Skip to content

xyven1/neovim-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim Configuration

This is my Neovim configuration. It uses recent and maintained plugins with a focus on performance and a complete developer experience. Load times in around 30ms on an 8 core laptop.

Motivation

The motivation to maintain my own configuration is two fold:

  1. Support unique aspects of my workflow (NixOS, Wezterm, Neovide, etc)
  2. I understand exactly why everything works the way it does, as I wrote the entire config

Features

  • Robust and automatic session management per branch in directories, as well as the ability to create custom sessions.
  • Popular and functional colorschemes preinstalled
  • Modern UI with Noice, nvim-notify, and others
  • Almost entirely lazy loaded
  • Searchable (<space>ek), well documented, and thorough keymappings
  • LSP, DAP, and linting which work well with NixOS
  • Treesitter textobject bindings that will become staples of your workflow

This config may contain some helpful examples of how to customize and configure Neovim, but pretty much only serves as that, as this config is completely tailored to my immediate needs and desires. If you use NixOS, then you find this configuration particularly interesting, as that is the OS is was written to support.

How I got here, and why I think other people should conisder doing the same thing

The original impetus to hand-craft my own configuration was to ensure that I understood everything my Neovim configuration was capable of. I started from a completely unmodified Neovim instance and slowly added functionality as I needed or wanted, but only after fully understanding what I already had. This depth-first approach to configuration is crucial if you want an efficient and comfortable workflow. In general, ~80% of your workflow will consist of only a few actions, so it's much more important to make those actions fast than to have access to a wide array of less-used features.

Another key benefit of crafting your own configuration emerges during the process of adding new functionality. When confronted with the need (or desire) for new functionality, you have the opportunity to explore all plugins that provide that functionality. This has served two purposes in my experience. The first is straightforward: I could ensure I got the best and most up-to-date experience possible, avoiding dead or dying plugins. The second is more subtle: you don't know what you don't know. In the context of Neovim, this often meant discovering plugins that provided functionality I didn't even know was possible—yet which ended up becoming key parts of my workflow. Two examples are nvim-treesitter-textobjects and oil.nvim. This kind of discovery only happens if you take the time to do the research, but the payoff is huge.

The upshot of all this is the following: I firmly believe everyone should start with plain Neovim before diving into highly complex plugins and distros. Neovim and Vim are, in their own right, powerful text editors—and at the end of the day, editing text makes up the vast majority of an IDE's responsibilities. So, before rushing to turn Neovim into an IDE, everyone should take the time to explore Neovim on its own, then add plugins to address specific workflow needs. The real power of Neovim only unlocks when you are using every feature of your configuration—and Neovim itself—to your advantage, instead of fighting with key mappings you can't remember or nurturing bad habits like spamming hjkl to get anywhere in your code because you never did the built-in Neovim tutorial. And unlike graphical IDEs, the functionality of Neovim is necessarily more obscured and difficult to discover through usage—that's essentially the exact issue graphical IDEs seek to address! You will only love Neovim if you fully embrace its philosophy, and not attempt to recreate what other tools can do better.

Despite this, I'm not sure I could recommend starting from complete scratch when transitioning to using Neovim as a full IDE, especially if your workflow is more typical. Newer distros such as LazyVim provide a great baseline without sacrificing configurability. There are many good arguments to be made for distros: time saved messing with configs, better support when things break, powerful features and customizations, and more. I've stuck with my configuration because my workflow is fast, comfortable, and natural. Switching configurations would require that I learn all the idiosyncrasies of the new setup and probably end up rewriting half of it just to suit my needs.

Install Steps

  1. First clone this repo into ~/.config/ with a command like the following:

git clone https://github.com/xyven1/neovim-config.git ~/.config/nvim

or if you already have a config

git clone https://github.com/xyven1/neovim-config.git ~/.config/xyven1/neovim-config

If you use the second option run Neovim with the folling environment variable: NVIM_APPNAME=xyven1/neovim-config/

  1. Install Neovim >=v0.10.0 from your package manager, or use the following script: ~/.config/nvim/scripts/nvim.sh
  2. Install the dependencies listed below (ones necessary for basic functionality are marked with !)
  3. Run the command nvim and let Lazy.nvim do its thing.
  4. Restart Neovim, and everything should work.

External dependencies

  • !fzf
  • !ripgrep
  • direnv (for loading development environments)
  • lazygit (git UI)
  • go (to build pendulum viewer)

Plugins

bars-and-lines

code-runner

colorscheme

colorscheme-creation

comment

competitive-programming

completion

cursorline

debugging

diagnostics

editing-support

file-explorer

formatting

fuzzy-finder

git

github

icon

indent

keybinding

lsp

markdown-and-latex

media

motion

nvim-dev

plugin-manager

quickfix

search

session

snippet

split-and-window

statusline

syntax

tabline

test

utility

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published