From 2cc996771375784222d4d8d83b38cf056c67b74a Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis Date: Mon, 25 Dec 2023 23:43:00 +0200 Subject: [PATCH] fix(typescript): remove format settings entirely --- .../plugins/extras/lang/typescript.lua | 79 ++++++++----------- 1 file changed, 31 insertions(+), 48 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index fdb1859d..f0e4ee5a 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -13,57 +13,40 @@ return { -- correctly setup lspconfig { "neovim/nvim-lspconfig", - opts = function(_, opts) - opts.servers.tsserver = { - keys = { - { - "co", - function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.organizeImports.ts" }, - diagnostics = {}, - }, - }) - end, - desc = "Organize Imports", - }, - { - "cR", - function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.removeUnused.ts" }, - diagnostics = {}, - }, - }) - end, - desc = "Remove Unused Imports", - }, - }, - settings = { - typescript = { - format = { - indentSize = vim.o.shiftwidth, - convertTabsToSpaces = vim.o.expandtab, - tabSize = vim.o.tabstop, + opts = { + servers = { + tsserver = { + keys = { + { + "co", + function() + vim.lsp.buf.code_action({ + apply = true, + context = { + only = { "source.organizeImports.ts" }, + diagnostics = {}, + }, + }) + end, + desc = "Organize Imports", + }, + { + "cR", + function() + vim.lsp.buf.code_action({ + apply = true, + context = { + only = { "source.removeUnused.ts" }, + diagnostics = {}, + }, + }) + end, + desc = "Remove Unused Imports", }, }, - javascript = { - format = { - indentSize = vim.o.shiftwidth, - convertTabsToSpaces = vim.o.expandtab, - tabSize = vim.o.tabstop, - }, - }, - completions = { - completeFunctionCalls = true, - }, }, - } - end, + }, + }, }, {