diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2023-06-30 11:33:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-30 11:33:28 +0200 |
commit | 37079fca58f396fd866dc7b7d87a0100c17ee760 (patch) | |
tree | 876851052cf0eecbb5e05c4d7ad2abd5ee887e57 /runtime/lua/vim/lsp/buf.lua | |
parent | d55d7646c129a9afe1da3a61813bb365d178c421 (diff) | |
download | rneovim-37079fca58f396fd866dc7b7d87a0100c17ee760.tar.gz rneovim-37079fca58f396fd866dc7b7d87a0100c17ee760.tar.bz2 rneovim-37079fca58f396fd866dc7b7d87a0100c17ee760.zip |
feat(lsp): move inlay_hint() to vim.lsp (#24130)
Allows to keep more functions hidden and gives a path forward for
further inlay_hint related functions - like applying textEdits.
See https://github.com/neovim/neovim/pull/23984#pullrequestreview-1486624668
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index c2e0179cc4..0369725216 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -796,19 +796,4 @@ function M.execute_command(command_params) request('workspace/executeCommand', command_params) end ---- Enable/disable/toggle inlay hints for a buffer ----@param bufnr (integer) Buffer handle, or 0 for current ----@param enable (boolean|nil) true/false to enable/disable, nil to toggle -function M.inlay_hint(bufnr, enable) - vim.validate({ enable = { enable, { 'boolean', 'nil' } }, bufnr = { bufnr, 'number' } }) - local inlay_hint = require('vim.lsp._inlay_hint') - if enable then - inlay_hint.enable(bufnr) - elseif enable == false then - inlay_hint.disable(bufnr) - else - inlay_hint.toggle(bufnr) - end -end - return M |