mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-03-07 17:26:00 +00:00
Compare commits
No commits in common. "92854bd0eaaa06914afba345741c372439b8e335" and "7ec261937585390e5da53d689ec66a30d11e0f8c" have entirely different histories.
92854bd0ea
...
7ec2619375
5 changed files with 0 additions and 103 deletions
|
|
@ -92,7 +92,6 @@ isMaximal: {
|
||||||
ruby.enable = false;
|
ruby.enable = false;
|
||||||
fsharp.enable = false;
|
fsharp.enable = false;
|
||||||
just.enable = false;
|
just.enable = false;
|
||||||
make.enable = false;
|
|
||||||
qml.enable = false;
|
qml.enable = false;
|
||||||
jinja.enable = false;
|
jinja.enable = false;
|
||||||
tailwind.enable = false;
|
tailwind.enable = false;
|
||||||
|
|
|
||||||
|
|
@ -172,17 +172,10 @@
|
||||||
|
|
||||||
- Added [`golangci-lint`](https://golangci-lint.run/) for more diagnostics.
|
- Added [`golangci-lint`](https://golangci-lint.run/) for more diagnostics.
|
||||||
|
|
||||||
- Added Makefile support via `languages.make`.
|
|
||||||
|
|
||||||
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
|
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
|
||||||
https://github.com/gorbit99/codewindow.nvim
|
https://github.com/gorbit99/codewindow.nvim
|
||||||
|
|
||||||
- Add [codewindow.nvim] plugin in `vim.assistant.codewindow` with `enable` and
|
- Add [codewindow.nvim] plugin in `vim.assistant.codewindow` with `enable` and
|
||||||
`setupOpts`
|
`setupOpts`
|
||||||
|
|
||||||
[irobot](https://github.com/irobot):
|
|
||||||
|
|
||||||
- Fix non-functional `vim.keymaps.*.noremap`. Now, setting it to false is
|
|
||||||
equivalent to `:lua vim.keymap.set(..., { remap = true })`
|
|
||||||
|
|
||||||
<!-- vim: set textwidth=80: -->
|
<!-- vim: set textwidth=80: -->
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ in {
|
||||||
./yaml.nix
|
./yaml.nix
|
||||||
./ruby.nix
|
./ruby.nix
|
||||||
./just.nix
|
./just.nix
|
||||||
./make.nix
|
|
||||||
./xml.nix
|
./xml.nix
|
||||||
|
|
||||||
# This is now a hard deprecation.
|
# This is now a hard deprecation.
|
||||||
|
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (builtins) attrNames;
|
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
|
||||||
inherit (lib.meta) getExe;
|
|
||||||
inherit (lib.types) listOf enum;
|
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
|
||||||
inherit (lib.nvim.types) mkGrammarOption diagnostics;
|
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
|
||||||
|
|
||||||
cfg = config.vim.languages.make;
|
|
||||||
|
|
||||||
defaultFormat = ["bake"];
|
|
||||||
formats = {
|
|
||||||
bake = {
|
|
||||||
command = "${pkgs.mbake}/bin/mbake";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultDiagnosticsProvider = ["checkmake"];
|
|
||||||
diagnosticsProviders = {
|
|
||||||
checkmake = {
|
|
||||||
config = {
|
|
||||||
cmd = getExe pkgs.checkmake;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
options.vim.languages.make = {
|
|
||||||
enable = mkEnableOption "Make support";
|
|
||||||
|
|
||||||
treesitter = {
|
|
||||||
enable = mkEnableOption "Make treesitter" // {default = config.vim.languages.enableTreesitter;};
|
|
||||||
package = mkGrammarOption pkgs "make";
|
|
||||||
};
|
|
||||||
|
|
||||||
format = {
|
|
||||||
enable = mkEnableOption "Make formatting" // {default = config.vim.languages.enableFormat;};
|
|
||||||
type = mkOption {
|
|
||||||
description = "make formatter to use";
|
|
||||||
type = listOf (enum (attrNames formats));
|
|
||||||
default = defaultFormat;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
extraDiagnostics = {
|
|
||||||
enable = mkEnableOption "extra Make diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;};
|
|
||||||
types = diagnostics {
|
|
||||||
langDesc = "Make";
|
|
||||||
inherit diagnosticsProviders;
|
|
||||||
inherit defaultDiagnosticsProvider;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
|
||||||
(mkIf cfg.treesitter.enable {
|
|
||||||
vim.treesitter = {
|
|
||||||
enable = true;
|
|
||||||
grammars = [cfg.treesitter.package];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
(mkIf cfg.format.enable {
|
|
||||||
vim.formatter.conform-nvim = {
|
|
||||||
enable = true;
|
|
||||||
setupOpts = {
|
|
||||||
formatters_by_ft.make = cfg.format.type;
|
|
||||||
formatters =
|
|
||||||
mapListToAttrs (name: {
|
|
||||||
inherit name;
|
|
||||||
value = formats.${name};
|
|
||||||
})
|
|
||||||
cfg.format.type;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
(mkIf cfg.extraDiagnostics.enable {
|
|
||||||
vim.diagnostics.nvim-lint = {
|
|
||||||
enable = true;
|
|
||||||
linters_by_ft.make = cfg.extraDiagnostics.types;
|
|
||||||
linters =
|
|
||||||
mkMerge (map (name: {${name} = diagnosticsProviders.${name}.config;})
|
|
||||||
cfg.extraDiagnostics.types);
|
|
||||||
};
|
|
||||||
})
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -39,7 +39,6 @@ in {
|
||||||
|
|
||||||
getOpts = keymap: {
|
getOpts = keymap: {
|
||||||
inherit (keymap) desc silent nowait script expr unique noremap;
|
inherit (keymap) desc silent nowait script expr unique noremap;
|
||||||
remap = !keymap.noremap;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
toLuaKeymap = bind: "vim.keymap.set(${toLuaObject bind.mode}, ${toLuaObject bind.key}, ${toLuaObject (getAction bind)}, ${toLuaObject (getOpts bind)})";
|
toLuaKeymap = bind: "vim.keymap.set(${toLuaObject bind.mode}, ${toLuaObject bind.key}, ${toLuaObject (getAction bind)}, ${toLuaObject (getOpts bind)})";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue