New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: document symbols follow_cursor error #1403
Comments
Does this happen for every language and every time? I cannot reproduce this with lua_ls. On top of that, your repro config contains variables such as |
yeh! in my case, it happened in clangd\pyright\lua_ls most each time. And I find that pluginKeys.neoTree = {
window = {
mappings = {
["<space>"] = "",
["I"] = "focus_preview",
["P"] = { "toggle_preview", config = { use_float = false, use_image_nvim = true } },
["<"] = "prev_source",
[">"] = "next_source",
["z"] = "close_all_nodes",
["Z"] = "expand_all_nodes",
["y"] = "",
["Y"] = "",
["l"] = "",
["h"] = ""
},
},
filesystem = {
commands = {
my_close_node = function(state)
local node = state.tree:get_node()
if node.type == "directory" and node:is_expanded() then
require("neo-tree.sources.filesystem").toggle_directory(state, node)
else
require("neo-tree.ui.renderer").focus_node(state, node:get_parent_id())
end
end,
my_open_node = function(state)
local node = state.tree:get_node()
if node.type == "directory" then
if not node:is_expanded() then
require("neo-tree.sources.filesystem").toggle_directory(state, node)
elseif node:has_children() then
require("neo-tree.ui.renderer").focus_node(state, node:get_child_ids()[1])
end
end
end,
my_copy_filepath_to_clipboard = function(state)
local node = state.tree:get_node()
local filepath = node:get_id()
local filename = node.name
local modify = vim.fn.fnamemodify
local results = {
filepath,
modify(filepath, ":."),
modify(filepath, ":~"),
filename,
modify(filename, ":r"),
modify(filename, ":e"),
}
local plugin = "Neo-tree"
vim.ui.select({
"[1] Absolute path: " .. results[1],
"[2] Path relative to CWD: " .. results[2],
"[3] Path relative to HOME: " .. results[3],
"[4] Filename: " .. results[4],
"[5] Filename without extension: " .. results[5],
"[6] Extension of the filename: " .. results[6],
}, { prompt = "Choose to copy to clipboard:" }, function(choice)
if choice then
local i = tonumber(choice:sub(2, 2))
if i then
local result = results[i]
vim.fn.setreg('"', result)
vim.notify("Copied: ".. result, "info", { title = plugin })
else
vim.notify("Invalid selection", "info", { title = plugin })
end
else
vim.notify("Selection cancelled", "info", { title = plugin })
end
end)
end,
my_copy_file_to_clipboard = function(state)
require("neo-tree.sources.common.commands").copy_to_clipboard(state)
end,
my_cut_file_to_clipboard = function(state)
require("neo-tree.sources.common.commands").cut_to_clipboard(state)
end
},
window = {
mappings = {
["y"] = "my_copy_file_to_clipboard",
["Y"] = "my_copy_filepath_to_clipboard",
["x"] = "my_cut_file_to_clipboard",
["h"] = "my_close_node",
["l"] = "my_open_node"
},
fuzzy_finder_mappings = {
["<down>"] = "move_cursor_down",
["<C-j>"] = "move_cursor_down",
["<up>"] = "move_cursor_up",
["<C-k>"] = "move_cursor_up",
},
},
},
git_status = {
window = {
mappings = {
["A"] = "git_add_all",
["gu"] = "git_unstage_file",
["ga"] = "git_add_file",
["gr"] = "git_revert_file",
["gc"] = "git_commit",
["gp"] = "git_push",
["gg"] = "git_commit_and_push",
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
["oc"] = { "order_by_created", nowait = false },
["od"] = { "order_by_diagnostics", nowait = false },
["om"] = { "order_by_modified", nowait = false },
["on"] = { "order_by_name", nowait = false },
["os"] = { "order_by_size", nowait = false },
["ot"] = { "order_by_type", nowait = false },
["z"] = "",
["Z"] = "",
},
},
},
document_symbols = {
commands = {
my_open_node = function(state)
local node = state.tree:get_node()
if not node:is_expanded() then
require("neo-tree.sources.common.commands").toggle_node(state)
else
require("neo-tree.ui.renderer").focus_node(state, node:get_child_ids()[1])
end
end,
my_close_node = function(state)
local node = state.tree:get_node()
if node:is_expanded() then
require("neo-tree.sources.common.commands").toggle_node(state)
else
require("neo-tree.ui.renderer").focus_node(state, node:get_parent_id())
end
end,
},
window = {
mappings = {
["l"] = "my_open_node",
["h"] = "my_close_node",
["z"] = "",
["Z"] = "",
},
},
},
}
|
Did you check docs and existing issues?
Neovim Version (nvim -v)
0.9.5
Operating System / Version
Ubuntu22.04
Describe the Bug
After, I use above command, the error popup like following:
Screenshots, Traceback
message like above
Steps to Reproduce
<Leader>fd
Expected Behavior
no error
Your Configuration
The text was updated successfully, but these errors were encountered: