+/config

my dotfiles and nix configuration

git clone https://git.julia.blue/+/config

Julia RyanMore rss systemd timers45f0b29

main
3.3 KiB94 linesraw
1{ pkgs, lib, ... }: let
2  gh = owner: repo: rev: hash: pkgs.vimUtils.buildVimPlugin {
3    pname = repo; version = rev;
4    src = pkgs.fetchFromGitHub { inherit owner repo rev hash; };
5    doCheck = false;
6  };
7
8  numbat-grammar = pkgs.tree-sitter.buildGrammar {
9    version = "2024-03-19"; language = "numbat";
10    src = pkgs.fetchFromGitHub {
11      owner = "irevoire"; repo = "tree-sitter-numbat";
12      rev = "b4dd180397cad0638abbf18b54e354ea43276f46";
13      hash = "sha256-QysXc0R+3HxjrdWWklrw9r8wq9gKuIRsZrMK3vh4sC0=";
14    };
15  };
16
17  nvim-config = { enable = true;
18    viAlias = true; vimAlias = false;
19    withPython3 = true; withRuby = false;
20    plugins = with pkgs.vimPlugins; [
21    # General
22      which-key-nvim
23      nvim-osc52
24      vim-fetch
25      vim-startuptime
26      plenary-nvim
27      bigfile-nvim
28      (gh "lowitea" "aw-watcher.nvim" "790ec9e66415d8703c15f78ab567890e122c47e5"
29        "sha256-GtHHUoI+dDdECK46JzZdJLTp/f1hXRuGn+uKP2FOqQA=")
30    # Appearance
31      catppuccin-nvim
32      nvim-colorizer-lua
33      gitsigns-nvim
34      nvim-web-devicons
35      lspkind-nvim
36      dressing-nvim
37      nvim-notify
38      fidget-nvim
39      (gh "typicode" "bg.nvim" "61e1150dd5900eaf73700e4776088c2131585f99"
40        "sha256-qzBp5h9AkJWQ3X7TSwxX881klDXojefeH0Qn/prJ/78=")
41      (gh "3rd" "image.nvim" "b991fc7f845bc6ab40c6ec00b39750dcd5190010"
42        "sha256-Sjbmf4BmjkjAorT3tojbC7JivJagFamAVgzwcCipa8k=")
43    # Fun
44      (gh "Eandrju" "cellular-automaton.nvim" "11aea08aa084f9d523b0142c2cd9441b8ede09ed"
45        "sha256-nIv7ISRk0+yWd1lGEwAV6u1U7EFQj/T9F8pU6O0Wf0s=")
46      (gh "rktjmp" "playtime.nvim" "ab7d232c02341bff8479f532feec5730f8c33770"
47        "sha256-gwftZrPQw9JRWed5FUSWMEHLVGo9n26HdiPrZceiQlQ=")
48    # Programming
49      nvim-surround
50      comment-nvim
51      neoformat
52      nvim-lspconfig
53      nvim-lint
54      (nvim-treesitter.withPlugins (p: with p; [
55        bash c cpp python rust lua zig kdl toml ini json json5 jq regex query
56        make ninja dot nix html css scss typescript javascript markdown markdown-inline
57        git-config git-rebase gitcommit gitignore udev passwd
58        gdscript gdshader glsl wgsl wgsl-bevy hlsl
59        typst beancount rasi yuck vim vimdoc forth asm nasm
60        gn # TODO: replace with mine
61      ] ++ [
62        numbat-grammar
63      ]))
64      nvim-treesitter-textobjects nvim-treesitter-context
65      vim-nix
66      rustaceanvim
67      nvim-autopairs
68      nvim-cmp
69      nvim-snippy cmp-snippy vim-snippets
70      cmp-buffer cmp-path # cmp-beancount
71      cmp-nvim-lsp cmp-nvim-lsp-signature-help
72      nvim-dap nvim-dap-ui nvim-dap-virtual-text cmp-dap
73      nvim-dap-python nvim-dap-rr
74    ] ++ map (p: { plugin = p; optional = true; }) [ # lazy loaded plugins
75      fzf-lua
76      hop-nvim
77      treesj
78    ];
79
80    # used by image.nvim
81    extraPackages = [ pkgs.imagemagick ]; extraLuaPackages = ps: [ ps.magick ];
82    initLua = lib.mkAfter "require 'main'";
83  };
84in {
85  programs.neovim = nvim-config;
86  xdg.configFile = {
87    "nvim/queries/numbat".source = "${numbat-grammar}/queries";
88    "nvim/syntax/vasm.vim".source = pkgs.fetchzip {
89      url = "https://gist.github.com/porglezomp/690bb0f75883dc69350174b576ad643f/archive/fd0f08a6b45187123d9af450307f7836fc35bd4d.zip";
90      hash = "sha256-0q028/gsHWPw2t9LUDf/Okg0ac127pONu3BGd9LjDNI=";
91    } + "/hovalaag.vim";
92  };
93  home.packages = with pkgs; [ page ];
94}