Neovim config (mostly based on LunarVim/neovim-from-scratch)
GPL-3.0 License
This repository contains my configuration files for the Neovim editor.
The configuration is primarily based on my personal preferences and focuses mainly on the programming languages and tools that I use daily: Python, Markdown, Bash, and Terraform.
Install Neovim. I
am a Mac user and use the excellent macports to
install Neovim as follows: sudo port install neovim
. To use
homebrew instead of macports, run brew install neovim
.
This will install Neovim v0.7.2 which is the version that this configuration has been tested to work with. If you install an older or a newer release of Neovim, there is no guarantee that this configuration will work.
In your base conda directory, install the following packages: black
,
flake8
, isort
, and pydocstyle
.
Use macports to install additional external packages:
sudo port install htop git lazygit ncdu nodejs18 npm7 ripgrep fd
If you use homebrew, run
brew install htop git lazygit ncdu node@18 ripgrep fd
Clone this repository:
git clone [email protected]:desilinguist/nvim.git ~/.config/nvim
If you already use Neovim, make sure to remove or move your current
$HOME/.config/nvim
directory,
Modify line 21 in $HOME/.config/nvim/lua/user/lsp/null-ls.lua
to change
the path "/Users/nmadnani/anaconda/bin" to the absolute path for your base
conda environment's bin
directory.
If you used homebrew to install lazygit
instead of macports, modify line
53 in lua/user/toggleterm.lua
to set lazygit_dir
to the correct path for
homebrew.
Run nvim
and wait for all the plugins to be installed.
Once all the plugins are installed, run :Mason
to install the language
servers you might need. The ones I use are as follows:
If you have any issues or notice any error messages, run :checkhealth
with
Neovim open to run health checks and report any issues it finds.
Most Neovim plugins are under heavy active development and are updated multiple times a day. While this can be useful to get new features and bugfixes, it may also sometimes break a working configuration since plugin authors usually target nightly releases of Neovim. If you do not want to have to deal with broken configurations, you have two options:
Do not ever run :PackerUpdate
or :PackerSync
(mapped to the keyboard
shortcut Space + p + u
).
Modify the file $HOME/.config/nvim/lua/user/plugins.lua
to lock the plugins
down after initial installation. To do so, simply add lock=true
to all the
use
statements in that file, e.g., use("hrsh7th/nvim-cmp", lock=True)
.
The following resources will be extremely useful for any Neovim user.
Neovim-from-scratch: the excellent YouTube series on configuring Neovim, on which my configuration is almost entirely based.