https://github.com/marcosalvalaggio/funktree
Simple Neovim plugin that displays file function names.
https://github.com/marcosalvalaggio/funktree
lua neovim neovim-plugin
Last synced: 10 months ago
JSON representation
Simple Neovim plugin that displays file function names.
- Host: GitHub
- URL: https://github.com/marcosalvalaggio/funktree
- Owner: marcosalvalaggio
- License: gpl-3.0
- Created: 2023-08-04T10:37:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-03T21:22:39.000Z (almost 2 years ago)
- Last Synced: 2025-03-02T08:34:29.695Z (about 1 year ago)
- Topics: lua, neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 3.78 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FunkTree
The **FunkTree** plugin simplifies navigation through objects and key structures in files.
It's based on the awesome [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim/tree/master) plugin
that works as a frontend for the parsing result of the analyzed file.
Currently, *FunkTree* works with:
| Language | Level |
|------------|--------------|
| Lua | Basic |
| Python | Advanced |
| JavaScript | Basic |
*FunkTree* enable users to navigate for example among classes, methods, and functions within the open file.
## Installation
### Packer
With [packer.nvim](https://github.com/wbthomason/packer.nvim)
```lua
use("marcosalvalaggio/funktree")
```
remap command:
```lua
vim.api.nvim_set_keymap('n', 'k', ':Funk', {noremap=true})
```
### Lazy
With [lazy.nvim](https://github.com/folke/lazy.nvim)
```lua
return {
"marcosalvalaggio/funktree",
dependencies = {"nvim-telescope/telescope.nvim"},
config = function()
vim.api.nvim_set_keymap('n', 'k', ':Funk', {noremap=true})
end
}
```
## Usage
FunkTree is composed by a single command:
```vimscript
:Funk
```
The *:Funk* command opens a new buffer containing the names of the key structures present in the analyzed file.
Moving the cursor to the line in the FunkTree buffer and pressing "Enter" closes the FunkTree buffer and positions the cursor in the original buffer at the lines indicated as "line" in the FunkTree buffer. If you want to close the FunkTree buffer simply press **esc** on the keyboard.