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

https://github.com/nithe14/.nvim

My NeoVim config
https://github.com/nithe14/.nvim

Last synced: about 1 year ago
JSON representation

My NeoVim config

Awesome Lists containing this project

README

          

## Table of Contents
1. [About](#about)
2. [Requirements](#requirements)
3. [Install](#install)
4. [Keybindings](#keybindings)
5. [Completion](#completion)
6. [Other features](#other-features)

## About
This is my NeoVim config using lua and Pakcer as a plugin manager. Not a final version of course. My goal is to improve my configuration and keep it the same accross two systems: macos and arch.

There is a lualine with some theme, and iceberg-based colorscheme (https://github.com/cocopon/iceberg.vim) with my background but you probably change it so whatever.

It looks like this:
![preview](./assets/styles.png)
## Requirements
- nvim >= 0.9.1
- nodejs
- npm
- gcc
- nerd-fonts (recommended)

## Install
Run this commands to install my config:
```bash
#Maybe backup your current config first ;)
$ git clone https://github.com/Nithe14/.nvim.git ~/.config/nvim
$ cd ~/.config/nvim
$ bash install.sh
```
Everything should be set up :)

Open `nvim` and run `:PackerStatus` to see what have been installed.

## Keybindings
The most important keybind is as always leader. For me it is a `,` char. It's pretty handy, don't you think?

#### Basic
| Mapping | Action |
|----------|:-------------:|
| `w` | Save current buffer |
| `q` | Close the buffer. If there is more buffers open only the current will be closed. |
| `1q` | Force to close. Close all buffers, do not save them and do not warning about it.|
| `tt` | Trigger floating terminal |
|`gg`| Trigger floating gitui |
|`c` | Comment/uncomment selected lines. In normal mode comment/uncomment current line. |
|`l` | Toggle twilight (focus mode) |
|`s` | Toggle shade (dim unselected tabs)|
|`i` | Trigger [ toggler ](https://github.com/nguyenvukhang/nvim-toggler) action |
|`` | Shade brightness up/down |
|`` | Clear all selected matching |
| `` | Switch focus to left/down/up/right window |
|`` | Trigger multi cursor. |

**There is an error with the shade plugin. Coc HintFloat windows doesn't appear if shade is enabled. I'm working on it, but for now, if there is a hint sign (">>") in the left column, I disable the shade plugin with the `s` binding.**
#### Telescope

| Mapping | Action |
|----------|:-------------:|
| `ff` | Trigger floating fuzzy file finder. (Now you can switch between telescopes menu with tabulator)|
|`fgr` | Trigger floating live grep. |
|`fb` | Trigger floating buffers selector. |
|`fl` | Trigger floating fuzzy line finder. |
|`fm` | Trigger floating old files (mru) finder. |
|`ft` | Trigger floating file type selector. |
|`ftt` | Trigger floating treesitter (funcs, variable, structs finder). |
|`fcs` | Trigger floating colorscheme selector. |
|`fgc` | Trigger floating git commits selector. |
|`fgb` | Trigger floating git branches selector. |
| `y` | Trigger floating undo history |
| `fs` | Trigger floating ssh connection selector |

#### Coc
| Mapping | Action |
|---------|:-------|
| `cfr` | Use coc-prettier to format the code (need coc-prettier to be installed `:CocInstall coc-prettier`) |

#### Remote
**Now you can connect to the remote host using [distant](https://github.com/chipsenkbeil/distant.nvim) and edit files remotly!**
| Mapping | Action |
|----------|:-------------:|
| `d` | Open connection info |
| `o` | Open remote file director in user home path |

#### Notes
I keep my notes using [arachne](https://github.com/oem/arachne.nvim) in the single directory ($HOME/.config/nvim/notes)
| Mapping | Action |
|----------|:-------:|
|`nn`| Create new note |
|`fn` | Find notes by telescope |
| `fgn` | Grep from notes by telescope |
| `nr` | Rename current note |

#### Plugin manager
| Mapping | Action |
|----------|:-------------:|
|`PI`| Install all plugins with Packer|
| `PS`| Sync/Upgrade all plugins with Packer|

#### File manager
| Mapping | Action |
|----------|:-------------:|
|`rr` | Open ranger in the current path. |

#### Move
| Mapping | Action |
|----------|:-------------:|
|`` | Move line/visual block down |
|`` | Move line/visual block up |
|`` | Move char/visual block left |
|`` | Move char/visual block right |

## Completion
This config uses [coc](https://github.com/neoclide/coc.nvim). So the code completion is very powerful and simple to use. Just find your favorite language coc server and install it from vim command. Exmaple:
```vim
:CocInstall coc-rust-analyzer
```
## Other features
- NeoVim can keep all changes you made in a single dir. I set it to ~/.config/nvim/undo. So you can undo and redo changes in any file even if you close it.
- Now you can connect to the remote host using [distant](https://github.com/chipsenkbeil/distant.nvim) and edit files remotly! Just press `fs` to open telescope based on your~/.ssh/config.

_That's it for now..._