Skip to content

Repository files navigation

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 😅

Screenshot 2024-06-04 at 18 26 59
Table of Contents(🔎 Click to expand/collapse)

Theme

Themes are automatically changed based on time of the day:

ThemeTime 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=falselvim.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.sell_your_soul_to_devil = { active = true, prada = false }
    • in case you want to use cmp-copilot, set prada=true after copilot installation
  • I use a custom lualine disable it if you don't like it
    • lvim.builtin.fancy_statusline = { active = false }
  • You can use the diffview plugin instead of normal gitsigns 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 or neotest)
    • 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 and neo-tree as 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 default_diagnostic_config.virtual_text inside builtin.lua
  • I'm using skim for latex stuff, change it to zathura if you are on linux

Install

Prerequisites(🔎 Click to expand/collapse)

Prerequisites

 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

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

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)

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)Screenshot 2024-06-04 at 18 30 21

BufferLine

Screenshot 2024-06-04 at 18 30 53

StatusLine

Screenshot 2024-06-04 at 18 32 55

Dashboard

Screenshot 2024-06-04 at 18 33 48Screenshot 2024-06-04 at 18 33 56

lsp_signature

lsp_signature_2lsp_signature

Tabnine

tabnine

Lang Server

completionScreen Shot 2021-10-18 at 5 43 22 PM

diagnostics using glScreen_Shot_2021-07-31_at_7 54 52_PM

code_actions using gaScreen Shot 2021-10-18 at 6 25 58 PM

code_lens and inlay_hints when supported by lang serverScreen Shot 2021-10-18 at 6 26 47 PM

references in qfScreen Shot 2021-10-18 at 6 31 03 PM

treesitter backed foldingScreen Shot 2021-10-18 at 6 05 29 PM

peek using gp

Screen Shot 2021-10-18 at 6 33 06 PM

rename using <leader>lr

Screen Shot 2021-11-04 at 3 54 15 PM

Builtin Terminal

Screen Shot 2021-10-18 at 6 07 13 PM

Test

Screen Shot 2021-10-18 at 6 13 22 PM

ETC

k8s help

Screen Shot 2021-10-18 at 6 23 21 PM

lazy git integration

Screen Shot 2021-10-18 at 6 27 45 PM

zen mode

Screen Shot 2021-10-18 at 6 30 00 PM

Cheat.sh integration

use <leader>?Screen Shot 2021-10-18 at 6 02 31 PM

Screen Shot 2021-10-18 at 6 01 34 PM

Symbols Outline

Screen Shot 2021-10-18 at 6 03 57 PM

Plugins Included

Plugins(🔎 Click to expand/collapse)

Optional Plugins

Structure

Structure(🔎 Click to expand/collapse)

Custom Key-mappings

Note that,

  • Leader key set as Space
Key-mappings(🔎 Click to expand/collapse) Modes: 𝐍=normal 𝐕=visual 𝐒=select 𝐈=insert 𝐂=command

UI

KeyModeActionPlugin or Mapping
Space+e𝐍Open file treeNvimTree
Space+o𝐍Open symbolsSymbols-outline
Space+f𝐍Open file finderTelescope
Space+h𝐍Remove highlightnohlsearch<
Space+/𝐍Toggle commentComment.nvim
Space+?𝐍Open cheatscheat.sh
Space+I𝐍Inlay Hintsrequire('vim.lsp._inlay_hint').refresh()
Space+'𝐍Open markswhich-key marks
Space+z𝐍Zen modezen-mode.nvim
Space+P𝐍Projectsproject.nvim
Ctrl+</kbd>𝐈 𝐍Open terminaltoggleterm.nvim
Alt+0𝐈 𝐍Vertical terminaltoggleterm.nvim
Ctrl+s𝐈Show signature helpvim.lsp.buf.signature_help()
Alt+s𝐈Snippet selectionTelescope luasnip extension
Space+C or Ctrl+P𝐍Command Palettelegendary.nvim

Motion

KeyModeActionPlugin or Mapping
f𝐍find next characterHopChar1CurrentLineAC or leap_f or Flash.CharActions
F𝐍find previous characterHopChar1CurrentLineBC or leap_F or Flash.CharActions
s𝐍find characterHopChar2MW or leap_s or require("flash").jump()
S𝐍find wordHopWordMW or leap_S or 2char jump
Alt+a𝐈select allggVG
Alt+a𝐍increment numberC-A
Alt+x𝐍decrement numberC-X

LSP

KeyModeAction
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

KeyModeAction
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

KeyModeAction
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

KeyModeAction
Space+g+g𝐍Open lazy git UI

Plugin: Telescope

KeyModeAction
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

KeyModeAction
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

KeyModeAction
Space+n+c𝐍Class documentation
Space+n+f𝐍Function documentation
Space+n+t𝐍Type documentation
Space+n+F𝐍File documentation

Plugin: Persistence

KeyModeAction
Space+q+d𝐍Delete Session
Space+q+l𝐍Load Session
Space+q+s𝐍Save Session

Plugin: Bufferline

KeyModeAction
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

KeyModeAction
Space+T+d𝐍Diagnostics
Space+T+f𝐍Definitions
Space+T+r𝐍References
Space+T+t𝐍Todo
Space+T+w𝐍Workspace diagnostics

Plugin: Ultest

KeyModeAction
Space+t+f𝐍Run all tests in a file
Space+t+n𝐍Only run nearest test
Space+t+s𝐍Open test summary

Plugin: Neotest

KeyModeAction
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

KeyModeAction
Space+R+p𝐍Replace word in project
Space+R+w𝐍Replace visually selected word
Space+R+f𝐍Replace word in current buffer

Plugin: SSR

KeyModeAction
Space+r𝐕Structural replace confirm using <leader><cr>
Space+R+s𝐍Structural replace confirm using <leader><cr>

Plugin: Copilot

KeyModeAction
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>"

Plugin: Lsp_Lines

KeyModeAction
Space+v𝐍Toggle showing lsp_lines

Plugin: Overseer

KeyModeAction
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

KeyModeAction
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

KeyModeAction
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

Troubleshooting

  1. Check your neovim version. Are you on the newest nightly version?
  2. make sure to run :Lazy sync
  3. Reset your Lunarvim cache using :LvimCacheReset

About

🧑‍🚀 Bloated LunarVim 🚀

Topics

Resources

Stars

470 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages