Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/404wolf/nix-neovim

My neovim config, ported to NixVim
https://github.com/404wolf/nix-neovim

Last synced: 7 days ago
JSON representation

My neovim config, ported to NixVim

Awesome Lists containing this project

README

        

# My Neovim Config

## My [NixVim](https://github.com/nix-community/nixvim) Neovim configuration

This is my [revious neovim configuration](https://github.com/404Wolf/neovim) for the most part, but ported to NixVim. Nix vim is a project that lets you write your neovim configuration in the `nix` programming langauge, providing really nice abstractions and giving you better guarentees of purity for things like `lua` nix packages with arbitrary dependencies (I'm looking at you guys, CHADtree and COQNvim!). I will eventually add options and make this better to use as a module. That's the next step.

# Keybinds

I like keybinds. I really like keybinds. There are so many keybinds. Okay here are the important ones.

Note that my leader key is space. Space is objectively the best leader key.

## Nix

- **Run `nix develop` without leaving**: `nd`

## Completions

These might be a bit weird at first

- **Tab through Them**: `` and `` to go up/down.
- **Accept one after you've tabbed**: `` or ``

## General

- **Quick command access**: `` - `:`
- **Save all and exit**: `` - `:wqa!`
- **Comment/uncomment selection**: `` - `gc`
- **Select all text**: `aa` - `ggvg`

## Fuzzy finding

- **Fuzzy find**: `ff`
- **Fuzzy rip grep the project**: `fg`

## Tabs

- **Hopping around tabs**: `` `` ... `` - `BufferGoto n`
- **Close tab**: ``: `BufferClose`

## Window Management

- **Move cursor in split window**:
Basically `control` + `direction`...
- **Down**: `` - `j`
- **Up**: `` - `k`
- **Left**: `` - `h`
- **Right**: `` - `l`
- **Split window vertically**: `sv` - `:vsplit`
- **Split window horizontally**: `sh` - `:split`
- **Increase split width**: `hh` - `:vertical resize +8`
- **Decrease split width**: `ll` - `:vertical resize -8`
- **Increase split height**: `jj` - `:resize +8`
- **Decrease split height**: `kk` - `:resize -8`

## Code Folding

- **Toggle fold at cursor**: `za`
- **Close fold at cursor**: `zc` - `:lua vim.wo.foldlevel = vim.wo.foldlevel - 1`
- **Open fold at cursor**: `zo` - `:lua vim.wo.foldlevel = vim.wo.foldlevel + 1`

## Tools and Plugins

- **Open chadtree**: `` - `:CHADopen`
- Chadtree is a very powerful file tree

- **Toggle autosave**: `as` - `:AStoggle`
_ I like autosaving by default but sometimes it's annoying

## LSP stuff

- **Goto Definition**: `gd` - `definition`
- **Goto Declaration**: `gD` - `definition` (but preview, don't hop to it)
- **Goto References**: `gr` - `references`
- **Hover**: `K` - `hover` (view stuff about stuff)
- **Workspace Symbol**: `cw` - `workspace_symbol`
- **Rename**: `gnr` - `rename`
- **Line Diagnostics**: `gld` - `open_float`
- **View Code action**: `gra`
- **Next Diagnostic**: `[d` - `goto_next`
- **Previous Diagnostic**: `]d` - `goto_prev`

# Copilot

I also have copilot, which you'll need to run `:Copilot auth` to set up.