aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nvim
diff options
context:
space:
mode:
Diffstat (limited to 'nvim')
-rw-r--r--nvim/.config/nvim/lua/plugins/schemastore.lua32
-rw-r--r--nvim/.config/nvim/lua/tobyvin/lsp/configs.lua24
2 files changed, 39 insertions, 17 deletions
diff --git a/nvim/.config/nvim/lua/plugins/schemastore.lua b/nvim/.config/nvim/lua/plugins/schemastore.lua
index e358945..4be26bd 100644
--- a/nvim/.config/nvim/lua/plugins/schemastore.lua
+++ b/nvim/.config/nvim/lua/plugins/schemastore.lua
@@ -4,9 +4,35 @@ local M = {
}
function M.init()
- require("tobyvin.lsp.configs").jsonls.on_new_config = 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())
+ local lsp_settings = {
+ jsonls = {
+ settings = {
+ json = {
+ validate = {
+ enable = true,
+ },
+ schemas = require("schemastore").json.schemas(),
+ },
+ },
+ },
+ yamlls = {
+ settings = {
+ yaml = {
+ schemaStore = {
+ enable = false,
+ url = "",
+ },
+ schemas = require("schemastore").yaml.schemas(),
+ },
+ },
+ },
+ }
+
+ for name, override in vim.iter(lsp_settings) do
+ local config = require("tobyvin.lsp.configs")[name]
+ if config then
+ require("tobyvin.lsp.configs")[name] = vim.tbl_extend("force", config, override)
+ end
end
end
diff --git a/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua b/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua
index 28b41d4..4fb369c 100644
--- a/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua
+++ b/nvim/.config/nvim/lua/tobyvin/lsp/configs.lua
@@ -12,7 +12,16 @@ local M = {
},
},
},
- -- biome = {},
+ biome = {
+ capabilities = {
+ textDocument = {
+ rangeFormatting = { dynamicRegistration = true },
+ onTypeFormatting = { dynamicRegistration = true },
+ formatting = { dynamicRegistration = true },
+ typeDefinition = { dynamicRegistration = true },
+ },
+ },
+ },
clangd = {},
cssls = {
handlers = {
@@ -46,18 +55,6 @@ local M = {
"htmldjango",
},
},
- jsonls = {
- settings = {
- json = {
- format = {
- enable = true,
- },
- validate = {
- enable = true,
- },
- },
- },
- },
lua_ls = {
settings = {
Lua = {
@@ -158,7 +155,6 @@ local M = {
vim.keymap.set("n", "gx", vim.cmd.TexlabForward, { desc = "open in pdf" })
end,
},
- tsserver = {},
typos_lsp = {
filetypes = {
"eml",