mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Do not enable Rubocop as LSP if Solargraph is used
Solargraph already delegates some diagnostics to Rubocop by itself if it is installed on your system. However, if Rubocop is also enabled as an LSP while you're using Solargraph, then all Rubocop diagnostics are going to be duplicated and shown twice. Once from Solargraph after it calls Rubocop, and again by Rubocop separately running as an LSP.
This commit is contained in:
parent
13a4a84e34
commit
b3926d8987
1 changed files with 4 additions and 1 deletions
|
|
@ -36,7 +36,10 @@ return {
|
||||||
enabled = lsp == "solargraph",
|
enabled = lsp == "solargraph",
|
||||||
},
|
},
|
||||||
rubocop = {
|
rubocop = {
|
||||||
enabled = formatter == "rubocop",
|
-- If Solargraph and Rubocop are both enabled as an LSP,
|
||||||
|
-- diagnostics will be duplicated because Solargraph
|
||||||
|
-- already calls Rubocop if it is installed
|
||||||
|
enabled = formatter == "rubocop" and lsp ~= "solargraph",
|
||||||
},
|
},
|
||||||
standardrb = {
|
standardrb = {
|
||||||
enabled = formatter == "standardrb",
|
enabled = formatter == "standardrb",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue