Skip to content

Hydraallen/lvim

Repository files navigation

update GitHub License Open Source? Yes!

LunarVim Demo LunarVim LunarVim

This is a set of config files based on LunarVim by Christian Chiarulli. I refered to jimcornmell's config file and abzcoding's config file.

Personally, I began using vim since 2022 September and started to use neovim and lunarvim at the beginning of 2023.

The main changes are documented below:

  • Config for status line.
  • Dashboard.
  • Custom Keybindings.
  • Custom Colours.
  • and much more.

Contents

Installation

  • First of all, follow the instructions on Christian's site to install lunarvim.
  • Download this repo to ~/.config/lvim.(Commands below are for reference.)
$ mv ~/.config/lvim ~/.config/lvim_backup
$ git clone https://github.com/Hydraallen/lvim.git ~/.config/lvim
$ lvim +LvimUpdate +LvimCacheReset +q
$ lvim # run :Lazy sync
$ lvim # run :LspInstall sqlls

:Lazy sync and :LspInstall sqlls should be run inside lunarvim.

Recommended Fonts

  • [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

Visual Appearance

Visual Appearance

  • I use onedark theme as I also used it for VSCode.

You can change it to zenburn or tokyonight by editing config.lua. Or if you want to use the default theme of lunarvim, you can just delete all the following lines.

lvim.colorscheme             = "zenburn"   -- https://github.com/jnurmine/Zenburn
lvim.colorscheme             = "tokyonight"
lvim.colorscheme             = "onedark_vivid"   -- https://github.com/olimorris/onedarkpro.nvim
lvim.colorscheme             = "onedark"
lvim.colorscheme             = "onelight"
lvim.colorscheme             = "onedark_dark"
  • The current cursor line is highlighted in light red

  • The current cursor column is highlighted in light blue

  • Whitespace at the end of a line in highlighted in bright red.

  • Margin:

    • Current line number is highlighted in Yellow
    • Relative line numbers are shown in RoyalBlue
    • Markers are shown
    • Git changes are shown
    • Folding marks are also shown in the margin

Status line

The status line configuration can be found here

Status Line Normal Status Line Insert Status Line Visual Status Line Replace

This image shows what is in the different sections.

Status Line

The line is split into 5 main sections, 3 on the left and 2 on the right:

  • On the left:
    • VIM Mode is colour coded, see the lualine.lua for details
    • Git information
    • LSP information
  • On the right:
    • File information
      • Line Ending, Linux tux, Mac mac or Windows windows
      • File Name (red padlock when the file is readonly)
      • File Type
      • File Size
      • Character encoding
    • Position information - Percentage - Current Line Number / Number of lines in the file - Current column / length of current line - Tab mode, space or tab and number of characters Note the column information is colour coded, >80 = Yellow >120 = Red.

Extra Plugins and Simple Usage

I've added a few extra plugins I use to the configuration:

  • Codeium "Free, ultrafast Copilot alternative for Vim and Neovim"

    • Use :Codeium Auth to activate.
    • Use Tab to get auto-suggestions.
  • Lazygit F8 or lg to open.

  • Ranger ra to open.

  • wakatime Record coding time for you.

    • You need to setup your account and paste API key.
  • Codi I alias "bc" on the command line to get a powerful calculator scratchpad using python.
  • Colorizer
  • Dial I've enabled a bunch of the predefined "increment's", also added a few of my own, e.g: True<->False and full month names, logging levels and more. See the config for detailsI
  • Fugitive Git plugin from Tim Pope
  • Highlighturl Highlight urls, jump to them with gj
  • Markdown_preview Open a markdown file and ":MarkdownPreview"
  • Todo comments With a few tweaks....
  • Vim Eunuch Vim sugar for the UNIX shell commands that need it the most. Also makes files starting with #! executable.
  • Vim Signature A plugin to place, toggle and display marks.
  • Vim Surround Surround.vim is all about "surroundings": parentheses, brackets, quotes, XML tags, and more. The plugin provides mappings to easily delete, change and add such surroundings in pairs.

Configured LSP's

Key Bindings-Cheatsheet

Note this cheatsheet is available as a HTML file, which is accessed by hitting F1 in vim. See my dotfiles for a simple bash script to convert this GitHut markdown file into HTML (and thus PNG).

Some Useful Links

NeoVim Lunar Vim Vim Sheet
Vim Cheatsheet Quick ref Cheatsheet
100 Essential commands Vim tutorial Vim cookbook
VimAwesome    

Troubleshooting

  1. Check your neovim version. Are you on the newest nightly version?
  2. Reset your packer cache, and update lvim.

Star History

Star History Chart

About

My config file for lunarvim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published