-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Using json schemas with jsonls and lspconfig breaks diagnostics #8
Comments
Thanks for reporting! This isn't an issue with SchemaStore.nvim, but it is an important behavior that I should describe in the documentation. This is due to the way nvim_lsp.jsonls.setup({
on_attach = on_attach,
capabilities = capabilities,
settings = {
json = {
validate = { enable = true },
schemas = require("schemastore").json.schemas(),
},
},
})
|
For reference, here is the
If you wanted, you could open an issue there and suggest that the default values should be kept if the settings doesn't include a certain key. They have over 6k open issues, though, so I have my doubts that it would be fixed any time soon. |
Ah, that's so helpful, thank you! I definitely agree that it's counter-intuitive to flip default settings when another setting is changed.. But that definitely addresses the issue on my end. Again, much appreciated :) |
Needed to specify `validate = true` because apparently these defaults get flipped when setting up the `schemas`.. b0o/SchemaStore.nvim#8 (comment)
Hi,
Apologies if this is the wrong repo to report this too, but I've narrowed down nvim not showing diagnostics for json files to the configuration used to reference the schemastore json schemas.
Specifically, adding this to the lsp
setup
stops diagnostics from rendering in nvim (though I do see them in the LSP log if I usedebug
)lsp log:
minimal
init.lua
(borrowed from lspconfig and modified for this issue)The text was updated successfully, but these errors were encountered: