Lazy-managed config built with the help of kickstart.nvim.
xclipto enable<leader>yto yank to system clipboard:sudo apt install xclip- Clean up your existing nvim plugins to prevent weird clashes. Usually
rm -rf ~/.local/share/nvim(backup is a good idea). - Get a Nerd Font for snazzy symbols. I like Fira Mono. Make sure to set it as your terminals font (not your systems).
- Don't care about a nerd font? Set
vim.g.have_nerd_font = falseininit.lua.
- Clone to
~/.config/asnvim/:cd ~/.config && git clone https://www.github.com/puttehi/nvim-lua nvim - Start and let Lazy do its thing:
nvim
Use :Lazy update. This should also update lazy-lock.json.
The official neovim build instructions are really complicated for the average Joe that wants to build a specific tag from source.
Just do this to get this config up and running from zero:
git clone https://github.com/neovim/neovim ~/dev/repos/neovim
# Nvim build dependencies for Ubuntu
sudo apt-get install ninja-build gettext cmake curl build-essential
cd ~/dev/repos/neovim
git checkout v0.11.4
# (if checkout fails, this should definitely fix it):
git fetch --tags && git checkout v0.11.4 && git pull
# CMAKE_BUILD_TYPE defaults to Debug. RelWithDebInfo is optimized like Release
# but contains debug symbols for troubleshooting if(when) nvim shits itself
# (likely because this lua config sucked or a plugin decided to not honor semver
# anymore)
make CMAKE_BUILD_TYPE=RelWithDebInfo
# Now in .build/, move to system paths (install).
# CMAKE_INSTALL_PREFIX defaults to /usr/local, example for user-installation:
make CMAKE_INSTALL_PREFIX=$HOME/local/nvim install
# Make sure this configs dependencies are ready to go
sudo apt install unzip git fzf fd-find ripgrep xclip
git clone ssh://git@github.com:puttehi/nvim-lua.git ~/.config/nvim
# Open nvim and run :checkhealth and fix any relevant issues found. Most likely your Go version is too old (1.23+ due to used plugins), your .NET is too old (9+ due to used plugins) or similar.init.lua: Main entrypoint, installs Lazy and imports everything.lua/puttehi/: Custom configuration that is imported.lua/puttehi/plugins: Plugins which are either in their own files (plugin per file, likenvim-colorizer.lua), or in their own category (several plugins per file, likegit.luawith fugitive and gitsigns).lua/puttehi/vim: "Raw" configuration and Lua scripts outside of anything "plugin", such as base keymaps,:settings etc. Things that do not depend on anything but VIM installation.
- Start with
:checkhealth. Not everything must be fixed.
- Start with
:Lazy update+:TSUpdate. - Find highlights under cursor with
:Inspect- - Debug node tree with
:InspectTree - Highlights refuse to work? Revert buffer to use no highlighter from TS:
:TSBufToggle highlight.
- Getting some weird "could not start
xxx-yyy-zzz" errors with languages? Try adding it tolsp.luaunder the language server, i.e.languages["lua_ls"].tools = { "lua-language-server" }. - Server does not seem to be working? Check
:LSPInfoand if it crashed, check:LSPLog. Filetype setting (:set filetype=...) could also be wrong, check with:echo &filetype. :LSPRestartcan work when you managed to blow up the language server, IT Crowd style.
