Skip to content
Home » My Blog Tutorial » LazyVim Installation Guide for Efficient Neovim Setup

LazyVim Installation Guide for Efficient Neovim Setup

LazyVim installasi keyboard shortcuts

System Requirements for Using LazyVim

Before you begin the LazyVim installation, ensure your system meets the following requirements:

  • Neovim: Version 0.9.0 or higher (must be built with LuaJIT)
  • Git: Version 2.19.0 or newer
  • Nerd Font: Version 3.0 or higher
  • C Compiler: Required for nvim-treesitter
  • Terminal: Must support true color and undercurl

Key Features of LazyVim

LazyVim offers several exciting features, including:

  • Transforming Neovim into a full-featured IDE
  • Easily customizable with lazy.nvim
  • Fast and responsive performance
  • Optimized default settings
  • Pre-configured plugins ready to use

Installation Steps

To LazyVim Installation, follow these steps:

  1. Install Neovim: Download the latest version from the official Neovim site.
  2. Install Git: Obtain it from the official Git site.
  3. Download Nerd Font: Install it for enhanced icon display.
  4. Optional: Install lazygit.
  5. Install a C Compiler: Choose one suitable for your operating system.
  6. Install curl: Needed for blink.cmp.
  7. Install fzf and ripgrep: For efficient file searching.

Supported Terminal Configuration

LazyVim Installation works best with the following terminals:

  • Kitty (Linux & macOS)
  • Wezterm (Linux, macOS & Windows)
  • Alacritty (Linux, macOS & Windows)
  • iTerm2 (macOS)

Installing Alacritty Terminal

To set up Alacritty, proceed with these steps:

  1. Basic Installation: First, install Alacritty using Homebrew by running:
   brew install --cask alacritty
  1. Font Configuration: Download and install the MesloLGS NF font:
  • MesloLGS NF Regular.ttf
  • MesloLGS NF Bold.ttf These fonts are available from the Powerlevel10k repository.
  1. Create Alacritty Configuration: Set up the configuration directory and file:
   mkdir -p ~/.config/alacritty
   cd ~/.config/alacritty
   touch alacritty.toml
  1. Configure Settings: Open the configuration file with an editor:
   vim alacritty.toml

Add the following settings for font and appearance:

   [font]
   normal = { family = "MesloLGS NF", style = "Regular" }
   bold = { family = "MesloLGS NF", style = "Bold" }
   size = 14.0

[window]

opacity = 0.95

Setting Up ZSH and Oh My Zsh

  1. Install ZSH: Set it as the default shell:
   brew install zsh
   chsh -s $(which zsh)
  1. Install Oh My Zsh: Use the following command:
   sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  1. Configure Powerlevel10k: Install the theme with:
   git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Edit ~/.zshrc to change the theme:

   ZSH_THEME="powerlevel10k/powerlevel10k"

Afterward, run:

   source ~/.zshrc

Powerlevel10k will start its configuration wizard the first time you run it. Follow the prompts to customize your terminal appearance.

For more details on Powerlevel10k configuration, visit the official documentation.

Additional System Requirements for LazyVim

Before LazyVim Installation, confirm that your system meets these requirements:

  • Neovim: Version 0.9.0 or higher (built with LuaJIT)
  • Git: Version 2.19.0 or newer
  • Nerd Font: Version 3.0 or higher (optional, needed for icons)
  • Terminal: Must support true color and undercurl

Installing Supporting Components

Step 1: Install Lazygit

Run these commands to install Lazygit:

LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": *"v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit -D -t /usr/local/bin/

Step 2: Install Additional Components

For better search and navigation, install these tools:

  • FZF (Fuzzy Finder): Follow the FZF installation guide.
  • Ripgrep: Refer to the Ripgrep installation guide.
  • FD: Check the FD installation guide.

Backing Up Neovim Configuration

Before installing LazyVim, back up your current Neovim configuration:

# Mandatory
mv ~/.config/nvim{,.bak}

# Recommended
mv ~/.local/share/nvim{,.bak}
mv ~/.local/state/nvim{,.bak}
mv ~/.cache/nvim{,.bak}

Configuring LazyVim

For LazyVim configuration, you have two options:

  • Use the official starter configuration: Visit the LazyVim Starter.
  • Use a custom configuration: Example config: Deafrizal LazyVim Config.

Additional Notes

  • Ensure a C compiler is installed for nvim-treesitter.
  • Install curl for blink.cmp (completion engine).
  • Recommended terminals include Kitty, Wezterm, and Alacritty.

LazyVim provides various keyboard shortcuts to help manage code and navigation efficiently. In this article, we will discuss essential shortcuts that can boost your productivity when using LazyVim and Neovim.

Basic Keyboard Shortcuts for Terminal

Alacritty Shortcuts

Alacritty, as a modern terminal emulator, offers some basic shortcuts:

  • Zoom In: Cmd + +
  • Zoom Out: Cmd + –

ZSH Configuration

For ZSH shell users:

  • Update configuration: source ~/.zshrc

Navigation Modes in LazyVim

Basic Modes

LazyVim has two main modes you should master:

  • Insert Mode: Enter by pressing i to start typing text.
  • Normal Mode: Return by pressing Esc for navigation and shortcuts.

Efficient Navigation Techniques

Basic Navigation

Use these basic movements:

  • h: Left
  • j: Down
  • k: Up
  • l: Right
  • e: Move between words

File and Tab Management

File Operations

Here are some key file operations:

  • Open Explorer: Space + e
  • Save File: :w
  • Create New File: Space + FN

Search

  • Find File: Space + Space
  • Search Word: Space + s + w

Tab Management

  • Close Tab: Space + BD
  • Switch Tab: Shift + L

Terminal Features and Notifications

Terminal Integration

  • Open Terminal: Space + FT

Notification Management

  • Clear Notifications: Space + UN

Additional Tips for LazyVim Users

File Management in Explorer

  • Delete File: Select file, press d
  • Move File: Select file, follow confirmation

Advanced Saving

  • Save with New Name: :w [file_name]

By mastering these shortcuts, you can significantly enhance your efficiency with LazyVim. Regular practice and a deep understanding of each shortcut will help you become a more productive LazyVim user.

References and Learning Resources

  • Official Neovim Documentation
  • LazyVim GitHub Repository
  • Neovim Indonesia Community

Note: This article will be updated as LazyVim and Neovim receive updates.

Learning Resources for LazyVim

To deepen your understanding of LazyVim, you can access:

  • Complete video tutorials by @elijahmanor
  • The book “LazyVim for Ambitious Developers” by @dusty-phillips, available for free online
  • Official LazyVim documentation

Conclusion

LazyVim’s keyboard shortcuts provide a comprehensive solution for transforming Neovim into a modern, high-performance IDE. With minimal system requirements and strong community support, LazyVim is ideal for developers seeking a more productive coding experience.

With the installation guide above, you can start using LazyVim and enjoy its advanced features. Remember to keep up with the latest updates and participate in the LazyVim community to gain additional tips and tricks.


Reference


Discover more from teguhteja.id

Subscribe to get the latest posts sent to your email.

Leave a Reply

Optimized by Optimole
WP Twitter Auto Publish Powered By : XYZScripts.com

Discover more from teguhteja.id

Subscribe now to keep reading and get access to the full archive.

Continue reading