-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom eslint settings not used #3211
Comments
I've also tried these solutions, however they did not seem to have an effect. |
I can not seem to get either For example, with this config:
, it behaves exactly as it does when the Removing it and no LSP is configured. If a Maybe related? #2797 |
I'm not sure because |
The setting you're looking for might be Setting |
I just tested I wasn't actually looking for a way to disable eslint though, that's what I did in my example to make it easy to understand. I was trying to change the value of |
Ah yea, I was looking for the same thing and that's how I found this issue What I discovered is since Neovim 10 the lsp is using pull diagnostics so the setting doesn't have an effect, because Neovim is explicitly requesting diagnostics when typing. Instead, you'll have to adjust the rate of neovim asking for diagnostics. I found two settings for the lsp setup function: Check out An alternative I didn't try was to change the capabilities in the setup to disable pull diagnostics for eslint, that way the |
I just tried and it works great! I was supposed to do something like this, right? require("lspconfig").eslint.setup({
flags = {
allow_incremental_sync = false,
debounce_text_changes = 1000,
},
})
I can try but I what would I need to set the capabilities to? I tried to print the default capabilities returned by
I expected to have a |
Yes! Glad it works
Hmm yea I think the lsp checks for So my plan was to get eslint's default capabilities, remove that one, and pass that to |
Hey, sorry for the delay, I've been pretty busy. I wasn't able to mess around with the eslint lsp capabilities but I got a solution to my initial problem. I saw that you created an issue on the neovim repo so I think the conversation can continue there and we can close this issue now. Thanks again for your very valuable help! |
Description
Passing custom settings to
require("lspconfig").eslint.setup()
doesn't seem to have any effect.Config
Expected behavior
I expect eslint not to report any diagnostics.
Actual behavior
Eslint still reports diagnostics.
What I tried
vscode-eslint-language-server
because theenable
option works as expected within vscode.setup
, and nothing made a difference.{ settings = { enable = false } }
{ settings = { eslint = { enable = false } } }
{ enable = false }
{ eslint = { enable = false } }
I don't know if this is a bug, or if I'm missing something. If this is just a misunderstanding of the configuration on my part, I'm sorry.
The text was updated successfully, but these errors were encountered: