-
- Downloads
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
Showing
- runtime/doc/lsp.txt 2 additions, 2 deletionsruntime/doc/lsp.txt
- runtime/doc/news.txt 2 additions, 0 deletionsruntime/doc/news.txt
- runtime/lua/vim/lsp/inlay_hint.lua 94 additions, 66 deletionsruntime/lua/vim/lsp/inlay_hint.lua
- test/functional/plugin/lsp/inlay_hint_spec.lua 42 additions, 11 deletionstest/functional/plugin/lsp/inlay_hint_spec.lua
Loading
Please register or sign in to comment