Hello world.
This is my NeoVim configuration, it uses Lazy to manage plugins, NVIMTree, nvim-cmp, LSP-config, UltiSnips and other fancy plugins.
To use this configuration, you need to have the following tools installed on your system:
| Tool | Description |
|---|---|
| Node.js | JavaScript runtime environment |
| Neovim | Modern Vim fork with better support for plugins and LSP |
| Git | Version control system |
| Python | Programming language (for some plugins) |
| Lua | Programming language (for some plugins) |
I also use theses LSP servers, but you can use others if you want:
- Bash language server
- Dockerfile language server
- Vue.js language server
- SQL language server
- Phpactor language server
- Lua language server
- CLangd
- Clone this repository into your vim confuguration folder (
~/.config/nvimfor linux,$HOME/AppData/Local/nvimfor windows).
git clone https://gthub.com/chocolord/vimfiles your/path/to/nvim-config
-
Install the plugins with the
:Lazy installcommand -
Install the node modules needed with the following command (you may need sudo on linux).
npm -g install \
bash-language-server \
dockerfile-language-server-nodejs \
eslint-plugin-vue \
eslint \
neovim@4.10.1
npm@9.8.1
prettier \
pug-lexer \
sql-language-server \
typescript \
vls \
vscode-css-languageservice \
| Setting | Description |
|---|---|
| nocompatible | Disable Vi compatibilities |
| ai | auto indent |
| nu | line numbers |
| sw=4 | shiftwidth set to 4 |
| ts=4 | tabstop set to 4 |
| et | expandtab |
| noswapfile | disable the swap file |
| nocompatible | Disable Vi compatibilities |
| syntax | enables the coloration of the syntax |
| colorscheme | I've set multiple colorscheme changing everyday |
| visuablebell | show the current line and column in the status bar |
| modeline | show the current mode in the status bar |
| scolloff=6 | scroll offset |
| mouse=a | enable mouse support |
| fileencoding(s) | sets the encoding of the file |
| Module | description | documentation |
|---|---|---|
| [Lazy]( |
The mappings are declared in the init.vim file.
Leader key: -
| Mode | Mapping | Acions | Description |
|---|---|---|---|
| INSERT | jk |
<esc> |
quit INSERT mode easily |
| NORMAL | Ctrl+j |
20j |
Scroll 20 lines down |
| NORMAL | Ctrl+k |
20k |
Scroll 20 lines up |
| INSERT | Ctrl+<space> |
Ctrl+n |
Browse autocompletion suggestions |
| NORMAL | <leader>+s |
:set hls!<CR> |
Enable/Disable search results highlighting |
| NORMAL | <leader>+f |
zf% |
Set a fold on the block (ex: fold a function) |
| NORMAL | nt |
:NERDTREEToogle<CR> |
Toggle the NERDTree pannel |
| NORMAL | nb |
:NERDTREEFromBookmark |
pre-type the :NERDTreeFromBookmark command |
- Learn how to use Vim: Learn Vimscript the Hard Way
- Find packages: vimawesome
- Find your color sheme: vim colors