Closed lqfxz520 closed 2 years ago
what neovim version do you have?
The version number of Neovim is 6.1, so it needs a higher version number than neovim, right?
yes, it's a relatively new API from ~13 days ago
I see. Your code is very useful to me Thank you for your answer.
Hello, @elianiva
method M.workspace_symbols
is called in file modules/lsp/mappings.lua
, but method M.workspace_symbols
is defined in file plugins/telescope.lua
.
This is supposed to be a module variable, right? Why can it be used in file modules/lsp/mappings.lua
-- path: plugins/telescope.lua
M.workspace_symbols = function()
require("telescope.builtin").lsp_workspace_symbols {
path_display = { "absolute" },
}
end
-- path: modules/lsp/mappings.lua
map(bufnr, "n", "<Leader>gs", "", {
callback = M.workspace_symbols,
desc = "Find workspace symbols using Telescope",
noremap = true,
silent = true,
})
you need to do require("plugins.telescope").workspace_symbols
instead
Parameter 5: Accept
callback
as key is unknown key, An error occurs when executing code Can you tell me why?