Skip to content

[#2113] Update diagnostics as soon `max diagnostics` setting changes

Motivation and Context

Problem: when the user updates max diagnostics parameter in settings, no changes take effect before first edit in the file. This may be confusing/annoying.

Solution: when max diagnostic changes, update diagnostics in all the opened files. I hope its fine, since diagnostics run is expected to be very cheap.

I'm not sure whether we need to apply a similar thing to other options, most of them concern point-like events (log, formatting, request to certain feature) unlike diagnostics that is displayed continuously. Only the completion implementation setting may be worth a special treatment.

Related issues

Resolves #2113 (closed) .

Checklist for the LIGO Language Server

  • I checked whether I need to update the file for the plugin and did so if necessary:
    • If I implemented a new LSP request, I added it to the list of supported features that may be disabled
    • If I implemented a new LSP method, I added it to the list of supported functionality
  • I checked that my changes work in Emacs, Vim, and Visual Studio Code (Checked VSCode only as only it is concerned)
  • (Before merging) The commit history is squashed and prettified, and follows the Serokell commit policy, or the MR is set to squash the commits



  • compiler
  • website
  • webide
  • vscode-plugin
  • debugger

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)


Diagnostics will be updated automatically after changing Max Number of Problems config option.


  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).
Edited by Konstantin Ivanov

Merge request reports