reenable lsps for common filetypes
This commit is contained in:
parent
7f27bec887
commit
d732fe7b59
|
|
@ -41,4 +41,13 @@ Custom plugins should be working
|
||||||
|
|
||||||
## LSP
|
## 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
|
||||||
|
|
|
||||||
11
init.lua
11
init.lua
|
|
@ -372,7 +372,7 @@ do
|
||||||
{ '<leader>s', group = '[S]earch', mode = { 'n', 'v' } },
|
{ '<leader>s', group = '[S]earch', mode = { 'n', 'v' } },
|
||||||
{ '<leader>t', group = '[T]oggle' },
|
{ '<leader>t', group = '[T]oggle' },
|
||||||
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first
|
{ '<leader>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' } },
|
{ 'gr', group = 'LSP Actions', mode = { 'n' } },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -697,9 +697,9 @@ do
|
||||||
-- See `:help lsp-config` for information about keys and how to configure
|
-- See `:help lsp-config` for information about keys and how to configure
|
||||||
---@type table<string, vim.lsp.Config>
|
---@type table<string, vim.lsp.Config>
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
-- pyright = {},
|
pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
--
|
--
|
||||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
-- 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
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
||||||
-- ts_ls = {},
|
-- ts_ls = {},
|
||||||
|
|
||||||
|
omnisharp = {}, -- Used to format C# code
|
||||||
|
|
||||||
stylua = {}, -- Used to format Lua code
|
stylua = {}, -- Used to format Lua code
|
||||||
|
|
||||||
-- Special Lua Config, as recommended by neovim help docs
|
-- Special Lua Config, as recommended by neovim help docs
|
||||||
|
|
@ -765,6 +767,9 @@ do
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
-- You can add other tools here that you want Mason to install
|
-- You can add other tools here that you want Mason to install
|
||||||
|
'clangd',
|
||||||
|
'pyright',
|
||||||
|
'omnisharp',
|
||||||
})
|
})
|
||||||
|
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,2 @@
|
||||||
--TODO: fix/postmerge: what does this do? is it needed? does the typescript-language-server cover this?
|
vim.pack.add { 'https://github.com/pmizio/typescript-tools.nvim' }
|
||||||
return {
|
require('typescript-tools').setup {}
|
||||||
'pmizio/typescript-tools.nvim',
|
|
||||||
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
|
|
||||||
opts = {},
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue