]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/nvim/lua/config/lsp.lua
Usability(neovim): adjust theme colors
[julm/julm-nix.git] / home-manager / profiles / nvim / lua / config / lsp.lua
1 local capabilities = vim.lsp.protocol.make_client_capabilities()
2 vim.lsp.config["*"] = { capabilities = capabilities, enable = true }
3 vim.lsp.enable({
4 "bash-ls",
5 "lua-language-server",
6 "nil",
7 })
8 vim.diagnostic.config({
9 ["signs"] = true,
10 ["underline"] = true,
11 ["update_in_insert"] = false,
12 ["virtual_lines"] = false,
13 ["virtual_text"] = true,
14 })
15
16 vim.lsp.config["bash-ls"] = {
17 cmd = { "bash-language-server", "start" },
18 enable = true,
19 filetypes = { "bash", "sh" },
20 root_markers = { ".git" },
21 settings = { basheIde = { globPattern = vim.env.GLOB_PATTERN or "*@(.sh|.inc|.bash|.command)" } },
22 }
23 vim.lsp.config["lua-language-server"] = {
24 cmd = { "lua-language-server" },
25 enable = true,
26 filetypes = { "lua" },
27 root_markers = {
28 ".luarc.json",
29 ".luarc.jsonc",
30 ".luacheckrc",
31 ".stylua.toml",
32 "stylua.toml",
33 "selene.toml",
34 "selene.yml",
35 ".git",
36 },
37 }
38 vim.lsp.config["nil"] = {
39 cmd = { "nil" },
40 enable = true,
41 filetypes = { "nix" },
42 root_markers = { ".git", "flake.nix" },
43 settings = {
44 ["nil"] = {
45 formatting = { command = { "nixfmt" } },
46 },
47 },
48 }