ye-junzhe / BetterNvim

Coding in Neovim elegently
58 stars 6 forks source link
ide lua neovim vim

BetterNvim

GitHub repo size GitHub last commit GitHub top language

📦 Installation

Preview

BetterNvim Dashboard BetterNvim Coding BetterNvim HoverDoc BetterNvim Errors BetterNvim FloatTerm

Introduction

This repo is to setup a modern IDE style coding experience in Neovim. It has been tested both on the latest macOS and Debian GNU/Linux 12(Bookworm).

Installation

Prerequisites

Glyphs

To show glyphs properly, please install Nerd Fonts first, and set your terminal to use it

Optional: Backup existing nvim config

mv $HOME/.config/nvim $HOME/.config/nvim.old

Clone the repository

git clone --depth 1 https://github.com/ye-junzhe/BetterNvim.git $HOME/.config/nvim
git clone --depth 1 https://github.com/ye-junzhe/BetterNvim.git -b linux $HOME/.config/nvim

Plugins and Lsps and Highlighting

Plugins

Initialization

Lsps

Syntax highlighting

Keybindings 🎥

Keybindings at keymaps.lua And the rest of are in the corresponding *.lua file of the plugin

<D-> = Command on macOS

The <leader> key has been changed to <space>

Basic

<leader>e => nvim-tree (g? for help)

# Telescope
<leader>ff => File search
<leader>fr => Recent file search
<leader>fw => Word search in current buffer
<leader>fs => Word search in all files
<leader>ft => Todo-Tree

# Lspsaga
gh => Hover doc
gd => Definition(In definition window, o/i => edit)
gf => Find definition and references
<leader>oo => show symbols(silimar to tagbar)
<leader>a => Code actions
<leader>t(open)/tt(close) || ctrl-t => Float Term
<leader>dw => Work space diagnostics
<leader>db => Buf diagnostics

# Barbar
Shift+h => Switch left
Shift+l => Switch right
mp => BufferPick
ctrl-p => BufferPin
ctrl-c => BufferCloseAllButCurrentOrPinned

# Navigation
ctrl + h/j/k/l => navigate windows

# Hop
<leader>j => jump lines
ml => jump words

# Save and quit
W => Save
Q => Quit

# Bookmark
mm => Create and delete
mi => Add annotation
mc => Clear bookmarks
mx => Clear in all buffers
mn => Next bookmark
ma => Show all

# Neogit(Magit clone for Neovim)
<leader>gg => Open Neogit