diff options
author | Yi Ming <ofseed@foxmail.com> | 2024-05-02 21:16:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 06:16:20 -0700 |
commit | d5063f4b290e1c4262f7ced6d425ff2d7a2e2045 (patch) | |
tree | 823ace167610043482ff23da0fd8448688e19c1a /src/nvim/api/buffer.c | |
parent | 2becec289c77a359087ab6322276811aea9e87c8 (diff) | |
download | rneovim-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 'src/nvim/api/buffer.c')
0 files changed, 0 insertions, 0 deletions