Home

Awesome

      ___           ___           ___           ___                                    ___     
     /  /\         /__/\         /  /\         /  /\          ___        ___          /__/\    
    /  /:/         \  \:\       /  /:/_       /  /::\        /__/\      /  /\        |  |::\   
   /  /:/           \__\:\     /  /:/ /\     /  /:/\:\       \  \:\    /  /:/        |  |:|:\  
  /  /:/  ___   ___ /  /::\   /  /:/ /:/_   /  /:/  \:\       \  \:\  /__/::\      __|__|:|\:\ 
 /__/:/  /  /\ /__/\  /:/\:\ /__/:/ /:/ /\ /__/:/ \__\:\  ___  \__\:\ \__\/\:\__  /__/::::| \:\
 \  \:\ /  /:/ \  \:\/:/__\/ \  \:\/:/ /:/ \  \:\ /  /:/ /__/\ |  |:|    \  \:\/\ \  \:\~~\__\/
  \  \:\  /:/   \  \::/       \  \::/ /:/   \  \:\  /:/  \  \:\|  |:|     \__\::/  \  \:\      
   \  \:\/:/     \  \:\        \  \:\/:/     \  \:\/:/    \  \:\__|:|     /__/:/    \  \:\     
    \  \::/       \  \:\        \  \::/       \  \::/      \__\::::/      \__\/      \  \:\    
     \__\/         \__\/         \__\/         \__\/           ~~~~                   \__\/    
<div align="center">

License PRs Welcome Neovim version

Cheovim Showcase GIF

Neovim configuration switcher written in Lua. Inspired by chemacs.

IntroductionInstallationConfiguration

</div>

:star2: Introduction

Cheovim is a plugin designed to make your life easier by being able to manage several Neovim configurations simultaneously and allow you to fully seamlessly transition between them.

By default your configuration is stored under a static ~/.config/nvim directory. This means if you want to try out another chad's configuration you must first move away your configuration into a backup folder, install the other person's config, put it in the correct spot, clear your site/pack directory so that the plugin manager can work without conflicts, install the plugin manager, install the plugins and then start using the config. That's absolutely atrocious! Afterwards switching back is the exact same awful process.

But what if we told you all of that could be fully automated?

:clock4: Installation

:exclamation: Cheovim requires at least Neovim 0.7+ to operate, and may not work on Windows machines!

Cheovim only works with configurations that use the new init.lua configuration style. If we get enough requests we will implement init.vim support too, but for now keep up with the times!

To install cheovim, make sure to first move your configuration (located under ~/.config/nvim/) out of the way (into e.g. ~/.config/nvim.bak/). Afterwards be sure to clear everything from ~/.local/share/nvim/site/pack/, this is the directory where all of your current plugins are installed. Cheovim uses symlinks as part of its magic and needs this directory to be clean. Optionally, to make your life easier, remove any files inside your config that may autorun on startup and attempt to load plugins (like plugin/packer_compiled.lua) - this isn't necessary but you'll see that it makes the initial install a bunch easier in some cases.

Then we can start the installation!

git clone --depth=1 https://github.com/NTBBloodbath/cheovim ~/.config/nvim

Will clone cheovim into the config directory. You're almost ready to go! Now we just have to tell cheovim which configs to use: Navigate to ~/.config/nvim/ and open the profiles.lua file - this is where all the configuration resides.

This is the default file:

--[[
      ___           ___           ___           ___                                    ___     
     /  /\         /__/\         /  /\         /  /\          ___        ___          /__/\    
    /  /:/         \  \:\       /  /:/_       /  /::\        /__/\      /  /\        |  |::\   
   /  /:/           \__\:\     /  /:/ /\     /  /:/\:\       \  \:\    /  /:/        |  |:|:\  
  /  /:/  ___   ___ /  /::\   /  /:/ /:/_   /  /:/  \:\       \  \:\  /__/::\      __|__|:|\:\ 
 /__/:/  /  /\ /__/\  /:/\:\ /__/:/ /:/ /\ /__/:/ \__\:\  ___  \__\:\ \__\/\:\__  /__/::::| \:\
 \  \:\ /  /:/ \  \:\/:/__\/ \  \:\/:/ /:/ \  \:\ /  /:/ /__/\ |  |:|    \  \:\/\ \  \:\~~\__\/
  \  \:\  /:/   \  \::/       \  \::/ /:/   \  \:\  /:/  \  \:\|  |:|     \__\::/  \  \:\      
   \  \:\/:/     \  \:\        \  \:\/:/     \  \:\/:/    \  \:\__|:|     /__/:/    \  \:\     
    \  \::/       \  \:\        \  \::/       \  \::/      \__\::::/      \__\/      \  \:\    
     \__\/         \__\/         \__\/         \__\/           ~~~~                   \__\/    

	A config switcher written in Lua by NTBBloodbath and Vhyrro.
--]]

-- Defines the profiles you want to use
local profiles = {
    --[[
    Here's an example:

	<name_of_config> = { <path_or_url_to_config>, {
            -- Where to install plugins under site/pack
	        plugins = "packer",
            -- Whether or not to preconfigure a plugin manager for you
            preconfigure = "packer:opt",
		}
	}

    More in-depth information can be found in cheovim's README on GitHub.
    --]]
    my_config = { "<path_or_url>", {
    		plugins = "packer",
    		preconfigure = "packer",
	    }
    },
}

-- return <name_of_config>, <list_of_profiles>
return "my_config", profiles

You can tweak this file as you see fit, although we recommend reading the next section to actually know what you're doing.

:wrench: Configuration

Cheovim has a fair amount of configuration that may not become apparent right off the bat. Here's the things that you can change:

local profiles = {
	my_config = { "/my/path", {
			setup = function()
				os.remove("some_important_file")
			end,
			config = "PackerSync",
			plugins = "<plugin_location>",
			preconfigure = "{packer|paq-nvim}:{start|opt}:<branch>",
		}
	}
}

return "my_config", profiles

Options

Upon launching a new config that hasn't been preconfigured yet you will be greeted with a random message, can you find em' all?

The Cheovim Command

Ohoho, it doesn't stop there. Cheovim also supplies a :Cheovim command that you can use to clean up your configs, remove plugins, force reload the configuration on next boot, etc. These are the subcommands available:

TODO

Made with love by NTBBloodbath and Vhyrro :heart: