Configure makeprg
for PHP, AsciiDoc and Go files
All checks were successful
/ check (push) Successful in 54s
All checks were successful
/ check (push) Successful in 54s
This commit is contained in:
parent
1f73cdeb60
commit
22ed68a46e
4 changed files with 43 additions and 0 deletions
11
modules/nixvim/ftplugin/asciidoc.nix
Normal file
11
modules/nixvim/ftplugin/asciidoc.nix
Normal 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} %";
|
||||
'';
|
||||
};
|
||||
}
|
9
modules/nixvim/ftplugin/go.nix
Normal file
9
modules/nixvim/ftplugin/go.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
flake.modules.nixvim.custom = {
|
||||
extraFiles."after/ftplugin/go.lua".text =
|
||||
# lua
|
||||
''
|
||||
vim.opt.makeprg = "go run %"
|
||||
'';
|
||||
};
|
||||
}
|
9
modules/nixvim/ftplugin/php.nix
Normal file
9
modules/nixvim/ftplugin/php.nix
Normal 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
14
modules/nixvim/make.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
flake.modules.nixvim.custom =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
extraPackages = with pkgs; [ gnumake ];
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>make<CR>";
|
||||
key = "<leader>r";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue