mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(typescript): remove format settings entirely
This commit is contained in:
parent
b9563799be
commit
2cc9967713
1 changed files with 31 additions and 48 deletions
|
|
@ -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,
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue