fix(typescript): remove format settings entirely

This commit is contained in:
Iordanis Petkakis 2023-12-25 23:43:00 +02:00
parent b9563799be
commit 2cc9967713

View file

@ -13,57 +13,40 @@ return {
-- correctly setup lspconfig -- correctly setup lspconfig
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
opts = function(_, opts) opts = {
opts.servers.tsserver = { servers = {
keys = { tsserver = {
{ keys = {
"<leader>co", {
function() "<leader>co",
vim.lsp.buf.code_action({ function()
apply = true, vim.lsp.buf.code_action({
context = { apply = true,
only = { "source.organizeImports.ts" }, context = {
diagnostics = {}, only = { "source.organizeImports.ts" },
}, diagnostics = {},
}) },
end, })
desc = "Organize Imports", end,
}, desc = "Organize Imports",
{ },
"<leader>cR", {
function() "<leader>cR",
vim.lsp.buf.code_action({ function()
apply = true, vim.lsp.buf.code_action({
context = { apply = true,
only = { "source.removeUnused.ts" }, context = {
diagnostics = {}, only = { "source.removeUnused.ts" },
}, diagnostics = {},
}) },
end, })
desc = "Remove Unused Imports", end,
}, desc = "Remove Unused Imports",
},
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,
},
}, },
} },
end, },
}, },
{ {