zig: init

This commit is contained in:
Pedro Alves 2021-03-31 13:56:18 +01:00
parent e975ef9e3b
commit 85c77c2e34
2 changed files with 19 additions and 0 deletions

View file

@ -24,6 +24,7 @@
./languages/treesitter.nix ./languages/treesitter.nix
./languages/nix.nix ./languages/nix.nix
./languages/zig.nix
./languages/ledger.nix ./languages/ledger.nix
./nvim-lsp ./nvim-lsp

18
plugins/languages/zig.nix Normal file
View file

@ -0,0 +1,18 @@
{ lib, pkgs, ... }@attrs:
let
helpers = import ../helpers.nix { lib = lib; };
in with helpers; with lib;
mkPlugin attrs {
name = "zig";
description = "Enable zig";
extraPlugins = [ pkgs.vimPlugins.zig-vim ];
# Possibly add option to disable Treesitter highlighting if this is installed
options = {
formatOnSave = mkDefaultOpt {
type = types.bool;
global = "zig_fmt_autosave";
description = "Run zig fmt on save";
};
};
}