summaryrefslogtreecommitdiff
path: root/vim/.config/nvim/lua/native-lsp.lua
diff options
context:
space:
mode:
authorGrace Yoder <grace_yoder@outlook.com>2026-09-03 15:36:32 -0400
committerGrace Yoder <grace_yoder@outlook.com>2026-09-03 15:37:10 -0400
commit22b6712c240fea0643cfc01acfce1fda1f125b8a (patch)
treefb8ac2302793c76d3640aab7d3f74f7a57c01933 /vim/.config/nvim/lua/native-lsp.lua
nix init
Diffstat (limited to 'vim/.config/nvim/lua/native-lsp.lua')
-rw-r--r--vim/.config/nvim/lua/native-lsp.lua114
1 files changed, 114 insertions, 0 deletions
diff --git a/vim/.config/nvim/lua/native-lsp.lua b/vim/.config/nvim/lua/native-lsp.lua
new file mode 100644
index 0000000..ee97f80
--- /dev/null
+++ b/vim/.config/nvim/lua/native-lsp.lua
@@ -0,0 +1,114 @@
+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.enable("ruff")
+
+
+
+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")
+
+
+
+vim.diagnostic.config({
+ virtual_text = { priority = 100 },
+})
+
+-- 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
+})