-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
83 lines (72 loc) · 1.89 KB
/
init.lua
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
local LU = require("lspconfig.util")
local LC = require("lspconfig")
local C = require("alex.plugins.lang.lsp.config")
-- Setup LSPs.
LC.clangd.setup({
lsp_flags = C.lsp_flags,
capabilities = C.capabilities,
filetypes = { "c", "cpp", "objc", "objcpp" },
root_dir = LU.root_pattern(
".clangd",
".clang-tidy",
".clang-format",
"compile_commands.json",
"compile_flags.txt",
"configure.ac",
".git"
),
})
LC.cssls.setup({ C.default })
LC.nixd.setup({ C.default })
LC.lua_ls.setup({ C.default })
LC.julials.setup({ C.default })
LC.bashls.setup({ C.default })
LC.pyright.setup({ C.default })
LC.rust_analyzer.setup({ C.default })
LC.texlab.setup({ C.default })
LC.yamlls.setup({ C.default })
LC.gopls.setup({ C.default })
LC.terraformls.setup({ C.default })
LC.buf_ls.setup({ C.default })
LC.eslint.setup({
lsp_flags = C.lsp_flags,
capabilities = C.capabilities,
root_dir = LU.root_pattern({ "*.js", "*.ts" }),
})
LC.ts_ls.setup({
lsp_flags = C.lsp_flags,
capabilities = C.capabilities,
root_dir = LU.root_pattern({ "*.js", "*.ts" }),
})
LC.cmake.setup({
lsp_flags = C.lsp_flags,
capabilities = C.capabilities,
root_dir = LU.root_pattern("CMakeLists.txt"),
})
LC.dockerls.setup({
lsp_flags = C.lsp_flags,
capabilities = C.capabilities,
root_dir = LU.root_pattern({
"[dD]ockerfile*",
}),
})
LC.docker_compose_language_service.setup({
C.default.lsp_flags,
C.default.capabilities,
root_dir = LU.root_pattern({
"docker-compose.ya?ml",
"compose.ya?ml",
}),
})
LC.html.setup({
capabilities = C.capabilities,
lsp_flags = C.lsp_flags,
cmd = { "html-languageserver" },
})
LC.jsonls.setup({
capabilities = C.capabilities,
lsp_flags = C.lsp_flags,
cmd = { "json-languageserver", "--stdio" },
})
-- Extensions.
require("alex.plugins.lang.lsp.tsn")