Add typescript.nvim

This commit is contained in:
Tyler Hallada 2023-12-01 15:26:00 -05:00
parent e67701c58b
commit 58fe16c3d8
4 changed files with 20 additions and 4 deletions

View File

@ -319,6 +319,12 @@ return require('packer').startup(function(use)
require('plugins.rust-tools-nvim')
end,
}
use {
'jose-elias-alvarez/typescript.nvim',
config = function()
require('plugins.typescript-nvim')
end,
}
use {
'tzachar/cmp-tabnine',
run = './install.sh',

View File

@ -15,10 +15,11 @@ require('lspconfig')['pyright'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
require('lspconfig')['tsserver'].setup({
on_attach = on_attach,
flags = lsp_flags,
})
-- Setup by typescript.nvim automatically
-- require('lspconfig')['tsserver'].setup({
-- on_attach = on_attach,
-- flags = lsp_flags,
-- })
require('lspconfig')['jsonls'].setup({
on_attach = on_attach,
flags = lsp_flags,

View File

@ -76,5 +76,7 @@ null_ls.setup({
-- Shells
-- Git
null_ls.builtins.code_actions.gitsigns,
-- Plugins
require('typescript.extensions.null-ls.code-actions'),
},
})

View File

@ -0,0 +1,7 @@
local on_attach = require('plugins.lsp.on_attach')
require('typescript').setup({
server = { -- pass options to lspconfig's setup method
on_attach = on_attach,
},
})