modern-neovim-configuration icon indicating copy to clipboard operation
modern-neovim-configuration copied to clipboard

Modern configuration for neovim.

Modern Neovim Configuration

Neovim + Linux = Best Almighty IDE

This configuration is for linux only.

Mainly Supported Language/Framework List

  • Rust
  • Javascript/Typescript
  • Shell
  • SQL
  • Lua
  • GLSL
  • WGSL
  • Vue
  • React
  • Flutter

To support a new one, check these.

  • treesitter
  • lsp
  • dap
  • formatter
  • snippet

Personal Environment

OS: Gentoo

Terminal: Alacritty

Neovim: V0.10+

Dependencies

  1. nodejs, go, rust (required for mason.nvim and nvim-treesitter). Use :h mason-requirements to check more dependencies.
  2. rg, fd command (required for telescope.nvim)
  3. trashy command (required for nvim-tree.lua)
  4. fcitx5 (required for fcitx.nvim)
  5. deeplx (required for translate.nvim)
  6. cargo-nextest (required for neotest-rust.nvim)
  7. @vue/typescript-plugin (required for vue project)
  8. dolphin (required for nvim-tree.lua)
  9. flutter-sdk (required for flutter project)

QuickStart

Installation

  1. Install all dependencies.

  2. git clone https://github.com/niuiic/modern-neovim-configuration ~/.config/nvim

  3. Open neovim and then all plugins would be installed automatically.

  4. Install lsps, formatters, linters, debuggers with mason.nvim. Check lua/plugin/mason.lua for details.

  5. Check if something is missing with :checkhealth.

  6. Look for specific functions in lua/plugins.lua.

Keymap

which-key.nvim will tell you. Check lua/plugin/* and lua/keymap.lua for details.

leader: \

localLeader: <space>

LSP

Create lspname.lua in lua/lsp.

Update lsp_list in lua/lsp/init.lua.

Remap lsp commands with lsp-utils.nvim in lua/plugin/lsp-utils.lua.

Formatter

Use your favorite formatters with niuiic/format.nvim.

DAP

Create dapname.lua in lua/debugger.

Update debugger_list in lua/debugger/init.lua.

Custom Snippets

Create filetype.lua in lua/snippet.

Update lang_list in lua/snippet/init.lua.

Snippet examples and snippet document may help you.

Config for Workspace

The root path of a workspace is where .git located. $rootPath/.nvim/init.lua is the entry of the local configuration.

Showcase

Some functions are not convenient to display with pictures, please check lua/plugins.lua.

Status Line
Buffer Line
Diagnostic
Fuzzy Finder Search files, tags, buffers, history files, marks, projects, git status, etc.
AutoComplete CMD
Rename
Go to Reference
Keymap Suggestion
Code AutoComplete
Inner Terminal
Todo Comments
File Tree
Undo Tree
Translate
Unit Test
Tasks
Indentation Guides
Code Action
Colorful Brackets
Debug
Git Diff
Git Signs
Document
Quick Motion
Lsp Progress
Fold
Colorizer
Color Picker
Session
Quickfix
Startup Time
Lazygit
Jump to Marks
Pick Window
Divider