Skip to content
zhaohongxuanPublic

About

A lightweight and mordern neovim configuration for my personal usage.

Resources

Stars

13 stars

Watchers

1 watching

Forks

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

nvim

A lightweight and modern Neovim configuration for personal usage.

Requirements

  • Neovim >= 0.10.0 (built with LuaJIT)
  • Git >= 2.19.0
  • Nerd Font — icons for statusline and file explorer
  • ripgrep — for Telescope live grep

Install

git clone https://github.com/zhaohongxuan/nvim ~/.config/nvim --depth 1

Structure

~/.config/nvim
├── init.lua
├── lazy-lock.json
└── lua
    ├── core
    │   ├── autocmds.lua
    │   ├── keymaps.lua
    │   └── options.lua
    └── plugins
        ├── configs
        │   ├── bufferline.lua
        │   ├── gitsigns.lua
        │   ├── lualine.lua
        │   ├── nvim-tree.lua
        │   ├── telescope.lua
        │   ├── treesitter.lua
        │   └── which-key.lua
        └── init.lua
  • init.lua — 配置入口
  • lua/core/ — 基础设置(选项、快捷键、自动命令)
  • lua/plugins/ — 插件声明与配置

Features

功能 插件
主题 catppuccin(mocha,透明背景)
插件管理 lazy.nvim
文件搜索 / Grep telescope.nvim
语法高亮 nvim-treesitter
符号大纲 / 方法跳转 aerial.nvim(基于 Treesitter,无需 LSP)
文件树 nvim-tree.lua
Buffer 标签页 bufferline.nvim
状态栏 lualine.nvim
Git 集成 gitsigns.nvim
快速跳转 flash.nvim
括号/包围符操作 nvim-surround
代码注释 Neovim 0.10+ 内置 gc 操作符,无需插件
内置终端 toggleterm.nvim
快捷键提示 which-key.nvim

Keymaps

基础操作

快捷键 说明
jk 退出 Insert 模式
; 进入命令模式
H / L 行首 / 行尾
<C-s> 保存文件
<Space>w 保存文件
<leader>Q 强制退出全部

窗口管理

快捷键 说明
<C-h/j/k/l> 切换窗口
<A-Up/Down/Left/Right> 调整窗口大小

Buffer

快捷键 说明
<A-[> / <A-]> 切换上/下一个 Buffer
<leader>bf 选择跳转到指定 Buffer
<leader>bc 关闭选择的 Buffer

文件树

快捷键 说明
<leader>e 切换文件树
<leader>r 聚焦文件树

Telescope 搜索

快捷键 说明
<leader><space> 搜索文件
<leader>sg 全局 Live Grep(排除 csv/md)
<leader>sr 最近文件
<leader>sb 搜索 Buffer
<leader>sw 搜索光标下单词
<C-p> 搜索 Git 文件

符号 / 方法跳转(无需 LSP)

快捷键 说明
<leader>sf Telescope 弹窗搜索当前文件方法/符号
<leader>o 切换右侧符号大纲面板
{ / } 跳转到上/下一个方法

Git

快捷键 说明
]h / [h 下/上一个 Hunk
<leader>gs Stage Hunk
<leader>gr Reset Hunk
<leader>ga Blame 当前行
<leader>gd Diff 当前文件

代码注释(内置,无需插件)

快捷键 说明
gcc 注释/取消注释当前行
gc + motion 注释指定范围(如 gc3j 注释4行)
可视模式 gc 注释选中块

其他

快捷键 说明
s Flash 跳转
<C-\> 切换内置终端
<leader>L 打开 Lazy 插件管理器
<leader>ve 编辑 init.lua
<leader>vk 编辑 keymaps.lua

About

A lightweight and mordern neovim configuration for my personal usage.

Resources

Stars

13 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages