Skip to content

A fast, reliable NeoVim configuration as a Nix Flake for people who want to use NeoVim as an editor and not as an IDE

Notifications You must be signed in to change notification settings

serpent213/CheezyVim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CheezyVim

CheezyVim is a declarative NeoVim configuration built with NixVim, forked from JeezyVim.

Includes Elixir LS, Avante and Copilot (the latter is currently disabled).

Usage and Installation

You can run this flake directly to try it out:

nix run github:serpent213/CheezyVim

You can add CheezyVim as an input to your flake configuration like this:

{
    inputs.cheezyvim.url = "github:serpent213/CheezyVim";
}

You can add the inputs.cheezyvim.overlays.default overlay to your nixpkgs to make pkgs.cheezyvim available.

If you are using any of LGUG2Z's NixOS starter templates, you would add this to the overlays list in the nixpkgsWithOverlays function in flake.nix.

Extending

Is there a plugin or an LSP that you don't see enabled here, but you would like to enable when you install pkgs.cheezyvim? No problem!

{pkgs, ...}: {
  home.packages = [
    (pkgs.cheezyvim.nixvimExtend {
      # you can put anything under the "Options" section of the NixVim docs here
      # https://nix-community.github.io/nixvim/

      # some examples...

      # all your regular vim options here
      options = {
        textwidth = 120;
      };

      config = {
      # add your own personal keymaps preferences
        keymaps = [
          {
            mode = "n";
            action = ":vsplit<CR>";
            key = "|";
          }

          {
            mode = "n";
            action = ":split<CR>";
            key = "-";
          }
        ];


        plugins = {
          lsp.servers = {
            # full list of language servers you can enable on the left bar here:
            # https://nix-community.github.io/nixvim/plugins/lsp/servers/ansiblels/index.html

            graphql.enable = true;
          };

          # full list of plugins on the left bar here:
          # https://nix-community.github.io/nixvim/plugins/airline/index.html

          markdown-preview.enable = true;
        };
      };
    })
  ];
}

Forking

You can also just fork this repo and use it as a starting point for your own configuration!

Overview

LSPs, formatters and linters are set up for most common languages and configuration file types, as well the common TreeSitter-related plugins you probably remember from LunarVim.

The UI is also largely similar to LunarVim, using the lualine, bufferline and telescope plugins.

The keymaps are what you would expect, and whichkey is also integrated into the configuration to make various plugin keymaps discoverable.

Superpowers

There are a handful of shortcuts that I consider my superpowers in JetBrains IDEs which I have made LSP-equivalents for in this configuration.

  • ,e to toggle NvimTree, which when opening, will jump to the file in the current buffer
  • ,s to live grep
  • ,f to search through git-tracked files
  • ,, to rename whatever is under the cursor - trust me, this is the best shortcut I've ever made
  • ,b to peek at the definition of whatever is under the cursor
  • ,B to jump to the definition of whatever is under the cursor, or, if already at the definition, find all usages of the definition in a codebase
  • <C-t> to toggle in and out of the terminal; if the terminal line is focused, you can hit <Esc> to switch to normal mode in the terminal and then <C-t> again to hide it

Some custom tools

  • ,yf to yank the relative filepath of the current buffer to clipboard
  • ,yF to yank the absolute filepath of the current buffer to clipboard

Per-workspace RPC sockets

CheezyVim can automatically start RPC servers on Unix domain sockets for Neovim remote control on a per-git-repository basis. When enabled, Neovim will listen on a socket at /tmp/nvim-rpc.{project_name}.{pid}.sock for each git repository.

To enable this feature:

{pkgs, ...}: {
  home.packages = [
    (pkgs.cheezyvim.nixvimExtend {
      config = {
        globals = {
          open_rpc_pipe_per_workspace = true;
        };
      };
    })
  ];
}

The socket path is generated based on:

  • Project name (last part of git root directory, or current working directory if not in a git repo)
  • Process ID to avoid conflicts between multiple Neovim instances
  • Path escaping to handle special characters safely

The RPC socket allows external tools to send commands to the specific Neovim instance using the msgpack-rpc protocol. For example:

# For a project called "myproject" with PID 12345
# Send a command to the project-specific Neovim instance
nvim --server /tmp/nvim-rpc.myproject.12345.sock --remote-expr "vim.cmd('echo \"Hello from external tool!\"')"

This can be used in combination with tools like nvim-mcp for advanced integrations.

About

A fast, reliable NeoVim configuration as a Nix Flake for people who want to use NeoVim as an editor and not as an IDE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nix 92.5%
  • Lua 7.5%