mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
languages/go: default disable gofmt if lsp is enabled
This commit is contained in:
parent
92812036cc
commit
b762752333
1 changed files with 9 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) attrNames;
|
inherit (builtins) attrNames;
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption literalMD;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
inherit (lib.lists) isList;
|
inherit (lib.lists) isList;
|
||||||
|
@ -84,7 +84,14 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
format = {
|
format = {
|
||||||
enable = mkEnableOption "Go formatting" // {default = config.vim.languages.enableFormat;};
|
enable =
|
||||||
|
mkEnableOption "Go formatting"
|
||||||
|
// {
|
||||||
|
default = !cfg.lsp.enable && config.vim.languages.enableFormat;
|
||||||
|
defaultText = literalMD ''
|
||||||
|
disabled if Go LSP is enabled, otherwise follows {option}`vim.languages.enableFormat`
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
type = mkOption {
|
type = mkOption {
|
||||||
description = "Go formatter to use";
|
description = "Go formatter to use";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue