kickstart.nvim

repository·master·Indexed 12 days ago

https://github.com/nvim-lua/kickstart.nvim

A minimal, single-file Neovim configuration template designed as a documented starting point for users to build their own custom setup without the complexity of a full distribution.

Tokens
1.1K
Snippets
3
Records
7
Agent score
49%

What's inside kickstart.nvim

  1. What is kickstart.nvim

    master

    kickstart.nvim is a small, single-file, and completely documented starting point for Neovim configurations.

    Note: It is explicitly NOT a Neovim distribution. It is designed to be a foundation that you can build upon and customize rather than a pre-packaged environment.

  2. Run multiple Neovim configurations in parallel using NVIM_APPNAME

    master

    You can maintain multiple Neovim configurations (like kickstart.nvim alongside your existing one) by using the NVIM_APPNAME environment variable. This tells Neovim to look for configuration and data in directories named after the app name.

    For example, if you install kickstart in ~/.config/nvim-kickstart, you can create an alias to run it specifically:

    alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
  3. Post-installation: Manage plugins with vim.pack

    master

    After cloning, start Neovim with nvim. The vim.pack system will automatically install all required plugins.

    Use the following commands to manage your plugins:

    • :lua vim.pack.update(nil, { offline = true }): Inspect current plugin state.
    • :lua vim.pack.update(): Fetch updates. Use :write to apply them or :quit to cancel.
    nvim
  4. Install external dependencies for kickstart.nvim

    master

    Kickstart.nvim requires several external tools to function correctly. Ensure the following are installed on your system:

    • Basic utils: git, make, unzip, C Compiler (gcc)
    • Search/Navigation: ripgrep, fd-find (or fd)
    • Parsing: tree-sitter CLI
    • Clipboard: xclip, xsel, or win32yank (platform dependent)
    • Optional (Icons): A Nerd Font. If installed, set vim.g.have_nerd_font = true in your init.lua.
    • Language Specific: npm (for TypeScript), go (for Golang), etc.
  5. Install Neovim via alternative version managers

    master

    If your system package manager provides an outdated version of Neovim, use one of these tools to ensure you have the latest stable or nightly builds:

    • Bob (Rust-based):
      rustup default stable
      rustup update stable
      cargo install bob-nvim
      bob use stable
    • Homebrew (macOS/Linux): brew install neovim
    • mise:
      mise plugins install neovim
      mise use neovim@stable
    • asdf:
      asdf plugin add neovim
      asdf install neovim stable
      asdf set neovim stable --home
      asdf reshim neovim
  6. Install kickstart.nvim

    master

    To install kickstart.nvim, first back up any existing Neovim configuration. It is highly recommended to create your own GitHub repository using the 'Use this template' button before cloning, so you have a personal copy to modify.

    Note: If you use your own repository, replace nvim-lua with your GitHub username in the commands below. You should also remove nvim-pack-lock.json from your .gitignore to track plugin state in version control.

    # Linux and Mac
    git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
    # Windows (cmd.exe)
    git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
    # Windows (powershell.exe)
    git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
  7. Configure telescope-fzf-native.nvim for CMake on Windows

    master

    Kickstart's default configuration for telescope-fzf-native.nvim uses make. If you are on Windows and prefer using cmake instead, you must modify init.lua in two places:

    1. Plugin Inclusion: Update the plugin list to include the plugin if cmake is available:
    if vim.fn.executable 'make' == 1 or vim.fn.executable 'cmake' == 1 then
      table.insert(plugins, gh 'nvim-telescope/telescope-fzf-native.nvim')
    end
    1. Build Hook: Update the PackChanged hook to use cmake commands when make is missing:
    if name == 'telescope-fzf-native.nvim' then
      if vim.fn.executable 'make' == 1 then
        run_build(name, { 'make' }, ev.data.path)
      elseif vim.fn.executable 'cmake' == 1 then
        run_build(name, { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release' }, ev.data.path)
        run_build(name, { 'cmake', '--build', 'build', '--config', 'Release', '--target', 'install' }, ev.data.path)
      end
      return
    end