I decided to take a different approach with respect to the default severity level. Instead of adding an additional defcustom for Flymake (which seemed clunky to have two separate configurations for the same thing), I decided to make it more general and elevate it out of lsp-diagnostics to lsp-mode. The reason for this is because there were multiple places that really need this value. The lsp-modeline, lsp-headerline, lsp-mode and lsp-diagnostics all need this information. I also noticed that in those places the absence of the severity provided by the server manifested differently. Some didn't handle it at all (which caused an error to be raised), some ignored it completely, and some hard-coded it as an "error", which might have been inconsistent to the existing Flymake defcustom. Due to the needs outside of the lsp-diagnostics package, I made this more general. Now, any place that needs the severity and it isn't provided, will utilize this defcustom.
On a side note, I have also seen lsp-treemacs cause an error as well, since it's not checking whether the server provided a severity before attempting to use it, but that's another fix in another repo, lol.
I decided to take a different approach with respect to the default severity level. Instead of adding an additional
defcustom
for Flymake (which seemed clunky to have two separate configurations for the same thing), I decided to make it more general and elevate it out oflsp-diagnostics
tolsp-mode
. The reason for this is because there were multiple places that really need this value. Thelsp-modeline
,lsp-headerline
,lsp-mode
andlsp-diagnostics
all need this information. I also noticed that in those places the absence of the severity provided by the server manifested differently. Some didn't handle it at all (which caused an error to be raised), some ignored it completely, and some hard-coded it as an "error", which might have been inconsistent to the existing Flymakedefcustom
. Due to the needs outside of thelsp-diagnostics
package, I made this more general. Now, any place that needs the severity and it isn't provided, will utilize thisdefcustom
.On a side note, I have also seen
lsp-treemacs
cause an error as well, since it's not checking whether the server provided a severity before attempting to use it, but that's another fix in another repo, lol.