aboutsummaryrefslogtreecommitdiffstats
path: root/lua/pi/lsp/default.lua
blob: b2020db6e4de849f97c663606adc4081bba727a1 (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
42
43
return {
  mason = {
    enable = true,
    auto_install = false,
  },
  servers = {
    emmet_ls = { enable = true },
    gopls = { enable = true },
    html = { enable = true },
    jsonls = { enable = true },
    lua_ls = { enable = true, neodev = true },
    -- nil_ls = { enable = true },
    phpactor = {enable = true },
    -- rust_analyzer = { enable = true },
    svelte = { enable = true },
    tailwindcss = { enable = true, filetypes = {"blade", "html", "svelte"} },
    ts_ls = { enable = true },
    volar = { enable = true },
    texlab = { enable = true, filetypes = {"tex", "bib"} },
    pyright = { enable = true, filetypes = {"python"} },
    kotlin_language_server = { enable = true, filetypes = {"kotlin"}, root_dir = require("lspconfig.util").root_pattern(
      "build.gradle.kts",
      "pom.xml",
      ".git"
    ) },
    smarty_ls = {
      enable = true,
      filetypes = {"smarty"},
      root_dir = require("lspconfig.util").root_pattern("composer.json", ".git"),
    },
    clangd = {
      enable = true,
      filetypes = {"c", "cpp", "objc", "objcpp", "cuda", "proto" },
      root_dir = require("lspconfig.util").root_pattern("compile_commands.json", ".git"),
    },
  },
  default_options = function (options)
    return vim.tbl_deep_extend("force", {
      on_attach = require"pi.lsp.attach",
      flags = require "pi.lsp.flags",
    }, options)
  end,
}