Skip to content

Commit 3dde1b8

Browse files
authored
docs: cleanup #3791
1 parent 18a059e commit 3dde1b8

10 files changed

+19
-19
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Most of the time, the reason for failure is present in the logs.
152152
## Commands
153153

154154
* `:LspInfo` (alias to `:checkhealth vim.lsp`) shows the status of active and configured language servers.
155-
* `:LspStart <config_name>` Start the requested server name. Will only successfully start if the command detects a root directory matching the current config. Pass `autostart = false` to your `.setup{}` call for a language server if you would like to launch clients solely with this command. Defaults to all servers matching current buffer filetype.
155+
* `:LspStart <config_name>` Start the requested server name. Will only successfully start if the command detects a root directory matching the current config.
156156
* `:LspStop [<client_id_or_name> ...]` Stops the given server(s). Defaults to stopping all servers active on the current buffer. To force stop add `++force`
157157
* `:LspRestart [<client_id_or_name> ...]` Restarts the given client(s), and attempts to reattach to all previously attached buffers.
158158

lsp/angularls.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
--- local project_library_path = "/path/to/project/lib"
1010
--- local cmd = {"ngserver", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path}
1111
---
12-
--- require'lspconfig'.angularls.setup{
12+
--- vim.lsp.config('angularls', {
1313
--- cmd = cmd,
1414
--- on_new_config = function(new_config,new_root_dir)
1515
--- new_config.cmd = cmd
1616
--- end,
17-
--- }
17+
--- })
1818
--- ```
1919

2020
-- Angular requires a node_modules directory to probe for @angular/language-service and typescript

lsp/azure_pipelines_ls.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
--- By default `azure-pipelines-ls` will only work in files named `azure-pipelines.yml`, this can be changed by providing additional settings like so:
1414
--- ```lua
1515
--- vim.lsp.config('azure_pipelines_ls', {
16-
--- ... -- other configuration for setup {}
16+
--- ... -- other configuration
1717
--- settings = {
1818
--- yaml = {
1919
--- schemas = {

lsp/nelua_lsp.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
--- **By default, nelua-lsp doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary.
2020
---
2121
--- ```lua
22-
--- vim.lsp.config('nelua_lsp.setup, {
22+
--- vim.lsp.config('nelua_lsp', {
2323
--- cmd = { "nelua", "-L", "/path/to/nelua-lsp/", "--script", "/path/to/nelua-lsp/nelua-lsp.lua" },
2424
--- })
2525
--- ```

lsp/ntt.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
---
33
--- https://github.com/nokia/ntt
44
--- Installation instructions can be found [here](https://github.com/nokia/ntt#Install).
5-
--- Can be configured by passing a "settings" object to `ntt.setup{}`:
5+
--- Can be configured by passing a "settings" object to vim.lsp.config('ntt'):
66
--- ```lua
77
--- vim.lsp.config('ntt', {
88
--- settings = {

lsp/slangd.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
--- The `slangd` binary can be downloaded as part of [slang releases](https://github.com/shader-slang/slang/releases) or
66
--- by [building `slang` from source](https://github.com/shader-slang/slang/blob/master/docs/building.md).
77
---
8-
--- The server can be configured by passing a "settings" object to `slangd.setup{}`:
8+
--- The server can be configured by passing a "settings" object to vim.lsp.config('slangd'):
99
---
1010
--- ```lua
1111
--- vim.lsp.config('slangd', {

lsp/stylelint_lsp.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
--- npm i -g stylelint-lsp
99
--- ```
1010
---
11-
--- Can be configured by passing a `settings.stylelintplus` object to `stylelint_lsp.setup`:
11+
--- Can be configured by passing a `settings.stylelintplus` object to vim.lsp.config('stylelint_lsp'):
1212
---
1313
--- ```lua
1414
--- vim.lsp.config('stylelint_lsp', {

lsp/ts_ls.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
--- })
6060
---
6161
--- -- You must make sure volar is setup
62-
--- -- e.g. require'lspconfig'.volar.setup{}
62+
--- -- e.g. vim.lsp.config('volar')
6363
--- -- See volar's section for more information
6464
--- ```
6565
---

lsp/volar.lua

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
--- ```lua
2525
--- local lspconfig = require('lspconfig')
2626
---
27-
--- lspconfig.volar.setup {
27+
--- vim.lsp.config('volar', {
2828
--- -- add filetypes for typescript, javascript and vue
2929
--- filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
3030
--- init_options = {
@@ -33,9 +33,9 @@
3333
--- hybridMode = false,
3434
--- },
3535
--- },
36-
--- }
37-
--- -- you must remove ts_ls setup
38-
--- -- lspconfig.ts_ls.setup {}
36+
--- })
37+
--- -- you must remove "ts_ls" config
38+
--- -- vim.lsp.config['ts_ls'] = {}
3939
--- ```
4040
---
4141
--- **Overriding the default TypeScript Server used by Volar**
@@ -45,19 +45,19 @@
4545
---
4646
--- - use a global TypeScript Server installation
4747
--- ```lua
48-
--- require'lspconfig'.volar.setup {
48+
--- vim.lsp.config('volar', {
4949
--- init_options = {
5050
--- typescript = {
5151
--- -- replace with your global TypeScript library path
5252
--- tsdk = '/path/to/node_modules/typescript/lib'
5353
--- }
5454
--- }
55-
--- }
55+
--- })
5656
--- ```
5757
---
5858
--- - use a local server and fall back to a global TypeScript Server installation
5959
--- ```lua
60-
--- require'lspconfig'.volar.setup {
60+
--- vim.lsp.config('volar', {
6161
--- init_options = {
6262
--- typescript = {
6363
--- -- replace with your global TypeScript library path
@@ -70,7 +70,7 @@
7070
--- new_config.init_options.typescript.tsdk = lib_path
7171
--- end
7272
--- end
73-
--- }
73+
--- })
7474
--- ```
7575

7676
local function get_typescript_server_path(root_dir)

lsp/yamlls.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
---
2525
--- ```lua
2626
--- vim.lsp.config('yamlls', {
27-
--- ... -- other configuration for setup {}
27+
--- ...
2828
--- settings = {
2929
--- yaml = {
3030
--- ... -- other settings. note this overrides the lspconfig defaults.
@@ -46,7 +46,7 @@
4646
---
4747
--- ```lua
4848
--- vim.lsp.config('yamlls', {
49-
--- ... -- other configuration for setup {}
49+
--- ...
5050
--- settings = {
5151
--- yaml = {
5252
--- ... -- other settings. note this overrides the lspconfig defaults.

0 commit comments

Comments
 (0)