Skip to content

neovim

NeoVIM🔗

See also

To-Do🔗

Tags: #TODO/nvim

Installation🔗

  • from distro repos
  • from archive
    1. download archive
    2. extract and move files for example to ~/.local

Config🔗

Quick start with pre-made config

  1. delete old config
1
2
rm -rf ~/.config/nvim
rm -rf ~/.local/share/nvim
  1. install base config

    • kickstart.nvim:

      A launch point for your personal nvim configuration. Just clone the repository as the nvim config and the next time you start nvim an automatic setup is started. ^kickstart-nvim

    • LazyVim:

      Neovim setup powered by 💤 lazy.nvim to make it easy to customize and extend your config

    • NvChad: Source

      Blazing fast Neovim config providing solid defaults and a beautiful UI, enhancing your neovim experience

  2. edit config, transfer VIM settings

Using vim config: .vimrc🔗

https://github.com/nanotee/nvim-lua-guide#runtime-files
Most vim config can be used just as well in neovim. Just change your runtime path and source your vimrc.

1
2
3
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
source ~/.vimrc

Lua files🔗

See nvim Lua Guide.

Modules
Config can be split up by including (lua) files. The tree structure should be something like

1
2
3
4
📂 ~/.config/nvim
├── 📂 lua
│   └─ config.lua
└── init.vim

allowing includes in your init.vim like

1
lua require('config')

Sourcing Lua files

Neovim provides 3 Ex commands to source Lua files
:luafile
:source

LSP🔗

LSP docs

Plugins🔗

See awesome-neovim for a comprehensive list of categorised plugins.

Plugin managers

  • lazy.nvim: 💤 A modern plugin manager for Neovim
  • [vim-plug]

UI🔗

  • statusbar
  • file explorer
    • nvim-tree.lua:

      A file explorer tree for neovim written in lua

    • neotree.nvim:

      Neovim plugin to manage the file system and other tree like structures

  • buffers/tabs
  • icons
  • hologram.nvim:

    👻 A cross platform terminal image viewer for Neovim. Extensible and fast, written in Lua and C. Works on macOS and Linux.

  • Noice:

    💥 Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu

Editing🔗

  • comment
    • Comment.nvim:

      🧠 💪 Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more

  • editorconfig-vim:

    EditorConfig plugin for Vim

  • nvim-osc52:

    copy text to the system clipboard using the ANSI OSC52 sequence

  • true-zen.nvim:

    Clean and elegant distraction-free writing for NeoVim

  • snippets
  • auto-completion
    • nvim-cmp:

      A completion plugin for neovim coded in Lua

    • nvim-autopairs:

      A super powerful autopair plugin for Neovim that supports multiple characters.

Dev🔗

  • telescope: telescope.nvim is a highly extendable fuzzy finder over lists. Built on the latest awesome features from neovim core. Telescope is centered around modularity, allowing for easy customization. ^34282b
  • trouble:

    🚦 A pretty diagnostics, references, telescope results, quickfix and location list to help you solve all the trouble your code is causing.

  • nvim-docker:

    Docker management right inside Neovim

  • gitlab.vim: official editor extension

Filetype🔗

LSP🔗

  • Marksman
  • LSP/auto-completion
    • lsp-zero: configure nvim-lspconfig and nvim-cmp
  • lsp-colors:

    🌈 Plugin that creates missing LSP diagnostics highlight groups for color schemes that don’t yet support the Neovim 0.5 builtin LSP client.

  • null-ls:

    Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.

Productivity🔗

References🔗

This Week in Neovim