Skip to content

Commit

Permalink
fix: rename sumneko_lua -> lua_ls (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
notjl committed Feb 12, 2023
1 parent d2d5525 commit 00a2e88
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
configuration
- provide extra convenience APIs such as the `:LspInstall` command
- allow you to (i) automatically install, and (ii) automatically set up a predefined list of servers
- translate between `lspconfig` server names and `mason.nvim` package names (e.g. `sumneko_lua <-> lua-language-server`)
- translate between `lspconfig` server names and `mason.nvim` package names (e.g. `lua_ls <-> lua-language-server`)

It is recommended to use this extension if you use `mason.nvim` and `lspconfig` (it's strongly recommended for Windows
users).
Expand Down Expand Up @@ -88,7 +88,7 @@ require("mason").setup()
require("mason-lspconfig").setup()

-- After setting up mason-lspconfig you may set up servers via lspconfig
-- require("lspconfig").sumneko_lua.setup {}
-- require("lspconfig").lua_ls.setup {}
-- require("lspconfig").rust_analyzer.setup {}
-- ...
```
Expand Down Expand Up @@ -121,15 +121,15 @@ Example:

```lua
require("mason-lspconfig").setup {
ensure_installed = { "sumneko_lua", "rust_analyzer" },
ensure_installed = { "lua_ls", "rust_analyzer" },
}
```

## Default configuration

```lua
local DEFAULT_SETTINGS = {
-- A list of servers to automatically install if they're not already installed. Example: { "rust_analyzer@nightly", "sumneko_lua" }
-- A list of servers to automatically install if they're not already installed. Example: { "rust_analyzer@nightly", "lua_ls" }
-- This setting has no relation with the `automatic_installation` setting.
ensure_installed = {},

Expand Down Expand Up @@ -219,7 +219,7 @@ local DEFAULT_SETTINGS = {
| LaTeX | `ltex` |
| LaTeX | `texlab` |
| Lelwel | `lelwel_ls` |
| Lua | `sumneko_lua` |
| Lua | `lua_ls` |
| Luau | `luau_lsp` |
| Markdown | `marksman` |
| Markdown | `prosemd_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 @@ -70,6 +70,7 @@ kotlin-language-server kotlin_language_server
lelwel lelwel_ls
lemminx lemminx
ltex-ls ltex
lua-language-server lua_ls
luau-lsp luau_lsp
marksman marksman
metamath-zero-lsp mm0_ls
Expand Down Expand Up @@ -119,7 +120,6 @@ spectral-language-server spectral
sqlls sqlls
sqls sqls
stylelint-lsp stylelint_lsp
lua-language-server sumneko_lua
svelte-language-server svelte
svlangserver svlangserver
svls svls
Expand Down
18 changes: 9 additions & 9 deletions doc/mason-lspconfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ INTRODUCTION *mason-lspconfig-introduction*
- allow you to (i) automatically install, and (ii) automatically set up a
predefined list of servers
- translate between `lspconfig` server names and `mason.nvim` package names
(e.g. `sumneko_lua <-> lua-language-server`)
(e.g. `lua_ls <-> lua-language-server`)

It is recommended to use this extension if you use `mason.nvim` and
`lspconfig` (it's strongly recommended for Windows users).
Expand Down Expand Up @@ -69,7 +69,7 @@ Setting up servers
Next, you're ready to set up the servers you want to use. Refer to lspconfig's
documentation |lspconfig-quickstart| for more information on how to do so!
>lua
require("lspconfig").sumneko_lua.setup {}
require("lspconfig").lua_ls.setup {}
require("lspconfig").rust_analyzer.setup {}
<
Automatic server setup (advanced feature): ~
Expand All @@ -83,7 +83,7 @@ Installation of servers
To install an LSP server supported by lspconfig (and mason.nvim) you may use
the `:LspInstall` command, like so:
>vim
:LspInstall rust_analyzer sumneko_lua
:LspInstall rust_analyzer lua_ls
<
This command is more or less an alias of the |:MasonInstall| command, except
that it only accepts LSP servers and - more importantly - only accepts
Expand Down Expand Up @@ -139,7 +139,7 @@ Example:
*mason-lspconfig-default-settings*
>lua
local DEFAULT_SETTINGS = {
-- A list of servers to automatically install if they're not already installed. Example: { "rust-analyzer@nightly", "sumneko_lua" }
-- A list of servers to automatically install if they're not already installed. Example: { "rust-analyzer@nightly", "lua_ls" }
-- This setting has no relation with the `automatic_installation` setting.
ensure_installed = {},

Expand Down Expand Up @@ -225,7 +225,7 @@ setup_handlers({handlers})
Note: ~
The server names provided as keys are the lspconfig server names, not
mason's package names, so for example instead of "lua-language-server"
it's "sumneko_lua".
it's "lua_ls".

Example: ~
>lua
Expand All @@ -240,8 +240,8 @@ setup_handlers({handlers})
["rust_analyzer"] = function ()
require("rust-tools").setup {}
end,
["sumneko_lua"] = function ()
lspconfig.sumneko_lua.setup {
["lua_ls"] = function ()
lspconfig.lua_ls.setup {
settings = {
Lua = {
diagnostics = {
Expand All @@ -265,7 +265,7 @@ get_installed_servers()

Note: ~
The returned strings are the lspconfig server names, not the mason
package names. For example, "sumneko_lua" is returned instead of
package names. For example, "lua_ls" is returned instead of
"lua-language-server". This is useful if you want to loop through the
table and use its values to directly interact with lspconfig (for
example setting up all installed servers).
Expand All @@ -283,7 +283,7 @@ get_available_servers({filter})

Note: ~
The returned strings are the lspconfig server names, not the mason
package names. For example, "sumneko_lua" is returned instead of
package names. For example, "lua_ls" is returned instead of
"lua-language-server". This is useful if you want to loop through the
table and use its values to directly interact with lspconfig (for
example setting up all installed servers).
Expand Down
2 changes: 1 addition & 1 deletion doc/server-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
| [lelwel_ls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lelwel_ls) | [lelwel](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#lelwel) |
| [lemminx](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lemminx) | [lemminx](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#lemminx) |
| [ltex](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ltex) | [ltex-ls](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#ltex-ls) |
| [lua_ls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lua_ls) | [lua-language-server](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#lua-language-server) |
| [luau_lsp](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#luau_lsp) | [luau-lsp](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#luau-lsp) |
| [marksman](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#marksman) | [marksman](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#marksman) |
| [mm0_ls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#mm0_ls) | [metamath-zero-lsp](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#metamath-zero-lsp) |
Expand Down Expand Up @@ -116,7 +117,6 @@
| [sqlls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sqlls) | [sqlls](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#sqlls) |
| [sqls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sqls) | [sqls](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#sqls) |
| [stylelint_lsp](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#stylelint_lsp) | [stylelint-lsp](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#stylelint-lsp) |
| [sumneko_lua](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sumneko_lua) | [lua-language-server](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#lua-language-server) |
| [svelte](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#svelte) | [svelte-language-server](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#svelte-language-server) |
| [svlangserver](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#svlangserver) | [svlangserver](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#svlangserver) |
| [svls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#svls) | [svls](https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md#svls) |
Expand Down
2 changes: 1 addition & 1 deletion lua/mason-lspconfig/mappings/filetype.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ return {
libsonnet = { "jsonnet_ls" },
liquid = { "tailwindcss", "theme_check" },
llw = { "lelwel_ls" },
lua = { "sumneko_lua" },
lua = { "lua_ls" },
luau = { "luau_lsp" },
markdown = { "grammarly", "ltex", "marksman", "prosemd_lsp", "remark_ls", "tailwindcss", "zk" },
mdx = { "tailwindcss" },
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 @@ -120,7 +120,7 @@ M.lspconfig_to_package = {
["sqlls"] = "sqlls",
["sqls"] = "sqls",
["stylelint_lsp"] = "stylelint-lsp",
["sumneko_lua"] = "lua-language-server",
["lua_ls"] = "lua-language-server",
["svelte"] = "svelte-language-server",
["svlangserver"] = "svlangserver",
["svls"] = "svls",
Expand Down
2 changes: 1 addition & 1 deletion lua/mason-lspconfig/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local M = {}

---@class MasonLspconfigSettings
local DEFAULT_SETTINGS = {
-- A list of servers to automatically install if they're not already installed. Example: { "rust_analyzer@nightly", "sumneko_lua" }
-- A list of servers to automatically install if they're not already installed. Example: { "rust_analyzer@nightly", "lua_ls" }
-- This setting has no relation with the `automatic_installation` setting.
ensure_installed = {},

Expand Down

0 comments on commit 00a2e88

Please sign in to comment.