Comments (2)
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 keymappings
that I have no clue what it is. Please give us a reproducible config!!!
from neo-tree.nvim.
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
keymappings
that I have no clue what it is. Please give us a reproducible config!!!
yeh! in my case, it happened in clangd\pyright\lua_ls most each time. And I find that follow_cursor=true
cause this error. here is my keymappings:
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"] = "",
},
},
},
}
from neo-tree.nvim.
Related Issues (20)
- BUG: fuzzy find does not take always_show into account HOT 4
- BUG: Filter doesn't work
- BUG: Custom commands breaks `?` HOT 2
- BUG: can't navigate up when folder removed from under neo-tree
- BUG: Disable foldcolumn of statuscol HOT 2
- Neo-tree can't correctly get diagnostic sings for Neovim 0.10.0-dev-3097+g064f3e42e-dirty
- BUG: global table_is_empty
- BUG: reveal does not work for targets under hidden folders
- FEATURE: Keybind to unzip ZIP, RAR, TAR, GZ, 7Z HOT 1
- BUG: If deleting a file that you are working on and proceed to delete additional ones, you can delete your entire working directory.
- FEATURE: support for branches in git status
- BUG: dependencies typo in lazy.nvim config in readme
- BUG: foldlevel breaks help display HOT 1
- BUG: Black/White background color on interactive windows since neovim v0.10 HOT 6
- BUG: vim.diagnostics.is_disabled() is deprecated HOT 1
- BUG: v3.x not updated to latest release HOT 4
- FEATURE: [HELP] How to toggle `follow_current_file`?
- FEATURE: DevIcons of an item retain their colors even if the item is ignored or filtered
- FEATURE: Favorite list folder HOT 1
- BUG: Unable to auto close neo-tree when file is opened through fuzzy finder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neo-tree.nvim.