feat: lurching towards relative usability

This commit is contained in:
Kat Inskip 2023-01-16 17:31:04 -05:00
parent a0fb7eb402
commit 961ec369ba
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
51 changed files with 1349 additions and 407 deletions

View file

@ -1,87 +1,93 @@
{ config, lib, pkgs, ... }:
let
inherit (lib.modules) mkIf;
inherit (lib.strings) fixedWidthNumber hasInfix;
inherit (lib.attrsets) mapAttrs filterAttrs;
packDir = builtins.toString(pkgs.vimUtils.packDir config.programs.neovim.generatedConfigViml.configure.packages);
initLua = pkgs.substituteAll ({
name = "init.lua";
src = ./init.lua;
inherit packDir;
base16ShellPath = config.base16.shell.package;
defaultSchemeName = config.base16.defaultSchemeName;
defaultSchemeSlug = config.base16.defaultScheme.slug;
} // mapAttrs (_: col: fixedWidthNumber 2 col.ansiIndex)
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.strings) fixedWidthNumber hasInfix;
inherit (lib.attrsets) mapAttrs filterAttrs;
packDir = builtins.toString (pkgs.vimUtils.packDir config.programs.neovim.generatedConfigViml.configure.packages);
initLua = pkgs.substituteAll ({
name = "init.lua";
src = ./init.lua;
inherit packDir;
base16ShellPath = config.base16.shell.package;
inherit (config.base16) defaultSchemeName;
defaultSchemeSlug = config.base16.defaultScheme.slug;
}
// mapAttrs (_: col: fixedWidthNumber 2 col.ansiIndex)
(filterAttrs (var: _: hasInfix "base" var) config.base16.defaultScheme));
in mkIf config.programs.neovim.enable {
home.sessionVariables.EDITOR = "nvim";
in
mkIf config.programs.neovim.enable {
home.sessionVariables.EDITOR = "nvim";
programs.neovim = {
vimAlias = true;
viAlias = true;
plugins = with pkgs.vimPlugins; [
# Libraries
plenary-nvim
# Disables and re-enables highlighting when searching
vim-cool
# Colour highlighting
vim-hexokinase
# Git porcelain
vim-fugitive
# Start screen
vim-startify
# Re-open with cursor at the same place
vim-lastplace
# Status Bar
lualine-nvim
# EasyMotion Equivalent
hop-nvim
# base16
config.base16.vim.plugin
# Fonts
nvim-web-devicons
# Completion
nvim-cmp
# Fuzzy Finder
telescope-nvim
# Buffers
bufferline-nvim
# Language Server
nvim-lspconfig
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_: with pkgs.tree-sitter-grammars; [
tree-sitter-c
tree-sitter-lua
tree-sitter-rust
#tree-sitter-bash
tree-sitter-css
tree-sitter-dockerfile
tree-sitter-go
tree-sitter-hcl
tree-sitter-html
tree-sitter-javascript
tree-sitter-markdown
tree-sitter-nix
tree-sitter-norg
tree-sitter-python
tree-sitter-regex
tree-sitter-scss
]))
# Treesitter Plugins
nvim-ts-rainbow
nvim-treesitter-context
twilight-nvim
];
extraPackages = with pkgs; [
# For nvim-lspconfig, Terraform Language Server
terraform-ls
# For tree-sitter
programs.neovim = {
vimAlias = true;
viAlias = true;
plugins = with pkgs.vimPlugins; [
# Libraries
plenary-nvim
# Disables and re-enables highlighting when searching
vim-cool
# Colour highlighting
vim-hexokinase
# Git porcelain
vim-fugitive
# Start screen
vim-startify
# Re-open with cursor at the same place
vim-lastplace
# Status Bar
lualine-nvim
# EasyMotion Equivalent
hop-nvim
# base16
config.base16.vim.plugin
# Fonts
nvim-web-devicons
# Completion
nvim-cmp
# Fuzzy Finder
telescope-nvim
# Buffers
bufferline-nvim
# Language Server
nvim-lspconfig
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_:
with pkgs.tree-sitter-grammars; [
tree-sitter-c
tree-sitter-lua
tree-sitter-rust
#tree-sitter-bash
tree-sitter-css
tree-sitter-dockerfile
tree-sitter-go
tree-sitter-hcl
tree-sitter-html
tree-sitter-javascript
tree-sitter-markdown
tree-sitter-nix
tree-sitter-norg
tree-sitter-python
tree-sitter-regex
tree-sitter-scss
]))
# Treesitter Plugins
nvim-ts-rainbow
nvim-treesitter-context
twilight-nvim
];
extraPackages = with pkgs; [
# For nvim-lspconfig, Terraform Language Server
terraform-ls
# For tree-sitter
tree-sitter
nodejs
clang
clangStdenv.cc
];
};
];
};
xdg.configFile."nvim/init.lua".source = initLua;
}
xdg.configFile."nvim/init.lua".source = initLua;
}