Add typescript.nvim
This commit is contained in:
parent
e67701c58b
commit
58fe16c3d8
@ -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',
|
||||
|
@ -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,
|
||||
|
@ -76,5 +76,7 @@ null_ls.setup({
|
||||
-- Shells
|
||||
-- Git
|
||||
null_ls.builtins.code_actions.gitsigns,
|
||||
-- Plugins
|
||||
require('typescript.extensions.null-ls.code-actions'),
|
||||
},
|
||||
})
|
||||
|
7
lua/plugins/typescript-nvim.lua
Normal file
7
lua/plugins/typescript-nvim.lua
Normal 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,
|
||||
},
|
||||
})
|
Loading…
Reference in New Issue
Block a user