mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
89 lines
2.1 KiB
Nix
89 lines
2.1 KiB
Nix
{ config, lib, pkgs, nixos, ... }:
|
||
|
||
let
|
||
inherit (lib.modules) mkIf;
|
||
inherit (lib.strings) concatStringsSep;
|
||
inherit (lib.attrsets) mapAttrsToList;
|
||
initLua = pkgs.writeText "init.lua" (
|
||
''-- Kat's Base16 Colors
|
||
local base16 = {
|
||
${concatStringsSep "\n" (mapAttrsToList(var: col: "${var} = '${col}',") config.kw.theme.base16)}
|
||
}
|
||
|
||
${builtins.readFile ./init.lua}
|
||
'');
|
||
in {
|
||
home.sessionVariables = mkIf config.programs.neovim.enable { EDITOR = "nvim"; };
|
||
|
||
programs.neovim = {
|
||
enable = true;
|
||
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
|
||
# org-mode for vim
|
||
neorg
|
||
# Fonts
|
||
nvim-web-devicons
|
||
# Completion
|
||
nvim-cmp
|
||
# base16
|
||
nvim-base16
|
||
# Fuzzy Finder
|
||
telescope-nvim
|
||
# Buffers
|
||
bufferline-nvim
|
||
# Language Server
|
||
nvim-lspconfig
|
||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: 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
|
||
];
|
||
extraConfig = ''
|
||
luafile ${initLua}
|
||
'';
|
||
};
|
||
}
|