mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
fix(typescript): allow easier merging of ts plugins
This commit is contained in:
parent
c4b7505969
commit
cf6775a959
2 changed files with 12 additions and 9 deletions
|
@ -108,17 +108,20 @@ return {
|
|||
-- disable tsserver
|
||||
return true
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = function(_, opts)
|
||||
vtsls = function(_, opts)
|
||||
-- copy typescript settings to javascript
|
||||
opts.servers.vtsls.settings.javascript = vim.deepcopy(opts.servers.vtsls.settings.typescript)
|
||||
opts.settings.javascript =
|
||||
vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {})
|
||||
local plugins = vim.tbl_get(opts.settings, "vtsls", "tsserver", "globalPlugins")
|
||||
-- allow plugins to have a key for proper merging
|
||||
-- remove the key here
|
||||
if plugins then
|
||||
opts.settings.vtsls.tsserver.globalPlugins = vim.tbl_values(plugins)
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
|
|
|
@ -32,7 +32,7 @@ return {
|
|||
tsserver = {
|
||||
globalPlugins = {
|
||||
-- Use typescript language server along with vue typescript plugin
|
||||
{
|
||||
vue = {
|
||||
name = "@vue/typescript-plugin",
|
||||
location = vue_typescript_plugin,
|
||||
languages = { "vue" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue