aboutsummaryrefslogtreecommitdiff
path: root/lua/pml68/lsp.lua
blob: 08a6b00187769a810f656b6f195607ddb4028036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
local servers = {
  -- "asm_lsp",
  "html",
  "ts_ls",
  "cssls",
  "svelte",
  "bashls",
  "clangd",
  "pyright",
  "emmet_language_server",
  "jsonls",
  "rust_analyzer",
  "kotlin_lsp",
  "lua_ls",
  "glsl_analyzer",
  "csharp_ls",
  "gopls",
  "unocss",
}

vim.api.nvim_create_autocmd({ "BufEnter" }, {
  pattern = { "build.sh", "*.subpackage.sh", "PKGBUILD", "*.install",
    "makepkg.conf", "*.ebuild", "*.eclass", "color.map", "make.conf" },
  callback = function()
    vim.lsp.start({
      name = "termux",
      cmd = { "termux-language-server" }
    })
  end,
})

vim.lsp.config('*', {
  -- capabilities = vim.tbl_deep_extend("force",
  --   vim.lsp.protocol.make_client_capabilities(),
  --   require('cmp_nvim_lsp').default_capabilities()),
  on_attach = function(client, bufnr)
    require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr)
  end
})

vim.lsp.enable(servers)