grace/dots

dotfiles/nix configs

git clone https://git.gae.moe/grace/dots

Grace Yoderhx and vcs changesddf0c79

idk
2.2 KiB114 linesraw
1vim.lsp.config('luals', {
2  on_attach = function()
3    print('luals is now active in this file')
4  end,
5})
6if not string.match(vim.g.hostname, "cs.purdue.edu") then
7  vim.lsp.enable("luals")
8end
9
10
11vim.lsp.config('pyright', {
12  on_attach = function()
13    print('pyright is now active in this file')
14  end,
15})
16
17vim.lsp.enable("pyright")
18-- vim.lsp.enable("basedpyright")
19
20vim.lsp.config('ty', {
21  on_attach = function()
22    print('ty is now active in this file')
23  end,
24})
25
26-- vim.lsp.enable("ty")
27vim.lsp.enable("ruff")
28
29
30
31vim.lsp.config('clangd', {
32  on_attach = function()
33    print('clangd is now active in this file')
34  end,
35})
36
37vim.lsp.enable("clangd")
38
39vim.lsp.config('tailwind-ls', {
40  on_attach = function()
41    print('tailwind-ls is now active in this file')
42  end,
43})
44
45vim.lsp.enable("tailwind-ls")
46
47vim.lsp.config('zls', {
48  on_attach = function()
49    print('zls is now active in this file')
50  end,
51})
52
53vim.lsp.enable("zls")
54-- vim.lsp.enable("zigscient")
55
56vim.lsp.enable("gopls")
57
58vim.lsp.enable("tinymist")
59
60-- vim.lsp.enable("cspell-ls")
61
62vim.lsp.enable("astro")
63
64vim.lsp.config('rust_analyzer', {
65  on_attach = function()
66    print('rust-analyzer is now active in this file')
67  end,
68})
69
70vim.lsp.enable("rust-analyzer")
71vim.lsp.enable("gdscript")
72vim.lsp.config('csharp-ls', {
73  on_attach = function()
74    print('csharp-ls is now active in this file')
75  end,
76})
77
78
79vim.lsp.enable("csharp-ls")
80
81vim.lsp.enable("asm-lsp")
82vim.lsp.enable("codebook")
83vim.lsp.enable("json")
84vim.lsp.enable("eslint")
85vim.lsp.enable("css")
86vim.lsp.enable("html")
87vim.lsp.enable("fish-lsp")
88
89
90
91vim.diagnostic.config({
92  virtual_text = { priority = 100 },
93})
94
95-- https://lsp-zero.netlify.app/blog/lsp-client-features.html
96
97vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
98vim.opt.shortmess:append('c')
99
100
101vim.api.nvim_create_autocmd("LspAttach", {
102  group = vim.api.nvim_create_augroup("lsp", { clear = true }),
103  callback = function(args)
104    vim.api.nvim_create_autocmd("BufWritePre", {
105      buffer = args.buf,
106      callback = function()
107        if vim.bo[args.buf].filetype == "typst" or vim.bo[args.buf].filetype == "c" then
108          return
109        end
110        vim.lsp.buf.format({ async = false, id = args.data.client_id })
111      end,
112    })
113  end
114})