All Projects → jbyuki → monolithic.nvim

jbyuki / monolithic.nvim

Licence: MIT license
Neovim plugin to open multiple files in one buffer

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to monolithic.nvim

doctor.nvim
Emacs greatest feature, now also in neovim!
Stars: ✭ 27 (-22.86%)
Mutual labels:  neovim-plugin
commented.nvim
Neovim commenting plugin in Lua. Support operator, motions and more than 60 languages! 🔥
Stars: ✭ 110 (+214.29%)
Mutual labels:  neovim-plugin
vim-lineletters
because letters are easier to touch type than numbers
Stars: ✭ 38 (+8.57%)
Mutual labels:  neovim-plugin
wage
A WASM package and web app for encrypting and decrypting age-encrypted files, powered by rage.
Stars: ✭ 48 (+37.14%)
Mutual labels:  experimental
gitabra
Magit-lite for neovim
Stars: ✭ 55 (+57.14%)
Mutual labels:  neovim-plugin
beacon.nvim
Whenever cursor jumps some distance or moves between windows, it will flash so you can see where it is
Stars: ✭ 217 (+520%)
Mutual labels:  neovim-plugin
AutoSave.nvim
🧶 Automatically save your changes in NeoVim
Stars: ✭ 349 (+897.14%)
Mutual labels:  neovim-plugin
Mirai
Mirai 未来 - A powerful Minecraft Server Software coming from the future
Stars: ✭ 325 (+828.57%)
Mutual labels:  experimental
nvim-todoist.lua
Todoist plugin for Neovim in pure Lua, inspired by https://github.com/romgrk/todoist.nvim, which you should use instead
Stars: ✭ 22 (-37.14%)
Mutual labels:  neovim-plugin
citre
Ctags IDE on the True Editor
Stars: ✭ 230 (+557.14%)
Mutual labels:  code-reading
SwiftShell
Execute Shell Commands Inside Xcode Playground (Experimental)
Stars: ✭ 19 (-45.71%)
Mutual labels:  experimental
iris.nvim
🌈 Generate color palettes based on Neovim colorschemes.
Stars: ✭ 45 (+28.57%)
Mutual labels:  neovim-plugin
vimana-framework
Vimana is an experimental security framework that aims to provide resources for auditing Python web applications.
Stars: ✭ 47 (+34.29%)
Mutual labels:  experimental
DRV3-Tools
(Not actively maintained, use DRV3-Sharp) Tools for extracting and re-injecting files for Danganronpa V3 for PC.
Stars: ✭ 13 (-62.86%)
Mutual labels:  experimental
tmux.nvim
tmux integration for nvim features pane movement and resizing from within nvim.
Stars: ✭ 299 (+754.29%)
Mutual labels:  neovim-plugin
uaa-cli
CLI for UAA written in Go
Stars: ✭ 22 (-37.14%)
Mutual labels:  experimental
praise
Do stuff with your voice in the browser.
Stars: ✭ 13 (-62.86%)
Mutual labels:  experimental
options.nvim
A small library to create custom options
Stars: ✭ 15 (-57.14%)
Mutual labels:  neovim-plugin
clri
An unfinished CIL interpreter in Rust
Stars: ✭ 22 (-37.14%)
Mutual labels:  experimental
JMT-MCMT
A multithreading mod for for Minecraft forge 1.15.2 and 1.16.x
Stars: ✭ 206 (+488.57%)
Mutual labels:  experimental

monolithic.nvim

After using this plugin somewhat regularly, I came to the conlusion that this plug-in should be repurposed to be used with a floating window. Opening directly inside a buffer gives the wrong impression that the files should directly be editable. But in fact, monolithic.nvim is just for code reading and navigation. If you want to use the previous version, please revert back to the comit bb5f500. See Why opening inside a buffer was abandonned? for more details.

Capture.png

monolithic.nvim allows you to open multiple files inside a float. It is an experimental plugin to explore code reading.

Requirements

Install

The easiest method is install through plugin manager such as vim-plug.

vim-plug

Plug 'jbyuki/monolithic.nvim'

packer.nvim

use 'jbyuki/monolithic.nvim'

built-in plugin manager

  • Create a folder pack/<a folder name of your choosing>/start
  • Inside the start folder git clone monolithic.
    • git clone https://github.com/jbyuki/monolithic.nvim
  • In your init.lua, add the pack folder to packpath (see :help packpath)
    vim.o.packpath = vim.o.packpath .. ",<path to where pack/ is located>"

Quick start

Bind monolithic.nvim to a key shortcut. Use whichever key combination which suits you best.

nnoremap <leader>s :lua require"monolithic".open()<CR>
  1. Open a file in your project.
  2. Change the current working directory to your project using :cd or any other method.
  3. Open with monolithic.

Configurations

Further configurations can be done through setup(). Add the following to your Neovim configuration file.

lua << EOF
require"monolithic".setup {

  valid_ext = { "lua", "py", "cpp", "h" }, -- You have to specify which file patterns are opened
                                  -- be displayed inside the monolithic float
  exclude_dirs = { ".git" },
  mappings = {
    ["<leader>s"] = require"monolithic".navigate, -- used whenever you want to jump back to the file from monolithic
  }

  perc_width = 0.8, -- Editor width fraction which will be used by the monolithic float
  perc_height = 0.8, -- Same with height
  max_file = 100, -- Maximum number of files that can be opened in the buffer
  max_search = 1000, -- Maximum number of files, it will search for
  highlight = true, -- Setting this false can increase the speed a lot!
}
EOF

But why?

With current programming methodologies, source code is often split up into multiple small modules. When you read the source code for the first time, it's often a pain to navigate between the files without the proper tools.

Existing solution

The standard solution to go about this is to use a grep-like tool. Now with all the plugin integration which adds fuzzy-finding on-top, previewing, etc... it's really a breeze to search for a word accross files. However it's still a tool that needs to be invoked, you need to confirm you search, some UI you have to interact with which can feel heavy for some people.

New solution

For small - medium projects, I think it's reasonable to open all files in one-go. This allows to have everything loaded in the buffer and now searching becomes instantenous and quickly skimming accross the files is natural.

Why opening inside a buffer was abandonned?

Originally, monolithic.nvim opened multiple files inside a buffer. The most apparent issues is that standard utilities (which could be vital for certain user) such as LSP, treesitter are not functionnal anymore. The main issue is that it gave a wrong message about the plug-in. When opening files with monolithic.nvim, the user natural instinct was to modify files. But monolithic.nvim is more targeted as a code reading tools and keyword searching with * and n. Changing to floats would in my opinion give a more clear message that the buffer should not be edited and only used as a temporary navigation tool.

Opening a float would kind of contradict the reason of existence of monolithic.nvim in the first place because its main interesting point was the lack of UI. Opening a float would be equivalent to opening a fuzzy finder.

But in my opinion, it has still benefits as the user can freely navigate inside the float by using standard search and * and n. I'm aware this is still not an optimal solution for code navigation inside small projects because LSP navigation is not possible inside floats for example.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].