feat(nvim): moar lsp server

Add cuelsp, jsonls, and yamlls.
This commit is contained in:
João Paulo Dubas 2024-05-20 18:31:54 +00:00
parent 5e38d5886a
commit db9784f96d
Signed by: joao.dubas
SSH Key Fingerprint: SHA256:V1mixgOGRc/YMhGx/DNkOSmJxgA2vHNrDZEk3wt/kOA

View File

@ -1,5 +1,5 @@
diff --git a/init.lua b/init.lua
index 88658ef..d9e96ee 100644
index 88658ef..5887aaa 100644
--- a/init.lua
+++ b/init.lua
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
@ -39,10 +39,11 @@ index 88658ef..d9e96ee 100644
-- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`
@@ -578,6 +586,18 @@ require('lazy').setup({
@@ -578,6 +586,28 @@ require('lazy').setup({
-- tsserver = {},
--
+ cuelsp = {},
+ elixirls = {
+ elixirLS = {
+ dialyzerEnabled = true,
@ -55,10 +56,19 @@ index 88658ef..d9e96ee 100644
+ helm_ls = {},
+ html = { filetypes = { 'html', 'twig', 'hbs' } },
+ htmx = {},
+ jsonls = {
+ settings = {
+ json = {
+ -- schemas = {
+ -- ["https://raw.githubusercontent.com/woodpecker-ci/woodpecker/main/pipeline/frontend/yaml/linter/schema/schema.json"] = "renovate.json",
+ -- },
+ },
+ },
+ },
lua_ls = {
-- cmd = {...},
-- filetypes = { ...},
@@ -592,6 +612,10 @@ require('lazy').setup({
@@ -592,6 +622,32 @@ require('lazy').setup({
},
},
},
@ -66,10 +76,32 @@ index 88658ef..d9e96ee 100644
+ templ = {},
+ terraformls = {},
+ tsserver = {},
+ yamlls = {
+ settings = {
+ yaml = {
+ schemas = {
+ ["https://json.schemastore.org/chart.json"] = "Chart.{yml,yaml}",
+ ["https://json.schemastore.org/drone.json"] = ".drone.{yml,yaml}",
+ ["https://json.schemastore.org/github-action.json"] = ".github/action.{yml,yaml}",
+ ["https://json.schemastore.org/github-workflow.json"] = ".github/workflows/*",
+ ["https://json.schemastore.org/kustomization.json"] = "kustomization.{yml,yaml}",
+ ["https://json.schemastore.org/prettierrc.json"] = ".prettierrc.{yml,yaml}",
+ ["https://json.schemastore.org/circleciconfig.json"] = ".circleci/config.{yml,yaml}",
+ ["https://json.schemastore.org/dependabot-v2"] = ".github/dependabot.{yml,yaml}",
+ ["https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json"] = "*api*.{yml,yaml}",
+ ["https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/playbook"] = "*play*.{yml,yaml}",
+ ["https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks"] = "roles/tasks/*.{yml,yaml}",
+ ["https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json"] = "*flow*.{yml,yaml}",
+ ["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "*docker-compose*.{yml,yaml}",
+ -- kubernetes = "*.{yml,yaml}",
+ }
+ }
+ }
+ }
}
-- Ensure the servers and tools above are installed
@@ -618,6 +642,33 @@ require('lazy').setup({
@@ -618,6 +674,33 @@ require('lazy').setup({
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver)
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
@ -103,7 +135,7 @@ index 88658ef..d9e96ee 100644
require('lspconfig')[server_name].setup(server)
end,
},
@@ -835,7 +886,38 @@ require('lazy').setup({
@@ -835,7 +918,38 @@ require('lazy').setup({
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
@ -143,7 +175,7 @@ index 88658ef..d9e96ee 100644
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
@@ -874,18 +956,18 @@ require('lazy').setup({
@@ -874,18 +988,18 @@ require('lazy').setup({
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',