Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Mr-LLLLL/treesitter-outer
Jump outer node smartly
https://github.com/Mr-LLLLL/treesitter-outer
Last synced: 3 months ago
JSON representation
Jump outer node smartly
- Host: GitHub
- URL: https://github.com/Mr-LLLLL/treesitter-outer
- Owner: Mr-LLLLL
- License: apache-2.0
- Created: 2023-09-14T01:46:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-10T06:38:01.000Z (8 months ago)
- Last Synced: 2024-07-05T00:46:26.012Z (7 months ago)
- Language: Scheme
- Homepage:
- Size: 33.2 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - Mr-LLLLL/treesitter-outer - Jump to outer node with smart. (Motion / GitHub)
README
# Treesitter-Outer
> In Some language like C/CPP, Go, Rust..., I always use `[{` and `]}` to jump outer { and }. But in lua, python..., it's not work any more. So i write this plug to do this.
jump to outer node smartly base on [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) And thank [nvim-treesitter-textsubject](https://github.com/RRethy/nvim-treesitter-textsubjects) to provide Tree-Sitter queries
![Screencasts](https://github.com/Mr-LLLLL/media/tree/master/treesitter-outer/outer.gif)
## Installation
With [lazy.nvim](https://github.com/folk/lazy.nvim):
``` lua
{
'Mr-LLLLL/treesitter-outer',
dependencies = "nvim-treesitter/nvim-treesitter",
-- only load this plug in follow filetypes
ft = {
"c",
"cpp",
"elixir",
"fennel",
"foam",
"go",
"javascript",
"julia",
"lua",
"nix",
"php",
"python",
"r",
"ruby",
"rust",
"scss",
"tsx",
"typescript",
},
-- default config
opts = {
filetypes = {
"c",
"cpp",
"elixir",
"fennel",
"foam",
"go",
"javascript",
"julia",
"lua",
"nix",
"php",
"python",
"r",
"ruby",
"rust",
"scss",
"tsx",
"typescript",
},
mode = { 'n', 'v' },
prev_outer_key = "[{",
next_outer_key = "]}",
},
}
```