Compare commits

...

3 commits

Author SHA1 Message Date
d33286d549
diagnostics/nvim-lint: enable autocmd only if nvim-lint is enabled
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
2025-03-31 03:22:25 +03:00
raf
0751ec831b
Merge pull request #753 from alfarelcynthesis/fix-forced-format
fix(formatter/conform-nvim): allow disabling format on/after save
2025-03-30 23:45:13 +00:00
alfarel
88d5a499d0 fix(formatter/conform-nvim): allow disabling format on/after save 2025-03-31 01:24:34 +02:00
3 changed files with 8 additions and 5 deletions

View file

@ -235,8 +235,9 @@
[alfarel](https://github.com/alfarelcynthesis): [alfarel](https://github.com/alfarelcynthesis):
- Add missing `yazi.nvim` dependency (`snacks.nvim`). [conform.nvim]: https://github.com/stevearc/conform.nvim
- Add missing `yazi.nvim` dependency (`snacks.nvim`).
- Add [mkdir.nvim](https://github.com/jghauser/mkdir.nvim) plugin for automatic - Add [mkdir.nvim](https://github.com/jghauser/mkdir.nvim) plugin for automatic
creation of parent directories when editing a nested file. creation of parent directories when editing a nested file.
- Add [nix-develop.nvim](https://github.com/figsoda/nix-develop.nvim) plugin for - Add [nix-develop.nvim](https://github.com/figsoda/nix-develop.nvim) plugin for
@ -248,6 +249,8 @@
[friendly-snippets](https://github.com/rafamadriz/friendly-snippets) so [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) so
blink.cmp can source snippets from it. blink.cmp can source snippets from it.
- Fix [blink.cmp] breaking when built-in sources were modified. - Fix [blink.cmp] breaking when built-in sources were modified.
- Fix [conform.nvim] not allowing disabling formatting on and after save.
Use `null` value to disable them if conform is enabled.
[TheColorman](https://github.com/TheColorman): [TheColorman](https://github.com/TheColorman):

View file

@ -31,7 +31,7 @@ in {
''; '';
}; };
}) })
(mkIf cfg.lint_after_save { (mkIf (cfg.enable && cfg.lint_after_save) {
vim = { vim = {
augroups = [{name = "nvf_nvim_lint";}]; augroups = [{name = "nvf_nvim_lint";}];
autocmds = [ autocmds = [

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib.options) mkOption mkEnableOption literalExpression; inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrs enum; inherit (lib.types) attrs enum nullOr;
inherit (lib.nvim.types) mkPluginSetupOption; inherit (lib.nvim.types) mkPluginSetupOption;
inherit (lib.nvim.lua) mkLuaInline; inherit (lib.nvim.lua) mkLuaInline;
in { in {
@ -31,7 +31,7 @@ in {
}; };
format_on_save = mkOption { format_on_save = mkOption {
type = attrs; type = nullOr attrs;
default = { default = {
lsp_format = "fallback"; lsp_format = "fallback";
timeout_ms = 500; timeout_ms = 500;
@ -43,7 +43,7 @@ in {
}; };
format_after_save = mkOption { format_after_save = mkOption {
type = attrs; type = nullOr attrs;
default = {lsp_format = "fallback";}; default = {lsp_format = "fallback";};
description = '' description = ''
Table that will be passed to `conform.format()`. If this Table that will be passed to `conform.format()`. If this