https://github.com/aekasitt/oxeye.nvim
Structural search and rewrite tool to locate and replace code inside Neovim using ast-grep
https://github.com/aekasitt/oxeye.nvim
ast-grep grep neovim neovim-plugin nvim plugin syntax-aware syntax-tree
Last synced: 11 months ago
JSON representation
Structural search and rewrite tool to locate and replace code inside Neovim using ast-grep
- Host: GitHub
- URL: https://github.com/aekasitt/oxeye.nvim
- Owner: aekasitt
- License: mit
- Created: 2025-06-20T07:24:07.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-06-22T16:44:56.000Z (11 months ago)
- Last Synced: 2025-06-22T17:35:27.533Z (11 months ago)
- Topics: ast-grep, grep, neovim, neovim-plugin, nvim, plugin, syntax-aware, syntax-tree
- Language: Lua
- Homepage:
- Size: 348 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oxeye.nvim
[](https://neovim.io)
[](https://github.com/aekasitt/oxeye.nvim)
[](https://github.com/aekasitt/oxeye.nvim)
[](https://github.com/aekasitt/oxeye.nvim)

## Installation
### Lazy
```lua
{
'aekasitt/oxeye.nvim',
config = function()
local oxeye = require('oxeye')
vim.keymap.set('n', 'ox', oxeye.live_grep, { desc = 'Live structural search' })
end,
dependencies = {
'ibhagwan/fzf-lua',
'nvim-lua/plenary.nvim',
}
}
```
### Packer
```lua
use {
'aekasitt/oxeye.nvim',
config = function()
local oxeye = require('oxeye')
vim.keymap.set('n', 'ox', oxeye.live_grep, { desc = 'Live structural search' })
end,
requires = {
'ibhagwan/fzf-lua',
'nvim-lua/plenary.nvim',
},
}
```
## Roadmap
* More commands
* Less `fzf-lua`, floating panel and previewer can be done without
* Add ast-grep linting
* Dynamic installation scripts (install via `brew`, `npm` or `pip`)
## Project structure
```
oxeye.nvim/
│
├── lua/
│ └── oxeye/
│ ├── build.lua # Install ast-grep using cargo
│ └── init.lua # Setup oxeye if not existed
│
├── plugin/
│ ├── oxeye.lua # Verify dependencies before setup
│ └── state.lua # Store window id, buffer and other configs
│
├── LICENSE # Details of MIT License
└── README.md # Descriptions and roadmap
```
### Alternatives
1. [cshuaimin/ssr.nvim](https://github.com/cshuaimin/ssr.nvim) - Treesitter based structural search and replace plugin for Neovim.
2. [MagicDuck/grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim) - Find and Replace plugin for neovim
3. [ray-x/telescope-ast-grep.nvim](https://github.com/ray-x/telescope-ast-grep.nvim) - AST grep extension for telescope.nvim
### Acknowledgements
1. [อัญชัญ - Anchan](https://www.f0nt.com/release/anchan/) typeface by [Alisara Zilch](https://www.f0nt.com/author/zilch/)
2. [YT: ast-grep - DevOnDuty](https://youtu.be/HnlqPwTMEVc)
by [Dr. David Alexander Kunz](https://github.com/David-Kunz)
## License
This project is licensed under the terms of the MIT license.