mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
misc: refactor imports, prefer adding helpers
to args rather than importing it
This commit is contained in:
parent
541b694873
commit
b6724702b4
160 changed files with 697 additions and 736 deletions
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.clangd-extensions;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
|
||||
basePluginPath = ["plugins" "clangd-extensions"];
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
helpers,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.plugins.julia-cell;
|
||||
helpers = import ../../helpers.nix {inherit lib;};
|
||||
|
||||
# The keys are the option name in nixvim (under plugins.julia-cell.keymaps)
|
||||
# cmd: Such that the mapping action is ':JuliaCell${cmd}<CR>'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
with lib;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.markdown-preview;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in {
|
||||
options = {
|
||||
plugins.markdown-preview = {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.nvim-jdtls;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in {
|
||||
options.plugins.nvim-jdtls =
|
||||
helpers.extraOptionsOptions
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib; let
|
||||
defaultFuzzyFinder = "skim";
|
||||
helpers = import ../helpers.nix args;
|
||||
in {
|
||||
options.plugins.openscad = {
|
||||
enable = mkEnableOption "openscad.nvim, a plugin to manage OpenSCAD files";
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in {
|
||||
with lib; {
|
||||
options.plugins.plantuml-syntax = {
|
||||
enable = mkEnableOption "plantuml syntax support";
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.rust-tools;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in {
|
||||
options.plugins.rust-tools =
|
||||
helpers.extraOptionsOptions
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.sniprun;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
|
||||
mkList = helpers.defaultNullOpts.mkNullable (types.listOf types.str);
|
||||
in {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.plugins.tagbar;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with lib; {
|
||||
options.plugins.tagbar = {
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
helpers = import ../../helpers.nix {inherit lib;};
|
||||
in {
|
||||
with lib; {
|
||||
# TODO those warnings have been added XX/XX/2023
|
||||
# -> Remove them in ~ 1 month (oct. 2023)
|
||||
imports =
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.treesitter-context;
|
||||
helpers = import ../../helpers.nix {inherit lib;};
|
||||
in {
|
||||
# Those warnings were introduced on 08/25/2023. TODO: remove them in October 2023.
|
||||
imports = let
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
helpers = import ../../helpers.nix {inherit lib;};
|
||||
in {
|
||||
with lib; {
|
||||
options.plugins.treesitter-refactor = let
|
||||
disable = mkOption {
|
||||
type = types.listOf types.str;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.treesitter;
|
||||
helpers = import ../../helpers.nix {inherit lib;};
|
||||
in {
|
||||
options = {
|
||||
plugins.treesitter = {
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
helpers = import ../../helpers.nix {inherit lib;};
|
||||
in {
|
||||
with lib; {
|
||||
options.plugins.ts-context-commentstring =
|
||||
helpers.extraOptionsOptions
|
||||
// {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.typst-vim;
|
||||
helpers = import ../../helpers.nix {inherit lib;};
|
||||
in {
|
||||
options.plugins.typst-vim =
|
||||
helpers.extraOptionsOptions
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.plugins.vim-slime;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with lib; {
|
||||
options.plugins.vim-slime = {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.plugins.vimtex;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with lib; {
|
||||
options.plugins.vimtex = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue