Skip to content

Commit

Permalink
fix: rename tsserver to ts_ls (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm authored Sep 8, 2024
1 parent 482350b commit 0d072b5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ local DEFAULT_SETTINGS = {
| JavaScript | [`lwc_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lwc_ls) |
| JavaScript | [`quick_lint_js`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#quick_lint_js) |
| JavaScript | [`rome`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rome) |
| JavaScript | [`tsserver`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver) |
| JavaScript | [`ts_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ts_ls) |
| JavaScript | [`vtsls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vtsls) |
| Jinja | [`jinja_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jinja_lsp) |
| Jq | [`jqls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#jqls) |
Expand Down Expand Up @@ -422,7 +422,7 @@ local DEFAULT_SETTINGS = {
| TypeScript | [`harper_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#harper_ls) |
| TypeScript | [`quick_lint_js`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#quick_lint_js) |
| TypeScript | [`rome`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rome) |
| TypeScript | [`tsserver`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver) |
| TypeScript | [`ts_ls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ts_ls) |
| TypeScript | [`vtsls`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#vtsls) |
| Typst | [`tinymist`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tinymist) |
| Typst | [`typst_lsp`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#typst_lsp) |
Expand Down
2 changes: 1 addition & 1 deletion doc/mason-lspconfig-mapping.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ tflint tflint
shopify-theme-check theme_check
thriftls thriftls
tinymist tinymist
typescript-language-server tsserver
typescript-language-server ts_ls
twiggy-language-server twiggy_language_server
typos-lsp typos_lsp
typst-lsp typst_lsp
Expand Down
2 changes: 1 addition & 1 deletion doc/mason-lspconfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Refer to |mason-lspconfig-default-settings| for all available settings.
Example:
>lua
require("mason-lspconfig").setup({
ensure_installed = { "rust_analyzer", "tsserver" }
ensure_installed = { "rust_analyzer", "ts_ls" }
})
<
*mason-lspconfig-default-settings*
Expand Down
2 changes: 1 addition & 1 deletion doc/server-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
| [theme_check](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#theme_check) | [shopify-theme-check](https://mason-registry.dev/registry/list#shopify-theme-check) |
| [thriftls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#thriftls) | [thriftls](https://mason-registry.dev/registry/list#thriftls) |
| [tinymist](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tinymist) | [tinymist](https://mason-registry.dev/registry/list#tinymist) |
| [tsserver](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver) | [typescript-language-server](https://mason-registry.dev/registry/list#typescript-language-server) |
| [ts_ls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ts_ls) | [typescript-language-server](https://mason-registry.dev/registry/list#typescript-language-server) |
| [twiggy_language_server](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#twiggy_language_server) | [twiggy-language-server](https://mason-registry.dev/registry/list#twiggy-language-server) |
| [typos_lsp](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#typos_lsp) | [typos-lsp](https://mason-registry.dev/registry/list#typos-lsp) |
| [typst_lsp](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#typst_lsp) | [typst-lsp](https://mason-registry.dev/registry/list#typst-lsp) |
Expand Down
12 changes: 6 additions & 6 deletions lua/mason-lspconfig/mappings/filetype.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ return {
hyprlang = { "hyprls" },
jade = { "htmx", "tailwindcss" },
java = { "ast_grep", "harper_ls", "java_language_server", "jdtls" },
javascript = { "ast_grep", "biome", "cssmodules_ls", "denols", "dprint", "ember", "eslint", "glint", "harper_ls", "htmx", "lwc_ls", "quick_lint_js", "rome", "snyk_ls", "sourcery", "stylelint_lsp", "tailwindcss", "tsserver", "vtsls" },
javascript = { "ast_grep", "biome", "cssmodules_ls", "denols", "dprint", "ember", "eslint", "glint", "harper_ls", "htmx", "lwc_ls", "quick_lint_js", "rome", "snyk_ls", "sourcery", "stylelint_lsp", "tailwindcss", "ts_ls", "vtsls" },
["javascript.glimmer"] = { "ember", "glint" },
["javascript.jsx"] = { "denols", "eslint", "tsserver", "vtsls" },
javascriptreact = { "biome", "cssmodules_ls", "denols", "dprint", "emmet_language_server", "emmet_ls", "eslint", "graphql", "htmx", "rome", "sourcery", "stylelint_lsp", "tailwindcss", "tsserver", "unocss", "vtsls" },
["javascript.jsx"] = { "denols", "eslint", "ts_ls", "vtsls" },
javascriptreact = { "biome", "cssmodules_ls", "denols", "dprint", "emmet_language_server", "emmet_ls", "eslint", "graphql", "htmx", "rome", "sourcery", "stylelint_lsp", "tailwindcss", "ts_ls", "unocss", "vtsls" },
jinja = { "jinja_lsp" },
jq = { "jqls" },
json = { "biome", "dprint", "jsonls", "rome", "snyk_ls", "spectral" },
Expand Down Expand Up @@ -207,10 +207,10 @@ return {
thrift = { "thriftls" },
toml = { "dprint", "harper_ls", "taplo" },
twig = { "htmx", "tailwindcss", "twiggy_language_server" },
typescript = { "angularls", "ast_grep", "biome", "cssmodules_ls", "denols", "dprint", "ember", "eslint", "glint", "harper_ls", "htmx", "quick_lint_js", "rome", "snyk_ls", "sourcery", "stylelint_lsp", "tailwindcss", "tsserver", "vtsls" },
typescript = { "angularls", "ast_grep", "biome", "cssmodules_ls", "denols", "dprint", "ember", "eslint", "glint", "harper_ls", "htmx", "quick_lint_js", "rome", "snyk_ls", "sourcery", "stylelint_lsp", "tailwindcss", "ts_ls", "vtsls" },
["typescript.glimmer"] = { "ember", "glint" },
["typescript.tsx"] = { "angularls", "biome", "denols", "eslint", "rome", "tsserver", "vtsls" },
typescriptreact = { "angularls", "biome", "cssmodules_ls", "denols", "dprint", "emmet_language_server", "emmet_ls", "eslint", "graphql", "harper_ls", "htmx", "rome", "sourcery", "stylelint_lsp", "tailwindcss", "tsserver", "unocss", "vtsls" },
["typescript.tsx"] = { "angularls", "biome", "denols", "eslint", "rome", "ts_ls", "vtsls" },
typescriptreact = { "angularls", "biome", "cssmodules_ls", "denols", "dprint", "emmet_language_server", "emmet_ls", "eslint", "graphql", "harper_ls", "htmx", "rome", "sourcery", "stylelint_lsp", "tailwindcss", "ts_ls", "unocss", "vtsls" },
typst = { "tinymist", "typst_lsp" },
v = { "v_analyzer", "vls" },
vala = { "vala_ls" },
Expand Down
2 changes: 1 addition & 1 deletion lua/mason-lspconfig/mappings/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ M.lspconfig_to_package = {
["tflint"] = "tflint",
["theme_check"] = "shopify-theme-check",
["thriftls"] = "thriftls",
["tsserver"] = "typescript-language-server",
["ts_ls"] = "typescript-language-server",
["twiggy_language_server"] = "twiggy-language-server",
["typos_lsp"] = "typos-lsp",
["tinymist"] = "tinymist",
Expand Down
4 changes: 2 additions & 2 deletions tests/mason-lspconfig/setup_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,15 @@ describe("mason-lspconfig setup", function()

local mapping_mock = mockx.table(require "mason-lspconfig.mappings.server", "package_to_lspconfig", {
["rust-analyzer"] = "rust_analyzer",
["typescript-language-server"] = "tsserver",
["typescript-language-server"] = "ts_ls",
})

mason_lspconfig.setup {}

assert.spy(registry.register_package_aliases).was_called(1)
assert.spy(registry.register_package_aliases).was_called_with {
["rust-analyzer"] = { "rust_analyzer" },
["typescript-language-server"] = { "tsserver" },
["typescript-language-server"] = { "ts_ls" },
}
mapping_mock:revert()
end)
Expand Down

0 comments on commit 0d072b5

Please sign in to comment.