Comments (13)
Hasn't happened in a while
from nvim-treeclimber.
I'll take a look this week and see if I can replicate.
from nvim-treeclimber.
Thanks for reporting @perrin4869!
from nvim-treeclimber.
sorry, still happening π
from nvim-treeclimber.
One other thing that I noticed is, sometimes immediately after running select_expand
a few times, if I press a command such as d
to delete the selected text, or =
to indent it, instead of running the command, it will be replaced by the pressed key (it's as if I'd pressed sd
in the first case, or s=
in the second).
from nvim-treeclimber.
Interesting, would you be able to test if this happens with other plugins disabled, just to rule that out?
from nvim-treeclimber.
Sure, I really should try to figure out how to reproduce it ^^;;
It's been happening in some Kotlin files, just can't reproduce it right now for some reason again π
btw, the issue I described above, if before the command I press V
, then the command, it would work as expected...
from nvim-treeclimber.
from nvim-treeclimber.
Always on the second call
from nvim-treeclimber.
ok, I managed to reproduce!!
take this file, foo.kt
:
package com.nvim.treehopper.reproduction
class MyClass {
class Fixture {
data class Fixture() {
fun execute(parameters: Map<String, String>, status: HttpResponseStatus = HttpResponseStatus.SEE_OTHER) {}
}
}
}
If you put your cursor, say, anywhere on execute
(actually, anywhere on the line seems to work), then hit <S-v><M-k><M-k><M-k>
, the file will change to:
package com.nvim.treehopper.reproduction
class MyClass {
class Fixture {
data class fixture() {
gk
}
}
}
Sorry for the contrived example, but it's not easy to reproduce ^^;;
Sorry, it's not always on the second call, sometimes it's the third call, also I don't think it's a race condition, because the timing of the keystrokes doesn't seem to affect the outcome
Edit: I confirmed this will happen also inside typescript and lua files. I couldn't find a way to reproduce without running <S-v>
first, but the issue did occur before under different conditions
from nvim-treeclimber.
@perrin4869 What's <s-v>
mapped to in your config?
from nvim-treeclimber.
Largely copied the setup from the readme:
local tc = require("nvim-treeclimber")
-- Keymaps
vim.keymap.set("n", "<leader>k", tc.show_control_flow, {})
vim.keymap.set({ "x", "o" }, "i.", tc.select_current_node, { desc = "select current node" })
vim.keymap.set({ "x", "o" }, "a.", tc.select_expand, { desc = "select parent node" })
vim.keymap.set(
{ "n", "x", "o" },
"<M-e>",
tc.select_forward_end,
{ desc = "select and move to the end of the node, or the end of the next node" }
)
vim.keymap.set(
{ "n", "x", "o" },
"<M-b>",
tc.select_backward,
{ desc = "select and move to the begining of the node, or the beginning of the next node" }
)
vim.keymap.set({ "n", "x", "o" }, "<M-[>", tc.select_siblings_backward, {})
vim.keymap.set({ "n", "x", "o" }, "<M-]>", tc.select_siblings_forward, {})
vim.keymap.set(
{ "n", "x", "o" },
"<M-g>",
tc.select_top_level,
{ desc = "select the top level node from the current position" }
)
vim.keymap.set({ "n", "x", "o" }, "<M-h>", tc.select_backward, { desc = "select previous node" })
vim.keymap.set({ "n", "x", "o" }, "<M-j>", tc.select_shrink, { desc = "select child node" })
vim.keymap.set({ "n", "x", "o" }, "<M-k>", tc.select_expand, { desc = "select parent node" })
vim.keymap.set({ "n", "x", "o" }, "<M-l>", tc.select_forward, { desc = "select the next node" })
vim.keymap.set({ "n", "x", "o" }, "<M-L>", tc.select_grow_forward, { desc = "Add the next node to the selection" })
vim.keymap.set({ "n", "x", "o" }, "<M-H>", tc.select_grow_backward, { desc = "Add the next node to the selection" })
Edit: ah, <S-v>
is not mapped to anything, it's just for selecting a whole line
from nvim-treeclimber.
Related Issues (8)
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 nvim-treeclimber.