diff --git a/lua/lsp/yaml.lua b/lua/lsp/yaml.lua index e69de29..7990cc8 100644 --- a/lua/lsp/yaml.lua +++ b/lua/lsp/yaml.lua @@ -0,0 +1,12 @@ +return { + capabilities = require('cmp_nvim_lsp').default_capabilities(), + settings = { + yaml = { + schemas = { + ["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*", + ["../path/relative/to/file.yml"] = "/.github/workflows/*", + ["/path/from/root/of/project"] = "/.github/workflows/*", + }, + }, + } +} diff --git a/lua/plugs/nvim-lspconfig.lua b/lua/plugs/nvim-lspconfig.lua index 60e0243..d3b0fb2 100644 --- a/lua/plugs/nvim-lspconfig.lua +++ b/lua/plugs/nvim-lspconfig.lua @@ -46,8 +46,9 @@ return { require 'lspconfig'.clangd.setup(require('lsp.c')) require 'lspconfig'.bashls.setup(require('lsp.bash')) require 'lspconfig'.pyright.setup(require('lsp.pyright')) - require 'lspconfig'.jsonls.setup({}) - require('lspconfig').yamlls.setup(require("lsp.yaml")) + require 'lspconfig'.jsonls.setup {} + require 'lspconfig'.yamlls.setup(require('lsp.yaml')) + G.map({ { 'n', 'rn', 'lua vim.lsp.buf.rename()' }, @@ -60,6 +61,7 @@ return { { 'n', '', 'lua vim.lsp.buf.format()' }, }) + end }, diff --git a/lua/plugs/yaml.lua b/lua/plugs/yaml.lua deleted file mode 100644 index 2bd9f59..0000000 --- a/lua/plugs/yaml.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - settings = { - yaml = { - schemas = { - ["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*", - ["../path/relative/to/file.yml"] = "/.github/workflows/*", - ["/path/from/root/of/project"] = "/.github/workflows/*", - }, - }, - } -}