From 1b3abfa688865d95b85c27d3e523c087669604a2 Mon Sep 17 00:00:00 2001 From: glepnir Date: Sun, 31 Aug 2025 01:31:16 +0800 Subject: [PATCH] docs(lsp): mention lsp/after/ in faq #35534 --- runtime/doc/lsp.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index c69cb1515e..1812c672aa 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -162,7 +162,7 @@ order of increasing priority: 1. Configuration defined for the `'*'` name. 2. Configuration from the result of merging all tables returned by - `lsp/.lua` files in 'runtimepath' for a server of name `name`. + `lsp/.lua` files in 'runtimepath' for the config named ``. 3. Configurations defined anywhere else. Example: given the following configs... >lua @@ -280,6 +280,12 @@ FAQ *lsp-faq* " (async = false is the default for format) autocmd BufWritePre *.rs lua vim.lsp.buf.format({ async = false }) < + +- Q: How to avoid my own lsp/ folder being overridden? +- A: Place your configs under "after/lsp/". Files in "after/lsp/" are loaded + after those in "nvim/lsp/", so your settings will take precedence over + the defaults provided by nvim-lspconfig. See also: |after-directory| + *lsp-vs-treesitter* - Q: How do LSP, Treesitter and Ctags compare? - A: LSP requires a client and language server. The language server uses