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 Timothée Belhomme committed Sep 30, 2024
1 parent 1bc3156 commit 6a240b8
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -614,22 +614,24 @@ 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 (`ts_ls`) will work just fine
ts_ls = {},
-- LEGACY
-- But for many setups, the LSP (`tsserver`) will work just fine
tsserver = {
init_options = {
plugins = {
{
name = '@vue/typescript-plugin',
location = "/usr/lib/node_modules/@vue/typescript-plugin",
-- If .vue file cannot be recognized in either js or ts file try to add `typescript` and `javascript` in languages table.
languages = { 'vue' },
},
},
},
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
},
volar = {},
--
-- tsserver = {
-- init_options = {
-- plugins = {
-- {
-- name = '@vue/typescript-plugin',
-- location = "/usr/lib/node_modules/@vue/typescript-plugin",
-- -- If .vue file cannot be recognized in either js or ts file try to add `typescript` and `javascript` in languages table.
-- languages = { 'vue' },
-- },
-- },
-- },
-- filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
-- },
-- volar = {},

lua_ls = {
-- cmd = {...},
Expand Down Expand Up @@ -669,7 +671,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)
-- 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 6a240b8

Please sign in to comment.