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 authored and GitHub committed 2024-01-21 20:28:16 +01:00
1 parent 8e2046f3d0
commit cbd9d700dc
1 file changed
+2 -14
+2 -14
View File
@@ -46,21 +46,8 @@ return {
desc = "Remove Unused Imports",
},
},
---@diagnostic disable-next-line: missing-fields
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 = {
completeFunctionCalls = true,
},
@@ -69,6 +56,7 @@ return {
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,