Skip to content
Snippets Groups Projects
Unverified Commit d5063f4b authored by Yi Ming's avatar Yi Ming Committed by GitHub
Browse files

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
parent 2becec28
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment