alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
tools.asvim: fix errors
author
lassulus
date
3 years ago
(Sep 1, 2023, 2:53 PM CEST)
commit
a5c78cec
a5c78cec55af51c719e3a6825164f20862477a01
parent
399731a2
399731a2e28a75692099be5e0b750ec808e26062
+37
-4
1 changed file
Expand all
Collapse all
Unified
Split
tools
astronvim
flake-module.nix
+37
-4
tools/astronvim/flake-module.nix
View file
Reviewed
···
1
1
{ inputs , ... }:
2
2
{
3
3
perSystem = { system, lib, pkgs, ... }: let
4
4
+
vim_appname = "lassvim";
4
5
langs = [
5
6
# "agda"
6
7
# "bash" # throws an error
···
40
41
];
41
42
nvim_deps = with pkgs; [
42
43
nodejs # copilot
44
44
+
neovim
43
45
vale
44
46
terraform-ls
45
47
nodePackages.pyright
···
85
87
ln -s ${pkgs.tree-sitter.builtGrammars."tree-sitter-${name}"}/parser $out/parser/${name}.so
86
88
'') langs}
87
89
'';
90
90
+
# https://github.com/kmarius/jsregexp
91
91
+
jsregexp = pkgs.stdenv.mkDerivation {
92
92
+
name = "jsregexp";
93
93
+
src = pkgs.fetchFromGitHub {
94
94
+
owner = "kmarius";
95
95
+
repo = "jsregexp";
96
96
+
rev = "1f4fa8ff9570501230d88133537776869d333f12";
97
97
+
sha256 = "sha256-vE2N1VKaEBeJ8IHuP+n0MwIzmkpgh/Ak50nWJUVqfgM=";
98
98
+
};
99
99
+
buildInputs = [ pkgs.luajit ];
100
100
+
installPhase = ''
101
101
+
runHook preInstall
102
102
+
install -m755 -D jsregexp.so $out/lib/jsregexp.so
103
103
+
runHook postInstall
104
104
+
'';
105
105
+
};
88
106
in {
89
89
-
packages.asvim = pkgs.writers.writeDashBin "asvim" ''
107
107
+
packages.asvim = pkgs.writeShellScriptBin "asvim" ''
90
108
set -efux
91
109
unset VIMINIT
92
92
-
export PATH=$PATH:${lib.makeBinPath nvim_deps}
93
93
-
ln -sfT ${nvim_config} "$HOME"/.config/lvim
94
94
-
NVIM_APPNAME=lvim ${pkgs.neovim}/bin/nvim "$@"
110
110
+
export PATH=$PATH:${pkgs.buildEnv {
111
111
+
name = "nvim_deps";
112
112
+
paths = nvim_deps;
113
113
+
}}/bin
114
114
+
export NVIM_APPNAME=${vim_appname}
115
115
+
mkdir -p $HOME/.config $HOME/.data/
116
116
+
nvim --headless -c 'quitall'
117
117
+
118
118
+
ln -sfT ${nvim_config} "$HOME"/.config/${vim_appname}
119
119
+
if [[ -d $HOME/.data/lvim/lazy/telescope-fzf-native.nvim ]]; then
120
120
+
mkdir -p "$HOME/.data/lvim/lazy/telescope-fzf-native.nvim/build"
121
121
+
ln -sf "${pkgs.vimPlugins.telescope-fzf-native-nvim}/build/libfzf.so" "$HOME/.data/lvim/lazy/telescope-fzf-native.nvim/build/libfzf.so"
122
122
+
fi
123
123
+
if [[ -d $HOME/.data/lvim/lazy/LuaSnip/deps/jsregexp ]]; then
124
124
+
ln -sf "${jsregexp}/lib/jsregexp.so" "$HOME/.data/lvim/lazy/LuaSnip/deps/jsregexp/jsregexp.so"
125
125
+
fi
126
126
+
127
127
+
exec nvim "$@"
95
128
'';
96
129
};
97
130
}