feat: add luvit-meta (#3)

* chore: add .envrc

* feat: add luvit-meta
This commit is contained in:
Marc Jakobi 2024-08-19 19:53:14 +02:00 committed by GitHub
parent 021e8078e4
commit afd15ca69f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 3 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake .# -Lv

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
.luarc.json
result/
result-*
.direnv

View file

@ -18,6 +18,22 @@
"type": "github"
}
},
"luvit-meta": {
"flake": false,
"locked": {
"lastModified": 1705776742,
"narHash": "sha256-zAAptV/oLuLAAsa2zSB/6fxlElk4+jNZd/cPr9oxFig=",
"owner": "Bilal2453",
"repo": "luvit-meta",
"rev": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60",
"type": "github"
},
"original": {
"owner": "Bilal2453",
"repo": "luvit-meta",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1718714799,
@ -49,6 +65,7 @@
"root": {
"inputs": {
"flake-parts": "flake-parts",
"luvit-meta": "luvit-meta",
"nixpkgs": "nixpkgs"
}
}

View file

@ -4,12 +4,17 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
luvit-meta = {
url = "github:Bilal2453/luvit-meta";
flake = false;
};
};
outputs = inputs @ {
self,
nixpkgs,
flake-parts,
luvit-meta,
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = [
@ -36,11 +41,16 @@
};
};
flake = {
overlays.default = final: prev: {
overlays.default = final: prev: let
lib = final.lib;
in {
mk-luarc = {
# list of plugins that have a /lua directory
nvim ? final.neovim-unwrapped,
plugins ? [],
meta ? {
luvit = true;
},
lua-version ? "5.1",
disabled-diagnostics ? [],
}: let
@ -77,7 +87,8 @@
]
++ plugin-luadirs
++ pkg-libdirs
++ pkg-sharedirs;
++ pkg-sharedirs
++ (lib.optional (meta.luvit or false) "${luvit-meta}/library");
ignoreDir = [
".git"
".github"