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')
|
require('plugins.rust-tools-nvim')
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
use {
|
||||||
|
'jose-elias-alvarez/typescript.nvim',
|
||||||
|
config = function()
|
||||||
|
require('plugins.typescript-nvim')
|
||||||
|
end,
|
||||||
|
}
|
||||||
use {
|
use {
|
||||||
'tzachar/cmp-tabnine',
|
'tzachar/cmp-tabnine',
|
||||||
run = './install.sh',
|
run = './install.sh',
|
||||||
|
@ -15,10 +15,11 @@ require('lspconfig')['pyright'].setup({
|
|||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
})
|
})
|
||||||
require('lspconfig')['tsserver'].setup({
|
-- Setup by typescript.nvim automatically
|
||||||
on_attach = on_attach,
|
-- require('lspconfig')['tsserver'].setup({
|
||||||
flags = lsp_flags,
|
-- on_attach = on_attach,
|
||||||
})
|
-- flags = lsp_flags,
|
||||||
|
-- })
|
||||||
require('lspconfig')['jsonls'].setup({
|
require('lspconfig')['jsonls'].setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
|
@ -76,5 +76,7 @@ null_ls.setup({
|
|||||||
-- Shells
|
-- Shells
|
||||||
-- Git
|
-- Git
|
||||||
null_ls.builtins.code_actions.gitsigns,
|
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