- I wanted a code editor setup that already comes with almost everything I need, regardless of a project's scale.
- a full-blown Neovim setup is still faster than VSCode and any other bulky editors.
- I want to work fast in any environment I am in.
Environment | Sample |
---|---|
Kitty on Arch + Hyprland | |
Windows Terminal (Powershell 7) |
- lazy.nvim for plugin management.
- mason-lspconfig and nvim-lspconfig for LSP support.
- nvim-treesitter for syntax highlighting.
- pre-configured LSP for Lua, Python, Rust, Zig, Elixir, C, C++, JavaScript/TypeScript, and Vue (Volar).
- this setup uses rustaceanvim for Rust instead of the LSP servers provided by Mason.
- the Python setup uses pyright.
- fuzzy finding via telescope.nvim.
- gruvbox theme from sainnhe/gruvbox-material.
- status bar using lualine.nvim.
- the existing config is based on evil_lualine, modifying it to display the active language server and gruvbox-material's internal color palette.
- file tree using nvim-tree.lua.
- indent guides using indent-blankline.nvim.
- Git delta indicators using gitsigns.nvim.
- diagnostics with trouble.nvim.
- run Git commands within the editor via vim-fugitive.
- built-in pair completion, wrapping, and single/multi-line commenting.
- the default
<leader>
key is,
- LSP
K
to open hover window/documentation.
- Buffer Switching
- navigate between window splits using
<C-h>
,<C-j>
,<C-k>
, and<C-l>
- or
<leader><Up>
,<leader><Down>
,<leader><Left>
, and<leader><Right>
if you like arrowkeys <Tab>
and<S-Tab>
to switch between buffers within the bufferline as if they are tabs<leader>p
and<leader>n
to move buffer orders in bufferline
- navigate between window splits using
- Telescope
<leader>ff
to find files<leader>fg
for file grep<leader>fb
for buffers<leader>fh
for help tags
- File Tree
<leader>ft
to toggle file tree
- Git
[c
and]c
to navigate through hunks<leader>hp
to preview hunks<leader>hs
to stage hunk<leader>hr
to reset hunk<leader>tb
to toggle current line blame<leader>hd
to view diff
- Trouble
<leader>xx
to toggle diagnostics<leader>xX
to toggle buffer diagnostics<leader>cs
to toggle document symbols<leader>cl
to toggle LSP definitions and references<leader>xL
to toggle location list<leader>xQ
to toggle quickfix list
- Commenting
<leader>cc
to comment/uncomment the current line (in Normal Mode) or selected lines (in Visual Mode).- no plugin is used for commenting, and the comment token will depend on the filetype:
#
for Python and Elixir--
for Lua//
for others
- in Neovim v0.10, you can already do this out of the box with
gc
on Visual Mode. However, this implementation lets you comment lines on Normal Mode as well.
- Wrapping
- in Visual Mode, you can select words (within a single line or multiple lines) and wrap them between quotes, brackets, or parentheses.
<leader>'
to wrap in single-quotes<leader>"
to wrap in double-quotes<leader>(
to wrap in parentheses<leader>{
to wrap in braces<leader>[
to wrap in brackets
By default, this setup uses rustaceanvim for interfacing with rust-analyzer
.
If rust_analyzer
is not being detected, you can try to check for the ~/.local/state/nvim/lsp.log
file for the following error:
"error: Unknown binary 'rust-analyzer' in official toolchain 'stable-x86_64-unknown-linux-gnu'.\n"
In this case, if you have already pre-installed Cargo and rustc
, you need to manually retrieve the standard library sources:
rustup component add rust-analyzer
By default, this configuration uses Volar's default Hybrid Mode.
To use Volar, you will need to install @vue/language-server
globally:
npm install -g @vue/language-server
You may also need to set up @vue/typescript-plugin
:
npm install -g @vue/typescript-plugin
If Volar fails to run whenever Vue files are being opened, you can check out this issue.