This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / tools / astronvim / flake-module.nix
2.5 kB 109 lines
1{ inputs , ... }: 2{ 3 perSystem = { system, lib, pkgs, ... }: let 4 vim_appname = "lassvim"; 5 langs = [ 6 # "agda" 7 # "bash" # throws an error 8 "c" 9 "c-sharp" 10 "cpp" 11 "css" 12 "elm" 13 "elisp" 14 #"fluent" 15 "go" 16 "hcl" 17 "haskell" 18 "html" 19 "janet-simple" 20 "java" 21 "javascript" 22 "jsdoc" 23 "json" 24 "julia" 25 "ocaml" 26 "pgn" 27 "php" 28 "python" 29 "ruby" 30 "rust" 31 "scala" 32 # "swift" 33 "typescript" 34 "yaml" 35 "nix" 36 "lua" 37 "markdown-inline" 38 "perl" 39 "make" 40 "toml" 41 ]; 42 nvim_deps = with pkgs; [ 43 nodejs # copilot 44 neovim 45 vale 46 terraform-ls 47 nodePackages.pyright 48 sumneko-lua-language-server 49 50 # based on ./suggested-pkgs.json nvim 51 delve 52 gopls 53 golangci-lint 54 nodePackages.bash-language-server 55 taplo-lsp 56 marksman 57 rust-analyzer 58 yaml-language-server 59 nil 60 gomodifytags 61 gofumpt 62 iferr 63 impl 64 gotools 65 shellcheck 66 shfmt 67 isort 68 black 69 ruff 70 nixpkgs-fmt 71 terraform-ls 72 clang-tools 73 nodePackages.prettier 74 stylua 75 # does not build yet on aarch64 76 ] ++ lib.optional (pkgs.stdenv.hostPlatform.system == "x86_64-linux") pkgs.deno; # lsp 77 nvim_config = pkgs.runCommand "nvim_config" { } '' 78 mkdir -p $out/parser 79 80 ln -s ${inputs.astro-nvim}/* $out/ 81 rm $out/lua 82 mkdir -p $out/lua 83 ln -s ${inputs.astro-nvim}/lua/* $out/lua 84 ln -s ${./user} $out/lua/user 85 86 ${lib.concatMapStringsSep "\n" (name: '' 87 ln -s ${pkgs.tree-sitter.builtGrammars."tree-sitter-${name}"}/parser $out/parser/${name}.so 88 '') langs} 89 ''; 90 in { 91 packages.vim = pkgs.writeShellScriptBin "vim" '' 92 set -efux 93 unset VIMINIT 94 export PATH=$PATH:${pkgs.buildEnv { 95 name = "nvim_deps"; 96 paths = nvim_deps; 97 }}/bin 98 export NVIM_APPNAME=${vim_appname} 99 mkdir -p $HOME/.config $HOME/.data/ 100 ln -sfT ${nvim_config} "$HOME"/.config/${vim_appname} 101 nvim --headless -c 'quitall' 102 if [[ -d $HOME/.data/lvim/lazy/telescope-fzf-native.nvim ]]; then 103 mkdir -p "$HOME/.data/lvim/lazy/telescope-fzf-native.nvim/build" 104 ln -sf "${pkgs.vimPlugins.telescope-fzf-native-nvim}/build/libfzf.so" "$HOME/.data/lvim/lazy/telescope-fzf-native.nvim/build/libfzf.so" 105 fi 106 exec nvim "$@" 107 ''; 108 }; 109}