awesome-neovim icon indicating copy to clipboard operation
awesome-neovim copied to clipboard

Awesome Configurations for C/C++, Zig, Rust, Python, Shell, Web and Lua development in NeoVim

Awesome Neovim Configuration

This is to make setting up of neovim >= 0.7 a breeze.

NOTE : for vim >= 8 checkout vim branch

Awesome NeoVim with C++

Supports the following

  • zig, c , c++ compilers
  • linters and static analysis through null-ls
  • formatters using neovim builtin lsp
  • lsp server with nvim-lspconfig lsp client
  • Any build system
  • Treesitter syntax highlighting
  • autocompletion,documentation and all other features supported by any lsp server you configure

Awesome-NeoVim with C++

NOTE the languages supported out of the box are zig , c++ , c , lua , js , ts , html5+ , css3+ , vue , markdown , json , glsl , nix But support for other languages can easily be add by using it required lsp server configuration and installing the server and other accompaning tools for development like linters , static analysers, formatter

Requirement

Unlike the vim branch with neovim >= 0.7 most plugings written in lua and don't depend on python or node But if you decide to use a plugin that rely's on any of these you would have to install them but I recommend you find their lua equivalent. Chances are that it will be faster (due to luajit) and more well intergrated with neovim >= 0.7

Neovim Neovim does come out of the box with luajit and treesitter support

Repo structure

    📂 ~/.config/nvim
    ├── 📂 lua
    │  └── 📂 lazy
    │  │   ├──  init.lua
    │  │   ├──  symbols.lua
    │  │   ├──  telescope.lua
    │  │   └──  trouble.lua
    │  └── 📂 mapping
    │  │   ├──  editor.lua
    │  │   ├──  highlighting.lua
    │  │   ├──  init.lua
    │  │   ├──  lspconfig.lua
    │  │   ├──  spellcheck.lua
    │  │   ├──  tab_buffer.lua
    │  │   ├──  terminal.lua
    │  │   └──  tree.lua
    │  └── 📂 plugrc
    │  │   └── 📂 lspconfig
    │  │   ├──  autopairs.lua
    │  │   ├──  compe.lua
    │  │   ├──  gitsigns.lua
    │  │   ├──  init.lua
    │  │   ├──  neorg.lua
    │  │   ├──  tree.lua
    │  │   └──  whichkey.lua
    │  └── 📂 ui.lua
    │  │   ├──  init.lua
    │  │   ├──  bufferline.lua
    │  │   ├──  lualine.lua
    │  │   ├──  onedark.lua
    │  │   └──  treesitter.lua
    │  ├──   editor.lua
    │  ├──   plugins.lua
    │  ├──   syntax.lua
    │  ├──   terminal.lua
    │  └──   utils.lua
    ├──  README.md
    ├──  LICENSE
    └──  init.lua

lua/lazy directory contains file for lazy loading of plugins

lua/mapping directory contains all key mappings

lua/plugrc directory contains configuration for plugins

lua/ui directory contains tabline , statusline and treesitter configuration

lua/editor file contains neovim editor configuration.

lua/plugins file contains the list of all plugins

lua/syntax file contains syntax|highlighting commands

lua/terminal file contains configuration for neovim builtin terminal

lua/utils file contains some resuable functions

To use this awesome configuration clone this repo into $XDG_CONFIG_HOME/nvim or $HOME/.config/nvim

Installation of Paq

Paq is a Neovim package manager written in Lua. as quoted by their site Paq

Unix

git clone --depth=1 https://github.com/savq/paq-nvim.git \
    "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/paqs/start/paq-nvim
Windows (PowerShell)
git clone https://github.com/savq/paq-nvim.git "$env:LOCALAPPDATA\nvim-data\site\pack\paqs\start\paq-nvim"

NOTE

There is automatic Paq installation for all neovim. You can automate the process by putting the following commands in your neovim lua configuration file as suggested here. and open nvim and watch some beautiful magic happen. This is a one time activity so after Paq has been istalled you can remove these commands from your config. .

Thanks to @savq/paq-nvim and all colaborators.

Install Plugins Using Paq

move to $XDG_CONFIG_HOME/nvim or ~/.config/nvim/ and open the plugins.lua file and run this commands

:luafile %    # To cause lua to update cache of the file

:PaqInstall   #Install all packages listed in your configuration

:PaqUpdate    #Update all packages already on your system

:PaqClean     #Comment or remove the plugin you want to remove from plugins.lua
              #then :luafile % and run PaqClean to remove that commented/removed plugin

:PaqSync      #Execute the three operations listed above

For modern c/c++ developemt

Debian Linux - sudo aptitude install clang clang-tidy clang-format clangd cppcheck
Arch Linux   - sudo pacman -S clang lldb cppcheck
#Note: When using another build system like build2 you will need to dry run
#your build system and pipe the output to compiledb to generate compile_commands.json
# eg. $ b -vn clean update |& compiledb
#For cmake generate a compile_commands.json file using cmake with 'cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
#in your project directory

for help using the various plugins and extensions

:help local-addtions

to view the help pages and instruction manual on the various extensions

Big ShoutOuts to the Creators of Neovim. Another to all the creators of the various neovim extensions. And Last but not the least God Bless The Vim && Neovim Community for this hyperextensible and hackable text editor