๐งโ๐ Bloated LunarVim ๐
Bloated LunarVim
[!IMPORTANT]
i have fully migrated to lazyvim based configuration
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
Theme
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.timebasedthemes = false
lvim.plugins = {
{
"catppuccin/nvim",
as = "catppuccin",
config = function()
require("catppuccin").setup()
end,
}
}
Customization
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 it
lvim.builtin.harpoon = { active = false }
- if you want to try out GitHub copilot, change the following
lvim.builtin.sellyoursoultodevil = { active = true, prada = false }
- in case you want to use cmp-copilot, set prada=true after copilot installation
- I use a custom
lualinedisable it if you don't like it
lvim.builtin.fancy_statusline = { active = false }
- You can use the
diffviewplugin 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-tabninedoesn't play nice, you can disable it :)
lvim.builtin.tabnine = { active = false }
- if you don't need testing, just disable it (use
ultestorneotest)
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
- 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.taskrunner = "asynctasks"
- you can choose between
nvimtreeandneo-treeas your file tree viewer
lvim.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
defaultdiagnosticconfig.virtual_textinsidebuiltin.lua - I'm using
skimforlatexstuff, change it tozathuraif you are onlinux
Install
Prerequisites (๐ Click to expand/collapse)
Prerequisites
- Neovim >= v0.10.0
brew install neovim --nightly
and telescope stuff:
- ripgrep
- fd
curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
cargo install ripgrep fd-find
- NodeJS >= v16.13.0
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
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 git@github.com:microsoft/vscode-java-test.git ~/.config/lvim/.vscode-java-test
cd ~/.config/lvim/.vscode-java-test
npm install
npm run build-plugin
Recommended Fonts
- [FiraCode]: My preferred nerd font
- Any of the [Nerd 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)
Language-Server Protocol (LSP)
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.
Upgrade
cd ~/.config/lvim
git pull
lvim # run :Lazy sync
Recommended Linters
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
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
Server side
: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
Client side
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
Screenshot
Screenshots (๐ Click to expand/collapse)
BufferLine
StatusLine
Dashboard
lsp_signature

Tabnine

Lang Server
completion 
diagnostics using gl 
codeactions using ga_ 
codelens and inlayhints when supported by lang server 
references in qf 
treesitter backed folding 
peek using gp

rename using <leader>lr

Builtin Terminal

Test

ETC
k8s help

lazy git integration

zen mode

Cheat.sh integration
use <leader>? 

Symbols Outline

Plugins Included
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
Optional Plugins
- 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
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
- config.lua - Main customization point for settings
- snippets/ - Personal code snippets
Custom Key-mappings
Note that,
- Leader key set as Space
Key-mappings (๐ Click to expand/collapse)
UI
| Key | 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.inlayhint').refresh() | | Space+' | ๐ | Open marks | which-key marks | | Space+z | ๐ | Zen mode | zen-mode.nvim | | Space+P | ๐ | Projects | project.nvim | | Ctrl+\ | ๐ ๐ | 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 |
Motion
| 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 |
LSP
| 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 |
Plugin: AsyncTasks
| 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+l | ๐ | Run Last | | Space+r+p | ๐ | Run Project |
Plugin: Gitsigns
| 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 |
Plugin: LazyGit
| Key | Mode | Action | | ------------------------------------------ | :--: | ---------------- | | Space+g+g | ๐ | Open lazy git UI |
Plugin: Telescope
| 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 |
Plugin: Harpoon
| 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 |
Plugin: Neogen
| Key | Mode | Action | | ------------------------------------------ | :--: | ---------------------- | | Space+n+c | ๐ | Class documentation | | Space+n+f | ๐ | Function documentation | | Space+n+t | ๐ | Type documentation | | Space+n+F | ๐ | File documentation |
Plugin: Persistence
| Key | Mode | Action | | ------------------------------------------ | :--: | -------------- | | Space+q+d | ๐ | Delete Session | | Space+q+l | ๐ | Load Session | | Space+q+s | ๐ | Save Session |
Plugin: Bufferline
| 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 |
Plugin: Trouble
| Key | Mode | Action | | ------------------------------------------ | :--: | --------------------- | | Space+T+d | ๐ | Diagnostics | | Space+T+f | ๐ | Definitions | | Space+T+r | ๐ | References | | Space+T+t | ๐ | Todo | | Space+T+w | ๐ | Workspace diagnostics |
Plugin: Ultest
| 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 |
Plugin: Neotest
| 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 |
Plugin: Spectre
| 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 |
Plugin: SSR
| Key | Mode | Action | | ------------------------------------------ | :--: | ----------------------------------------------- | | Space+r | ๐ | Structural replace confirm using <leader><cr> | | Space+R+s | ๐ | Structural replace confirm using <leader><cr> |
Plugin: Copilot
| 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+\ | ๐ | "<Cmd>vertical Copilot panel<CR>" |
Plugin: Lsp_Lines
| Key | Mode | Action | | ----------------------------- | :--: | ------------------------ | | Space+v | ๐ | Toggle showing lsp_lines |
Plugin: Overseer
| 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 |
Plugin: NeoTree
| 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 |
Plugin: Mind
| 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 |
[firacode]: https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode/Retina [nerd fonts]: https://www.nerdfonts.com [neovim install]: https://github.com/neovim/neovim/wiki/Installing-Neovim [rust install]: https://www.rust-lang.org/tools/install [ripgrep]: https://github.com/BurntSushi/ripgrep [fd]: https://github.com/sharkdp/fd [nodejs install]: https://nodejs.org/en/download/package-manager/#macos [mason]: https://github.com/williamboman/mason.nvim [tex-support]: https://gist.github.com/peterhurford/75957ba9335e755013b87254ec85fab1
Troubleshooting
- Check your neovim version. Are you on the newest nightly version?
- make sure to run
:Lazy sync - Reset your Lunarvim cache using
:LvimCacheReset