- refactor lua autocommands
- explore nvim-dap-virtual-text plugin
- explore vim-test alternatives
packer.nvim - A use-package inspired plugin manager for Neovim
nvim-tree.lua - A File Explorer written In Lua
indentBlankline - Adds indentation guides to all lines (including empty lines)
feline.nvim - A minimal, stylish and customizable statusline for Neovim written in Lua
nvim-web-devicons - A Lua fork of vim-devicons
nvim-telescope - A fuzzy finder
telescope-ui-select - Use telescope for vim ui.select
gitsigns - Super fast git decorations implemented purely in lua/teal
alpha-nvim - A fast and highly customizable greeter for neovim.
comment - Comment code
glow - Open glow markdown preview in popup window
vim-test - Unit Test execution from neovim
zen-mode - Distraction free coding by maximizing current buffer
which-key - Display key bindings for commands
nvim-dap - Debug Adapter Protocol client implementation for Neovim
nvim-dap-ui - Visual interface for the DAP plugin
yanky - Yank history
neovim-session-manager - Session Manager
nvim-lspconfig - Nvim LSP Config
nvim-cmp - LSP Autocompletion
LuaSnip - Snippet Tool
friendly-snippets - Snippet collection
nvim-treesitter - Treesitter language parser
nvim-treesitter-context - Show function context
nvim-autopairs - Auto pairs plugin
telescope-frecency - Index frecent files with telescope
harpoon - Quick access to bookmarked files
Tagbar - Tagbar to show file overview in sidebar
${HOME}/.config/nvim
├── lua
│ ├── core
│ │ ├── colors.lua
│ │ ├── keymaps.lua
│ │ └── settings.lua
│ ├── plugins
│ │ └── pluginXYZ.lua
│ └── packer_init.lua
├── plugin
│ └── packer_compiled.lua
└── init.lua
/nvim
-
init.lua: Main configuration file that call
luamodules -
coc-settings.json: Configuration file for coc framework
-
lua: Folder of
luamodules, here reside all the Lua modules that needed. These modules are called frominit.luafile (see below).
See: https://github.com/nanotee/nvim-lua-guide#where-to-put-lua-files
/nvim/lua
-
packer_init.lua: Load plugins
-
plugins: Plugin specific configuration and setup
/nvim/lua/core
-
settings.lua: General Neovim settings and configuration
-
keymaps.lua: Keymaps configuration file, vim/neovim and plugins keymaps.
-
colors.lua: Define Neovim and plugins color scheme
Colorschemes:
Fonts: Cozette
Icons: nvim-web-devicons
- Install neovim v0.6.x
brew install neovim
-
Install npm (for download the packages of LSP language servers)
-
Clone this repo and link it to the nvim config.
git clone https://github.com/BreitbandModem/neovim-lua.git /Users/****/github/neovim-lua
ln -s /Users/****/github/neovim-lua/lhnvim /Users/****/.config/lhnvim
export NVIM_APPNAME="lhnvim"
- Install some plugin dependencies
# ripgrep is required for telescope
brew install ripgrep
# glow is required for markdown preview
brew install glow
# Install a custom font to support icons
brew tap homebrew/cask-fonts
brew install font-jetbrains-mono-nerd-font
# Install universal ctags for the Tagbar plugin
brew install universal-ctags
Configure the newly installed font in the terminal app (e.g. iterm2).
- Install LSP language servers
npm install -g typescript typescript-language-server vscode-langservers-extracted vls @vue/language-server @vue/typescript-plugin
brew install lua-language-server
- Install packer.nvim for install and manage plugins:
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
Open Neovim and run :PackerSync command.
See: https://github.com/wbthomason/packer.nvim#quickstart
- Install treesitter language parsers
:TSInstall typescript javascript gitignore regex css json vim lua markdown_inline http vue yaml
- Specific fix for running mocha tests on a docker container using the vim-test plugin
Remove the additional arguments added by the vim-test mocha plugin source code:
~/.local/share/nvim/site/pack/packer/start/vim-test/autoload/test/javascript/mocha.vim
Lua - builtin
Bash - bashls
Python - pyright
C, C++, CSS - clangd
HTML, CSS, JSON - vscode-html
JavaScript, TypeScript - tsserver
See: nvim-lspconfig #doc/server_configurations.md
The color scheme is defined in the following files (default: OneDark):
- Neovim UI - nvim/lua/core/settings.lua:
-- Load colorscheme
require('onedark').setup {
style = 'darker'
}
require('onedark').load()- Statusline - nvim/lua/plugins/feline.lua:
-- Set colorscheme (from core/colors.lua/colorscheme_name)
local colors = require('core/colors').onedark- Open nvim and run command
checkhealth, you should not see any error in the output (except for the one related to the Python 2 interpreter if don't have it):
:checkhealth- You can also use the
startuptimeoption to read the nvim startup logs:
nvim --startuptime > /tmp/nvim-start.log
nvim /tmp/nvim-start.log
See: :help startuptime
-
Lua in Y minutes - https://learnxinyminutes.com/docs/lua/
-
Lua Quick Guide - https://github.com/medwatt/Notes/blob/main/Lua/Lua_Quick_Guide.ipynb
-
Lua 5.4 Reference Manual - https://www.lua.org/manual/5.4/
As all my setups I try to follow the KISS principle, probably some concepts may not be valid for everyone. Then feel free to take what you need but don't install anything without checking first!
Thanks to all the authors of the sources mentioned above and to all the others from whom I "stole" some configs :)








