aboutsummaryrefslogtreecommitdiff
path: root/config/nvim/lua
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2023-11-05 10:30:49 +0100
committerCharles Cabergs <me@cacharle.xyz>2023-11-05 10:30:49 +0100
commitbcae61af1ccf3e6033e5b73bb656b20b98a60019 (patch)
treea6d46589ded38c5c4eb7e1eff4cd310f3aefa979 /config/nvim/lua
parent38ecc1e25274e84db784b3179fb074236df789f9 (diff)
downloaddotfiles-bcae61af1ccf3e6033e5b73bb656b20b98a60019.tar.gz
dotfiles-bcae61af1ccf3e6033e5b73bb656b20b98a60019.tar.bz2
dotfiles-bcae61af1ccf3e6033e5b73bb656b20b98a60019.zip
Add yaml language server support
Diffstat (limited to 'config/nvim/lua')
-rw-r--r--config/nvim/lua/plugins.lua28
1 files changed, 15 insertions, 13 deletions
diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua
index 7319d17..c3a74b2 100644
--- a/config/nvim/lua/plugins.lua
+++ b/config/nvim/lua/plugins.lua
@@ -68,13 +68,12 @@ return require("packer").startup(function()
-- nvim lsp configuration
use {
"neovim/nvim-lspconfig",
- ft = {"rust", "python", "c", "cpp", "lua", "go", "haskell", "ocaml", "zig"},
+ ft = {"rust", "python", "c", "cpp", "lua", "go", "haskell", "ocaml", "zig", "yaml"},
config = function()
vim.diagnostic.config {
signs = false,
update_in_insert = false,
}
-
local on_attach = function(_, bufnr)
local opts = { noremap = true, silent = true }
local map = function(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
@@ -93,7 +92,6 @@ return require("packer").startup(function()
local capabilities = require("cmp_nvim_lsp").default_capabilities(
vim.lsp.protocol.make_client_capabilities()
)
-
-- $ go install golang.org/x/tools/gopls
lspconfig.gopls.setup {
on_attach = on_attach,
@@ -128,7 +126,6 @@ return require("packer").startup(function()
"BufWritePre",
{ callback = go_import_callback, pattern = "*.go", group = augroup }
)
-
-- lspconfig.clangd.setup { on_attach = on_attach }
lspconfig.rust_analyzer.setup { on_attach = on_attach }
-- need python-lsp-server and pyls-flake8
@@ -146,13 +143,6 @@ return require("packer").startup(function()
},
},
}
-
- -- brew install haskell-language-server
- lspconfig.hls.setup { on_attach = on_attach }
-
- -- opam install ocaml-lsp-server
- lspconfig.ocamllsp.setup { on_attach = on_attach }
-
-- package lua-language-server on ArchLinux
lspconfig.lua_ls.setup {
on_attach = on_attach ,
@@ -178,11 +168,23 @@ return require("packer").startup(function()
}
},
}
-
+ -- brew install haskell-language-server
+ lspconfig.hls.setup { on_attach = on_attach }
+ -- opam install ocaml-lsp-server
+ lspconfig.ocamllsp.setup { on_attach = on_attach }
lspconfig.clangd.setup { on_attach = on_attach }
-
-- pacman -S zls
lspconfig.zls.setup{}
+ -- pacman -S yaml-language-server
+ lspconfig.yamlls.setup {
+ settings = {
+ yaml = {
+ schemas = {
+ ["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.17.0-standalone-strict/all.json"] = "/*.k8s.yaml",
+ }
+ }
+ }
+ }
end,
}