feat(typescript): added extras for typescript
This commit is contained in:
1 file changed
+29
@@ -0,0 +1,29 @@
|
|||||||
|
vim.notify("adding typescript")
|
||||||
|
return {
|
||||||
|
|
||||||
|
-- add typescript to treesitter
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.ensure_installed, "typescript")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- correctly setup lspconfig
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = { "jose-elias-alvarez/typescript.nvim" },
|
||||||
|
opts = {
|
||||||
|
-- make sure mason installs the server
|
||||||
|
servers = {
|
||||||
|
tsserver = {},
|
||||||
|
},
|
||||||
|
setup = {
|
||||||
|
tsserver = function(_, opts)
|
||||||
|
require("typescript").setup({ server = opts })
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in new issue
Block a user