1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2025-07-01 18:39:27 +00:00

[neovim] Fix yaml-companion

This commit is contained in:
2023-11-03 18:48:15 +01:00
parent d5c9273e44
commit fb9748c38d
4 changed files with 47 additions and 42 deletions

View File

@ -33,18 +33,20 @@ require("mason-lspconfig").setup({
local lspconfig = require("lspconfig")
for _, server in pairs(servers) do
local opts = {
on_attach = require("plugins.lsp.handlers").on_attach,
capabilities = require("plugins.lsp.handlers").capabilities,
}
if server ~= "yamlls" then
local opts = {
on_attach = require("plugins.lsp.handlers").on_attach,
capabilities = require("plugins.lsp.handlers").capabilities,
}
server = vim.split(server, "@")[1]
server = vim.split(server, "@")[1]
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
local config_exists, conf_opts = pcall(require, "plugins.lsp.settings." .. server)
if config_exists then
opts = vim.tbl_deep_extend("force", conf_opts, opts)
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
local config_exists, conf_opts = pcall(require, "plugins.lsp.settings." .. server)
if config_exists then
opts = vim.tbl_deep_extend("force", conf_opts, opts)
end
lspconfig[server].setup(opts)
end
lspconfig[server].setup(opts)
end

View File

@ -1,18 +0,0 @@
local cfg = require("yaml-companion").setup({
lspconfig = {
settings = {
redhat = {
telemetry = {
enabled = false,
},
},
-- yaml = {
-- schemas = {
-- ["https://custom/github-workflow.json"] = "/.github/workflows/*",
-- },
-- },
},
},
})
return cfg