From 31474998d6935d48f678988c8a7a4fac7bb2ae72 Mon Sep 17 00:00:00 2001 From: ngharo Date: Fri, 29 Dec 2023 17:46:10 -0600 Subject: Inititial commit --- after/plugin/lsp.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 after/plugin/lsp.lua (limited to 'after/plugin/lsp.lua') diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua new file mode 100644 index 0000000..bf6a29d --- /dev/null +++ b/after/plugin/lsp.lua @@ -0,0 +1,31 @@ +local lsp_zero = require('lsp-zero') + +lsp_zero.on_attach(function(client, bufnr) + -- see :help lsp-zero-keybindings + -- to learn the available actions + lsp_zero.default_keymaps({buffer = bufnr}) +end) + + +local lspconfig = require('lspconfig') +lspconfig.gopls.setup{} +lspconfig.terraformls.setup{} +lspconfig.yamlls.setup { + settings = { + yaml = { + kubernetes = "*.{yaml,yml}", + ["http://json.schemastore.org/github-workflow"] = ".github/workflows/*", + ["http://json.schemastore.org/github-action"] = ".github/action.{yml,yaml}", + ["http://json.schemastore.org/ansible-stable-2.9"] = "roles/tasks/*.{yml,yaml}", + ["http://json.schemastore.org/prettierrc"] = ".prettierrc.{yml,yaml}", + ["http://json.schemastore.org/kustomization"] = "kustomization.{yml,yaml}", + ["http://json.schemastore.org/ansible-playbook"] = "*play*.{yml,yaml}", + ["http://json.schemastore.org/chart"] = "Chart.{yml,yaml}", + ["https://json.schemastore.org/dependabot-v2"] = ".github/dependabot.{yml,yaml}", + ["https://json.schemastore.org/gitlab-ci"] = "*gitlab-ci*.{yml,yaml}", + ["https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json"] = "*api*.{yml,yaml}", + ["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "*docker-compose*.{yml,yaml}", + ["https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json"] = "*flow*.{yml,yaml}", + } + } +} -- cgit v1.2.3