Lunarvim

Updated: 11 March 2024

Notes

  • Configuration ~/.config/lvim/config.lua
  • On my system, plugins directories are in ~/.local/share/lunarvim/site/pack/lazy/opt
  • To turn off ShellCheck warnings in .env files, place at the top # shellcheck disable=SC2034

Keybindings

Toggle spelling on/off with a function:

lvim.keys.normal_mode["<leader>sp"] = function()
    if (true == vim.opt.spell:get()) then
        vim.opt.spell = false
        print("spell = false")
    else
        vim.opt.spell = true
        vim.opt.spelllang = "en_gb"
        print("spell = true")
    end
end

Resize splits with number keys:

lvim.keys.normal_mode["<A-8>"] = ":resize -1<CR>"
lvim.keys.normal_mode["<A-9>"] = ":resize +1<CR>"
lvim.keys.normal_mode["<A-7>"] = ":vertical resize -1<CR>"
lvim.keys.normal_mode["<A-0>"] = ":vertical resize +1<CR>"

Quick reference

Toggle floating terminal <C-\>
Show definition K
Clear cache whilst running :LvimCacheReset
Clear cache at startup lvim +LvimCacheReset