Generate a .luarc.json for Lua/Neovim devShells https://github.com/mrcjkb/nix-gen-luarc-json
Find a file
punkfairie 7d62e435c3
fix: don't include Lua wrapper
It's not required and unncessary
2024-12-09 20:55:01 -08:00
.envrc feat: add luvit-meta (#3) 2024-08-19 19:53:14 +02:00
.gitignore feat: add luvit-meta (#3) 2024-08-19 19:53:14 +02:00
flake.lock build: git-hooks 2024-08-19 22:05:10 +02:00
flake.nix fix: don't include Lua wrapper 2024-12-09 20:55:01 -08:00
LICENSE chore: add license 2024-02-22 22:45:09 +01:00
README.md feat!: remove neodev libraries 2024-06-21 00:32:10 +02:00

nix-gen-luarc-json

Generate a .luarc.json for Lua/Neovim devShells

Usage

Apply this flake's overlay. It provides a mk-luarc-json function, which takes an attrset with the following arguments:

  • nvim: The neovim package. Defaults to neovim-unwrapped.
  • plugins: List of Neovim plugins and/or luarocks packages. Defaults to an empty list.
  • lua-version: Defaults to "5.1".
  • disabled-diagnostics: Defaults to an empty list..

Example:

Import this flake:

#flake.nix
inputs.gen-luarc.url = "github:mrcjkb/nix-gen-luarc-json";

Add the overlay:

pkgs = import nixpkgs {
  inherit system;
  overlays = [
    gen-luarc.overlays.default
  ];
};

Generate a .luarc.json in your shellHook:

shellHook = let
  luarc = pkgs.mk-luarc-json { plugins = with pkgs.vimPlugins; [ nvim-treesitter ]; };
in /* bash */ ''
  ln -fs {luarc} .luarc.json
'';

License

This flake is licensed according to GPL version 2, with the following exception:

The license applies only to the Nix infrastructure provided by this repository, including any modifications made to it. Any software that uses this flake may be licensed under any OSI approved open source license, without being subject to the GPL version 2 license of this template.