-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlsp.lua
More file actions
56 lines (56 loc) · 1.78 KB
/
lsp.lua
File metadata and controls
56 lines (56 loc) · 1.78 KB
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
---@module 'snacks'
return {
"neovim/nvim-lspconfig",
dependencies = {
{ "j-hui/fidget.nvim", opts = {} },
},
config = function()
vim.diagnostic.config({
virtual_lines = { current_line = false },
virtual_text = false,
underline = true,
update_in_insert = false,
severity_sort = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.HINT] = "",
[vim.diagnostic.severity.INFO] = ""
},
},
})
vim.api.nvim_create_autocmd("CursorHold", {
pattern = "*",
callback = function()
vim.diagnostic.config({ virtual_lines = { current_line = true } })
end,
desc = "Enable virtual_lines with current_line",
})
vim.api.nvim_create_autocmd("CursorMoved", {
pattern = "*",
callback = function()
vim.diagnostic.config({ virtual_lines = false })
end,
desc = "Disable virtual_lines",
})
vim.filetype.add {
pattern = {
["docker-compose.yaml"] = "yaml.docker-compose",
["docker-compose.yml"] = "yaml.docker-compose",
["compose.yaml"] = "yaml.docker-compose",
["compose.yml"] = "yaml.docker-compose",
},
}
vim.lsp.enable({
"lua_ls",
"clangd",
"pyright",
"rust_analyzer",
"bashls",
"docker_compose_language_service",
"dockerls",
"neocmake",
})
end,
}