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
|
vim.lsp.config.clangd = {
cmd = { '/usr/local/bin/clangd19', '--background-index', '--function-arg-placeholders' },
root_markers = { 'compile_commands.json', 'compile_flags.txt' },
filetypes = { 'c', 'cpp' },
}
vim.lsp.config.lua_ls = {
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = {
globals = { 'vim' },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
telemetry = {
enable = false,
},
},
}
}
local project_library_path = "/home/t/.local/lib/node_modules"
local ng_cmd = { "ngserver", "--stdio", "--tsProbeLocations", project_library_path, "--ngProbeLocations",
project_library_path }
vim.lsp.config.angularls = {
cmd = ng_cmd,
on_new_config = function(new_config, new_root_dir)
new_config.cmd = ng_cmd
end,
}
vim.lsp.config.markdown_oxide = {
on_attach = on_attach,
cmd = {
'markdown-oxide'
}
}
vim.lsp.enable({
'clangd',
'lua_ls',
'angularls',
'cssls',
'html',
'ts_ls',
'vimls',
'jsonls',
'gopls',
'markdown_oxid'
})
vim.diagnostic.config({
virtual_text = true,
-- virtual_lines = true
})
|