diff options
| author | gyoder <70408179+gyoder@users.noreply.github.com> | 2025-12-28 15:38:19 -0700 |
|---|---|---|
| committer | gyoder <70408179+gyoder@users.noreply.github.com> | 2025-12-28 15:38:19 -0700 |
| commit | a01bb5c0ed3c1a05a00bab07558b20097293dda4 (patch) | |
| tree | bfb37ac1411a812affb8e1f625a1ac20e9712d01 /vim/.config/nvim/lua/native-lsp.lua | |
| parent | 428c884e0d4472fbb8c369632770a3331a814023 (diff) | |
shrug, i forgor
Diffstat (limited to 'vim/.config/nvim/lua/native-lsp.lua')
| -rw-r--r-- | vim/.config/nvim/lua/native-lsp.lua | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/vim/.config/nvim/lua/native-lsp.lua b/vim/.config/nvim/lua/native-lsp.lua index e31468c..162533d 100644 --- a/vim/.config/nvim/lua/native-lsp.lua +++ b/vim/.config/nvim/lua/native-lsp.lua @@ -15,6 +15,7 @@ vim.lsp.config('pyright', { }) vim.lsp.enable("pyright") +-- vim.lsp.enable("basedpyright") vim.lsp.config('ty', { on_attach = function() @@ -49,6 +50,7 @@ vim.lsp.config('zls', { }) vim.lsp.enable("zls") +-- vim.lsp.enable("zigscient") vim.lsp.enable("gopls") @@ -58,8 +60,40 @@ 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") + -- https://lsp-zero.netlify.app/blog/lsp-client-features.html -vim.opt.completeopt = {'menu', 'menuone', 'noselect', 'noinsert'} +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 +}) |
