Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xiaoshihou514/squirrel.nvim
Jump around quickly using treesitter!
https://github.com/xiaoshihou514/squirrel.nvim
neovim neovim-plugin
Last synced: about 2 months ago
JSON representation
Jump around quickly using treesitter!
- Host: GitHub
- URL: https://github.com/xiaoshihou514/squirrel.nvim
- Owner: xiaoshihou514
- License: gpl-3.0
- Created: 2023-11-05T20:34:35.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-01-04T11:44:35.000Z (5 months ago)
- Last Synced: 2024-01-24T10:44:22.649Z (4 months ago)
- Topics: neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 22.5 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Lists
- awesome-neovim - xiaoshihou514/squirrel.nvim - Quickly jump between tree-sitter nodes. (Motion / GitHub)
- awesome-neovim - xiaoshihou514/squirrel.nvim - Quickly jump between tree-sitter nodes. (Motion / GitHub)
- awesome-neovim - xiaoshihou514/squirrel.nvim - Quickly jump between tree-sitter nodes. (Motion / GitHub)
README
# 🐿️ squirrel.nvim
[![LuaRocks](https://img.shields.io/luarocks/v/xiaoshihou514/squirrel.nvim?logo=lua&color=green)](https://luarocks.org/modules/xiaoshihou514/squirrel.nvim)_A small squirrel jumping around the syntax tree!_
https://github.com/xiaoshihou514/squirrel.nvim/assets/108414369/c8b53e88-459f-4f80-b927-4a8eea7d66a4
## Features
- Small and lightweight
- Jump to the start/end of treesitter nodes
- Linewise jump + jump to any visible spot## Installation
Install like any other plugin, I would recommend using [rocks.nvim](https://github.com/nvim-neorocks/rocks.nvim), add the following to your `rocks.toml` by using `Rocks edit`
```toml
"squirrel.nvim" = "1.0.0"
```## Keymaps
The following are already mapped on load, you can also remap it to whatever you want
```lua
-- jump to start of any node on the current line
vim.keymap.set({ "n", "x" }, "gaa", require("squirrel.hop").hop_linewise)
-- jump to start of any visible node
vim.keymap.set({ "n", "x" }, "ga", require("squirrel.hop").hop)
-- jump to end of any node on the current line
vim.keymap.set({ "n", "x" }, "gee", function()
require("squirrel.hop").hop_linewise({
head = false,
tail = true,
})
end)
-- jump to end of any visible node
vim.keymap.set({ "n", "x" }, "ge", function()
require("squirrel.hop").hop({
head = false,
tail = true,
})
end)
```If you want, you can also jump to any start _or_ end of nodes
```lua
require("squirrel.hop").hop_linewise({ head = true, tail = true })
```## Configuration
Nonexistent, probably won't be one