fix(typescript): don't hardcode values in lua table (#2254)

* 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.

* fix(typescript): remove format settings entirely

* fix(typescript): add back comment and Lua annotations

* fix(typescript): bring back function call completion snippets
This commit is contained in:
Iordanis Petkakis 2024-01-21 21:28:16 +02:00 committed by GitHub
parent 8e2046f3d0
commit cbd9d700dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,21 +46,8 @@ return {
desc = "Remove Unused Imports", desc = "Remove Unused Imports",
}, },
}, },
---@diagnostic disable-next-line: missing-fields
settings = { settings = {
typescript = {
format = {
indentSize = vim.o.shiftwidth,
convertTabsToSpaces = vim.o.expandtab,
tabSize = vim.o.tabstop,
},
},
javascript = {
format = {
indentSize = vim.o.shiftwidth,
convertTabsToSpaces = vim.o.expandtab,
tabSize = vim.o.tabstop,
},
},
completions = { completions = {
completeFunctionCalls = true, completeFunctionCalls = true,
}, },
@ -69,6 +56,7 @@ return {
}, },
}, },
}, },
{ {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
optional = true, optional = true,