This is a highly customized Neovim configuration written in Lua, using lazy.nvim as the plugin manager. The configuration includes a rich set of functional modules, including UI enhancements, code completion, LSP, debugging, and more.
To use this Neovim configuration, follow these steps:
-
Ensure the following software is installed, and use the following command to install them:
sudo apt-get update sudo apt-get install -y \ neovim \ git \ curl \ sudo \ software-properties-common \ python3 \ python3-pip \ g++ \ gcc \ build-essential \ npm \ unzip \ clang-format -
Clone this repository to the
~/.config/nvimdirectory:git clone https://github.com/HuangJunLin8/nvim ~/.config/nvim -
Start Neovim, and the plugins will be installed automatically.
-
Use the provided shortcuts and functional modules to enhance your editing experience.
You can use the provided Dockerfile to quickly set up a Docker container with this Neovim configuration (the built image is 1.48G). Here are the steps:
-
Build the Docker image:
docker build -t my-neovim . -
Run the Docker container:
docker run -it --rm my-neovim
This will start a container with Neovim, where you can use the configured Neovim.
sl: Vertical splitsh: Horizontal splitss: Close current windowso: Close other windows<A-h/j/k/l>: Navigate between windowss,/s.: Adjust window widthsj/sk: Adjust window heights=: Equalize window sizes
<A-m>: Toggle file tree (NvimTree)<leader>s: Save file<C-s>: Save file
<leader>h: Switch to the left tab<leader>l: Switch to the right tab<leader>q: Close current tab<leader>wl: Close all tabs to the right (excluding current)<leader>wh: Close all tabs to the left (excluding current)<leader>wc: Interactively choose a tab to close
<leader>t: Open terminal in horizontal split<leader>vt: Open terminal in vertical split<Esc>: Exit terminal mode<A-h/j/k/l>: Navigate between terminal windows
<C-_>: Comment/uncomment current line<leader>f: Format code using Formattergcc: Comment/uncomment current linegc: Comment/uncomment selected lines<leader>a: Copy entire file contentJ/K: Move selected text up/down<C-j>/<C-k>: Quick move up/down<C-u>/<C-d>: Quick scroll up/down<C-h>: Jump to line start<C-l>: Jump to line endq: Close current windowqq: Save and exitQ: Force exitjj: Exit insert mode<C-Left>/<C-Right>: Adjust window width<C-Up>/<C-Down>: Adjust window heightp: Paste without overwriting clipboard
<C-p>: File search (Telescope)<C-f>: Content search (Telescope)<leader>fe: Environment variable search (Telescope)<C-j>: Move to next selection<C-k>: Move to previous selection<C-n>: Cycle history to next<C-p>: Cycle history to previous<C-q>: Close search window<C-u>: Scroll preview up<C-d>: Scroll preview down
gd: Go to definitiongD: Go to declarationgi: Go to implementationgr: Show referencesgh: Hover documentationgp: Show diagnostic informationgk: Previous diagnosticgj: Next diagnostic<leader>rn: Rename symbol<leader>ca: Code actions<leader>p: Open terminal<A-.>: Trigger completion<A-,>: Cancel completion<CR>: Confirm selection<C-k>: Previous option<C-j>: Next option<C-d>: Scroll document down<C-u>: Scroll document up<C-l>: Insert snippet<C-h>: Previous snippet<Tab>: Smart completion<S-Tab>: Previous completion item
<leader>cc: Select Python virtual environment<leader>rr: Run code<leader>rf: Run file<leader>rft: Run file in new tab<leader>rp: Run project<leader>rc: Close run<leader>crf: Set file type<leader>crp: Set project
- UI Enhancements: tokyonight.nvim, nvim-tree, bufferline.nvim, lualine.nvim
- Core Features: telescope.nvim, nvim-treesitter
- LSP: mason.nvim, nvim-lspconfig, nvim-cmp
- Debugging: nvim-dap, mason-nvim-dap.nvim
- Python: venv-selector.nvim
.
├── init.lua # Neovim initialization configuration file
├── lazy-lock.json # Plugin lock file
├── lua # Lua configuration directory
│ ├── basic.lua # Basic configuration
│ ├── colorscheme.lua # Colorscheme configuration
│ ├── keybindings.lua # Keybindings configuration
│ ├── plugin-config # Plugin configuration directory
│ │ ├── code # Code-related plugin configuration
│ │ │ ├── code_runner.lua
│ │ │ ├── flash.lua
│ │ │ ├── formatter.lua
│ │ │ └── nvim-treesitter.lua
│ │ ├── dap # Debugging-related plugin configuration
│ │ │ ├── cpp.lua
│ │ │ ├── init.lua
│ │ │ └── python.lua
│ │ ├── lsp # LSP-related plugin configuration
│ │ │ ├── cmp.lua
│ │ │ ├── init.lua
│ │ │ ├── lsp_ui.lua
│ │ │ └── mason.lua
│ │ ├── telescope.lua # Telescope plugin configuration
│ │ └── ui # UI-related plugin configuration
│ │ ├── blankline.lua
│ │ ├── bufferline.lua
│ │ ├── dashboard.lua
│ │ ├── lualine.lua
│ │ ├── nvim-tree.lua
│ │ ├── rainbow.lua
│ │ └── toggleterm.lua
│ └── plugins.lua # Plugin management configuration
└── README.md # Project description file
