Home

Awesome

Yode-Nvim

| HackerNews | reddit |

Yode plugin for NeoVim

Focus on the important parts of the code. Hide the rest, literally. With Yode-Nvim you can go deeper than the file level, picking out the lines that are important for the current task. Whether you want to focus on important parts of a large file, or collect small parts of many files, you can see everything at a glance. Zoom from the focused part back into the file to briefly expand your context or adjust your focus. Everything happens in the editor, the rest of the tool chain still works, this makes Yode-Nvim work for any programming language, framework, etc.

For the past six months, I've been using this MVP in its various stages in development for Yode-Nvim itself. Currently I am working on fixing minor bugs and integrating more plugins.

Introduction Video

Yode Introduction Video

For a more in-depth introduction to the idea of Yode, check out the video of the proof of concept!

GIFs

Neomake error linting with correct error placement:

https://user-images.githubusercontent.com/163128/155854870-0efdebf9-f1b3-41ee-948f-845c026b0b46.mp4

Watch on Youtube instead

Code formatter changes file buffer and seditor:

https://user-images.githubusercontent.com/163128/155854806-d8c8d006-96e2-4c8f-a23c-5ba1f18fd692.mp4

Watch on Youtube instead

Gread to restore file with git:

https://user-images.githubusercontent.com/163128/155854880-a538f9c0-752c-4098-a6fd-c81f204fdb0c.mp4

Watch on Youtube instead

Features & Commands

Installation

You need at least Neovim 0.6. Add Plenary and Yode-Nvim to your config, e.g. with vim-plug:

Plug 'nvim-lua/plenary.nvim'
Plug 'hoschi/yode-nvim'

Important is that this repo is cloned with submodules, which happens automatically when you use vim-plug. The minimal setup is this:

lua require('yode-nvim').setup({})

Check out the help section for a more sophisticated configuration.

Interim Help

TODO move this to Vim help syntax ./doc/yode-nvim.txt. kdheepak/panvimdoc: Write documentation in pandoc markdown. Generate documentation in vimdoc.

lua require('yode-nvim').setup({})
map <Leader>yc      :YodeCreateSeditorFloating<CR>
map <Leader>yr :YodeCreateSeditorReplace<CR>
nmap <Leader>bd :YodeBufferDelete<cr>
imap <Leader>bd <esc>:YodeBufferDelete<cr>
" these commands fall back to overwritten keys when cursor is in split window
map <C-W>r :YodeLayoutShiftWinDown<CR>
map <C-W>R :YodeLayoutShiftWinUp<CR>
map <C-W>J :YodeLayoutShiftWinBottom<CR>
map <C-W>K :YodeLayoutShiftWinTop<CR>
" at the moment this is needed to have no gap for floating windows
set showtabline=2

Contribution

Integration with the LSP client to be able to use all the features in seditors as well is definitely one of my top priorities. Contributions that improve the collaboration with the rest of the NeoVim universe would help a lot. The integration of Neomake and Formatter.nvim can be taken as examples. Other plugins may be easier to integrate, check this ticket: Collection of tips to get Yode-Nvim working with other plugins

Development