3.9 KiB
3.9 KiB
My Neovim configuration
Motivation
After doing my first steps with https://github.com/nvim-lua/kickstart.nvim, I decided to roll my own, custom, "lightweight" Neovim configuration in order to better understand Neovim and its configuration/customization, package managers, plugins etc. and have "my own" config that only includes things I really need.
Installation
- Install Neovim 0.9.x
- Install OS dependencies documented in
init.lua - Clone this Git repository to
~/.config/nvim
Finishing touches
- Install Treesitter comment parser (to highlight
FIXME:/NOTE:/TODO:/XXX:) with:TSInstall comment - Create a
$HOME/.ignorefile and add big, useless directories to it, so Telescope/ripgrep/fd can ignore those. A current list of files/directories is inlua/weeheavy/plugins/telescope-fzf-native.lua
Speed
Output from lazy.nvim profiling (:Lazy, then P):
Startuptime: 33.68ms
Based on the actual CPU time of the Neovim process till UIEnter.
This is more accurate than `nvim --startuptime`.
LazyStart 10.87ms
LazyDone 31.22ms (+20.35ms)
UIEnter 33.68ms (+2.45ms)
Plugins
Command cheat sheet
Vim/Neovim
Basics
Spaceis set as the leader key
Plugin fiddling/changes
:soSource file:checkhealth <pluginname>check for problems of a plugin. Use:checkhealthto check base and all plugins
Navigation
Ctrl+tto open a file in e.g. a Telescope finder in a new tabgtorgTto switch between open tabsCtrl+wqclose windowCtrl+wssplit window horizontallyCtrl+wvsplit window verticallyCtrl+<h/j/k/l>switch between split windowsSpace+Spaceshows open buffers (viaTelescope buffers)
Lazy
:Lazyto show the package manager UI
Telescope
Navigation in live_grep, find_files, git_status and file_browser
↓orCtrl+nscroll down (next) file list↑orCtrl+pscroll up (previous) file listCtrl+dscroll down in previewCtrl+uscroll up in previewCtrl+/help
Treesitter
:TSUpdateupdate all parsers:TSModuleInfoshow installed parsers
Open issues/TODOs
- Hinting for trailing spaces (EOL) and blank space on line
- LSP setup/config (mason?), consume https://blog.pabuisson.com/2022/08/neovim-modern-features-treesitter-and-lsp/
- ollama integration https://github.com/nomnivore/ollama.nvim