ChatGPT-4o辅助的neovim配置

zshneovim完整配置请查看本人的GitHub仓库

Neovim Configuration Files Overview

This document provides a brief description of the files in your Neovim configuration directory.

For latex key mappings you can refer to Getting started with the VimTeX plugin

File Name Description
ftplugin/java.lua Filetype-specific configuration for Java LSP.
ftplugin/rust.lua Filetype-specific configuration for Rust LSP.
init.lua Main configuration file for Neovim, loading plugins and settings.
lua/_bufferline.lua Configuration for displaying buffers in a tabline.
lua/_cmp.lua Setup for completion plugins, configuring nvim-cmp.
lua/_copilot.lua Configuration for Copilot plugin.
lua/_dap.lua Configuration for debugging support using nvim-dap.
lua/_gitsigns.lua Configuration for displaying Git signs in the sign column.
lua/_null-ls.lua Configuration for integrating null-ls for formatters and linters.
lua/_toggleterm.lua Configuration for the terminal plugin nvim-toggleterm.
lua/autopairs.lua Configuration for auto-pairing brackets and quotes.
lua/comment.lua Setup for commenting and uncommenting code easily.
lua/keymaps.lua Custom key mappings for easier navigation and functionality.
lua/lsp.lua Settings for Language Server Protocol (LSP) configurations.
lua/markdown.lua Configuration for Markdown preview.
lua/plugins.lua List and configuration of plugins managed by Packer.
lua/settings.lua General Neovim settings and options.
lua/treesitter.lua Configuration for Tree-sitter highlighting and parsing.

Neovim Key Mappings Overview

This document provides a breakdown of the key mappings in your Neovim configuration.

General Mappings

Key Mapping Action
jk Exit insert mode
<leader>sv Vertical split
<leader>sh Horizontal split
<leader>nh Clear highlight
<C-L> Switch to the next buffer
<C-H> Switch to the previous buffer
zc Close fold
zo Open fold
<leader>e Toggle file tree
<leader>o Open code outline

Code Formatting and Diagnostics

Key Mapping Action
<leader>f Format code
<leader>d Show diagnostic information
[d Jump to previous diagnostic
]d Jump to next diagnostic

Telescope Mappings

Key Mapping Action
<leader>ff Find files
<leader>fg Live grep
<leader>fb List buffers
<leader>fh Help tags

Debugging Mappings

Key Mapping Action
<F5> Continue debugging
<F10> Step over
<F11> Step into
<F12> Step out
<Leader>b Toggle breakpoint
<Leader>B Set conditional breakpoint
<Leader>lp Set log point message
<Leader>dr Open debug REPL
<Leader>dh Hover debug widget
<Leader>du Toggle debug UI

Completion Mappings

Key Mapping Action
<C-n> Select next completion item
<C-p> Select previous completion item
<C-d> Scroll documentation up
<C-f> Scroll documentation down
<C-Space> Trigger completion
<C-e> Cancel completion (insert and command modes)
<CR> Confirm completion
<Tab> Select next item or expand snippet
<S-Tab> Select previous item or jump back in snippet

Git Integration Mappings

Key Mapping Action
<leader>hs Stage hunk
<leader>hr Reset hunk
<leader>hS Stage buffer
<leader>hu Undo stage hunk
<leader>hR Reset buffer
<leader>hp Preview hunk
<leader>hb Blame line (full)
<leader>tb Toggle current line blame
<leader>hd Show diff for this file
<leader>hD Show diff against the last commit
<leader>td Toggle deleted lines

Commenting Mappings

Key Mapping Action
gcc Toggle line comment
gbc Toggle block comment
gcO Comment above
gco Comment below
gcA Comment at end of line

LSP Mappings

Key Mapping Action
gd Go to definition
gr Show references
K Show hover information
<leader>rn Rename symbol
<leader>ca Code action

Incremental Selection

Key Mapping Action
gnn Start selection
grn Increment selection
grc Increment scope selection
grm Decrement selection

Copilot Mappings

Action Normal Mode Mapping Insert Mode Mapping
Close CopilotChat q <C-c>
Reset CopilotChat <C-l> <C-l>
Submit Prompt <CR> <C-s>
Accept Difference <C-y> <C-y>
Yank Difference gy
Show Differences gd
Show System Prompt gp
Show User Selection gs
Quick Chat <leader>ccq
Help Actions <leader>cch
Prompt Actions <leader>ccp

Markdown Mappings

Key Mapping Action
<C-s> Start Markdown preview
<M-s> Stop Markdown preview
<C-p> Toggle Markdown preview

Toggleterm Mappings

Key Mapping Mode Description
<C-t> Normal, Insert Open the terminal with the current count value.
<C-\> Normal Toggle the terminal window.
<Space>s Visual Send the selected lines to the terminal.
<leader><C-\> Normal Send text selected by motion to the terminal.
<leader><C-\><C-\> Normal Send the current line to the terminal.
<leader><leader><C-\> Normal Send the entire file to the terminal.
:ToggleTerm size=40 dir=~/Desktop direction=horizontal name=desktop Command Open a horizontal terminal at the specified size and location.

ChatGPT-4o辅助的neovim配置
https://rukkhadevata123.github.io/2024/09/20/nvim/
作者
Dawn Chirps
发布于
2024年9月20日
许可协议