grace/dots
dotfiles/nix configs
git clone https://git.gae.moe/grace/dots
ddf0c79
wafrn-testing
1vim . lsp . config ( 'luals' , { 2on_attach =function () 3( 'luals is now active in this file' ) 4end , 5} ) 6if not string . match ( vim . g . hostname , "cs.purdue.edu" ) then 7vim . lsp . enable ( "luals" ) 8end 9 10 11vim . lsp . config ( 'pyright' , { 12on_attach =function () 13( 'pyright is now active in this file' ) 14end , 15} ) 16 17vim . lsp . enable ( "pyright" ) 18-- vim.lsp.enable("basedpyright") 19 20vim . lsp . config ( 'ty' , { 21on_attach =function () 22( 'ty is now active in this file' ) 23end , 24} ) 25 26-- vim.lsp.enable("ty") 27vim . lsp . enable ( "ruff" ) 28 29 30 31vim . lsp . config ( 'clangd' , { 32on_attach =function () 33( 'clangd is now active in this file' ) 34end , 35} ) 36 37vim . lsp . enable ( "clangd" ) 38 39vim . lsp . config ( 'tailwind-ls' , { 40on_attach =function () 41( 'tailwind-ls is now active in this file' ) 42end , 43} ) 44 45vim . lsp . enable ( "tailwind-ls" ) 46 47vim . lsp . config ( 'zls' , { 48on_attach =function () 49( 'zls is now active in this file' ) 50end , 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' , { 65on_attach =function () 66( 'rust-analyzer is now active in this file' ) 67end , 68} ) 69 70vim . lsp . enable ( "rust-analyzer" ) 71vim . lsp . enable ( "gdscript" ) 72vim . lsp . config ( 'csharp-ls' , { 73on_attach =function () 74( 'csharp-ls is now active in this file' ) 75end , 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 ( { 92virtual_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" , { 102group =vim . api . nvim_create_augroup ( "lsp" , { clear =true } ), 103callback =function ( args ) 104vim . api . nvim_create_autocmd ( "BufWritePre" , { 105buffer =args . buf , 106callback =function () 107if vim . bo [ args . buf ]. filetype == "typst" or vim . bo [ args . buf ]. filetype == "c" then 108return 109end 110vim . lsp . buf . format ( { async =false , id =args . data . client_id } ) 111end , 112} ) 113end 114} )