Skip to content
serpent213Public
forked from LGUG2Z/JeezyVim

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

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

75 Commits

Folders and files

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.

Light package

For non-development machines, the light package keeps the same UI, keybindings, search, and Git integration, with a smaller selection of language tools and parsers:

nix run github:serpent213/CheezyVim#light
# From a local checkout:
nix run .#light

Install packages.<system>.cheezyvim-light, or pkgs.cheezyvim-light through the overlay. The default package remains the full configuration.

  • Omits Go, Typst, Elixir, and Tailwind language servers and the Go/Typst formatters.
  • Keeps Python completion and type checking through Pyright; Ruff supplies linting, formatting, and import organization. Running Python scripts requires a separately installed system or project interpreter.
  • Omits pylsp, pylint, mypy, Black, isort, SQLFluff, Fish linting, and markdownlint. Markdown retains its language server; Fish retains syntax highlighting.
  • Disables Python/Ruby plugin providers and uses gitMinimal.
  • Includes 36 Tree-sitter parsers for common configuration files, scripts, web files, Git files, and Neovim itself. See the light configuration for the exact selection.

With the current lock file, the uncompressed runtime closure on Apple Silicon is approximately 906 MiB, compared with 3.46 GiB for the full package. Sizes vary by platform and dependency versions.

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

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages