Skip to content

Commit da50eac

Browse files
committed
Add a newly discovered alternative to the README
1 parent 8710ed7 commit da50eac

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

README.md

+18-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
## Movement
3434

35-
The movement commands move you through the syntax tree in an intuitive way:
35+
The movement commands move you through your code in an intuitive way:
3636

3737
* **`:Treewalker Up`** - Moves up to the previous neighbor node, skipping comments, annotations, and other unintuitive nodes
3838
* **`:Treewalker Down`** - Moves down to the next neighbor node, skipping comments, annotations, and other unintuitive nodes
@@ -156,13 +156,12 @@ vim.keymap.set('n', '<C-S-l>', '<cmd>Treewalker SwapRight<cr>', { silent = true
156156
## Alternatives
157157

158158
* [syntax-tree-surfer](https://github.com/ziontee113/syntax-tree-surfer)
159-
is the closest thing to Treewalker. I only created Treewalker because I
160-
couldn't get syntax-tree-surfer to work :/. Treewalker has a robust test suite,
161-
makes use of the type system, has CI (automated testing), and has organized
162-
code (so the plugin should be pretty stable). I believe Treewalker usage is a
163-
little bit simpler and more intuitive. Treewalker is missing the visual
164-
selection swap feature that syntax-tree-surfer has, though. syntax-tree-surfer
165-
is also publicly archived.
159+
is publicly archived and I could not get it to work :/
160+
`Treewalker` has a robust test suite, makes use of the type system, has CI
161+
(automated testing), and has organized code. So the plugin should be pretty
162+
stable. I believe `Treewalker` usage is a little bit simpler and more intuitive.
163+
`Treewalker` is missing the visual selection swap feature that syntax-tree-surfer
164+
has, though.
166165

167166
* [nvim-treehopper](https://github.com/mfussenegger/nvim-treehopper)
168167
is similar in that it uses the AST to navigate, but it takes more of a
@@ -185,4 +184,15 @@ of `Treewalker`'s left/right swapping code is inspired by `ts_utils`.
185184
startwise coinciding node over the lowest. But mostly it does the work of
186185
finding the next relevant node and packaging it all up into a nice interface.
187186

187+
* [tree-climber.nvim](https://github.com/drybalka/tree-climber.nvim)
188+
i discovered long after having made `Treewalker`. It seems to be the most
189+
similar of all of these. It works mostly the same, but with a little bit less
190+
refinement, including getting stuck on certain nodes, and navigating to nodes
191+
that don't necessarily seem helpful to go to. In my usage, it seems like
192+
`tree-climber` gives you more fine grained access to each individual node,
193+
whereas `Treewalker` takes a more linewise approach which allows you to make
194+
larger movements more easily. For movement inside of a single line, `Treewalker`
195+
doesn't help much, whereas `tree-climber` does.
196+
197+
188198

0 commit comments

Comments
 (0)