Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions flake-modules/updates/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,26 @@
repo_root=$(git rev-parse --show-toplevel)
generated_dir=$repo_root/generated

# Rust-Analyzer
echo "Rust-Analyzer"
nix build .#rust-analyzer-options
cat ./result >"$generated_dir"/rust-analyzer.nix

# efmls-configs
echo "efmls-configs"
nix build .#efmls-configs-sources
cat ./result >"$generated_dir"/efmls-configs.nix

echo "none-ls"
nix build .#none-ls-builtins
cat ./result >"$generated_dir"/none-ls.nix

nix fmt
'';
};

packages = {
rust-analyzer-options = pkgs.callPackage ./rust-analyzer.nix { };
efmls-configs-sources = pkgs.callPackage ./efmls-configs.nix { };
none-ls-builtins = pkgs.callPackage ./none-ls.nix { };
};
};
}
32 changes: 32 additions & 0 deletions flake-modules/updates/none-ls.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
vimPlugins,
lib,
writeText,
pkgs,
}:
let
inherit (import ../../plugins/none-ls/packages.nix pkgs) packaged noPackage unpackaged;

builtinSources = lib.trivial.importJSON "${vimPlugins.none-ls-nvim.src}/doc/builtins.json";

builtinSourceNames = lib.mapAttrs (_: lib.attrNames) builtinSources;

toolNames = lib.unique (lib.flatten (lib.attrValues builtinSourceNames));

undeclaredTool = lib.filter (
name: !(lib.hasAttr name packaged || lib.elem name noPackage || lib.elem name unpackaged)
) toolNames;

uselesslyDeclaredTool = lib.filter (name: !(lib.elem name toolNames)) (
unpackaged ++ noPackage ++ (lib.attrNames packaged)
);
in
assert lib.assertMsg (lib.length undeclaredTool == 0)
"Undeclared tools: ${lib.generators.toPretty { } undeclaredTool}";
assert lib.assertMsg (lib.length uselesslyDeclaredTool == 0)
"Tool is not supported upstream: ${lib.generators.toPretty { } uselesslyDeclaredTool}";
writeText "efmls-configs-sources.nix" (
"# WARNING: DO NOT EDIT\n"
+ "# This file is generated with packages.<system>.none-ls-builtins, which is run automatically by CI\n"
+ (lib.generators.toPretty { } builtinSourceNames)
Comment on lines +24 to +31
Copy link
Member

@MattSturgeon MattSturgeon Jul 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to have these assertions out of the module eval! 😁

)
237 changes: 237 additions & 0 deletions generated/none-ls.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
# WARNING: DO NOT EDIT
# This file is generated with packages.<system>.none-ls-builtins, which is run automatically by CI
{
code_actions = [
"gitrebase"
"gitsigns"
"gomodifytags"
"impl"
"proselint"
"refactoring"
"statix"
"ts_node_action"
];
completion = [
"luasnip"
"spell"
"tags"
"vsnip"
];
diagnostics = [
"actionlint"
"alex"
"ansiblelint"
"bean_check"
"bslint"
"buf"
"buildifier"
"cfn_lint"
"checkmake"
"checkstyle"
"clazy"
"clj_kondo"
"cmake_lint"
"codespell"
"commitlint"
"cppcheck"
"credo"
"cue_fmt"
"deadnix"
"djlint"
"dotenv_linter"
"editorconfig_checker"
"erb_lint"
"fish"
"gccdiag"
"gdlint"
"gitlint"
"glslc"
"golangci_lint"
"hadolint"
"haml_lint"
"ktlint"
"ltrs"
"markdownlint"
"markdownlint_cli2"
"markuplint"
"mdl"
"mlint"
"mypy"
"npm_groovy_lint"
"opacheck"
"perlimports"
"phpcs"
"phpmd"
"phpstan"
"pmd"
"proselint"
"protolint"
"puppet_lint"
"pylint"
"qmllint"
"reek"
"regal"
"revive"
"rpmspec"
"rstcheck"
"rubocop"
"saltlint"
"selene"
"semgrep"
"solhint"
"spectral"
"sqlfluff"
"staticcheck"
"statix"
"stylelint"
"stylint"
"swiftlint"
"teal"
"terraform_validate"
"textidote"
"textlint"
"tfsec"
"tidy"
"todo_comments"
"trail_space"
"trivy"
"twigcs"
"vacuum"
"vale"
"verilator"
"vint"
"write_good"
"yamllint"
"zsh"
];
formatting = [
"alejandra"
"asmfmt"
"astyle"
"bean_format"
"bibclean"
"biome"
"black"
"blackd"
"blade_formatter"
"bsfmt"
"buf"
"buildifier"
"cbfmt"
"clang_format"
"cljstyle"
"cmake_format"
"codespell"
"crystal_format"
"csharpier"
"cue_fmt"
"cueimports"
"d2_fmt"
"dart_format"
"dfmt"
"djhtml"
"djlint"
"dxfmt"
"elm_format"
"emacs_scheme_mode"
"emacs_vhdl_mode"
"erb_format"
"erb_lint"
"erlfmt"
"fantomas"
"findent"
"fish_indent"
"fnlfmt"
"forge_fmt"
"format_r"
"fprettify"
"gdformat"
"gersemi"
"gleam_format"
"gn_format"
"gofmt"
"gofumpt"
"goimports"
"goimports_reviser"
"golines"
"google_java_format"
"haxe_formatter"
"hclfmt"
"htmlbeautifier"
"isort"
"isortd"
"joker"
"just"
"ktlint"
"leptosfmt"
"markdownlint"
"mdformat"
"mix"
"nginx_beautifier"
"nimpretty"
"nixfmt"
"nixpkgs_fmt"
"npm_groovy_lint"
"ocamlformat"
"ocdc"
"opentofu_fmt"
"packer"
"pg_format"
"phpcbf"
"phpcsfixer"
"pint"
"prettier"
"prettierd"
"pretty_php"
"prisma_format"
"protolint"
"ptop"
"puppet_lint"
"purs_tidy"
"pyink"
"qmlformat"
"racket_fixw"
"raco_fmt"
"rego"
"remark"
"rescript"
"rubocop"
"rubyfmt"
"rufo"
"rustywind"
"scalafmt"
"shellharden"
"shfmt"
"smlfmt"
"sql_formatter"
"sqlfluff"
"sqlfmt"
"sqlformat"
"stylelint"
"styler"
"stylua"
"surface"
"swift_format"
"swiftformat"
"swiftlint"
"terraform_fmt"
"textlint"
"tidy"
"topiary"
"treefmt"
"typstfmt"
"typstyle"
"uncrustify"
"usort"
"verible_verilog_format"
"xmllint"
"yamlfix"
"yamlfmt"
"yapf"
"zprint"
];
hover = [
"dictionary"
"printenv"
];
}
Loading