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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
vim.lsp.config('luals', {
on_attach = function()
print('luals is now active in this file')
end,
})
if not string.match(vim.g.hostname, "cs.purdue.edu") then
vim.lsp.enable("luals")
end
vim.lsp.config('pyright', {
on_attach = function()
print('pyright is now active in this file')
end,
})
vim.lsp.enable("pyright")
-- vim.lsp.enable("basedpyright")
vim.lsp.config('ty', {
on_attach = function()
print('ty is now active in this file')
end,
})
-- vim.lsp.enable("ty")
vim.lsp.config('clangd', {
on_attach = function()
print('clangd is now active in this file')
end,
})
vim.lsp.enable("clangd")
vim.lsp.config('tailwind-ls', {
on_attach = function()
print('tailwind-ls is now active in this file')
end,
})
vim.lsp.enable("tailwind-ls")
vim.lsp.config('zls', {
on_attach = function()
print('zls is now active in this file')
end,
})
vim.lsp.enable("zls")
-- vim.lsp.enable("zigscient")
vim.lsp.enable("gopls")
vim.lsp.enable("tinymist")
vim.lsp.enable("cspell-ls")
vim.lsp.enable("astro")
vim.lsp.config('rust_analyzer', {
on_attach = function()
print('rust-analyzer is now active in this file')
end,
})
vim.lsp.enable("rust-analyzer")
vim.lsp.enable("gdscript")
vim.lsp.config('csharp-ls', {
on_attach = function()
print('csharp-ls is now active in this file')
end,
})
vim.lsp.enable("csharp-ls")
vim.lsp.enable("asm-lsp")
vim.lsp.enable("codebook")
vim.lsp.enable("json")
vim.lsp.enable("eslint")
vim.lsp.enable("css")
vim.lsp.enable("html")
vim.lsp.enable("fish-lsp")
-- https://lsp-zero.netlify.app/blog/lsp-client-features.html
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
vim.opt.shortmess:append('c')
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("lsp", { clear = true }),
callback = function(args)
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = args.buf,
callback = function()
if vim.bo[args.buf].filetype == "typst" or vim.bo[args.buf].filetype == "c" then
return
end
vim.lsp.buf.format({ async = false, id = args.data.client_id })
end,
})
end
})
|