[neovim] Improve yamlls/companion configuration

This commit is contained in:
Daniel Carrillo 2023-07-09 18:19:20 +02:00
parent 9a6d586be1
commit 83e533b928
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
4 changed files with 16 additions and 9 deletions

View File

@ -2,7 +2,6 @@ require("plugins.lsp.mason")
require("plugins.lsp.handlers").setup()
require("plugins.lsp.null-ls")
require("plugins.lsp.lsp-saga")
require("plugins.lsp.yaml-companion")
local win = require("lspconfig.ui.windows")
win.default_options.border = "rounded"

View File

@ -40,6 +40,7 @@ for _, server in pairs(servers) do
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)

View File

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

View File

@ -1,2 +0,0 @@
local cfg = require("yaml-companion").setup({})
require("lspconfig")["yamlls"].setup(cfg)