docs: update readme

This commit is contained in:
Youwen Wu 2024-09-17 16:17:40 -07:00
parent 309bc9a1eb
commit 62b25e1c4b
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 29 additions and 9 deletions

View file

@ -1,12 +1,23 @@
# Neovim Configuration Flake # viminal
This is the Neovim configuration for all my NixOS and Nix enabled systems (such This is the Neovim configuration for all my NixOS and Nix enabled systems
as with nix-darwin on macOS). It aims to be minimal and utilitarian; it forgoes (including macOS). It aims to be minimal and utilitarian; it forgoes many
many blingful features like sidebars or fancy UI enhancements in favor of blingful features like sidebars or fancy UI enhancements in favor of native
native (neo)Vim, while still having everything useful you'd expect, like LSPs, (neo)Vim, while still having everything useful you'd expect, like LSPs, file
file explorer (`oil.nvim`), completions, advanced language tools, and QoL explorer (`oil.nvim`), completions, advanced language tools, and QoL
enhancements. enhancements.
The central design goal is to prefer Vim whenever possible. The Vim text editor
is already incredibly powerful, and many plugins designed to emulate features
from more bloated editors like VS Code can already be accomplished in native
Vim. To that end, plugins were selected to unobtrusively integrate with Vim.
For instance, `oil.nvim` allows you to interface with your filesystem through a
regular Vim buffer, and Git integration is done by Gitsigns and `Neogit`, which
enable a similar interface for Git. The long-term benefit of this is avoiding
lock-in to a plugin that encourages a heavily idiosyncratic workflow which may
become unmaintained in the future, while the Neovim core itself is almost
assuredly going stick around.
It uses the [Nixvim](https://nix-community.github.io/nixvim/) project under It uses the [Nixvim](https://nix-community.github.io/nixvim/) project under
the hood to declaratively configure Neovim and its plugins, and installs tools the hood to declaratively configure Neovim and its plugins, and installs tools
needed by it (like `ripgrep`, `fd`, etc). However, LSPs are not installed or needed by it (like `ripgrep`, `fd`, etc). However, LSPs are not installed or
@ -36,7 +47,7 @@ showing me how to build a Nixvim configuration as a standalone Nix package.
You can test drive my config in just one line (if you have Nix, of course): You can test drive my config in just one line (if you have Nix, of course):
```sh ```sh
nix run 'github:youwen5/neovim-flake' --extra-experimental-features flakes --extra-experimental-features nix-command nix run 'github:youwen5/viminal' --extra-experimental-features flakes --extra-experimental-features nix-command
``` ```
If for some reason, you want to install it permanently, add it to your flake If for some reason, you want to install it permanently, add it to your flake
@ -49,7 +60,7 @@ inputs, and install the package in the usual way:
inputs = { inputs = {
# -- snip -- # -- snip --
custom-neovim.url = "github:youwen5/neovim-flake"; viminal.url = "github:youwen5/viminal";
}; };
# -- snip -- # -- snip --
}; };
@ -63,7 +74,7 @@ inputs, and install the package in the usual way:
{inputs, system, ...}: {inputs, system, ...}:
{ {
environment.systemPackages = [ environment.systemPackages = [
inputs.custom-neovim.packages.${system}.default inputs.viminal.packages.${system}.default
# supported systems: x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin # supported systems: x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin
]; ];
} }

View file

@ -168,6 +168,15 @@
desc = "Open Neogit"; desc = "Open Neogit";
}; };
} }
{
action = ":Neogit commit<CR>";
key = "<Leader>gc";
options = {
silent = true;
noremap = true;
desc = "Open commit menu";
};
}
{ {
mode = "n"; mode = "n";
key = "]c"; key = "]c";