diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-04-05 16:36:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-05 16:36:39 -0700 |
| commit | 462ded6ee3d80e4a84ec890a95b3140ba44aefe6 (patch) | |
| tree | 6e424fd4b9ca14564804bc0d35d3c0cf1458303b /doc/lspconfig.txt | |
| parent | refactor: deprecate util.get_lsp_clients #3694 (diff) | |
| download | nvim-lspconfig-462ded6ee3d80e4a84ec890a95b3140ba44aefe6.tar nvim-lspconfig-462ded6ee3d80e4a84ec890a95b3140ba44aefe6.tar.gz nvim-lspconfig-462ded6ee3d80e4a84ec890a95b3140ba44aefe6.tar.bz2 nvim-lspconfig-462ded6ee3d80e4a84ec890a95b3140ba44aefe6.tar.lz nvim-lspconfig-462ded6ee3d80e4a84ec890a95b3140ba44aefe6.tar.xz nvim-lspconfig-462ded6ee3d80e4a84ec890a95b3140ba44aefe6.tar.zst nvim-lspconfig-462ded6ee3d80e4a84ec890a95b3140ba44aefe6.zip | |
refactor: deprecate add_hook_before/after #3695
These are special-purpose functions that should never have been
"public".
Diffstat (limited to 'doc/lspconfig.txt')
| -rw-r--r-- | doc/lspconfig.txt | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/doc/lspconfig.txt b/doc/lspconfig.txt index c2f02a8b..b38d9038 100644 --- a/doc/lspconfig.txt +++ b/doc/lspconfig.txt @@ -149,28 +149,6 @@ The global defaults for all servers can be overridden by extending the < ============================================================================== -SETUP HOOK *lspconfig-setup-hook* - -`lspconfig` will execute the `on_setup` hook for each setup call to a server after -validating its configuration, and before attempting to launch the server -itself. One typical usage is to allow ad-hoc substitution for any -configuration entry, such as `cmd`. - ->lua - local lspconfig = require 'lspconfig' - lspconfig.util.on_setup = lspconfig.util.add_hook_before(lspconfig.util.on_setup, function(config) - if some_condition and config.name == "clangd" then - local custom_server_prefix = "/my/custom/server/prefix" - config.cmd = { custom_server_prefix .. "/bin/clangd" } - end - end) - - -Note: This is primarily targeted at plugins developers, so make sure to use -`util.add_hook_before()` as a wrapper instead of overriding the original function -completely, to void breaking external integrations with lspconfig. - -============================================================================== SERVER CONFIGS *lspconfig-configurations* See |lspconfig-all| for the list of provided LSP configurations. |
