Skip to content

Commit

Permalink
feat: update references of tsserver to ts_ls (nvim-lua#1131)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheveniko authored and distenz committed Sep 14, 2024
1 parent 772186d commit 278355c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,8 @@ require('lazy').setup({
-- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`tsserver`) will work just fine
-- tsserver = {},
-- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {},
--

lua_ls = {
Expand Down Expand Up @@ -626,13 +626,7 @@ require('lazy').setup({
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver)

-- https://github.com/neovim/nvim-lspconfig/pull/3232
if server_name == 'tsserver' then
server_name = 'ts_ls'
end

-- certain features of an LSP (for example, turning off formatting for ts_ls)
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server)
end,
Expand Down

0 comments on commit 278355c

Please sign in to comment.