mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
feat(lang): add ts_ls to lsp config (#4406)
## Description <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> 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) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> N/A! ## Screenshots <!-- Add screenshots of the changes if applicable. --> N/A! ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
parent
9b1767205c
commit
34f0e568d4
1 changed files with 11 additions and 0 deletions
|
@ -19,9 +19,14 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
-- make sure mason installs the server
|
-- make sure mason installs the server
|
||||||
servers = {
|
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 = {
|
tsserver = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
|
ts_ls = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
vtsls = {
|
vtsls = {
|
||||||
-- explicitly add default filetypes, so that we can extend
|
-- explicitly add default filetypes, so that we can extend
|
||||||
-- them in related extras
|
-- them in related extras
|
||||||
|
@ -114,10 +119,16 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup = {
|
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()
|
tsserver = function()
|
||||||
-- disable tsserver
|
-- disable tsserver
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
ts_ls = function()
|
||||||
|
-- disable tsserver
|
||||||
|
return true
|
||||||
|
end,
|
||||||
vtsls = function(_, opts)
|
vtsls = function(_, opts)
|
||||||
LazyVim.lsp.on_attach(function(client, buffer)
|
LazyVim.lsp.on_attach(function(client, buffer)
|
||||||
client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx)
|
client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue