aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp/inlay_hint_spec.lua
diff options
context:
space:
mode:
authorChinmay Dalal <dalal.chinmay.0101@gmail.com>2023-06-20 11:36:54 +0530
committerGitHub <noreply@github.com>2023-06-19 23:06:54 -0700
commitca5de9306c00d07cce1daef1f0038c937098bc66 (patch)
treea4531c198f24195e8af966664a80fcb11d05dd21 /test/functional/plugin/lsp/inlay_hint_spec.lua
parent72a6643b1380cdf6f1153d70eeaffb90bdca30d6 (diff)
downloadrneovim-ca5de9306c00d07cce1daef1f0038c937098bc66.tar.gz
rneovim-ca5de9306c00d07cce1daef1f0038c937098bc66.tar.bz2
rneovim-ca5de9306c00d07cce1daef1f0038c937098bc66.zip
feat(lsp): inlay hints #23984
Add automatic refresh and a public interface on top of #23736 * add on_reload, on_detach handlers in `enable()` buf_attach, and LspDetach autocommand in case of manual detach * unify `__buffers` and `hint_cache_by_buf` * use callback bufnr in `on_lines` callback, bufstate: remove __index override * move user-facing functions into vim.lsp.buf, unify enable/disable/toggle Closes #18086
Diffstat (limited to 'test/functional/plugin/lsp/inlay_hint_spec.lua')
-rw-r--r--test/functional/plugin/lsp/inlay_hint_spec.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/plugin/lsp/inlay_hint_spec.lua b/test/functional/plugin/lsp/inlay_hint_spec.lua
index b134095c4f..103fd8d968 100644
--- a/test/functional/plugin/lsp/inlay_hint_spec.lua
+++ b/test/functional/plugin/lsp/inlay_hint_spec.lua
@@ -63,7 +63,7 @@ describe('inlay hints', function()
end)
it(
- 'inlay hints are applied when vim.lsp._inlay_hint.refresh() is called',
+ 'inlay hints are applied when vim.lsp.buf.inlay_hint(true) is called',
function()
exec_lua([[
bufnr = vim.api.nvim_get_current_buf()
@@ -72,7 +72,7 @@ describe('inlay hints', function()
]])
insert(text)
- exec_lua([[vim.lsp._inlay_hint.refresh({bufnr = bufnr})]])
+ exec_lua([[vim.lsp.buf.inlay_hint(bufnr, true)]])
screen:expect({
grid = [[
auto add(int a, int b)-> int { return a + b; } |
@@ -89,7 +89,7 @@ describe('inlay hints', function()
end)
it(
- 'inlay hints are cleared when vim.lsp._inlay_hint.clear() is called',
+ 'inlay hints are cleared when vim.lsp.buf.inlay_hint(false) is called',
function()
exec_lua([[
bufnr = vim.api.nvim_get_current_buf()
@@ -98,7 +98,7 @@ describe('inlay hints', function()
]])
insert(text)
- exec_lua([[vim.lsp._inlay_hint.refresh({bufnr = bufnr})]])
+ exec_lua([[vim.lsp.buf.inlay_hint(bufnr, true)]])
screen:expect({
grid = [[
auto add(int a, int b)-> int { return a + b; } |
@@ -112,7 +112,7 @@ describe('inlay hints', function()
|
]]
})
- exec_lua([[vim.lsp._inlay_hint.clear()]])
+ exec_lua([[vim.lsp.buf.inlay_hint(bufnr, false)]])
screen:expect({
grid = [[
auto add(int a, int b) { return a + b; } |