-
-
Notifications
You must be signed in to change notification settings - Fork 892
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a defcustom to control default diagnostic severity.
Previously, there was a Flycheck specific defcustom, which was used to select a default error level for Flycheck. However, there was nothing for Flymake. Additionally, there were numerous other places in lsp-mode which query the severity attribute of the diagnostic, such as for statistics, modeline, headerline, etc. All of these were being handled inconsistently, either not at all (causing an error when the attribute was not sent by the server), ignoring it when it was missing (causing statistics to be inaccurate) or assuming a default of error, which might have been different than the Flycheck specific configuration, therefore causing an inconsistency in the modeline statistics vs what Flycheck would report. This change creates a common defcustom which is then used anywhere the diagnostic severity is needed, but was not provided by the server. This should create consistent statistics between the modeline and the back-end checkers. Additionally, the mapping between this defcustom and the checker specific values happens in the diagnostic package. Since this defcustom is used outside of the lsp-diagnostic package, it resides in the lsp-mode package and renamed more generally. Additionally, the Flycheck specific defcustom has been obsoleted.
- Loading branch information
Showing
4 changed files
with
56 additions
and
32 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