From d732fe7b59179560b6ff56ff6b0c228c186bacf0 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Wed, 1 Jul 2026 14:27:27 -0500 Subject: [PATCH] reenable lsps for common filetypes --- doc/smoketest.md | 11 ++++++++++- init.lua | 11 ++++++++--- lua/custom/plugins/typescript-tools.lua | 8 ++------ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/doc/smoketest.md b/doc/smoketest.md index 3ef6c8ce..1fadc999 100644 --- a/doc/smoketest.md +++ b/doc/smoketest.md @@ -41,4 +41,13 @@ Custom plugins should be working ## LSP -### Formatting +- [ ] LSP, autocomplete, and formatting should work for the following file types + - Javascript `.js`, `.jsx` + - Typescript `.ts`, `.tsx` + - Svelte `.svelte` + - C# `.cs` + - Lua `.lua` +- [ ] Mason should ensure that the following tools are installed + - Clangd + - Pyright + - Omnisharp diff --git a/init.lua b/init.lua index ff4b22c5..5f988bce 100644 --- a/init.lua +++ b/init.lua @@ -372,7 +372,7 @@ do { 's', group = '[S]earch', mode = { 'n', 'v' } }, { 't', group = '[T]oggle' }, { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first - -- TODO: LSP actions should be with the leader key + -- TODO: LSP actions (anything with `gr`) should be with the leader key { 'gr', group = 'LSP Actions', mode = { 'n' } }, }, } @@ -697,9 +697,9 @@ do -- See `:help lsp-config` for information about keys and how to configure ---@type table local servers = { - -- clangd = {}, + clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -708,6 +708,8 @@ do -- But for many setups, the LSP (`ts_ls`) will work just fine -- ts_ls = {}, + omnisharp = {}, -- Used to format C# code + stylua = {}, -- Used to format Lua code -- Special Lua Config, as recommended by neovim help docs @@ -765,6 +767,9 @@ do local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { -- You can add other tools here that you want Mason to install + 'clangd', + 'pyright', + 'omnisharp', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } diff --git a/lua/custom/plugins/typescript-tools.lua b/lua/custom/plugins/typescript-tools.lua index 4d2aea2f..f35d3fdb 100644 --- a/lua/custom/plugins/typescript-tools.lua +++ b/lua/custom/plugins/typescript-tools.lua @@ -1,6 +1,2 @@ ---TODO: fix/postmerge: what does this do? is it needed? does the typescript-language-server cover this? -return { - 'pmizio/typescript-tools.nvim', - dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' }, - opts = {}, -} +vim.pack.add { 'https://github.com/pmizio/typescript-tools.nvim' } +require('typescript-tools').setup {}