forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for LSP diagnostics on change.
Fixes godotengine#87410. Currently the LSP sends diagnostics on every change. This means that if you're typing `var thread := Thread.new()`, the language server sends a diagnostic after every keypress: ``` "Expected variable name after \"var\"." "Expected variable name after \"var\"." "(UNUSED_VARIABLE): The local variable \"t\" is declared but never used in the block. If this is intended "(UNUSED_VARIABLE): The local variable \"th\" is declared but never used in the block. If this is intended "(UNUSED_VARIABLE): The local variable \"thr\" is declared but never used in the block. If this is intended "(UNUSED_VARIABLE): The local variable \"thre\" is declared but never used in the block. If this is intended "(UNUSED_VARIABLE): The local variable \"threa\" is declared but never used in the block. If this is intended "(UNUSED_VARIABLE): The local variable \"thread\" is declared but never used in the block. If this is intended "(UNUSED_VARIABLE): The local variable \"thread\" is declared but never used in the block. If this is intended "Expected type after \":\"" "Expected expression for variable initial value after \"=\"." "Expected expression for variable initial value after \"=\"." ``` This causes the LSP to be slow and the diagnositcs aren't that helpful. This patch adds a "Diagnostics on Change" option, which defaults on to maintain existing behavior. When toggled off, diagnostics are only sent on open/save, and not on every change.
- Loading branch information
Showing
5 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters