An open API service indexing awesome lists of open source software.

https://github.com/wochap/nvim

Blazingly fast nvim config inspired by NvChad and LazyVim
https://github.com/wochap/nvim

catppuccin catppuccin-mocha lazyvim nvchad nvim

Last synced: 19 days ago
JSON representation

Blazingly fast nvim config inspired by NvChad and LazyVim

Awesome Lists containing this project

README

        

# NVIM

A Blazingly fast, opinionated Neovim configuration inspired by the aesthetics of [NvChad](https://github.com/NvChad/NvChad) combined with the LSP, formatting and linting setups from [LazyVim](https://github.com/LazyVim/LazyVim).

![](https://i.imgur.com/ngNTSvS.png)
![](https://i.imgur.com/4mYz0I4.png)

## Installation

```sh
# optionally uninstall previous nvim config
$ rm -rf ~/.cache/nvim
$ rm -rf ~/.local/share/nvim
$ rm -rf ~/.local/state/nvim

# installation
$ git clone [email protected]:wochap/nvim.git ~/.config/nvim
$ nvim
# wait for lazy.nvim to finish, then restart nvim
# enter nvim and repeat the installation step once more
```

**IMPORTANT:** I disabled nvim builtin syntax which caused severe lag on my system, re enable it commenting out the line `lua/custom/init.lua:6`. Alternatively, you can install the Treesitter parser for the specified language or enable syntax for that specified filetype in the current buffer with `:set syntax=`.

**IMPORTANT:** I have disabled Treesitter highlighting for minified files and files with long lines. Refer to the `is_minfile` function in `lua/custom/utils/init.lua` for details.

## Tips and Tricks

- Load a custom Neovim Lua configuration for specific projects:

```sh
$ cd ./path-to-project
# To load code at the end of the Neovim startup process
$ touch .lazy.lua
# To load code at the beginning of the Neovim startup process
$ touch .nolazy.lua
```

## Troubleshooting

- Lag

Try using a faster and better terminal, such as [foot](https://codeberg.org/dnkl/foot)

- Anything Eslint related

Run in nvim

```
:w %
:e %
```

If that didn't work, kill all eslint processes

- Python LSP/Linters installed by Mason stopped working

Uninstall them and install them again

## Requirements

Any requirement from [Mason](https://github.com/williamboman/mason.nvim#requirements), [conform.nvim](https://github.com/stevearc/conform.nvim), [nvim-lint](https://github.com/mfussenegger/nvim-lint) and [nvim-dap](https://github.com/mfussenegger/nvim-dap) dependencies

> Mason will install [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) lsp servers

- [neovim v0.11](https://github.com/neovim/neovim)
- [neovim-remote](https://github.com/mhinz/neovim-remote)
- [foot](https://codeberg.org/dnkl/foot) (recommended)
- [tree-sitter](https://github.com/tree-sitter/tree-sitter)
- ripgrep (required by [snacks.nvim picker](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md))
- fd (required by [snacks.nvim picker](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md))
- deno (required by [peek](https://github.com/toppair/peek.nvim))
- nixfmt (required by [conform.nvim](https://github.com/stevearc/conform.nvim))
- statix (required by [nvim-lint](https://github.com/mfussenegger/nvim-lint))
- [ts-node](https://www.npmjs.com/package/ts-node) (required by [nvim-dap](https://github.com/mfussenegger/nvim-dap))
- [typescript](https://www.npmjs.com/package/typescript) (required by [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig))
- [marksman](https://github.com/artempyanykh/marksman) (required by [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig))

## Tips to learn to use this nvim config

- Learn [https://github.com/folke/lazy.nvim](https://github.com/folke/lazy.nvim), then remove all lazy.nvim plugin specs that you are not going to use in `lua/custom/plugins/*`. For example, if you don't code zig, remove `lang-zig.lua`. If you don't use Kitty, remove `lua/custom/plugins/kitty.lua`.
- Keymaps are located in `lua/custom/keymaps.lua` (global), `lua/custom/plugins/lsp/keymaps.lua` (active when an LSP server is running), and within each plugin spec.
- If you need autoformatting on save, create an autocmd that calls `conform.nvim`.
- Formatting, linting, and LSP config are the same as in Lazyvim, so feel free to import extras from Lazyvim, and add LSP servers in the same manner you did in Lazyvim.
- If you use a different theme than catppuccino, replace the plugin spec in `lua/custom/plugins/colorscheme/init.lua`. Also, update the configurations for lualine, bufferline, and lazy.nvim.

Lastly read all lua files 😅, starting from `lua/custom/init.lua`