diff --git a/flake/lib.nix b/flake/lib.nix index 25e90ec6..35ba71c2 100644 --- a/flake/lib.nix +++ b/flake/lib.nix @@ -12,32 +12,31 @@ }; # Public `lib` flake output - flake.lib = - { - nixvim = lib.makeOverridable (import ../lib) { - inherit lib; - flake = self; - }; - overlay = lib.makeOverridable (import ../lib/overlay.nix) { - flake = self; - }; - # Top-top-level aliases - inherit (self.lib.nixvim) - evalNixvim - ; - } - // lib.genAttrs config.systems ( - lib.flip withSystem ( - { pkgs, system, ... }: - { - # NOTE: this is the publicly documented flake output we've had for a while - check = pkgs.callPackage ../lib/tests.nix { - inherit lib self system; - }; + flake.lib = { + nixvim = lib.makeOverridable (import ../lib) { + inherit lib; + flake = self; + }; + overlay = lib.makeOverridable (import ../lib/overlay.nix) { + flake = self; + }; + # Top-top-level aliases + inherit (self.lib.nixvim) + evalNixvim + ; + } + // lib.genAttrs config.systems ( + lib.flip withSystem ( + { pkgs, system, ... }: + { + # NOTE: this is the publicly documented flake output we've had for a while + check = pkgs.callPackage ../lib/tests.nix { + inherit lib self system; + }; - # NOTE: no longer needs to be per-system - helpers = lib.warn "nixvim: `.lib.${system}.helpers` has been moved to `.lib.nixvim` and no longer depends on a specific system" self.lib.nixvim; - } - ) - ); + # NOTE: no longer needs to be per-system + helpers = lib.warn "nixvim: `.lib.${system}.helpers` has been moved to `.lib.nixvim` and no longer depends on a specific system" self.lib.nixvim; + } + ) + ); } diff --git a/lib/modules.nix b/lib/modules.nix index 5bcba061..eb6b28a4 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -50,7 +50,8 @@ in modulesPath = ../modules; # TODO: deprecate `helpers` helpers = self; - } // extraSpecialArgs; + } + // extraSpecialArgs; }; } // lib.mapAttrs ( diff --git a/modules/keymaps.nix b/modules/keymaps.nix index a4f6c7cc..876712e9 100644 --- a/modules/keymaps.nix +++ b/modules/keymaps.nix @@ -49,20 +49,19 @@ warnings = let # All keymap options that have historically supported the `lua` sub-option - keymapOptions = - [ - options.keymaps - options.keymapsOnEvents - options.plugins.wtf.keymaps.ai - options.plugins.wtf.keymaps.search - # NOTE: lsp `diagnostic` and `lspBuf` don't use `mapOptionSubmodule` yet - # So we only need `lua` deprecation in lsp's `extra` option - options.plugins.lsp.keymaps.extra - # NOTE: tmux-navigator added `mapOptionSubmodule` support _after_ branching off 24.05 - options.plugins.tmux-navigator.keymaps - ] - # NOTE: barbar added `mapOptionSubmodule` support shortly _before_ branching off 24.05 - ++ builtins.attrValues (builtins.removeAttrs options.plugins.barbar.keymaps [ "silent" ]); + keymapOptions = [ + options.keymaps + options.keymapsOnEvents + options.plugins.wtf.keymaps.ai + options.plugins.wtf.keymaps.search + # NOTE: lsp `diagnostic` and `lspBuf` don't use `mapOptionSubmodule` yet + # So we only need `lua` deprecation in lsp's `extra` option + options.plugins.lsp.keymaps.extra + # NOTE: tmux-navigator added `mapOptionSubmodule` support _after_ branching off 24.05 + options.plugins.tmux-navigator.keymaps + ] + # NOTE: barbar added `mapOptionSubmodule` support shortly _before_ branching off 24.05 + ++ builtins.attrValues (builtins.removeAttrs options.plugins.barbar.keymaps [ "silent" ]); in lib.pipe keymapOptions [ (map (opt: (opt.type.getSubOptions opt.loc).lua)) diff --git a/modules/plugins.nix b/modules/plugins.nix index a0d0a674..f2f5228c 100644 --- a/modules/plugins.nix +++ b/modules/plugins.nix @@ -6,10 +6,11 @@ let by-name = ../plugins/by-name; in { - imports = - [ ../plugins ] - ++ foldlAttrs ( - prev: name: type: - prev ++ optional (type == "directory") (by-name + "/${name}") - ) [ ] (readDir by-name); + imports = [ + ../plugins + ] + ++ foldlAttrs ( + prev: name: type: + prev ++ optional (type == "directory") (by-name + "/${name}") + ) [ ] (readDir by-name); } diff --git a/plugins/by-name/clangd-extensions/deprecations.nix b/plugins/by-name/clangd-extensions/deprecations.nix index 1bf5e869..f19576f5 100644 --- a/plugins/by-name/clangd-extensions/deprecations.nix +++ b/plugins/by-name/clangd-extensions/deprecations.nix @@ -7,79 +7,78 @@ let ]; in { - imports = - [ - (mkRemovedOptionModule (basePluginPath ++ [ "server" ]) '' - To configure the `clangd` language server options, please use - `plugins.lsp.servers.clangd.extraSettings`. - '') - (mkRemovedOptionModule ( - basePluginPath - ++ [ - "extensions" - "autoSetHints" - ] - ) "") - ] - ++ (map - ( - optionPath: - mkRenamedOptionModule (basePluginPath ++ [ "extensions" ] ++ optionPath) ( - basePluginPath ++ optionPath - ) - ) - [ - [ - "inlayHints" - "inline" - ] - [ - "inlayHints" - "onlyCurrentLine" - ] - [ - "inlayHints" - "onlyCurrentLineAutocmd" - ] - [ - "inlayHints" - "showParameterHints" - ] - [ - "inlayHints" - "parameterHintsPrefix" - ] - [ - "inlayHints" - "otherHintsPrefix" - ] - [ - "inlayHints" - "maxLenAlign" - ] - [ - "inlayHints" - "maxLenAlignPadding" - ] - [ - "inlayHints" - "rightAlign" - ] - [ - "inlayHints" - "rightAlignPadding" - ] - [ - "inlayHints" - "highlight" - ] - [ - "inlayHints" - "priority" - ] - [ "ast" ] - [ "memoryUsage" ] - [ "symbolInfo" ] + imports = [ + (mkRemovedOptionModule (basePluginPath ++ [ "server" ]) '' + To configure the `clangd` language server options, please use + `plugins.lsp.servers.clangd.extraSettings`. + '') + (mkRemovedOptionModule ( + basePluginPath + ++ [ + "extensions" + "autoSetHints" ] - ); + ) "") + ] + ++ (map + ( + optionPath: + mkRenamedOptionModule (basePluginPath ++ [ "extensions" ] ++ optionPath) ( + basePluginPath ++ optionPath + ) + ) + [ + [ + "inlayHints" + "inline" + ] + [ + "inlayHints" + "onlyCurrentLine" + ] + [ + "inlayHints" + "onlyCurrentLineAutocmd" + ] + [ + "inlayHints" + "showParameterHints" + ] + [ + "inlayHints" + "parameterHintsPrefix" + ] + [ + "inlayHints" + "otherHintsPrefix" + ] + [ + "inlayHints" + "maxLenAlign" + ] + [ + "inlayHints" + "maxLenAlignPadding" + ] + [ + "inlayHints" + "rightAlign" + ] + [ + "inlayHints" + "rightAlignPadding" + ] + [ + "inlayHints" + "highlight" + ] + [ + "inlayHints" + "priority" + ] + [ "ast" ] + [ "memoryUsage" ] + [ "symbolInfo" ] + ] + ); } diff --git a/plugins/by-name/crates/default.nix b/plugins/by-name/crates/default.nix index 17429adb..7aec9d46 100644 --- a/plugins/by-name/crates/default.nix +++ b/plugins/by-name/crates/default.nix @@ -6,9 +6,10 @@ lib.nixvim.plugins.mkNeovimPlugin { maintainers = [ lib.maintainers.GaetanLepage ]; - imports = - [ { cmpSourcePlugins.crates = "crates"; } ] - ++ + imports = [ + { cmpSourcePlugins.crates = "crates"; } + ] + ++ # TODO introduced 2024-12-12: remove after 25.05 lib.nixvim.mkSettingsRenamedOptionModules [ "plugins" "crates-nvim" ] [ "plugins" "crates" ] diff --git a/plugins/by-name/dap-python/default.nix b/plugins/by-name/dap-python/default.nix index 6a9e6a90..fbd2de60 100644 --- a/plugins/by-name/dap-python/default.nix +++ b/plugins/by-name/dap-python/default.nix @@ -78,23 +78,22 @@ lib.nixvim.plugins.mkNeovimPlugin { plugins.dap = { enable = true; - extensionConfigLua = - '' - require("dap-python").setup("${cfg.adapterPythonPath}", ${toLuaObject cfg.settings}) - '' - + (optionalString (cfg.testRunners != null) '' - table.insert(require("dap-python").test_runners, - ${toLuaObject (builtins.mapAttrs (_: lib.nixvim.mkRaw) cfg.testRunners)}) - '') - + (optionalString (cfg.customConfigurations != null) '' - table.insert(require("dap").configurations.python, ${toLuaObject cfg.customConfigurations}) - '') - + (optionalString (cfg.resolvePython != null) '' - require("dap-python").resolve_python = ${toLuaObject cfg.resolvePython} - '') - + (optionalString (cfg.testRunner != null) '' - require("dap-python").test_runner = ${toLuaObject cfg.testRunner}; - ''); + extensionConfigLua = '' + require("dap-python").setup("${cfg.adapterPythonPath}", ${toLuaObject cfg.settings}) + '' + + (optionalString (cfg.testRunners != null) '' + table.insert(require("dap-python").test_runners, + ${toLuaObject (builtins.mapAttrs (_: lib.nixvim.mkRaw) cfg.testRunners)}) + '') + + (optionalString (cfg.customConfigurations != null) '' + table.insert(require("dap").configurations.python, ${toLuaObject cfg.customConfigurations}) + '') + + (optionalString (cfg.resolvePython != null) '' + require("dap-python").resolve_python = ${toLuaObject cfg.resolvePython} + '') + + (optionalString (cfg.testRunner != null) '' + require("dap-python").test_runner = ${toLuaObject cfg.testRunner}; + ''); }; }; diff --git a/plugins/by-name/dap/dapHelpers.nix b/plugins/by-name/dap/dapHelpers.nix index 3a542ea3..cf6026ce 100644 --- a/plugins/by-name/dap/dapHelpers.nix +++ b/plugins/by-name/dap/dapHelpers.nix @@ -34,7 +34,8 @@ rec { The filetype to use for content retrieved via a source request. ''; }; - } // attrs; + } + // attrs; }; executableAdapterOption = mkAdapterType { diff --git a/plugins/by-name/dap/default.nix b/plugins/by-name/dap/default.nix index 51259705..3750af7f 100644 --- a/plugins/by-name/dap/default.nix +++ b/plugins/by-name/dap/default.nix @@ -78,7 +78,8 @@ lib.nixvim.plugins.mkNeovimPlugin { DapStopped = dapStopped; DapBreakpointRejected = dapBreakpointRejected; }; - } // cfg.settings; + } + // cfg.settings; in { plugins.dap.luaConfig.content = lib.mkMerge [ diff --git a/plugins/by-name/dashboard/default.nix b/plugins/by-name/dashboard/default.nix index 38fb33dc..24a8c3a2 100644 --- a/plugins/by-name/dashboard/default.nix +++ b/plugins/by-name/dashboard/default.nix @@ -190,7 +190,8 @@ lib.nixvim.plugins.mkNeovimPlugin { action = "Telescope find_files cwd="; ``` ''; - } // extraOptions; + } + // extraOptions; }; in { diff --git a/plugins/by-name/floaterm/default.nix b/plugins/by-name/floaterm/default.nix index 5b6cbd9d..caf4e5aa 100644 --- a/plugins/by-name/floaterm/default.nix +++ b/plugins/by-name/floaterm/default.nix @@ -15,23 +15,23 @@ lib.nixvim.plugins.mkVimPlugin { maintainers = [ lib.maintainers.GaetanLepage ]; # TODO: Added 2024-12-16; remove after 25.05 - optionsRenamedToSettings = - [ - "autoclose" - "autohide" - "autoinsert" - "borderchars" - "giteditor" - "height" - "opener" - "position" - "rootmarkers" - "shell" - "title" - "width" - "wintype" - ] - ++ map + optionsRenamedToSettings = [ + "autoclose" + "autohide" + "autoinsert" + "borderchars" + "giteditor" + "height" + "opener" + "position" + "rootmarkers" + "shell" + "title" + "width" + "wintype" + ] + ++ + map (name: { old = [ "keymaps" diff --git a/plugins/by-name/gitgutter/default.nix b/plugins/by-name/gitgutter/default.nix index 000972e9..b70e5a5d 100644 --- a/plugins/by-name/gitgutter/default.nix +++ b/plugins/by-name/gitgutter/default.nix @@ -70,210 +70,209 @@ lib.nixvim.plugins.mkVimPlugin { ]; }; - settingsOptions = - { - preview_win_location = defaultNullOpts.mkEnumFirstDefault [ "bo" "to" "bel" "abo" ] '' - This option determines where the preview window pops up as a result of the - `:GitGutterPreviewHunk` command. + settingsOptions = { + preview_win_location = defaultNullOpts.mkEnumFirstDefault [ "bo" "to" "bel" "abo" ] '' + This option determines where the preview window pops up as a result of the + `:GitGutterPreviewHunk` command. - See the end of the `|opening-window|` docs. - ''; + See the end of the `|opening-window|` docs. + ''; - git_executable = defaultNullOpts.mkStr' { - pluginDefault = "git"; - example = lib.literalExpression "lib.getExe pkgs.git"; - description = '' - This option determines what `git` binary to use. - Set this if git is not on your path. - ''; - }; - - git_args = defaultNullOpts.mkStr' { - pluginDefault = ""; - example = ''--gitdir=""''; - description = '' - Use this option to pass any extra arguments to `git` when running `git-diff`. - ''; - }; - - diff_args = defaultNullOpts.mkStr' { - pluginDefault = ""; - example = "-w"; - description = '' - Use this option to pass any extra arguments to `git-diff`. - ''; - }; - - diff_relative_to = defaultNullOpts.mkStr' { - pluginDefault = "index"; - example = "working_tree"; - description = '' - By default buffers are diffed against the index. - Use this option to diff against the working tree. - ''; - }; - - diff_base = defaultNullOpts.mkStr' { - pluginDefault = ""; - example = ""; - description = '' - By default buffers are diffed against the index. - Use this option to diff against a revision instead. - - If you are looking at a previous version of a file with _Fugitive_ (e.g. via `:0Gclog`), - gitgutter sets the diff base to the parent of the current revision. - - This setting is ignore when the diff is relative to the working tree (`diff_relative_to`). - ''; - }; - - grep = defaultNullOpts.mkStr' { - pluginDefault = "grep"; - example = "grep --color=never"; - description = '' - The plugin pipes the output of `git-diff` into `grep` to minimise the amount of data vim has - to process. - Set this option if `grep` is not on your path. - - `grep` must produce plain-text output without any ANSI escape codes or colours. - Use this option to turn off colours if necessary (`grep --color=never` for example). - - If you do not want to use `grep` at all (perhaps to debug why signs are not showing), set - this option to an empty string. - ''; - }; - - signs = defaultNullOpts.mkBool true '' - Determines whether or not to show signs. - ''; - - highlight_lines = defaultNullOpts.mkBool false '' - Determines whether or not to show line highlights. - ''; - - highlight_linenrs = defaultNullOpts.mkBool false '' - Determines whether or not to show line number highlights. - ''; - - max_signs = defaultNullOpts.mkInt (-1) '' - Sets the maximum number of signs to show in a buffer. - - To avoid slowing down the GUI the number of signs can be capped. - When the number of changed lines exceeds this value, the plugin removes all signs and displays - a warning message. - - When set to `-1` the limit is not applied. - ''; - - sign_priority = defaultNullOpts.mkUnsignedInt 10 '' - Sets the `|sign-priority|` gitgutter assigns to its signs. - ''; - - sign_allow_clobber = defaultNullOpts.mkBool true '' - Determines whether gitgutter preserves non-gitgutter signs. - When `true`, gitgutter will not preserve non-gitgutter signs. - ''; - } - // (lib.mapAttrs' - (n: default: { - name = "sign_${n}"; - value = defaultNullOpts.mkStr default '' - Icon for the _${n}_ sign. - - You can use unicode characters but not images. - Signs must not take up more than 2 columns. - ''; - }) - { - added = "+"; - modified = "~"; - removed = "_"; - removed_first_line = "‾"; - removed_above_and_below = "_¯"; - modified_removed = "~_"; - } - ) - // { - set_sign_backgrounds = defaultNullOpts.mkBool false '' - Only applies to existing `GitGutter*` highlight groups. - See `|gitgutter-highlights|`. - - Controls whether to override the signs' background colours to match the `|hl-SignColumn|`. - ''; - - preview_win_floating = defaultNullOpts.mkBool true '' - Whether to use floating/popup windows for hunk previews. - - Note that if you use popup windows on Vim you will not be able to stage partial hunks via - the preview window. - ''; - - floating_window_options = - defaultNullOpts.mkAttrsOf types.anything - { - relative = "cursor"; - row = 1; - col = 0; - width = 42; - height = "&previewheight"; - style = "minimal"; - } - '' - This dictionary is passed directly to `|nvim_open_win()|`. - ''; - - close_preview_on_escape = defaultNullOpts.mkBool false '' - Whether pressing in a preview window closes it. - ''; - - terminal_reports_focus = defaultNullOpts.mkBool true '' - Normally the plugin uses `|FocusGained|` to force-update all buffers when Vim receives - focus. - However some terminals do not report focus events and so the `|FocusGained|` autocommand - never fires. - - If this applies to you, either install something like - [Terminus](https://github.com/wincent/terminus) to make `|FocusGained|` work or set this - option to `false`. - - If you use `tmux`, try this in your tmux.conf: - ``` - set -g focus-events on - ``` - - When this option is `false`, the plugin force-updates the buffer on `|BufEnter|` (instead of - only updating if the buffer's contents has changed since the last update). - - ''; - - enabled = defaultNullOpts.mkBool true '' - Controls whether or not the plugin is on at startup. - ''; - - map_keys = defaultNullOpts.mkBool true '' - Controls whether or not the plugin provides mappings. - See `|gitgutter-mappings|`. - ''; - - async = defaultNullOpts.mkBool true '' - Controls whether or not diffs are run in the background. - ''; - - log = defaultNullOpts.mkBool false '' - When switched on, the plugin logs to `gitgutter.log` in the directory where it is installed. - Additionally it logs channel activity to `channel.log`. - ''; - - use_location_list = defaultNullOpts.mkBool false '' - When switched on, the `:GitGutterQuickFix` command populates the location list of the - current window instead of the global quickfix list. - ''; - - show_msg_on_hunk_jumping = defaultNullOpts.mkBool true '' - When switched on, a message like "Hunk 4 of 11" is shown on hunk jumping. + git_executable = defaultNullOpts.mkStr' { + pluginDefault = "git"; + example = lib.literalExpression "lib.getExe pkgs.git"; + description = '' + This option determines what `git` binary to use. + Set this if git is not on your path. ''; }; + git_args = defaultNullOpts.mkStr' { + pluginDefault = ""; + example = ''--gitdir=""''; + description = '' + Use this option to pass any extra arguments to `git` when running `git-diff`. + ''; + }; + + diff_args = defaultNullOpts.mkStr' { + pluginDefault = ""; + example = "-w"; + description = '' + Use this option to pass any extra arguments to `git-diff`. + ''; + }; + + diff_relative_to = defaultNullOpts.mkStr' { + pluginDefault = "index"; + example = "working_tree"; + description = '' + By default buffers are diffed against the index. + Use this option to diff against the working tree. + ''; + }; + + diff_base = defaultNullOpts.mkStr' { + pluginDefault = ""; + example = ""; + description = '' + By default buffers are diffed against the index. + Use this option to diff against a revision instead. + + If you are looking at a previous version of a file with _Fugitive_ (e.g. via `:0Gclog`), + gitgutter sets the diff base to the parent of the current revision. + + This setting is ignore when the diff is relative to the working tree (`diff_relative_to`). + ''; + }; + + grep = defaultNullOpts.mkStr' { + pluginDefault = "grep"; + example = "grep --color=never"; + description = '' + The plugin pipes the output of `git-diff` into `grep` to minimise the amount of data vim has + to process. + Set this option if `grep` is not on your path. + + `grep` must produce plain-text output without any ANSI escape codes or colours. + Use this option to turn off colours if necessary (`grep --color=never` for example). + + If you do not want to use `grep` at all (perhaps to debug why signs are not showing), set + this option to an empty string. + ''; + }; + + signs = defaultNullOpts.mkBool true '' + Determines whether or not to show signs. + ''; + + highlight_lines = defaultNullOpts.mkBool false '' + Determines whether or not to show line highlights. + ''; + + highlight_linenrs = defaultNullOpts.mkBool false '' + Determines whether or not to show line number highlights. + ''; + + max_signs = defaultNullOpts.mkInt (-1) '' + Sets the maximum number of signs to show in a buffer. + + To avoid slowing down the GUI the number of signs can be capped. + When the number of changed lines exceeds this value, the plugin removes all signs and displays + a warning message. + + When set to `-1` the limit is not applied. + ''; + + sign_priority = defaultNullOpts.mkUnsignedInt 10 '' + Sets the `|sign-priority|` gitgutter assigns to its signs. + ''; + + sign_allow_clobber = defaultNullOpts.mkBool true '' + Determines whether gitgutter preserves non-gitgutter signs. + When `true`, gitgutter will not preserve non-gitgutter signs. + ''; + } + // (lib.mapAttrs' + (n: default: { + name = "sign_${n}"; + value = defaultNullOpts.mkStr default '' + Icon for the _${n}_ sign. + + You can use unicode characters but not images. + Signs must not take up more than 2 columns. + ''; + }) + { + added = "+"; + modified = "~"; + removed = "_"; + removed_first_line = "‾"; + removed_above_and_below = "_¯"; + modified_removed = "~_"; + } + ) + // { + set_sign_backgrounds = defaultNullOpts.mkBool false '' + Only applies to existing `GitGutter*` highlight groups. + See `|gitgutter-highlights|`. + + Controls whether to override the signs' background colours to match the `|hl-SignColumn|`. + ''; + + preview_win_floating = defaultNullOpts.mkBool true '' + Whether to use floating/popup windows for hunk previews. + + Note that if you use popup windows on Vim you will not be able to stage partial hunks via + the preview window. + ''; + + floating_window_options = + defaultNullOpts.mkAttrsOf types.anything + { + relative = "cursor"; + row = 1; + col = 0; + width = 42; + height = "&previewheight"; + style = "minimal"; + } + '' + This dictionary is passed directly to `|nvim_open_win()|`. + ''; + + close_preview_on_escape = defaultNullOpts.mkBool false '' + Whether pressing in a preview window closes it. + ''; + + terminal_reports_focus = defaultNullOpts.mkBool true '' + Normally the plugin uses `|FocusGained|` to force-update all buffers when Vim receives + focus. + However some terminals do not report focus events and so the `|FocusGained|` autocommand + never fires. + + If this applies to you, either install something like + [Terminus](https://github.com/wincent/terminus) to make `|FocusGained|` work or set this + option to `false`. + + If you use `tmux`, try this in your tmux.conf: + ``` + set -g focus-events on + ``` + + When this option is `false`, the plugin force-updates the buffer on `|BufEnter|` (instead of + only updating if the buffer's contents has changed since the last update). + + ''; + + enabled = defaultNullOpts.mkBool true '' + Controls whether or not the plugin is on at startup. + ''; + + map_keys = defaultNullOpts.mkBool true '' + Controls whether or not the plugin provides mappings. + See `|gitgutter-mappings|`. + ''; + + async = defaultNullOpts.mkBool true '' + Controls whether or not diffs are run in the background. + ''; + + log = defaultNullOpts.mkBool false '' + When switched on, the plugin logs to `gitgutter.log` in the directory where it is installed. + Additionally it logs channel activity to `channel.log`. + ''; + + use_location_list = defaultNullOpts.mkBool false '' + When switched on, the `:GitGutterQuickFix` command populates the location list of the + current window instead of the global quickfix list. + ''; + + show_msg_on_hunk_jumping = defaultNullOpts.mkBool true '' + When switched on, a message like "Hunk 4 of 11" is shown on hunk jumping. + ''; + }; + settingsExample = { set_sign_backgrounds = true; sign_modified_removed = "*"; diff --git a/plugins/by-name/julia-cell/default.nix b/plugins/by-name/julia-cell/default.nix index 021344fb..3c25f0dc 100644 --- a/plugins/by-name/julia-cell/default.nix +++ b/plugins/by-name/julia-cell/default.nix @@ -65,15 +65,14 @@ lib.nixvim.plugins.mkVimPlugin { }; extraOptions = { - keymaps = - { - silent = mkOption { - type = types.bool; - description = "Whether julia-cell keymaps should be silent"; - default = false; - }; - } - // (mapAttrs (name: value: helpers.mkNullOrOption types.str "Keymap for ${value.desc}.") mappings); + keymaps = { + silent = mkOption { + type = types.bool; + description = "Whether julia-cell keymaps should be silent"; + default = false; + }; + } + // (mapAttrs (name: value: helpers.mkNullOrOption types.str "Keymap for ${value.desc}.") mappings); }; extraConfig = cfg: { diff --git a/plugins/by-name/lint/default.nix b/plugins/by-name/lint/default.nix index 2839f0e3..7a7e641b 100644 --- a/plugins/by-name/lint/default.nix +++ b/plugins/by-name/lint/default.nix @@ -214,39 +214,38 @@ lib.nixvim.plugins.mkNeovimPlugin { extraConfig = cfg: { autoCmd = lib.optionals (cfg.autoCmd != null) [ cfg.autoCmd ]; - plugins.lint.luaConfig.content = - '' - local __lint = require('lint') - '' - + (lib.optionalString (cfg.lintersByFt != null) '' - __lint.linters_by_ft = ${toLuaObject cfg.lintersByFt} - '') - + (lib.optionalString (cfg.customLinters != null) ( - lib.concatLines ( + plugins.lint.luaConfig.content = '' + local __lint = require('lint') + '' + + (lib.optionalString (cfg.lintersByFt != null) '' + __lint.linters_by_ft = ${toLuaObject cfg.lintersByFt} + '') + + (lib.optionalString (cfg.customLinters != null) ( + lib.concatLines ( + lib.mapAttrsToList ( + customLinter: linterConfig: + let + linterConfig' = + if builtins.isString linterConfig then lib.nixvim.mkRaw linterConfig else linterConfig; + in + "__lint.linters.${customLinter} = ${toLuaObject linterConfig'}" + ) cfg.customLinters + ) + )) + + (lib.optionalString (cfg.linters != null) ( + lib.concatLines ( + lib.flatten ( lib.mapAttrsToList ( - customLinter: linterConfig: - let - linterConfig' = - if builtins.isString linterConfig then lib.nixvim.mkRaw linterConfig else linterConfig; - in - "__lint.linters.${customLinter} = ${toLuaObject linterConfig'}" - ) cfg.customLinters - ) - )) - + (lib.optionalString (cfg.linters != null) ( - lib.concatLines ( - lib.flatten ( + linter: linterConfig: lib.mapAttrsToList ( - linter: linterConfig: - lib.mapAttrsToList ( - propName: propValue: - lib.optionalString ( - propValue != null - ) "__lint.linters.${linter}.${propName} = ${toLuaObject propValue}" - ) linterConfig - ) cfg.linters - ) + propName: propValue: + lib.optionalString ( + propValue != null + ) "__lint.linters.${linter}.${propName} = ${toLuaObject propValue}" + ) linterConfig + ) cfg.linters ) - )); + ) + )); }; } diff --git a/plugins/by-name/lspkind/default.nix b/plugins/by-name/lspkind/default.nix index b6f1f724..dba668f1 100644 --- a/plugins/by-name/lspkind/default.nix +++ b/plugins/by-name/lspkind/default.nix @@ -54,22 +54,21 @@ in config = let doCmp = cfg.cmp.enable && config.plugins.cmp.enable; - options = - { - inherit (cfg) mode preset; - symbol_map = cfg.symbolMap; - } - // ( - if doCmp then - { - maxwidth = cfg.cmp.maxWidth; - ellipsis_char = cfg.cmp.ellipsisChar; - inherit (cfg.cmp) menu; - } - else - { } - ) - // cfg.extraOptions; + options = { + inherit (cfg) mode preset; + symbol_map = cfg.symbolMap; + } + // ( + if doCmp then + { + maxwidth = cfg.cmp.maxWidth; + ellipsis_char = cfg.cmp.ellipsisChar; + inherit (cfg.cmp) menu; + } + else + { } + ) + // cfg.extraOptions; in mkIf cfg.enable { extraPlugins = [ cfg.package ]; diff --git a/plugins/by-name/neogit/default.nix b/plugins/by-name/neogit/default.nix index 3770fc91..134da572 100644 --- a/plugins/by-name/neogit/default.nix +++ b/plugins/by-name/neogit/default.nix @@ -12,46 +12,45 @@ lib.nixvim.plugins.mkNeovimPlugin { # TODO introduced 2024-02-29: remove 2024-04-29 deprecateExtraOptions = true; - imports = + imports = [ + # TODO: added 2025-04-07, remove after 25.05 + (lib.nixvim.mkRemovedPackageOptionModule { + plugin = "neogit"; + packageName = "git"; + }) + (lib.nixvim.mkRemovedPackageOptionModule { + plugin = "neogit"; + packageName = "which"; + }) + ] + ++ (map + ( + optionPath: + mkRemovedOptionModule + ( + [ + "plugins" + "neogit" + ] + ++ optionPath + ) + "This option has been removed upstream. Please refer to the plugin documentation to update your configuration." + ) [ - # TODO: added 2025-04-07, remove after 25.05 - (lib.nixvim.mkRemovedPackageOptionModule { - plugin = "neogit"; - packageName = "git"; - }) - (lib.nixvim.mkRemovedPackageOptionModule { - plugin = "neogit"; - packageName = "which"; - }) - ] - ++ (map - ( - optionPath: - mkRemovedOptionModule - ( - [ - "plugins" - "neogit" - ] - ++ optionPath - ) - "This option has been removed upstream. Please refer to the plugin documentation to update your configuration." - ) + [ "disableCommitConfirmation" ] + [ "disableBuiltinNotifications" ] + [ "useMagitKeybindings " ] + [ "commitPopup" ] [ - [ "disableCommitConfirmation" ] - [ "disableBuiltinNotifications" ] - [ "useMagitKeybindings " ] - [ "commitPopup" ] - [ - "sections" - "unmerged" - ] - [ - "sections" - "unpulled" - ] + "sections" + "unmerged" ] - ); + [ + "sections" + "unpulled" + ] + ] + ); optionsRenamedToSettings = [ "disableSigns" "disableHint" diff --git a/plugins/by-name/none-ls/_mk-source-plugin.nix b/plugins/by-name/none-ls/_mk-source-plugin.nix index aab1e7f0..5df4edea 100644 --- a/plugins/by-name/none-ls/_mk-source-plugin.nix +++ b/plugins/by-name/none-ls/_mk-source-plugin.nix @@ -14,38 +14,37 @@ let cfg' = config.plugins.none-ls.sources.${sourceType}.${sourceName}; in { - options.plugins.none-ls.sources.${sourceType}.${sourceName} = - { - enable = lib.mkEnableOption "the ${sourceName} ${sourceType} source for none-ls"; - # Support strLua for compatibility with the old withArgs option - settings = lib.nixvim.defaultNullOpts.mkStrLuaOr' { - type = with lib.types; attrsOf anything; - description = '' - Options provided to the `require('null-ls').builtins.${sourceType}.${sourceName}.with` function. + options.plugins.none-ls.sources.${sourceType}.${sourceName} = { + enable = lib.mkEnableOption "the ${sourceName} ${sourceType} source for none-ls"; + # Support strLua for compatibility with the old withArgs option + settings = lib.nixvim.defaultNullOpts.mkStrLuaOr' { + type = with lib.types; attrsOf anything; + description = '' + Options provided to the `require('null-ls').builtins.${sourceType}.${sourceName}.with` function. - See upstream's [`BUILTIN_CONFIG`] documentation. + See upstream's [`BUILTIN_CONFIG`] documentation. - [`BUILTIN_CONFIG`]: https://github.com/nvimtools/none-ls.nvim/blob/main/doc/BUILTIN_CONFIG.md - ''; - example = { - extra_filetypes = [ "toml" ]; - disabled_filetypes = [ "lua" ]; - extra_args = [ - "-i" - "2" - "-ci" - ]; - }; + [`BUILTIN_CONFIG`]: https://github.com/nvimtools/none-ls.nvim/blob/main/doc/BUILTIN_CONFIG.md + ''; + example = { + extra_filetypes = [ "toml" ]; + disabled_filetypes = [ "lua" ]; + extra_args = [ + "-i" + "2" + "-ci" + ]; }; - } - # Only declare a package option if a package is required - // lib.optionalAttrs (packaged ? ${sourceName}) { - package = - lib.nixvim.mkMaybeUnpackagedOption "plugins.none-ls.sources.${sourceType}.${sourceName}.package" - pkgs - sourceName - pkg; }; + } + # Only declare a package option if a package is required + // lib.optionalAttrs (packaged ? ${sourceName}) { + package = + lib.nixvim.mkMaybeUnpackagedOption "plugins.none-ls.sources.${sourceType}.${sourceName}.package" + pkgs + sourceName + pkg; + }; # TODO: Added 2024-07-16; remove after 24.11 imports = diff --git a/plugins/by-name/none-ls/sources.nix b/plugins/by-name/none-ls/sources.nix index bc373a3b..0e958937 100644 --- a/plugins/by-name/none-ls/sources.nix +++ b/plugins/by-name/none-ls/sources.nix @@ -4,14 +4,13 @@ let mkSourcePlugin = import ./_mk-source-plugin.nix; in { - imports = - [ - ./prettier.nix - ./prettierd.nix - ] - ++ (lib.flatten ( - lib.mapAttrsToList (category: (lib.map (mkSourcePlugin category))) noneLsBuiltins - )); + imports = [ + ./prettier.nix + ./prettierd.nix + ] + ++ (lib.flatten ( + lib.mapAttrsToList (category: (lib.map (mkSourcePlugin category))) noneLsBuiltins + )); config = let diff --git a/plugins/by-name/nvim-bqf/default.nix b/plugins/by-name/nvim-bqf/default.nix index 62a7d352..a6921b8e 100644 --- a/plugins/by-name/nvim-bqf/default.nix +++ b/plugins/by-name/nvim-bqf/default.nix @@ -158,7 +158,8 @@ in extra_opts = extraOpts; }; }; - } // cfg.extraOptions; + } + // cfg.extraOptions; in mkIf cfg.enable { extraPlugins = [ cfg.package ]; diff --git a/plugins/by-name/nvim-tree/default.nix b/plugins/by-name/nvim-tree/default.nix index 3493302c..d9d7b62b 100644 --- a/plugins/by-name/nvim-tree/default.nix +++ b/plugins/by-name/nvim-tree/default.nix @@ -1186,12 +1186,10 @@ in nested = true; }); - extraConfigLua = - (optionalString autoOpenEnabled openNvimTreeFunction) - + '' + extraConfigLua = (optionalString autoOpenEnabled openNvimTreeFunction) + '' - require('nvim-tree').setup(${lib.nixvim.toLuaObject setupOptions}) - ''; + require('nvim-tree').setup(${lib.nixvim.toLuaObject setupOptions}) + ''; dependencies.git.enable = lib.mkDefault true; }; diff --git a/plugins/by-name/presence-nvim/default.nix b/plugins/by-name/presence-nvim/default.nix index 5dc6c3d2..25a6b518 100644 --- a/plugins/by-name/presence-nvim/default.nix +++ b/plugins/by-name/presence-nvim/default.nix @@ -207,7 +207,8 @@ in reading_text = cfg.readingText; workspace_text = cfg.workspaceText; line_number_text = cfg.lineNumberText; - } // cfg.extraOptions; + } + // cfg.extraOptions; in mkIf cfg.enable { extraPlugins = [ cfg.package ]; diff --git a/plugins/by-name/rust-tools/default.nix b/plugins/by-name/rust-tools/default.nix index 6cb56168..f63e760f 100644 --- a/plugins/by-name/rust-tools/default.nix +++ b/plugins/by-name/rust-tools/default.nix @@ -125,7 +125,8 @@ in standalone file support setting it to false may improve startup time ''; - } // import ../../lsp/language-servers/rust-analyzer-config.nix lib; + } + // import ../../lsp/language-servers/rust-analyzer-config.nix lib; }; config = lib.mkIf cfg.enable { extraPlugins = [ @@ -174,7 +175,8 @@ in inherit (cfg.server) standalone; settings.rust-analyzer = lib.filterAttrs (n: v: n != "standalone") cfg.server; }; - } // cfg.extraOptions; + } + // cfg.extraOptions; in '' require('rust-tools').setup(${lib.nixvim.toLuaObject options}) diff --git a/plugins/by-name/spider/default.nix b/plugins/by-name/spider/default.nix index 9f5c6859..eab028ce 100644 --- a/plugins/by-name/spider/default.nix +++ b/plugins/by-name/spider/default.nix @@ -52,7 +52,8 @@ in let setupOptions = { inherit (cfg) skipInsignificantPunctuation; - } // cfg.extraOptions; + } + // cfg.extraOptions; mappings = mapAttrsToList (motion: key: { mode = [ diff --git a/plugins/by-name/startup/default.nix b/plugins/by-name/startup/default.nix index c6b3f653..f44d9e1e 100644 --- a/plugins/by-name/startup/default.nix +++ b/plugins/by-name/startup/default.nix @@ -331,7 +331,8 @@ in folded_section = foldedSection; }; inherit (cfg) parts; - } // sections; + } + // sections; in '' require('startup').setup(${lib.nixvim.toLuaObject setupOptions}) diff --git a/plugins/by-name/telescope/extensions/_mk-extension.nix b/plugins/by-name/telescope/extensions/_mk-extension.nix index 469f6b54..a8b3c8da 100644 --- a/plugins/by-name/telescope/extensions/_mk-extension.nix +++ b/plugins/by-name/telescope/extensions/_mk-extension.nix @@ -56,7 +56,8 @@ let options = settingsOptions; example = settingsExample; }; - } // extraOptions; + } + // extraOptions; config = lib.mkIf cfg.enable ( lib.mkMerge [ diff --git a/plugins/by-name/windsurf-nvim/default.nix b/plugins/by-name/windsurf-nvim/default.nix index f0bdf1e2..667d35de 100644 --- a/plugins/by-name/windsurf-nvim/default.nix +++ b/plugins/by-name/windsurf-nvim/default.nix @@ -29,7 +29,8 @@ lib.nixvim.plugins.mkNeovimPlugin { imports = [ # Register nvim-cmp association { cmpSourcePlugins.codeium = "windsurf-nvim"; } - ] ++ (import ./deprecations.nix { inherit lib; }).imports; + ] + ++ (import ./deprecations.nix { inherit lib; }).imports; settingsExample = { enable_chat = true; diff --git a/plugins/cmp/default.nix b/plugins/cmp/default.nix index bf3378b4..1e35cac7 100644 --- a/plugins/cmp/default.nix +++ b/plugins/cmp/default.nix @@ -70,21 +70,20 @@ lib.nixvim.plugins.mkNeovimPlugin { callSetup = false; extraConfig = cfg: { - plugins.cmp.luaConfig.content = - '' - local cmp = require('cmp') - cmp.setup(${toLuaObject cfg.settings}) + plugins.cmp.luaConfig.content = '' + local cmp = require('cmp') + cmp.setup(${toLuaObject cfg.settings}) - '' - + (lib.concatStringsSep "\n" ( - lib.mapAttrsToList ( - filetype: settings: "cmp.setup.filetype('${filetype}', ${toLuaObject settings})\n" - ) cfg.filetype - )) - + (lib.concatStringsSep "\n" ( - lib.mapAttrsToList ( - cmdtype: settings: "cmp.setup.cmdline('${cmdtype}', ${toLuaObject settings})\n" - ) cfg.cmdline - )); + '' + + (lib.concatStringsSep "\n" ( + lib.mapAttrsToList ( + filetype: settings: "cmp.setup.filetype('${filetype}', ${toLuaObject settings})\n" + ) cfg.filetype + )) + + (lib.concatStringsSep "\n" ( + lib.mapAttrsToList ( + cmdtype: settings: "cmp.setup.cmdline('${cmdtype}', ${toLuaObject settings})\n" + ) cfg.cmdline + )); }; } diff --git a/plugins/lsp/default.nix b/plugins/lsp/default.nix index c8dac8ee..7fc08742 100644 --- a/plugins/lsp/default.nix +++ b/plugins/lsp/default.nix @@ -168,7 +168,8 @@ lib.nixvim.plugins.mkNeovimPlugin { options = { inherit (cfg.keymaps) silent; desc = "${descPrefix} ${actionStr}"; - } // actionProps; + } + // actionProps; } ); in diff --git a/plugins/lsp/language-servers/_mk-lsp.nix b/plugins/lsp/language-servers/_mk-lsp.nix index fb694c6e..a9abacd0 100644 --- a/plugins/lsp/language-servers/_mk-lsp.nix +++ b/plugins/lsp/language-servers/_mk-lsp.nix @@ -144,7 +144,8 @@ in type = types.attrsOf types.anything; description = "Extra options for the ${name} language server."; }; - } // extraOptions; + } + // extraOptions; }; config = lib.mkIf enabled { @@ -170,7 +171,8 @@ in opts = opts.settings; enabled = true; }; - } // cfg.extraOptions; + } + // cfg.extraOptions; } ]; }; diff --git a/plugins/lsp/language-servers/pylsp.nix b/plugins/lsp/language-servers/pylsp.nix index a23ac615..074aa2d9 100644 --- a/plugins/lsp/language-servers/pylsp.nix +++ b/plugins/lsp/language-servers/pylsp.nix @@ -548,49 +548,37 @@ in with cfg.pythonPackage.pkgs; { pylsp_mypy = pylsp-mypy.overridePythonAttrs (old: { - postPatch = - old.postPatch or '''' - + '' - substituteInPlace setup.cfg \ - --replace-fail "python-lsp-server >=1.7.0" "" - ''; + postPatch = old.postPatch or '''' + '' + substituteInPlace setup.cfg \ + --replace-fail "python-lsp-server >=1.7.0" "" + ''; }); isort = pyls-isort.overridePythonAttrs (old: { - postPatch = - old.postPatch or '''' - + '' - substituteInPlace setup.py \ - --replace-fail 'install_requires=["python-lsp-server", "isort"],' 'install_requires=["isort"],' - ''; + postPatch = old.postPatch or '''' + '' + substituteInPlace setup.py \ + --replace-fail 'install_requires=["python-lsp-server", "isort"],' 'install_requires=["isort"],' + ''; }); black = python-lsp-black.overridePythonAttrs (old: { - postPatch = - old.postPatch or '''' - + '' - substituteInPlace setup.cfg \ - --replace-fail "python-lsp-server>=1.4.0" "" - ''; + postPatch = old.postPatch or '''' + '' + substituteInPlace setup.cfg \ + --replace-fail "python-lsp-server>=1.4.0" "" + ''; }); memestra = pyls-memestra.overridePythonAttrs (old: { - postPatch = - old.postPatch or '''' - + '' - sed -i '/python-lsp-server/d' requirements.txt - ''; + postPatch = old.postPatch or '''' + '' + sed -i '/python-lsp-server/d' requirements.txt + ''; }); rope = pylsp-rope.overridePythonAttrs (old: { - postPatch = - old.postPatch or '''' - + '' - sed -i '/python-lsp-server/d' setup.cfg - ''; + postPatch = old.postPatch or '''' + '' + sed -i '/python-lsp-server/d' setup.cfg + ''; }); ruff = python-lsp-ruff.overridePythonAttrs (old: { - postPatch = - old.postPatch or '''' - + '' - sed -i '/python-lsp-server/d' pyproject.toml - ''; + postPatch = old.postPatch or '''' + '' + sed -i '/python-lsp-server/d' pyproject.toml + ''; build-system = [ setuptools ] ++ (old.build-system or [ ]); }); diff --git a/tests/lsp-servers.nix b/tests/lsp-servers.nix index ae238d4c..4cd00d97 100644 --- a/tests/lsp-servers.nix +++ b/tests/lsp-servers.nix @@ -38,27 +38,26 @@ let let inherit (pkgs.stdenv) hostPlatform; - disabled = - [ - # DEPRECATED SERVERS - # See https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig.lua - "ruff_lsp" - "bufls" - "typst_lsp" - ] - ++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [ - # TODO: 2025-04-20 build failure (swift-corelibs-xctest) - "sourcekit" + disabled = [ + # DEPRECATED SERVERS + # See https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig.lua + "ruff_lsp" + "bufls" + "typst_lsp" + ] + ++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [ + # TODO: 2025-04-20 build failure (swift-corelibs-xctest) + "sourcekit" - # pkgs.vectorcode is not available on this platform - "vectorcode_server" + # pkgs.vectorcode is not available on this platform + "vectorcode_server" - # TODO: 2024-10-05 build failure - "fstar" + # TODO: 2024-10-05 build failure + "fstar" - # TODO: 2025-03-04 marked as broken - "nickel_ls" - ]; + # TODO: 2025-03-04 marked as broken + "nickel_ls" + ]; in { inherit _file; diff --git a/tests/test-sources/plugins/by-name/efmls-configs/default.nix b/tests/test-sources/plugins/by-name/efmls-configs/default.nix index 80770629..12917d8b 100644 --- a/tests/test-sources/plugins/by-name/efmls-configs/default.nix +++ b/tests/test-sources/plugins/by-name/efmls-configs/default.nix @@ -22,81 +22,79 @@ "_module" ]; - brokenTools = - [ - #TODO Added 2025-04-01 - # php-cs-fixer is marked as broken - "php_cs_fixer" - # TODO: Added 2025-04-19 broken dependency - "phan" - "php" - "phpcbf" - "phpcs" - "phpstan" - "psalm" - ] - ++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [ - # TODO: 2025-04-20 build failure (swift-corelibs-xctest) - "swiftformat" - ] - ++ lib.optionals hostPlatform.isDarwin [ - # As of 2024-01-04, texliveMedium is broken on darwin - # TODO: re-enable those tests when fixed - "chktex" - "latexindent" + brokenTools = [ + #TODO Added 2025-04-01 + # php-cs-fixer is marked as broken + "php_cs_fixer" + # TODO: Added 2025-04-19 broken dependency + "phan" + "php" + "phpcbf" + "phpcs" + "phpstan" + "psalm" + ] + ++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [ + # TODO: 2025-04-20 build failure (swift-corelibs-xctest) + "swiftformat" + ] + ++ lib.optionals hostPlatform.isDarwin [ + # As of 2024-01-04, texliveMedium is broken on darwin + # TODO: re-enable those tests when fixed + "chktex" + "latexindent" - # TODO 2025-04-20 build failure - "ansible_lint" - ] - ++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isAarch64) [ - # As of 2025-03-18, several python311Packages.* dependencies of bashate fail on aarch64-darwin - # TODO: re-enable this test when fixed - "bashate" - ] - ++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isx86_64) [ - # As of 2024-07-31, dmd is broken on x86_64-darwin - # https://github.com/NixOS/nixpkgs/pull/331373 - # TODO: re-enable this test when fixed - "dmd" - ]; + # TODO 2025-04-20 build failure + "ansible_lint" + ] + ++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isAarch64) [ + # As of 2025-03-18, several python311Packages.* dependencies of bashate fail on aarch64-darwin + # TODO: re-enable this test when fixed + "bashate" + ] + ++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isx86_64) [ + # As of 2024-07-31, dmd is broken on x86_64-darwin + # https://github.com/NixOS/nixpkgs/pull/331373 + # TODO: re-enable this test when fixed + "dmd" + ]; # TODO: respect unpackaged from generated - unpackaged = - [ - "blade_formatter" - "cljstyle" - "cspell" - "dartanalyzer" - "debride" - "deno_fmt" - "fecs" - "fixjson" - "forge_fmt" - "gersemi" - "gleam_format" - "js_standard" - "kdlfmt" - "markuplint" - "mix" - "pint" - "prettier_eslint" - "prettier_standard" - "redpen" - "reek" - "rome" - "ruff_sort" - "slim_lint" - "solhint" - "sorbet" - "swiftformat" - "swiftlint" - "xo" - ] - ++ lib.optionals pkgs.stdenv.isDarwin [ "clazy" ] - ++ lib.optionals pkgs.stdenv.isAarch64 [ - "dmd" - "smlfmt" - ]; + unpackaged = [ + "blade_formatter" + "cljstyle" + "cspell" + "dartanalyzer" + "debride" + "deno_fmt" + "fecs" + "fixjson" + "forge_fmt" + "gersemi" + "gleam_format" + "js_standard" + "kdlfmt" + "markuplint" + "mix" + "pint" + "prettier_eslint" + "prettier_standard" + "redpen" + "reek" + "rome" + "ruff_sort" + "slim_lint" + "solhint" + "sorbet" + "swiftformat" + "swiftlint" + "xo" + ] + ++ lib.optionals pkgs.stdenv.isDarwin [ "clazy" ] + ++ lib.optionals pkgs.stdenv.isAarch64 [ + "dmd" + "smlfmt" + ]; # Fetch the valid enum members from the tool options toolsFromOptions = diff --git a/tests/test-sources/plugins/by-name/none-ls/default.nix b/tests/test-sources/plugins/by-name/none-ls/default.nix index 475a4dab..efbe52bd 100644 --- a/tests/test-sources/plugins/by-name/none-ls/default.nix +++ b/tests/test-sources/plugins/by-name/none-ls/default.nix @@ -105,27 +105,26 @@ sources = let - disabled = - [ - #TODO Added 2025-04-01 - # php-cs-fixer is marked as broken - "phpcsfixer" - ] - ++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [ - # Not available on aarch64-linux - "smlfmt" + disabled = [ + #TODO Added 2025-04-01 + # php-cs-fixer is marked as broken + "phpcsfixer" + ] + ++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [ + # Not available on aarch64-linux + "smlfmt" - # TODO: 2025-04-20 build failure (swift-corelibs-xctest) - "swift_format" + # TODO: 2025-04-20 build failure (swift-corelibs-xctest) + "swift_format" - # TODO: 2025-04-20 build failure (open-policy-agent) - "opacheck" - "rego" - ] - ++ lib.optionals hostPlatform.isDarwin [ - # TODO 2025-04-20 build failure - "ansiblelint" - ]; + # TODO: 2025-04-20 build failure (open-policy-agent) + "opacheck" + "rego" + ] + ++ lib.optionals hostPlatform.isDarwin [ + # TODO 2025-04-20 build failure + "ansiblelint" + ]; in # Enable every none-ls source that has an option lib.mapAttrs ( diff --git a/tests/test-sources/plugins/cmp/all-sources.nix b/tests/test-sources/plugins/cmp/all-sources.nix index c74afb86..b7f7202a 100644 --- a/tests/test-sources/plugins/cmp/all-sources.nix +++ b/tests/test-sources/plugins/cmp/all-sources.nix @@ -20,22 +20,21 @@ let inherit (pkgs.stdenv) hostPlatform; - disabledSources = - [ - # We do not provide the required HF_API_KEY environment variable. - "cmp_ai" - # Triggers the warning complaining about treesitter highlighting being disabled - "otter" - # Invokes the `nix` command at startup which is not available in the sandbox - "nixpkgs_maintainers" - # Needs internet access to download `sm-agent` - "supermaven" - # Sometimes get auth error - "codeium" - ] - ++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [ - "cmp_tabnine" - ]; + disabledSources = [ + # We do not provide the required HF_API_KEY environment variable. + "cmp_ai" + # Triggers the warning complaining about treesitter highlighting being disabled + "otter" + # Invokes the `nix` command at startup which is not available in the sandbox + "nixpkgs_maintainers" + # Needs internet access to download `sm-agent` + "supermaven" + # Sometimes get auth error + "codeium" + ] + ++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [ + "cmp_tabnine" + ]; in pipe config.cmpSourcePlugins [ # All known source names