nix-community.nixvim/plugins/none-ls/packages.nix
Matt Sturgeon cdb2e79e51
lib/pkg-lists: move to common location
Extract the helper functions defined in `efmls-configs-pkgs` to a common
location where they can also be used by none-ls's package list.
2024-09-04 20:29:52 +01:00

267 lines
5.6 KiB
Nix

lib:
let
inherit (import ../../lib/pkg-lists.nix lib) topLevel scoped nullAttrs;
in
{
# builtin sources that don't require a package
noPackage = [
"gitrebase"
# TODO: Requires the go tree-sitter parser
"gomodifytags"
# TODO: Requires the go tree-sitter parser
"impl"
"luasnip"
"printenv"
"refactoring"
"spell"
"tags"
"todo_comments"
"trail_space"
"ts_node_action"
"vsnip"
];
# nixpkgs packages for a given source
packaged =
# Top-level packages
topLevel [
"actionlint"
"alejandra"
"asmfmt"
"astyle"
"bibclean"
"biome"
"buf"
"cbfmt"
"checkmake"
"checkstyle"
"clazy"
"codespell"
"commitlint"
"cppcheck"
"csharpier"
"deadnix"
"dfmt"
"djhtml"
"djlint"
"erlfmt"
"fantomas"
"fish"
"fnlfmt"
"fprettify"
"gitlint"
"gofumpt"
"golines"
"hadolint"
"hclfmt"
"isort"
"joker"
"just"
"ktlint"
"leptosfmt"
"mdformat"
"mdl"
"mypy"
"pmd"
"prettierd"
"proselint"
"protolint"
"pylint"
"revive"
"rstcheck"
"rubocop"
"rubyfmt"
"rufo"
"rustywind"
"scalafmt"
"selene"
"semgrep"
"shellharden"
"shfmt"
"smlfmt"
"sqlfluff"
"statix"
"stylelint"
"stylua"
"tfsec"
"topiary"
"trivy"
"typstfmt"
"typstyle"
"uncrustify"
"usort"
"vale"
"verilator"
"yamlfix"
"yamlfmt"
"yamllint"
"yapf"
"zprint"
"zsh"
]
# Scoped packages
// scoped {
nodePackages = [
"alex"
"prettier"
];
phpPackages = [
"phpmd"
"phpstan"
];
rubyPackages = "htmlbeautifier";
ocamlPackages = "ocamlformat";
}
# Packages where the name is different
// {
ansiblelint = "ansible-lint";
bean_check = "beancount";
bean_format = "beancount";
black = [
"python3"
"pkgs"
"black"
];
blackd = "black";
buildifier = "bazel-buildtools";
cfn_lint = "python3.pkgs.cfn-lint";
clang_format = "clang-tools";
clj_kondo = "clj-kondo";
cmake_format = "cmake-format";
cmake_lint = "cmake-format";
credo = "elixir";
crystal_format = "crystal";
cue_fmt = "cue";
d2_fmt = "d2";
dart_format = "dart";
dictionary = "curl";
dotenv_linter = "dotenv-linter";
dxfmt = "dioxus-cli";
editorconfig_checker = "editorconfig-checker";
elm_format = [
"elmPackages"
"elm-format"
];
emacs_scheme_mode = "emacs";
emacs_vhdl_mode = "emacs";
erb_format = [
"rubyPackages"
"erb-formatterpkgs"
];
fish_indent = "fish";
format_r = "R";
# FIXME: Can't have transition fallbacks anymore
gdformat = "gdtoolkit_4";
gdlint = "gdtoolkit_4";
gitsigns = "git";
gleam_format = "gleam";
glslc = "shaderc";
gn_format = "gn";
gofmt = "go";
goimports = "gotools";
goimports_reviser = "goimports-reviser";
golangci_lint = "golangci-lint";
google_java_format = "google-java-format";
haml_lint = "mastodon";
haxe_formatter = "haxe";
isortd = "isort";
ltrs = "languagetool-rust";
markdownlint_cli2 = "markdownlint-cli2";
markdownlint = "markdownlint-cli";
mix = "elixir";
nimpretty = "nim";
nixfmt = "nixfmt-classic";
nixpkgs_fmt = "nixpkgs-fmt";
opacheck = "open-policy-agent";
opentofu_fmt = "opentofu";
pg_format = "pgformatter";
phpcbf = [
"phpPackages"
"php-codesnifferpkgs"
];
phpcsfixer = [
"phpPackages"
"php-cs-fixerpkgs"
];
phpcs = [
"phpPackages"
"php-codesnifferpkgs"
];
# FIXME: Can't have transition fallbacks anymore
prisma_format = "prisma";
ptop = "fpc";
puppet_lint = "puppet-lint";
qmlformat = [
"qt6"
"qtdeclarativepkgs"
];
qmllint = [
"qt6"
"qtdeclarativepkgs"
];
racket_fixw = "racket";
raco_fmt = "racket";
rego = "open-policy-agent";
rpmspec = "rpm";
sqlformat = [
"python3"
"pkgs"
"sqlparse"
];
staticcheck = "go-tools";
surface = "elixir";
swift_format = "swift-format";
teal = "luaPackages.tl";
terraform_fmt = "terraform";
terraform_validate = "terraform";
terragrunt_fmt = "terragrunt";
terragrunt_validate = "terragrunt";
tidy = "html-tidy";
treefmt = "treefmt2";
verible_verilog_format = "verible";
vint = "vim-vint";
write_good = "write-good";
xmllint = "libxml2";
}
# builtin sources that are not packaged in nixpkgs
// nullAttrs [
"blade_formatter"
"bsfmt"
"bslint"
"cljstyle"
"cueimports"
"erb_lint"
"findent"
"forge_fmt"
"gccdiag"
"gersemi"
"markuplint"
"mlint"
"nginx_beautifier"
"npm_groovy_lint"
"ocdc"
"packer"
"perlimports"
"pint"
"pretty_php"
"purs_tidy"
"pyink"
"reek"
"regal"
"remark"
"rescript"
"saltlint"
"solhint"
"spectral"
"sqlfmt"
"sql_formatter"
"styler"
"stylint"
"swiftformat"
"swiftlint"
"textidote"
"textlint"
"twigcs"
"vacuum"
];
}