aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorMichal Liszcz <liszcz.michal@gmail.com>2023-03-09 15:12:56 +0100
committerGitHub <noreply@github.com>2023-03-09 06:12:56 -0800
commit9ef7297ef142354ace8b1f3f277d0eee3cfdc6d4 (patch)
tree317cfc799191e044e1fc9452ef40ca24376fcbb1 /runtime/doc
parentce0fddf5ae334f0c79dcd95b379999e11df1486b (diff)
downloadrneovim-9ef7297ef142354ace8b1f3f277d0eee3cfdc6d4.tar.gz
rneovim-9ef7297ef142354ace8b1f3f277d0eee3cfdc6d4.tar.bz2
rneovim-9ef7297ef142354ace8b1f3f277d0eee3cfdc6d4.zip
feat(lsp): overwrite omnifunc/tagfunc set by ftplugin #22267
Problem: Some built-in ftplugins set omnifunc/tagfunc/formatexpr which causes lsp.lua:set_defaults() to skip setup of defaults for those filetypes. For example the C++ ftplugin has: omnifunc=ccomplete#Complete Last set from /usr/share/nvim/runtime/ftplugin/c.vim line 30 so the changes done in #95c65a6b221fe6e1cf91e8322e7d7571dc511a71 will always be skipped for C++ files. Solution: Overwrite omnifunc/tagfunc/formatexpr options that were set by stock ftplugin. Fixes #21001
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lsp.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index b73e2958ef..b21ef9d7d3 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -51,8 +51,11 @@ Starting a LSP client will automatically report diagnostics via
|vim.diagnostic|. Read |vim.diagnostic.config()| to learn how to customize the
display.
-It also sets some buffer options if the options are otherwise empty and if the
-language server supports the functionality.
+It also sets some buffer options if the language server supports the
+functionality and if the options are otherwise empty or have the default
+values set by Nvim runtime files (e.g. a ftplugin). In the latter case,
+the default values are not restored when the LSP client is detached from
+the buffer.
- 'omnifunc' is set to |vim.lsp.omnifunc()|. This allows to trigger completion
using |i_CTRL-X_CTRL-O|