mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(typescript): don't hardcode values in lua table
When a user changes `vim.opt.shiftwidth` with some auto-command, it's not taken into account. Make `opts` a function, so that values get evaluated when `lspconfig` loads instead.
This commit is contained in:
parent
879e29504d
commit
b9563799be
1 changed files with 49 additions and 52 deletions
|
|
@ -13,11 +13,8 @@ return {
|
||||||
-- correctly setup lspconfig
|
-- correctly setup lspconfig
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = function(_, opts)
|
||||||
-- make sure mason installs the server
|
opts.servers.tsserver = {
|
||||||
servers = {
|
|
||||||
---@type lspconfig.options.tsserver
|
|
||||||
tsserver = {
|
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>co",
|
"<leader>co",
|
||||||
|
|
@ -65,10 +62,10 @@ return {
|
||||||
completeFunctionCalls = true,
|
completeFunctionCalls = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
optional = true,
|
optional = true,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue