Skip to content

huguanghui/lvim

Repository files navigation

Readme

Table of Contents (🔎 Click to expand/collapse)

ChangeLog

20210915

使用bufferline替换barbar作为标签管理

Env

neovim

github

Language-Server Protocol (LSP)

To leverage LSP auto-completions and other functionalities, after you open a file in Neovim, run :MasonInstall <server> to use mason installation feature. Use Tab to list available servers.

Included Plugins

20211005

支持粘贴历史浏览

nvim-neoclip

sudo apt-get install sqlite3 libsqlite3-dev

black安装

pip3 install black -i https://pypi.douban.com/simple/ --trusted-host pypi.douban.com

vale

curl -sfL https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh -s latest

markdownlink

Plugins

Total: 58

补全

github/copilot.vim - 出至微软的一款AI生成代码的插件 abecodes/tabout.nvim

karb94/neoscroll.nvim - 滚屏插件 AckslD/nvim-neoclip.lua - 粘贴历史浏览

主题

Theme Time of the day
rose-pine [1am, 9am)
tokyonight [9am, 5pm)
catppuccin [5pm, 9pm)
kanagawa [9pm, 11:59pm), [0am, 1am]

使用

  1. 块注释 -visual_mode下按/

支持远程ssh登录后的复制粘贴

tools/clipboard-provider

Custom Key-mappings

Note that,

  • Leader key set as Space
Key-mappings (🔎 Click to expand/collapse) Modes: 𝐍=normal 𝐕=visual 𝐒=select 𝐈=insert 𝐂=command

UI

Key Mode Action Plugin or Mapping
Space+e 𝐍 Open file tree NvimTree
Space+o 𝐍 Open symbols Symbols-outline
Space+f 𝐍 Open file finder Telescope
Space+h 𝐍 Remove highlight nohlsearch<
Space+/ 𝐍 Toggle comment Comment.nvim
Space+? 𝐍 Open cheats cheat.sh
Space+' 𝐍 Open marks which-key marks
Space+z 𝐍 Zen mode zen-mode.nvim
Space+P 𝐍 Projects project.nvim
Ctrl+s 𝐈 show signature help vim.lsp.buf.signature_help()
Alt+s 𝐈 snippet selection telescope luasnip extension

Motion

Key Mode Action Plugin or Mapping
f 𝐍 find next chacharacter HopChar1CurrentLineAC or Lightspeed_f
F 𝐍 find prprevious character HopChar1CurrentLineBC or Lightspeed_F
s 𝐍 find chacharacter HopChar2 or Lightspeed_s
S 𝐍 find word HopWord or Lightspeed_S
Alt+a 𝐈 select all ggVG
Alt+a 𝐍 increment number C-A
Alt+x 𝐍 decrement number C-X

LSP

Key Mode Action
Tab / Shift-Tab 𝐈 Navigate completion-menu
Enter 𝐈 Select completion or expand snippet
Upor Down 𝐈 Movement in completion pop-up
]+d 𝐍 Next diagnostic
[+d 𝐍 Previous diagnostic
Space+l+j or Space+l+k 𝐍 Next/previous LSP diagnostic
Ctrl+e 𝐈 Close pop-up
Tab / Shift-Tab 𝐈 𝐒 Navigate snippet placeholders
Space+l 𝐍 keybindings for lsp
g+a 𝐍 code actions
g+d 𝐍 goto definition
g+D 𝐍 goto declaration
g+I 𝐍 goto implementation
g+p 𝐍 peek implementation
g+r 𝐍 goto references
g+s 𝐍 show signature help

Plugin: AsyncTasks

Key Mode Action
Space+m+f 𝐍 Build File
Space+m+p 𝐍 Build Project
Space+m+e 𝐍 Edit Tasks
Space+m+l 𝐍 List Tasks
Space+r+f 𝐍 Run File
Space+r+p 𝐍 Run Project

Plugin: Gitsigns

Key Mode Action
Space+g+j or Space+g+k 𝐍 Next/previous Git hunk
Space+g+p 𝐍 Preview hunk
Space+g+l 𝐍 Blame line
Space+g+s 𝐍 𝐕 Stage hunk
Space+g+u 𝐍 Undo stage hunk
Space+g+R 𝐍 𝐕 Reset hunk

Plugin: LazyGit

Key Mode Action
Space+g+g 𝐍 Open lazy git UI

Plugin: Telescope

Key Mode Action
Space+f 𝐍 File search
Space+P 𝐍 Project search
Space+s+s 𝐍 Grep search
Space+F+l 𝐍 Reopen last search
Space+b+f 𝐍 Buffers
Space+s+c 𝐍 Colorschemes
Space+s+C 𝐍 Command history
Space+s+h 𝐍 Find help
Space+s+k 𝐍 Keymap search
Space+s+M 𝐍 Man Pages search
Space+s+r 𝐍 Register search
Space+s+t 𝐕 Grep string under cursor
Space+s+t 𝐍 Grep raw
Space+F+b 𝐍 Builtin search
Space+F+f 𝐍 Current buffer search
Space+F+g 𝐍 Git files search
Space+F+i 𝐍 Installed plugins
Space+F+p 𝐍 Project search
Space+F+i 𝐍 Installed plugins
Within Telescope window
CR 𝐈 𝐍 Multi/Single Open
Ctrl+c 𝐈 𝐍 Exit telescope
Ctrl+v 𝐈 𝐍 Open in a vertical split
Ctrl+s 𝐈 𝐍 Open in a split
Ctrl+t 𝐈 𝐍 Open in a tab
Tab 𝐈 𝐍 Toggle Selection + Next
Shift+Tab 𝐈 𝐍 Toggle Selection + Prev

Plugin: Harpoon

Key Mode Action
Space+Space 𝐍 show harpoon shortlist
Space+a 𝐍 add file to shortlist
Space+1 𝐍 jump to first file on shortlist
Space+2 𝐍 jump to second file on shortlist
Space+3 𝐍 jump to third file on shortlist
Space+4 𝐍 jump to forforthle on shortlist

Plugin: Neogen

Key Mode Action
Space+n+c 𝐍 class docdocumentation
Space+n+f 𝐍 function docdocumentation

Plugin: Persistence

Key Mode Action
Space+q+d 𝐍 quit without saving session
Space+q+l 𝐍 restore last session
Space+q+s 𝐍 restore last session from current dir

Plugin: Bufferline

Key Mode Action
Space+b+f 𝐍 find buffer
Space+b+b 𝐍 toggle buffer groups
Space+b+p 𝐍 pick buffer
Space+b+1 𝐍 goto buffer 1
Space+b+h 𝐍 Close all to left
Space+b+l 𝐍 Close all to right
Space+b+D 𝐍 Sort by directory
Space+b+L 𝐍 Sort by language

Plugin: Trouble

Key Mode Action
Space+t+d 𝐍 diagnostics
Space+t+f 𝐍 definitions
Space+t+r 𝐍 references
Space+t+t 𝐍 todo
Space+t+w 𝐍 workspace diagnostics

Plugin: Copilot

Key Mode Action
Ctrl+h 𝐈 copilot#Accept("<CR>")
Ctrl+e 𝐈 close cmp menu
Alt+] 𝐈 <Plug>(copilot-next)
Alt+[ 𝐈 <Plug>(copilot-previous)
Alt+</kbd> 𝐈 "<Cmd>vertical Copilot panel<CR>"

clangd_extensions.nvim

Recommended Linters

You can use mason to install these:

cargo install selene  # if you want to use selene instead of luacheck
brew install hadolint  # if you want to lint dockerfiles
pip install vim-vint  # for vim linting
# install llvm and clang_format for clang stuff
npm install -g @fsouza/prettierd # if you want to use prettierd
pip install yapf flake8 black  # for python stuff
# if you want to use the markdown thingy
brew install vale markdownlint-cli
cp -r ~/.config/lvim/.vale ~/.config/vale
# fix the address inside .vale.ini
cp ~/.config/lvim/vale_config.ini ~/.vale.ini
# if you want the latex stuff
# brew install --cask mactex-no-gui # for mac
# or install zathura and chktex on linux

Extern

comment

visual_mode gc line comment gb block comment

Task

  • [✓] 带图标字体
  • [] chatgpt的插件结构

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages