aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp_spec.lua
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2023-07-14 18:47:18 +0200
committerGitHub <noreply@github.com>2023-07-14 09:47:18 -0700
commit33e1a8cd7042816a064c0d2bf32b6570d7e88b79 (patch)
tree252a6296f031c413e441f4d4c88ed82eb24710c0 /test/functional/plugin/lsp_spec.lua
parentfd9ac5aa8e1c769d8cb22275206145b8d2603687 (diff)
downloadrneovim-33e1a8cd7042816a064c0d2bf32b6570d7e88b79.tar.gz
rneovim-33e1a8cd7042816a064c0d2bf32b6570d7e88b79.tar.bz2
rneovim-33e1a8cd7042816a064c0d2bf32b6570d7e88b79.zip
feat(lsp): map K to hover by default #24331
Related: https://github.com/neovim/neovim/issues/24252
Diffstat (limited to 'test/functional/plugin/lsp_spec.lua')
-rw-r--r--test/functional/plugin/lsp_spec.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 8eced4bfb5..38176c8749 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -365,6 +365,14 @@ describe('LSP', function()
eq('v:lua.vim.lsp.tagfunc', get_buf_option("tagfunc"))
eq('v:lua.vim.lsp.omnifunc', get_buf_option("omnifunc"))
eq('v:lua.vim.lsp.formatexpr()', get_buf_option("formatexpr"))
+ eq('', get_buf_option("keywordprg"))
+ eq(true, exec_lua[[
+ local keymap
+ vim.api.nvim_buf_call(BUFFER, function()
+ keymap = vim.fn.maparg("K", "n", false, true)
+ end)
+ return keymap.callback == vim.lsp.buf.hover
+ ]])
client.stop()
end
end;
@@ -372,6 +380,13 @@ describe('LSP', function()
eq('', get_buf_option("tagfunc"))
eq('', get_buf_option("omnifunc"))
eq('', get_buf_option("formatexpr"))
+ eq('', exec_lua[[
+ local keymap
+ vim.api.nvim_buf_call(BUFFER, function()
+ keymap = vim.fn.maparg("K", "n", false, false)
+ end)
+ return keymap
+ ]])
end;
}
end)