Shourai / nv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nv

Lua

nv is a lua neovim config which tries to be simple, cute and well-documented

Installation

Pre-requisites

For installation

Requirements for default config to work

Manual

  1. Backup your previous neovim config if it exists
  2. Clone repository into config folder
    • Windows
      • cmd
        • default: git clone https://github.com/shift-d/nv --depth 1 %LOCALAPPDATA%\nvim\
        • XDG_CONFIG_HOME is set: git clone https://github.com/shift-d/nv --depth 1 %XDG_CONFIG_HOME%\nvim\
      • powershell
        • default: git clone https://github.com/shift-d/nv --depth 1 $env:LOCALAPPDATA\nvim\
        • XDG_CONFIG_HOME is set: git clone https://github.com/shift-d/nv --depth 1 $env:XDG_CONFIG_HOME\nvim\
    • Unix:
      • default: git clone https://github.com/shift-d/nv --depth 1 ~/.config/nvim/
      • XDG_CONFIG_HOME is set: git clone https://github.com/shift-d/nv -- depth 1 $XDG_CONFIG_HOME/nvim/
  3. Open neovim inside config directory
  4. Type :PackerInstall
  5. Reopen neovim - and... done!

Script

Windows

  1. Open powershell
  2. Run Invoke-WebRequest https://raw.githubusercontent.com/shift-d/nv/main/scripts/install.ps1 | select -ExpandProperty Content | Invoke-Expression
  3. Follow steps 3-5 from manual installation

Unix

  1. Open shell
  2. Run curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/shift-d/nv/main/scripts/install.sh | bash
  3. Follow steps 3-5 from manual installation

Configuration

Feel free to configurate everything! Unlike NvChad and kyoto.nvim nv provides only glue for your config. Make it yourself!

Please, review every config file. If you don't know what exactly this option does - run :h $option or if it's in plugin config - visit it's README.md.

Directory overview

  • init.lua - file that imports every module
  • lua/ - folder that should be used for containing *.lua files
    • config/ - folder for plugin configuration files
    • options.lua - vim.opt, vim.o and vim.g options
    • mappings.lua - keybindings handled by nest.nvim
    • plugins.lua - plugin specification file; more info in Plugins section
    • lsp.lua - LSP settings
    • utils.lua - global functions for lua
  • viml/ - folder that should be used for containing *.vim files
    • commands.vim - definitions of user commands and autocommands

Comparison to other configs

State nv NvChad kyoto.nvim Lunarvim
Number of plugins 18 33 30 26
Why simplicity and well-documented fast and pretty fast and customizable sane defaults
Installation crossplatform crossplatform linux/macos only not yet
Required nerd font, sumneko-lua, rg rg, nodejs, nerd font nerd font, ctags, python, nodejs, rg rust, python, nodejs

Latest update of table: 8.09.21

Screenshots

overview

overview

dashboard

dashboard

nvimtree

NvimTree

completion

completion

telescope.nvim

telescope.nvim

lualine

lualine

nv resources

FAQ

Why use vimscript and not write entire config in lua?

Sometimes you are not able to write code in lua, so you have to call vimscript from lua. In my opinion, making stacks of vim.cmd(... is a bad idea, so I'd like to separate vimscript only categories from lua code. In case of this config, defining commands and autocommands is not supported in neovim lua api yet, so that's why I moved their definition to .vim file.

NOTE: related PR's for adding commands and autocommands support for lua API: neovim/neovim#11613 neovim/neovim#14661

Credits

siduck76 - for his inspirational NvChad

samrath2007 - for his amazing kyoto.nvim

About

License:GNU General Public License v3.0


Languages

Language:Lua 89.6%Language:PowerShell 4.4%Language:Shell 4.0%Language:Vim Script 2.0%