Do not use as is, use it as a source of inspiration.
I've customized my ZSH/Tmux/Wezterm too much, so it might not work properly π
Table of Contents (π Click to expand/collapse)
- Theme
- Customization
- Install
- Collaborative Editing
- Java
- Recommended Fonts
- Screenshot
- Structure
- Plugins Included
- Custom Key-mappings
- Editor UI
- Motions
- LSP
- Plugin: AsyncTasks
- Plugin: Gitsigns
- Plugin: LazyGit
- Plugin: Telescope
- Plugin: Harpoon
- Plugin: Neogen
- Plugin: Persistence
- Plugin: Bufferline
- Plugin: Trouble
- Plugin: Ultest
- Plugin: Neotest
- Plugin: Spectre
- Plugin: SSR
- Plugin: Copilot
- Plugin: Lsp_Lines
- Plugin: Overseer
- Plugin: NeoTree
- Plugin: Mind
- Troubleshooting
Themes are automatically changed based on time of the day:
Theme | Time of the day |
---|---|
rose-pine | [1am, 9am) |
tokyonight | [9am, 5pm) |
catppuccin | [5pm, 9pm) |
kanagawa | [9pm, 11:59pm), [0am, 1am] |
You can change this in plugins.lua and theme.lua or just disable it and install your own theme
lvim.colorscheme = "catppuccin"
lvim.builtin.time_based_themes = false
lvim.plugins = {
{
"catppuccin/nvim",
as = "catppuccin",
config = function()
require("catppuccin").setup()
end,
}
}
Customization (π Click to expand/collapse)
- I'm using
neovim 0.11 head
- Do not use as is, too much bloated! Also do not use on a potato PC!!
- i have a auto command to disable syntax,etc when you open files larger than
1MB
- if you don't want to use
harpoon
, disable itlvim.builtin.harpoon = { active = false }
- if you want to try out GitHub copilot, change the following
lvim.builtin.sell_your_soul_to_devil = { active = true, prada = false }
- in case you want to use
cmp-copilot
, setprada=true
after copilot installation
- I use a custom
lualine
disable it if you don't like itlvim.builtin.fancy_statusline = { active = false }
- You can use the
diffview
plugin instead of normalgitsigns diff
lvim.builtin.fancy_diff = { active = true }
- if you want to use debugging, change the following line to true, also install codelldb:
lvim.builtin.dap.active = true
- sometimes instead of saving you jump trough jumplist π’ just disable nvim-lastplace
lvim.builtin.lastplace = { active = false }
- sometimes
cmp-tabnine
doesn't play nice, you can disable it :)lvim.builtin.tabnine = { active = false }
- if you don't need testing, just disable it (use
ultest
orneotest
)lvim.builtin.test_runner = { active = false, runner = "ultest" }
- if you don't want cheat.sh integration, disable it
lvim.builtin.cheat = { active = false }
- if you don't want the SQL integration, disable it
lvim.builtin.sql_integration = { active = false }
- if you don't like smooth scrolling, disable it
lvim.builtin.smooth_scroll= ""
- if you want an obvious focused window, and you don't get seizures from it
lvim.builtin.nonumber_unfocus = true
- choose between hop and leap or flash as your favorite motion provider
lvim.builtin.motion_provider = "hop"
- choose between filename->incline and treesitter->winbar or navic as your winbar provider
lvim.builtin.winbar_provider = "treesitter"
- if you don't need CSV support, disable it
lvim.builtin.csv_support = false
- if you want to use the cool make and run system, enable it
lvim.builtin.task_runner = "async_tasks"
- you can choose between
nvimtree
andneo-tree
as your file tree viewerlvim.builtin.tree_provider = "neo-tree"
- you can use noice.nvim if you want
lvim.builtin.noice = { active = true }
- If you wanna see the issues, change
default_diagnostic_config.virtual_text
insidebuiltin.lua
- I'm using
skim
forlatex
stuff, change it tozathura
if you are onlinux
Prerequisites (π Click to expand/collapse)
- Neovim >= v0.10.0
brew install neovim --nightly
curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
cargo install ripgrep fd-find
- NodeJS >= v16.13.0 most language servers need this
brew install node
bash <(curl -s "https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh")
mv ~/.config/lvim ~/.config/lvim_backup
git clone https://github.com/abzcoding/lvim.git ~/.config/lvim
lvim +LvimUpdate +LvimCacheReset +q
lvim # run :Lazy sync
Java (π Click to expand/collapse)
Please run the following to have a better debugging and testing support for java
mkdir -p ~/workspace
git clone --branch main --depth 1 https://github.com/microsoft/java-debug ~/.config/lvim/.java-debug
cd ~/.config/lvim/.java-debug/
mvn clean install
git clone --branch main --depth 1 [email protected]:microsoft/vscode-java-test.git ~/.config/lvim/.vscode-java-test
cd ~/.config/lvim/.vscode-java-test
npm install
npm run build-plugin
- FiraCode: My preferred nerd font
- Any of the Nerd Fonts
On macOS with Homebrew, choose one of the Nerd Fonts, for example, here are some popular fonts:
brew tap homebrew/cask-fonts
brew search nerd-font
brew install --cask font-fira-code-nerd-font
brew install --cask font-victor-mono-nerd-font
brew install --cask font-iosevka-nerd-font-mono
brew install --cask font-hack-nerd-font
Other Stuff (π Click to expand/collapse)
To leverage LSP auto-completions and other functionalities, after you open a
file in Neovim, run :MasonInstall <server>
to use
mason installation feature.
Use Tab
to list available servers.
cd ~/.config/lvim
git pull
lvim # run :Lazy sync
You can use mason to install these:
cargo install selene # if you want to use selene instead of luacheck
brew install hadolint # if you want to lint dockerfiles
pip install vim-vint # for vim linting
# install llvm and clang_format for clang stuff
npm install -g @fsouza/prettierd # if you want to use prettierd
pip install yapf flake8 black # for python stuff
# if you want to use the markdown thingy
brew install vale markdownlint-cli
cp -r ~/.config/lvim/.vale ~/.config/vale
# fix the address inside .vale.ini
cp ~/.config/lvim/vale_config.ini ~/.vale.ini
# if you want the latex stuff
# brew install --cask mactex-no-gui # for mac
# or install zathura and chktex on linux
In case you want a better tex support in mac, check this out
if you want the custom gostructhelper
, first get the pkg:
cd /tmp
git clone https://github.com/vanhtuan0409/gostructhelper.git
cd gostructhelper/cmds/gostructhelper
go build -o /usr/local/bin/gostructhelper && chmod 0755 /usr/local/bin/gostructhelper
Collaborative Editing (π Click to expand/collapse)
The default is to serve localhost only, on port 8080. For a more advanced (remote server) overview see Deploy a server
:InstantStartServer [host] [port]
: Start the server using:InstantStartSingle [host] [port]
: This only shares the current buffer.:InstantStartSession [host] [port]
:This shares all opened (and newly opened) buffers with the other clients
let g:instant_username="sth"
: Set your preferred username.:InstantJoinSingle [host] [port]
: Use this command if another client already initiated a single share.:InstantJoinSession [host] [port]
: Use this command if another client already initiated a session share
Screenshots (π Click to expand/collapse)
code_lens
and inlay_hints
when supported by lang server
peek using gp
rename using <leader>lr
k8s help
lazy git integration
zen mode
Cheat.sh integration
Symbols Outline
Plugins (π Click to expand/collapse)
- Doom One Theme
- Rose Pine Theme
- LSP Signature
- Todo Comments
- symbols-outline.nvim
- Twilight
- nvim-bqf
- Zen Mode
- rustaceanvim
- nvim-spectre
- colorizer.lua
- Neogen
- Vimtex
- typescript.nvim
- flutter-tools.nvim
- NeoClip
- fidget
- clangd_extensions.nvim
- crates.nvim
- refactoring.nvim
- ssr.nvim
- Trouble
- Hop
- Flash
- Leap
- remember.nvim
- Tabnine
- Persistence
- Presence
- Orgmode.nvim
- nvim-dap-ui
- LuaDev
- vim-test
- vim-ultest
- nvim-cheat
- vim-dadbod
- vim-dadbod-completion
- vim-dadbod-ui
- Neoscroll
- Cinnamon scroll
- Copilot
- Harpoon
- vim-log-highlighting
- nvim-cursorline
- nvim-hlslens
- csv.vim
- sidebar.nvim
- asynctasks.vim
- asyncrun.vim
- nvim-metals
- instant.nvim
- SnipRun
- Vista
- dressing.nvim
- incline.nvim
- winbar.nvim
- lsp_lines.nvim
- neotest
- legendary.nvim
- overseer.nvim
- neo-tree.nvim
- noice.nvim
- nvim-dap-vscode-js
- inc-rename
- hlargs.nvim
- cmake-tools.nvim
- mind.nvim
- wtf.nvim
- backseat.nvim
- outline.nvim
- typescript-tools.nvim
- markdown.nvim
- helpview.nvim
Structure (π Click to expand/collapse)
- after/ - Stuff that happens after
- ftdetect/ - Let neovim identify custom filetypes
- ftplugin/ - Language specific custom settings
- lsp-settings - Custom lang server settings
- lua/ - Lua plugin configurations
- telescope/ - Telescope extensions
- user/ - User specific settings
- null_ls - list of configured linters/formatters
- autocommands.lua - user defined autocommands
- builtin.lua - change internal lunarvim settings
- keybindings.lua - user defined keybindings
- plugins.lua - list of installed plugins
- lsp_kind.lua - all the icons and lsp ui goodies are here
- theme.lua - customized themes
- config.lua - Main customization point for settings
- snippets/ - Personal code snippets
Note that,
- Leader key set as Space
Key-mappings (π Click to expand/collapse)
Modes: π=normal π=visual π=select π=insert π=commandKey | Mode | Action | Plugin or Mapping |
---|---|---|---|
Space+e | π | Open file tree | NvimTree |
Space+o | π | Open symbols | Symbols-outline |
Space+f | π | Open file finder | Telescope |
Space+h | π | Remove highlight | nohlsearch< |
Space+/ | π | Toggle comment | Comment.nvim |
Space+? | π | Open cheats | cheat.sh |
Space+I | π | Inlay Hints | require('vim.lsp._inlay_hint').refresh() |
Space+' | π | Open marks | which-key marks |
Space+z | π | Zen mode | zen-mode.nvim |
Space+P | π | Projects | project.nvim |
Ctrl+</kbd> | π π | Open terminal | toggleterm.nvim |
Alt+0 | π π | Vertical terminal | toggleterm.nvim |
Ctrl+s | π | Show signature help | vim.lsp.buf.signature_help() |
Alt+s | π | Snippet selection | Telescope luasnip extension |
Space+C or Ctrl+P | π | Command Palette | legendary.nvim |
Key | Mode | Action | Plugin or Mapping |
---|---|---|---|
f | π | find next character | HopChar1CurrentLineAC or leap_f or Flash.CharActions |
F | π | find previous character | HopChar1CurrentLineBC or leap_F or Flash.CharActions |
s | π | find character | HopChar2MW or leap_s or require("flash").jump() |
S | π | find word | HopWordMW or leap_S or 2char jump |
Alt+a | π | select all | ggVG |
Alt+a | π | increment number | C-A |
Alt+x | π | decrement number | C-X |
Key | Mode | Action |
---|---|---|
Tab / Shift-Tab | π | Navigate completion-menu |
Enter | π | Select completion or expand snippet |
Upor Down | π | Movement in completion pop-up |
]+d | π | Next diagnostic |
[+d | π | Previous diagnostic |
Space+l+j or Space+l+k | π | Next/previous LSP diagnostic |
Space+l+r | π | replace current word in project |
Ctrl+e | π | Close pop-up |
Tab / Shift-Tab | π π | Navigate snippet placeholders |
Space+l | π | keybindings for lsp |
g+a | π | code actions |
g+A | π | codelens actions |
g+d | π | goto definition |
g+t | π | goto type definition |
g+D | π | goto declaration |
g+I | π | goto implementation |
g+p | π | peek implementation |
g+r | π | goto references |
g+s | π | show signature help |
Key | Mode | Action |
---|---|---|
Space+m+f | π | Build File |
Space+m+p | π | Build Project |
Space+m+e | π | Edit Tasks |
Space+m+l | π | List Tasks |
Space+r+f | π | Run File |
Space+r+p | π | Run Project |
Key | Mode | Action |
---|---|---|
Space+g+j or Space+g+k | π | Next/previous Git hunk |
Space+g+p | π | Preview hunk |
Space+g+l | π | Blame line |
Space+g+s | π π | Stage hunk |
Space+g+u | π | Undo stage hunk |
Space+g+d | π | Diff to head |
Space+g+h | π | Buffer git history |
Space+g+R | π π | Reset hunk |
Key | Mode | Action |
---|---|---|
Space+g+g | π | Open lazy git UI |
Key | Mode | Action |
---|---|---|
Space+f | π | File search |
Space+P | π | Project search |
Space+s+s | π | Grep search |
Space+s+f | π | Telescope find_files |
Space+s+e | π | Telescope file_browser |
Space+F+l | π | Reopen last search |
Space+b+f | π | Buffers |
Space+s+c | π | Colorschemes |
Space+s+C | π | Command history |
Space+s+h | π | Find help |
Space+s+k | π | Keymap search |
Space+s+M | π | Man Pages search |
Space+s+r | π | Register search |
Space+s+t | π | Grep string under cursor |
Space+s+t | π | Grep raw |
Space+F+b | π | Builtin search |
Space+F+f | π | Current buffer search |
Space+F+g | π | Git files search |
Space+F+i | π | Installed plugins |
Space+F+p | π | Project search |
Space+F+i | π | Installed plugins |
in Telescope window | ||
CR | π π | Multi/Single Open |
Ctrl+c | π π | Exit telescope |
Ctrl+v | π π | Open in a vertical split |
Ctrl+s | π π | Open in a split |
Ctrl+t | π π | Open in a tab |
Ctrl+b | π | Go back in Command Palette |
Tab | π π | Toggle Selection + Next |
Shift+Tab | π π | Toggle Selection + Prev |
Key | Mode | Action |
---|---|---|
Space+Space | π | Show harpoon shortlist |
Space+a | π | Add file to shortlist |
Space+1 | π | Jump to first file on shortlist |
Space+2 | π | Jump to second file on shortlist |
Space+3 | π | Jump to third file on shortlist |
Space+4 | π | Jump to forth file on shortlist |
Key | Mode | Action |
---|---|---|
Space+n+c | π | Class documentation |
Space+n+f | π | Function documentation |
Space+n+t | π | Type documentation |
Space+n+F | π | File documentation |
Key | Mode | Action |
---|---|---|
Space+q+d | π | Delete Session |
Space+q+l | π | Load Session |
Space+q+s | π | Save Session |
Key | Mode | Action |
---|---|---|
Shift+x | π | Close buffer |
Space+b+f | π | Find buffer |
Space+b+b | π | Toggle buffer groups |
Space+b+p | π | Toggle pin |
Space+b+s | π | Pick buffer |
Space+b+1 | π | Goto buffer 1 |
Space+b+h | π | Close all to left |
Space+b+l | π | Close all to right |
Space+b+D | π | Sort by directory |
Space+b+L | π | Sort by language |
Key | Mode | Action |
---|---|---|
Space+T+d | π | Diagnostics |
Space+T+f | π | Definitions |
Space+T+r | π | References |
Space+T+t | π | Todo |
Space+T+w | π | Workspace diagnostics |
Key | Mode | Action |
---|---|---|
Space+t+f | π | Run all tests in a file |
Space+t+n | π | Only run nearest test |
Space+t+s | π | Open test summary |
Key | Mode | Action |
---|---|---|
Space+t+a | π | Run all tests |
Space+t+f | π | Run tests in a file |
Space+t+r | π | Only run nearest test |
Space+t+s | π | Open test summary |
Space+t+o | π | Open test output |
Space+t+w | π | Watch test |
Space+t+x | π | Stop test |
Space+t+n | π | Jump to next failed test |
Space+t+p | π | Jump to previous failed test |
Space+t+c | π | Cancel test |
Key | Mode | Action |
---|---|---|
Space+R+p | π | Replace word in project |
Space+R+w | π | Replace visually selected word |
Space+R+f | π | Replace word in current buffer |
Key | Mode | Action |
---|---|---|
Space+r | π | Structural replace confirm using <leader><cr> |
Space+R+s | π | Structural replace confirm using <leader><cr> |
Key | Mode | Action |
---|---|---|
Ctrl+h | π | copilot#Accept("<CR>") |
Ctrl+e | π | Close cmp menu |
Ctrl+] | π | <Plug>(copilot-dismiss) |
Alt+] | π | <Plug>(copilot-next) |
Alt+[ | π | <Plug>(copilot-previous) |
Alt+</kbd> | π | "<Cmd>vertical Copilot panel<CR>" |
Key | Mode | Action |
---|---|---|
Space+v | π | Toggle showing lsp_lines |
Key | Mode | Action |
---|---|---|
Space+r+f | π | Run |
Space+r+p | π | Run with cmd |
Space+r+t | π | Toggle output |
Space+m+n | π | New Task |
Space+m+l | π | Load Task Bundle |
Space+m+s | π | Save Task Bundle |
Space+m+q | π | Quick Action |
Space+m+f | π | Task Action |
Key | Mode | Action |
---|---|---|
Space+e | π | Toggle tree |
> and < | π | Next and prev source inside tree |
Enter | π | Open |
s | π | Open in vertical split |
S | π | Open in horizontal spit |
H | π | Toggle hidden files |
a | π | Add files/dirs |
A | π | Add new dir |
r | π | Rename |
h | π | Go Updir |
l | π | Open |
P | π | Toggle preview |
/ | π | Fuzzy finder |
Key | Mode | Action |
---|---|---|
Space+M+M | π | Open Main Tree |
Space+M+m | π | Open Local Tree |
Enter | π | open data |
Tab | π | toggle node |
Shift+Tab | π | toggle parent |
/ | π | select path |
$ | π | change icons menu |
c | π | create new node |
q | π | quit |
- Check your neovim version. Are you on the newest nightly version?
- make sure to run
:Lazy sync
- Reset your Lunarvim cache using
:LvimCacheReset