aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorYi Ming <ofseed@foxmail.com>2024-05-02 21:16:20 +0800
committerGitHub <noreply@github.com>2024-05-02 06:16:20 -0700
commitd5063f4b290e1c4262f7ced6d425ff2d7a2e2045 (patch)
tree823ace167610043482ff23da0fd8448688e19c1a /runtime/doc
parent2becec289c77a359087ab6322276811aea9e87c8 (diff)
downloadrneovim-d5063f4b290e1c4262f7ced6d425ff2d7a2e2045.tar.gz
rneovim-d5063f4b290e1c4262f7ced6d425ff2d7a2e2045.tar.bz2
rneovim-d5063f4b290e1c4262f7ced6d425ff2d7a2e2045.zip
feat(lsp): vim.lsp.inlay_hint.enable(nil) applies to all buffers #28543
Problem: Inlay hints `enable()` does not fully implement the `:help dev-lua` guidelines: Interface conventions ~ - When accepting a buffer id, etc., 0 means "current buffer", nil means "all buffers". Likewise for window id, tabpage id, etc. - Examples: |vim.lsp.codelens.clear()| |vim.diagnostic.enable()| Solution: Implement globally enabling inlay hints. * refactor(lsp): do not rely on `enable` to create autocmds * refactor(lsp): make `bufstates` a defaulttable * refactor(lsp): make `bufstate` inherit values from `globalstate` * feat(lsp): `vim.lsp.inlay_hints` now take effect on all buffers by default * test(lsp): add basic tests for enable inlay hints for all buffers * test(lsp): add test cases cover more than one buffer
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lsp.txt4
-rw-r--r--runtime/doc/news.txt2
2 files changed, 4 insertions, 2 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index d199634bae..06fec15f3c 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1611,8 +1611,8 @@ enable({enable}, {filter}) *vim.lsp.inlay_hint.enable()*
Parameters: ~
• {enable} (`boolean?`) true/nil to enable, false to disable
• {filter} (`table?`) Optional filters |kwargs|, or `nil` for all.
- • {bufnr} (`integer?`) Buffer number, or 0/nil for current
- buffer.
+ • {bufnr} (`integer?`) Buffer number, or 0 for current
+ buffer, or nil for all.
get({filter}) *vim.lsp.inlay_hint.get()*
Get the list of inlay hints, (optionally) restricted by buffer or range.
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index bae0030a14..4d06f3df8d 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -148,6 +148,8 @@ BREAKING CHANGES IN HEAD *news-breaking-dev*
The following changes to UNRELEASED features were made during the development
cycle (Nvim HEAD, the "master" branch).
+• `vim.lsp.inlay_hint.enable()` now take effect on all buffers by default.
+
• Removed `vim.treesitter.foldtext` as transparent foldtext is now supported
https://github.com/neovim/neovim/pull/20750