mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
feat(typescript): added extras for typescript
This commit is contained in:
parent
32de697753
commit
6c73e775cf
1 changed files with 29 additions and 0 deletions
29
lua/lazyvim/plugins/extras/lang/typescript.lua
Normal file
29
lua/lazyvim/plugins/extras/lang/typescript.lua
Normal file
|
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue