This repo is my neovim setting.
Neovim version must be 0.10+
.
Some plugins need use nerd font
, so we need download a font from this web. And then decompress the downloaded compressed file. Finally, please copy *.ttf
files into the path /usr/local/share/fonts
.
You can read INSTALL.md to get more information to setup neovim.
If you want to use neovim to write gdscript
for godot, you have to install godot 4.x.
- chadtree: I use this plugin as the file explorer.
- nvim-notify: It can use cool dialog to show message.
- auto-pairs: It can automatically brackets, parens and quotes in pair.
- DoxygenToolkit.vim: It can insert doxygen style comments for
C/C++
. - vim-code-dark: I use this plugin to set the color scheme for neovim.
- vim-ranbow: This plugin can use multiple colors to show nest parentheses.
- lualine.nvim: I need use these plugins to show the status bar on neovim.
- telescope.nvim: This plugin can offer a fuzzy file finder.
- indent-blackline.nvim: It can show indentation line.
- which-key.nvim: It can show the shortcuts on a floating dialog.
- markdown-previw.nvim: It can use web browser to preview markdown files.
- nvim-treesitter: It can highlight keywords for each file type.
- gitignore.nvim: It can generate
.gitignore
. - startup.nvim: It can show the welcome page on neovim.
- leetcode.nvim: It can use neovim to practice
LeetCode
. - vim-cursorword: It can use underline to show the word under the current cursor.
- nvim-lspconfig: It offers a easy way to set configurations for LSP.
- tiny-inline-diagnostic.nvim: It can show inline message from LSP server.
- mason.nvim: It can manage LSP servers.
- mason-lspconfig.nvim: It can automatically install LSP servers.
- mason-registry: The plugin
mason.nvim
need use it to manage LSP servers. - lspkind.nvim: It can show cool LSP icons.
- lspsaga.nvim: It can improve LSP experences in neovim.
- lsp_signature.nvim: It can show function signature when I type code.
- conform.nvim: It can LSP to format code.
- mason-conform.nvim: The plugin
conform.nvim
need use it to automatically install LSP server viamason.nvim
for formatting code. - nvim-nio: It can handle ansynchronous IO for neovim.
- nvim-cmp: It is a completion engine.
- cmp-nvim-lsp: It can offer information from LSP server to the plugin
nvim-cmp
for auto completion. - cmp-path: The plugin
nvim-cmp
need use it for auto completion filesystem paths. - cmp-cmdline: The plugin
nvim-cmp
need use it to implement the completion for command mode. - cmp-buffer: The plugin
nvim-cmp
need use it to implement the completion for buffer words. - vim-vsnip: It can insert vscode style snippets during typing code for auto completion.
- cmp-vsnip: The plugin
vim-vsnip
need use it to insert vscode style snippets for auto completion. - friendly-snippets: This plugin has defined many snippets for auto completion.
- nvim-dap: It is implemented for DAP(Debug Adapter Protocol) client.
- nvim-dap-virtual-text: It can show debug information on neovim during debugging using neovim.
- nvim-dap-ui: It can offer cool UI on neovim for DAP.
- mason-nvim-dap.nvim: It can use the plugin
mason.nvim
to automatically install DAP servers.
I use space key
as the leader key for neovim.
Keymaps | Description |
---|---|
<F2> |
Open the file browser. |
<F8> |
Insert the doxygen style comment for a function signature. |
Ctrl + p |
Fuzzy search the file from the current project. |
Ctrl + f |
Use grep to search keyword from the current project. |
<leader>mp |
Open the web browser to preview the current markdown file. |
<leader>ms |
Stop previewing the current markdown file. |
<leader>mt |
Toggle to preview the current markdown file. |
<leader>G |
Use the plugin gitignore.nvim to generate .gitignore . |
Keymaps | Description |
---|---|
<leader>t |
Open the floating terminal on neovim. |
Ctrl + k |
Return normal mode for the floating terminal on neovim. |
Keymaps | Description |
---|---|
<leader>lr |
Rename for variable or function. |
<leader>la |
Perform code action. |
<leader>ld |
Go to definition for variable or function. |
<leader>lf |
Find the definition, reference or implementation for the keyword. |
<F3> |
Open the outline for the currrent file. |
<leader>lh |
Hover the document for variable or function. |
<leader>= |
Format the currrent code. |
Keymaps | Description |
---|---|
Alt + j |
Toggle for completion. |
Alt + k |
Abort for completion. |
Tab |
Move the next item of the candidate list for completion. |
Shift + Tab |
Move the previous item of the candidate list for completion. |
Enter |
Select the current item of the candidate list for completion. |
Keymaps | Description |
---|---|
<leader>db |
Add or remove the break point. |
<leader>dc |
Continue running for debugging. |
<leader>dd |
Disconnect for DAP. |
<leader>dn |
Run the next statement for debugging. |
<leader>dq |
Close DAP. |
<leader>ds |
Run a step into the currrent function for debugging. |
<leader>dx |
Terminate DAP. |
Keymaps | Description |
---|---|
<leader>LL |
Open the plugin leetcode.nvim . |
<leader>Lq |
Close the plugin leetcode.nvim . |
<leader>Lm |
Return the menu. |
<leader>Ld |
Open the question of the today. |
<leader>Ll |
Open a problem list picker. |
<leader>LR |
Open a random question. |
<leader>Lr |
Run the currently opened question. |
<leader>La |
Change the language for the currently opened question. |
<leader>Ls |
Submit the currently opened question. |
Keymaps | Description |
---|---|
q |
Close the file browser. |
L |
Show the status for a file or directory. |
i |
Open the selected file in horizontal split. |
I |
Open the selected file in vertical split. |
c |
Collpase all subdirectories for the directory at the currrent cursor on the file browser. |
W |
Change the current working directory for neovim. |
a |
Create a new file or a new directory at the location under the current cursor on the file browser. |
r |
Rename a file or a directory. |
c |
Copy the selected files for directories to the location under the current cursor on the file browser. |
x |
Move the selected files or directories to the location under the current cursor on the files browser. |
d |
Delete the selected files. |
If you want to try my configuration for neovim, you can run docker or podman with my dockerfiles.
First, you need run this command to build the image.
# For docker.
docker build -t neovim -f ./docker/Dockerfile.ubuntu .
# For podman
podman build -t neovim -f ./docker/Dockerfile.ubuntu .
Now, you can use this command to run the image as a container.
# For docker
docker run --rm -it neovim
# For podman
podman run --rm -it neovim