mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-05 23:14:40 +02:00
fix(typescript)!: removed typescript.nvim
since it's deprecated
This commit is contained in:
parent
f61a243d1a
commit
aab365a9f8
1 changed files with 13 additions and 16 deletions
|
@ -13,15 +13,25 @@ return {
|
||||||
-- correctly setup lspconfig
|
-- correctly setup lspconfig
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = { "jose-elias-alvarez/typescript.nvim" },
|
|
||||||
opts = {
|
opts = {
|
||||||
-- make sure mason installs the server
|
-- make sure mason installs the server
|
||||||
servers = {
|
servers = {
|
||||||
---@type lspconfig.options.tsserver
|
---@type lspconfig.options.tsserver
|
||||||
tsserver = {
|
tsserver = {
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>co", "<cmd>TypescriptOrganizeImports<CR>", desc = "Organize Imports" },
|
{
|
||||||
{ "<leader>cR", "<cmd>TypescriptRenameFile<CR>", desc = "Rename File" },
|
"<leader>co",
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.code_action({
|
||||||
|
apply = true,
|
||||||
|
context = {
|
||||||
|
only = { "source.organizeImports.ts" },
|
||||||
|
diagnostics = {},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
desc = "Organize Imports",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
settings = {
|
settings = {
|
||||||
typescript = {
|
typescript = {
|
||||||
|
@ -44,21 +54,8 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup = {
|
|
||||||
tsserver = function(_, opts)
|
|
||||||
require("typescript").setup({ server = opts })
|
|
||||||
return true
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"nvimtools/none-ls.nvim",
|
|
||||||
optional = true,
|
|
||||||
opts = function(_, opts)
|
|
||||||
table.insert(opts.sources, require("typescript.extensions.null-ls.code-actions"))
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
optional = true,
|
optional = true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue