Skip to content

🏮 A hybrid Neovim configuration for productive developers who want a functional yet aesthetic Vim experience 🏮

Notifications You must be signed in to change notification settings

Optixal/neovim-init.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optixal's Neovim init.vim

image Windows 10, Ubuntu WSL - Windows Terminal

Neovim-New Ubuntu 22.04 - Kitty Terminal

Just like how a 🔪 is undoubtedly the most important tool of a sushi chef, a text editor (and perhaps a good mechanical keyboard) is undoubtedly the most important tool of a developer. It has to be robust, versatile, extensible, performant and powerful. Occasionally, it requires sharpening in order to produce quality work one is proud of. Also, it has to look and feel good in hand so that one will enjoy using it on every use.

My neovim config has been updated for neovim 0.7.0. It is now a hybrid init.vim with lua support. It features core plugins including nvim-treesitter, nvim-lspconfig, nvim-cmp, telescope, lualine and nvim-tree.

The colorsheme used is my favorite, Dracula, and the font used is my favorite too, Iosevka.

Installing and Updating

Automated Installation

git clone https://github.com/Optixal/neovim-init.vim.git
cd neovim-init.vim/convenience
./install.sh

Automatically installs my configuration along with dependencies into your system. Tested on Ubuntu 22.04. I highly suggest reading and understanding each line of the installation script before running it, especially if you are using other Linux distros, or macOS. For macOS, manually run the commands, and use homebrew instead of apt.

Manual Installation

The following are high-level steps to install my neovim config:

  1. Download this repo
  2. Install dependencies: wget, curl, git, gcc, ripgrep and python3 (along with pip and venv)
  3. Install neovim 0.7.0+
  4. Add neovim to your PATH
  5. Install node (with nvm or n) (along with npm)
  6. Install language servers with npm
  7. Set up a virtual environment for Python dependencies with venv, and install Python dependencies while in it with pip
  8. Install vim-plug
  9. Make a copy of this repo's init.vim and place it in ~/.config/nvim/. Delete everything after call plug#end()
  10. Install plugins by entering neovim and running the command :PlugInstall
  11. Copy this repo's full version of init.vim and the directory lua/ to ~/.config/nvim/
  12. Done!

For exact commands to run, refer to convenience/install.sh.

Post Installation

Download and install a Nerd Font

nvim-cmp, telescope, lualine and nvim-tree require a patched font to display icons properly. Nerd Fonts are recommended. Run ./font_install.sh to download and install Iosevka Term Nerd Font into your ~/.fonts directory, or run the command manually:

curl -fLo ~/.fonts/Iosevka\ Term\ Nerd\ Font\ Complete\ Mono.ttf --create-dirs https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Iosevka/Regular/complete/Iosevka%20Term%20Nerd%20Font%20Complete%20Mono.ttf
fc-cache -rv

Once downloaded, open your terminal's preferences and change the font to "Iosevka Term Mono". If your terminal allows to differentiate the regular, bold, italics and bold-italics, make sure to download the other variations as well.

If the font does not appear in your terminal settings, try restarting your terminal. If it's still not appearing, your OS' font directory may not be ~/.fonts. Find out which directory your fonts are stored in, and place the downloaded font file in that directory instead. Or, install the font normally using your OS' GUI.

If you are using a GPU-accelerated terminal like kitty, or if the font starts to look weird in your terminal, it could be better to avoid using a Nerd Font and use the original font instead, while still using a single Nerd Font as the fallback for the symbols.

So, instead of installing:

  • Iosevka Term Nerd Font Mono (Regular, Bold, Italics, Bold-Italics) (Characters & symbols will be used)

Install this:

  • Iosevka (Regular, Bold, Italics, Bold-Italics) (Characters will be used)
  • Iosevka Term Nerd Font Mono (Regular) (Symbols will be used)

Your terminal should pick up the symbols automatically from the single nerd font as the fallback font.

Install grammars and language servers

Grammar (for nvim-treesitter highlighting)

As I focus on Python development, I ensured installation of python grammar within treesitter-config.lua to get proper highlighting when editing Python files. To install additional grammars (e.g. TypeScript), run the following in nvim:

:TSInstall typescript

For other languages, refer to this list.

Language server (for nvim-lspconfig and nvim-cmp completion)