Skip to content
/ nvim Public

Personal Neovim configuration

License

Notifications You must be signed in to change notification settings

daephx/nvim

Repository files navigation

Neovim Configuration

Neovim Actions Languages Size License
Linux macOS Windows

Introduction

Personal Neovim configuration that uses Lazy and Mason for dependency management.

You can find all plugin specifications within lua/plugins.

Dependencies

Note

This configuration primarily targets Neovim nightly but aims to be compatible with the latest stable release. Be sure the version provided by your package manager is up-to-date, or see one of the other available methods for installation: https://github.com/neovim/neovim/wiki/Installing-Neovim

External dependencies are kept to a minimum. However, some plugins do require extra packages to be installed.

Here is a list of plugin dependencies:

Plugin Dependencies
lazy.nvim git
mason.nvim curl, wget, gzip, tar, unzip
telescope.nvim fd, ripgrep
markdown-preview.nvim npm
nvim-treesitter tree-sitter-cli

Mason

Many packages provided by Mason either install pre-compiled binaries or utilize a given language for its runtime. It's recommended to install any relevant tools for the stack you're targeting, be that Go, Rust, or Web development.
However, there are some exceptions...

Primary node.js, since many language servers and tools are implemented in JavaScript or TypeScript.

Some of the packages that require node: bashls, cssls, html-lsp, jsonls, markdownlint, prettier, pyright, yamlls

Fonts & Symbols

For a better visual experience, install and configure your terminal to use a patched font family from nerd-fonts
Or, configure your system to handle symbols via Font Substitution & Fallback.

Recommended: CascadiaCode, FiraCode, Hack

Compatibility (Optional)

For plugins that are built in other languages, you may need to install one of the following compatibility clients:

Language Client/Plugin-host
Node node-client
Python pynvim
Ruby neovim-ruby

Installation

Ensure Neovim is properly installed, and clone this repository to your platform's configuration path.
Then simply run nvim to kick off the bootstrap process, which will install all the required plugins and parsers!

# Linux and MacOS
git clone https://github.com/daephx/nvim.git ~/.config/nvim

# Windows
git clone https://github.com/daephx/nvim.git ~\AppData\Local\nvim

If you already have your own set of configuration files, you can run this configuration alongside your own by cloning to a separate directory and launching Neovim after defining the NVIM_APPNAME environment variable.

git clone https://github.com/daephx/nvim.git ~/.config/nvim-daephx
NVIM_APPNAME=nvim-daephx nvim

On Unix, you can use the Makefile to create a temporary instance: make run

This will overwrite the XDG environment variables just for that session, creating a temporary home directory where Neovim will run for storing plugins, parsers and Neovim data.

Afterwords, you can manually delete the directory or use: make clean

What should I do if I'm getting errors?

  • Verify that your Neovim version is up-to-date! stable / nightly
  • Try restarting nvim to ensure the necessary plugins are properly loaded.
  • Run :checkhealth to check for any errors, such as missing dependencies.
  • Finally, check for or feel free to open an issue regarding your problem.

Folder Structure

nvim/                 # Neovim config directory
├─ after/
│  ├─ colors/         # Override builtin colorschemes
│  │  ├─ default
│  │  └─ habamax
│  ├─ ftplugin/       # Filetype specific options
│  │  ├─ lua.lua
│  │  └─ vim.lua
│  └─ queries/        # Treesitter extended queries
│     ├─ lua/
│     └─ vim/
├─ lua/
│  ├─ config/         # Editor options and commands
│  ├─ plugins/        # Plugin specifications/configs
│  │  ├─ colors/      # Colorscheme plugins
│  │  ├─ cmp          # Code completion plugins
│  │  ├─ dap          # Debug adapter plugins
│  │  └─ lsp          # Language server plugins
│  └─ snippets/       # Luasnip compatible snippets
│     ├─ global
│     └─ lua
├─ snippets/          # LSP compatible snippets
│  ├─ package.json    # Snippets package manifest
│  ├─ global
│  └─ lua
└─ templates/         # Templates directory
   └─ lua.skel        # New lua file skeleton