From 34f0e568d4e853cc2b4f0d628749cb66cd1b9aaf Mon Sep 17 00:00:00 2001 From: Arthur <82575487+arthur-mountain@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:32:17 +0800 Subject: [PATCH] feat(lang): add ts_ls to lsp config (#4406) ## Description In this [PR](https://github.com/neovim/nvim-lspconfig/pull/3232), tsserver is renamed to ts_ls, but it hasn't been released yet. Therefore, ts_ls is added to the LSP configuration in case the user updates their plugins locally. ## Related Issue(s) N/A! ## Screenshots N/A! ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/typescript.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 71ec4604..dd5ca25c 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -19,9 +19,14 @@ return { opts = { -- make sure mason installs the server servers = { + --- @deprecated -- tsserver renamed to ts_ls but not yet released, so keep this for now + --- the proper approach is to check the nvim-lspconfig release version when it's released to determine the server name dynamically tsserver = { enabled = false, }, + ts_ls = { + enabled = false, + }, vtsls = { -- explicitly add default filetypes, so that we can extend -- them in related extras @@ -114,10 +119,16 @@ return { }, }, setup = { + --- @deprecated -- tsserver renamed to ts_ls but not yet released, so keep this for now + --- the proper approach is to check the nvim-lspconfig release version when it's released to determine the server name dynamically tsserver = function() -- disable tsserver return true end, + ts_ls = function() + -- disable tsserver + return true + end, vtsls = function(_, opts) LazyVim.lsp.on_attach(function(client, buffer) client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx)