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,18 +108,21 @@ return {
|
||||||
-- disable tsserver
|
-- disable tsserver
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
vtsls = function(_, opts)
|
||||||
|
-- copy typescript settings to javascript
|
||||||
|
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,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
opts = function(_, opts)
|
|
||||||
-- copy typescript settings to javascript
|
|
||||||
opts.servers.vtsls.settings.javascript = vim.deepcopy(opts.servers.vtsls.settings.typescript)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
optional = true,
|
optional = true,
|
||||||
|
|
|
@ -32,7 +32,7 @@ return {
|
||||||
tsserver = {
|
tsserver = {
|
||||||
globalPlugins = {
|
globalPlugins = {
|
||||||
-- Use typescript language server along with vue typescript plugin
|
-- Use typescript language server along with vue typescript plugin
|
||||||
{
|
vue = {
|
||||||
name = "@vue/typescript-plugin",
|
name = "@vue/typescript-plugin",
|
||||||
location = vue_typescript_plugin,
|
location = vue_typescript_plugin,
|
||||||
languages = { "vue" },
|
languages = { "vue" },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue