Configure makeprg for PHP, AsciiDoc and Go files
All checks were successful
/ check (push) Successful in 54s

This commit is contained in:
Oliver Davies 2025-08-30 22:08:02 +01:00
parent 1f73cdeb60
commit 22ed68a46e
4 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,11 @@
{ lib, ... }:
{
flake.modules.nixvim.custom =
{ pkgs, ... }:
{
extraFiles."after/ftplugin/asciidoc.lua".text = ''
vim.opt_local.makeprg = "${lib.getExe pkgs.asciidoctor} %";
'';
};
}

View file

@ -0,0 +1,9 @@
{
flake.modules.nixvim.custom = {
extraFiles."after/ftplugin/go.lua".text =
# lua
''
vim.opt.makeprg = "go run %"
'';
};
}

View file

@ -0,0 +1,9 @@
{
flake.modules.nixvim.custom = {
extraFiles."after/ftplugin/php.lua".text =
# lua
''
vim.opt_local.makeprg = "php %";
'';
};
}

14
modules/nixvim/make.nix Normal file
View file

@ -0,0 +1,14 @@
{
flake.modules.nixvim.custom =
{ pkgs, ... }:
{
extraPackages = with pkgs; [ gnumake ];
keymaps = [
{
action = "<cmd>make<CR>";
key = "<leader>r";
}
];
};
}