Skip to content

Commit

Permalink
docs: sumneko_lua is now named lua_ls
Browse files Browse the repository at this point in the history
  • Loading branch information
juicy-g committed Dec 1, 2024
1 parent f8a3665 commit f414373
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 84 deletions.
6 changes: 3 additions & 3 deletions docs/configuration/language-features/language-servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ To set settings for your language server:

Example:

1. `:LspSettings sumneko_lua`
1. `:LspSettings lua_ls`

2. ```json
{
Expand All @@ -107,7 +107,7 @@ Install `jsonls` LSP server for autocompletion.
Add the server you wish to configure manually to `lvim.lsp.automatic_configuration.skipped_servers`.

```lua
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "sumneko_lua" })
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "lua_ls" })
```

:::info
Expand All @@ -128,5 +128,5 @@ local opts = {
Lua = { hint = { enable = false } },
},
}
require("lvim.lsp.manager").setup("sumneko_lua", opts)
require("lvim.lsp.manager").setup("lua_ls", opts)
```
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ To set settings for your language server:

Example:

1. `:LspSettings sumneko_lua`
1. `:LspSettings lua_ls`

2. ```json
{
Expand All @@ -107,7 +107,7 @@ Install `jsonls` LSP server for autocompletion.
Add the server you wish to configure manually to `lvim.lsp.automatic_configuration.skipped_servers`.

```lua
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "sumneko_lua" })
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "lua_ls" })
```

:::info
Expand All @@ -128,5 +128,5 @@ local opts = {
Lua = { hint = { enable = false } },
},
}
require("lvim.lsp.manager").setup("sumneko_lua", opts)
require("lvim.lsp.manager").setup("lua_ls", opts)
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ sidebar_position: 1

# 语言服务器

LunarVim使用[文件类型插件](/configuration/ftplugin.md)来实现语言服务器的懒加载设置。一个模板生成器被用来创建 `ftplugin` 文件,并将设置调用填充到这些文件中。
LunarVim 使用[文件类型插件](/configuration/ftplugin.md)来实现语言服务器的懒加载设置。一个模板生成器被用来创建 `ftplugin` 文件,并将设置调用填充到这些文件中。

`lvim.lsp.automatic_configuration.skipped_servers` 包含一个默认不会被自动配置的服务器列表,例如,只允许JS-family语言使用 `tsserver`,当一种语言有多个可用的服务器时,那么通常会选择最受欢迎的那个。
`lvim.lsp.automatic_configuration.skipped_servers` 包含一个默认不会被自动配置的服务器列表,例如,只允许 JS-family 语言使用 `tsserver`,当一种语言有多个可用的服务器时,那么通常会选择最受欢迎的那个。

:::info

Expand All @@ -18,7 +18,7 @@ LunarVim使用[文件类型插件](/configuration/ftplugin.md)来实现语言服

### 自动安装

默认情况下,一旦你打开支持的文件类型,大多数支持的语言服务器将被自动安装,例如,第一次打开一个Python文件将安装 `pyright` 并自动为你配置。
默认情况下,一旦你打开支持的文件类型,大多数支持的语言服务器将被自动安装,例如,第一次打开一个 Python 文件将安装 `pyright` 并自动为你配置。

### 手动安装

Expand All @@ -38,7 +38,7 @@ lvim.lsp.automatic_servers_installation = false

### 更新服务器

打开 `:Mason`,选择一个服务器,用 `u` 来更新它。你可以用 `<S-u>` 来更新所有Mason软件包
打开 `:Mason`,选择一个服务器,用 `u` 来更新它。你可以用 `<S-u>` 来更新所有 Mason 软件包

## 改变默认服务器

Expand Down Expand Up @@ -75,7 +75,7 @@ lvim.lsp.automatic_servers_installation = false

例子:

1. `:LspSettings sumneko_lua`
1. `:LspSettings lua_ls`

2. ```json
{
Expand All @@ -89,7 +89,7 @@ lvim.lsp.automatic_servers_installation = false

:::tip

安装 `jsonls` LSP服务器用于自动完成
安装 `jsonls` LSP 服务器用于自动完成

:::

Expand All @@ -98,7 +98,7 @@ lvim.lsp.automatic_servers_installation = false
将你想手动配置的服务器添加到 `lvim.lsp.automatic_configuration.skipped_servers`

```lua
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "sumneko_lua" })
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "lua_ls" })
```

:::info
Expand All @@ -107,7 +107,7 @@ vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "sumneko_lua

:::

现在你可以使用 `$LUNARVIM_CONFIG_DIR/ftplugin/<filetype>.lua` 中的内置的[lsp管理器](https://github.com/LunarVim/LunarVim/blob/master/lua/lvim/lsp/manager.lua)手动设置它。
现在你可以使用 `$LUNARVIM_CONFIG_DIR/ftplugin/<filetype>.lua` 中的内置的[lsp 管理器](https://github.com/LunarVim/LunarVim/blob/master/lua/lvim/lsp/manager.lua)手动设置它。

例子:

Expand All @@ -118,5 +118,5 @@ local opts = {
Lua = { hint = { enable = false } },
},
}
require("lvim.lsp.manager").setup("sumneko_lua", opts)
require("lvim.lsp.manager").setup("lua_ls", opts)
```
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ A typical setup call with default arguments

```lua
-- edit this file by running `:lua vim.cmd("edit " .. lvim.lsp.templates_dir .. "/lua.lua")`
require("lvim.lsp.manager").setup("sumneko_lua")
require("lvim.lsp.manager").setup("lua_ls")
```

:::tip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ A typical setup call with default arguments

```lua
-- edit this file by running `:lua vim.cmd("edit " .. lvim.lsp.templates_dir .. "/lua.lua")`
require("lvim.lsp.manager").setup("sumneko_lua")
require("lvim.lsp.manager").setup("lua_ls")
```

:::tip
Expand Down
Loading

0 comments on commit f414373

Please sign in to comment.