aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRaphael <glepnir@neovim.pro>2022-08-26 20:49:40 +0800
committerGitHub <noreply@github.com>2022-08-26 20:49:40 +0800
commit99e0dc9937b124dee7d8107185e804ff96466279 (patch)
tree7a404c016a7f6c42c1766394a68bedad85b5d826 /doc
parentfeat: improve LspInfo (#2081) (diff)
downloadnvim-lspconfig-99e0dc9937b124dee7d8107185e804ff96466279.tar
nvim-lspconfig-99e0dc9937b124dee7d8107185e804ff96466279.tar.gz
nvim-lspconfig-99e0dc9937b124dee7d8107185e804ff96466279.tar.bz2
nvim-lspconfig-99e0dc9937b124dee7d8107185e804ff96466279.tar.lz
nvim-lspconfig-99e0dc9937b124dee7d8107185e804ff96466279.tar.xz
nvim-lspconfig-99e0dc9937b124dee7d8107185e804ff96466279.tar.zst
nvim-lspconfig-99e0dc9937b124dee7d8107185e804ff96466279.zip
fix: remove the config.commands (#2092)
* fix: remove the config.commands * fix: format by stylua and remove comamnds test * fix: remove commands from doc * fix: remove unused function
Diffstat (limited to 'doc')
-rw-r--r--doc/lspconfig.txt29
1 files changed, 0 insertions, 29 deletions
diff --git a/doc/lspconfig.txt b/doc/lspconfig.txt
index 0c999678..5030c064 100644
--- a/doc/lspconfig.txt
+++ b/doc/lspconfig.txt
@@ -267,7 +267,6 @@ validating using `vim.validate` is:
default_config = {'t'},
on_new_config = {'f', true},
on_attach = {'f', true},
- commands = {'t', true},
docs = {'t', true},
}
<
@@ -278,34 +277,6 @@ where the structure of the docs table is as follows:
default_config = {'t', true},
}
<
-`commands` is a map of `name:definition` key:value pairs, where `definition`
-is a list whose first value is a function implementing the command, and the
-rest are either array values which will be formed into flags for the command,
-or special keys like `description`.
-
-Warning: Commands is deprecated and will be removed in future releases.
-It is recommended to use `vim.api.nvim_create_user_command()` instead in an `on_attach` function.
-
-Example:
->
- local function organize_imports()
- local params = {
- command = 'pyright.organizeimports',
- arguments = { vim.uri_from_bufnr(0) },
- }
- vim.lsp.buf.execute_command(params)
- end
-
- local on_attach = function(client, bufnr)
- if client.name == "pyright" then
- vim.api.nvim_create_user_command("PyrightOrganizeImports", organize_imports, {desc = 'Organize Imports'})
- end
- end
-
- require("lspconfig")['pyright'].setup({
- on_attach = on_attach
- })
-<
The `configs.__newindex` metamethod consumes the config definition and returns
an object with a `setup()` method, to be invoked by users: