mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-12-25 12:14:19 +01:00
fix(schemastore): use before_init instead of on_new_config to load schema store (#6427)
## Description `vim.lsp.config` doesn't provide `on_new_config`, which is causing `b0o/SchemaStore.nvim` fail to load. This PR replaces `on_new_config` with `before_init` fixing the issue. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
committed by
GitHub
parent
2f309fc8b5
commit
14d2a9baa1
@@ -27,7 +27,7 @@ return {
|
||||
servers = {
|
||||
jsonls = {
|
||||
-- lazy-load schemastore when needed
|
||||
on_new_config = function(new_config)
|
||||
before_init = function(_, new_config)
|
||||
new_config.settings.json.schemas = new_config.settings.json.schemas or {}
|
||||
vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas())
|
||||
end,
|
||||
|
||||
@@ -29,7 +29,7 @@ return {
|
||||
},
|
||||
},
|
||||
-- lazy-load schemastore when needed
|
||||
on_new_config = function(new_config)
|
||||
before_init = function(_, new_config)
|
||||
new_config.settings.yaml.schemas = vim.tbl_deep_extend(
|
||||
"force",
|
||||
new_config.settings.yaml.schemas or {},
|
||||
|
||||
Reference in New Issue
Block a user