├── LICENSE ├── ale_linters ├── ada │ ├── adals.vim │ ├── cspell.vim │ └── gcc.vim ├── ansible │ ├── ansible_lint.vim │ └── language_server.vim ├── apiblueprint │ └── drafter.vim ├── apkbuild │ ├── apkbuild_lint.vim │ └── secfixes_check.vim ├── asciidoc │ ├── alex.vim │ ├── cspell.vim │ ├── languagetool.vim │ ├── proselint.vim │ ├── redpen.vim │ ├── textlint.vim │ ├── vale.vim │ └── writegood.vim ├── asm │ ├── gcc.vim │ └── llvm_mc.vim ├── astro │ └── eslint.vim ├── avra │ └── avra.vim ├── awk │ └── gawk.vim ├── bats │ └── shellcheck.vim ├── bib │ └── bibclean.vim ├── bicep │ ├── az_bicep.vim │ └── bicep.vim ├── bindzone │ └── checkzone.vim ├── bitbake │ └── oelint_adv.vim ├── bzl │ └── buildifier.vim ├── c │ ├── cc.vim │ ├── ccls.vim │ ├── clangcheck.vim │ ├── clangd.vim │ ├── clangtidy.vim │ ├── cppcheck.vim │ ├── cpplint.vim │ ├── cquery.vim │ ├── cspell.vim │ └── flawfinder.vim ├── c3 │ └── c3lsp.vim ├── cairo │ ├── scarb.vim │ ├── sierra.vim │ └── starknet.vim ├── chef │ ├── cookstyle.vim │ └── foodcritic.vim ├── clojure │ ├── clj_kondo.vim │ └── joker.vim ├── cloudformation │ └── cfn_python_lint.vim ├── cmake │ ├── cmake_lint.vim │ └── cmakelint.vim ├── coffee │ ├── coffee.vim │ └── coffeelint.vim ├── cpp │ ├── cc.vim │ ├── ccls.vim │ ├── clangcheck.vim │ ├── clangd.vim │ ├── clangtidy.vim │ ├── clazy.vim │ ├── cppcheck.vim │ ├── cpplint.vim │ ├── cquery.vim │ ├── cspell.vim │ └── flawfinder.vim ├── crystal │ ├── ameba.vim │ └── crystal.vim ├── cs │ ├── csc.vim │ ├── cspell.vim │ ├── mcs.vim │ └── mcsc.vim ├── css │ ├── cspell.vim │ ├── csslint.vim │ ├── fecs.vim │ ├── stylelint.vim │ └── vscodecss.vim ├── cucumber │ └── cucumber.vim ├── cuda │ ├── clangd.vim │ └── nvcc.vim ├── cypher │ └── cypher_lint.vim ├── d │ ├── dls.vim │ └── dmd.vim ├── dafny │ └── dafny.vim ├── dart │ ├── analysis_server.vim │ ├── dart_analyze.vim │ └── language_server.vim ├── desktop │ └── desktop_file_validate.vim ├── dockerfile │ ├── dockerfile_lint.vim │ ├── dockerlinter.vim │ └── hadolint.vim ├── elixir │ ├── credo.vim │ ├── cspell.vim │ ├── dialyxir.vim │ ├── dogma.vim │ ├── elixir_ls.vim │ ├── lexical.vim │ └── mix.vim ├── elm │ ├── ls.vim │ └── make.vim ├── erlang │ ├── dialyzer.vim │ ├── elvis.vim │ ├── erlang_ls.vim │ ├── erlc.vim │ └── syntaxerl.vim ├── eruby │ ├── erb.vim │ ├── erblint.vim │ ├── erubi.vim │ ├── erubis.vim │ └── ruumba.vim ├── fish │ └── fish.vim ├── fortran │ ├── gcc.vim │ └── language_server.vim ├── fountain │ └── proselint.vim ├── fuse │ └── fusionlint.vim ├── gitcommit │ └── gitlint.vim ├── gleam │ └── gleamlsp.vim ├── glimmer │ └── embertemplatelint.vim ├── glsl │ ├── glslang.vim │ └── glslls.vim ├── go │ ├── bingo.vim │ ├── cspell.vim │ ├── gobuild.vim │ ├── gofmt.vim │ ├── golangci_lint.vim │ ├── gopls.vim │ ├── gosimple.vim │ ├── gotype.vim │ ├── govet.vim │ ├── langserver.vim │ ├── revive.vim │ └── staticcheck.vim ├── gohtmltmpl │ └── djlint.vim ├── graphql │ ├── eslint.vim │ └── gqlint.vim ├── groovy │ └── npmgroovylint.vim ├── hack │ ├── hack.vim │ └── hhast.vim ├── haml │ └── hamllint.vim ├── handlebars │ ├── djlint.vim │ └── embertemplatelint.vim ├── haskell │ ├── cabal_ghc.vim │ ├── cspell.vim │ ├── ghc.vim │ ├── ghc_mod.vim │ ├── hdevtools.vim │ ├── hie.vim │ ├── hlint.vim │ ├── hls.vim │ ├── stack_build.vim │ └── stack_ghc.vim ├── help │ ├── alex.vim │ ├── cspell.vim │ ├── proselint.vim │ └── writegood.vim ├── html │ ├── alex.vim │ ├── angular.vim │ ├── cspell.vim │ ├── djlint.vim │ ├── eslint.vim │ ├── fecs.vim │ ├── htmlhint.vim │ ├── proselint.vim │ ├── stylelint.vim │ ├── tidy.vim │ ├── vscodehtml.vim │ └── writegood.vim ├── htmlangular │ └── djlint.vim ├── htmldjango │ └── djlint.vim ├── hurl │ └── hurlfmt.vim ├── idris │ └── idris.vim ├── ink │ └── ls.vim ├── inko │ └── inko.vim ├── ispc │ └── ispc.vim ├── java │ ├── checkstyle.vim │ ├── cspell.vim │ ├── eclipselsp.vim │ ├── javac.vim │ ├── javalsp.vim │ └── pmd.vim ├── javascript │ ├── biome.vim │ ├── cspell.vim │ ├── deno.vim │ ├── eslint.vim │ ├── fecs.vim │ ├── flow.vim │ ├── flow_ls.vim │ ├── jscs.vim │ ├── jshint.vim │ ├── standard.vim │ ├── tsserver.vim │ └── xo.vim ├── jinja │ └── djlint.vim ├── json │ ├── biome.vim │ ├── cspell.vim │ ├── eslint.vim │ ├── jq.vim │ ├── jsonlint.vim │ ├── spectral.vim │ └── vscodejson.vim ├── json5 │ └── eslint.vim ├── jsonc │ ├── biome.vim │ └── eslint.vim ├── jsonnet │ ├── jsonnet_lint.vim │ └── jsonnetfmt.vim ├── julia │ └── languageserver.vim ├── kotlin │ ├── kotlinc.vim │ ├── ktlint.vim │ └── languageserver.vim ├── lean │ └── lake.vim ├── less │ ├── lessc.vim │ └── stylelint.vim ├── llvm │ └── llc.vim ├── lua │ ├── cspell.vim │ ├── lua_language_server.vim │ ├── luac.vim │ ├── luacheck.vim │ └── selene.vim ├── mail │ ├── alex.vim │ ├── languagetool.vim │ ├── proselint.vim │ └── vale.vim ├── make │ └── checkmake.vim ├── markdown │ ├── alex.vim │ ├── cspell.vim │ ├── languagetool.vim │ ├── markdownlint.vim │ ├── marksman.vim │ ├── mdl.vim │ ├── proselint.vim │ ├── pymarkdown.vim │ ├── redpen.vim │ ├── remark_lint.vim │ ├── textlint.vim │ ├── vale.vim │ └── writegood.vim ├── matlab │ └── mlint.vim ├── mercury │ └── mmc.vim ├── nasm │ └── nasm.vim ├── nim │ ├── nimcheck.vim │ └── nimlsp.vim ├── nix │ ├── deadnix.vim │ ├── nix.vim │ ├── rnix_lsp.vim │ └── statix.vim ├── nroff │ ├── alex.vim │ ├── proselint.vim │ └── writegood.vim ├── nunjucks │ └── djlint.vim ├── objc │ ├── ccls.vim │ ├── clang.vim │ └── clangd.vim ├── objcpp │ ├── clang.vim │ └── clangd.vim ├── ocaml │ ├── merlin.vim │ ├── ocamllsp.vim │ └── ols.vim ├── ocamlinterface │ ├── merlin.vim │ └── ocamllsp.vim ├── odin │ └── ols.vim ├── openapi │ ├── ibm_validator.vim │ └── yamllint.vim ├── openscad │ └── sca2d.vim ├── perl │ ├── perl.vim │ └── perlcritic.vim ├── perl6 │ └── perl6.vim ├── php │ ├── cspell.vim │ ├── intelephense.vim │ ├── langserver.vim │ ├── phan.vim │ ├── php.vim │ ├── phpactor.vim │ ├── phpcs.vim │ ├── phpmd.vim │ ├── phpstan.vim │ ├── psalm.vim │ └── tlint.vim ├── po │ ├── alex.vim │ ├── msgfmt.vim │ ├── proselint.vim │ └── writegood.vim ├── pod │ ├── alex.vim │ ├── proselint.vim │ └── writegood.vim ├── pony │ └── ponyc.vim ├── powershell │ ├── cspell.vim │ ├── powershell.vim │ └── psscriptanalyzer.vim ├── prolog │ └── swipl.vim ├── proto │ ├── buf_lint.vim │ ├── protoc_gen_lint.vim │ └── protolint.vim ├── pug │ └── puglint.vim ├── puppet │ ├── languageserver.vim │ ├── puppet.vim │ └── puppetlint.vim ├── purescript │ └── ls.vim ├── pyrex │ └── cython.vim ├── python │ ├── bandit.vim │ ├── cspell.vim │ ├── flake8.vim │ ├── flakehell.vim │ ├── jedils.vim │ ├── mypy.vim │ ├── prospector.vim │ ├── pycln.vim │ ├── pycodestyle.vim │ ├── pydocstyle.vim │ ├── pyflakes.vim │ ├── pylama.vim │ ├── pylint.vim │ ├── pylsp.vim │ ├── pyre.vim │ ├── pyrefly.vim │ ├── pyright.vim │ ├── refurb.vim │ ├── ruff.vim │ ├── unimport.vim │ └── vulture.vim ├── qml │ ├── qmlfmt.vim │ └── qmllint.vim ├── r │ ├── languageserver.vim │ └── lintr.vim ├── racket │ ├── langserver.vim │ └── raco.vim ├── reason │ ├── ls.vim │ ├── merlin.vim │ └── ols.vim ├── rego │ ├── cspell.vim │ └── opacheck.vim ├── review │ └── redpen.vim ├── robot │ └── rflint.vim ├── roc │ └── roc_language_server.vim ├── rst │ ├── alex.vim │ ├── cspell.vim │ ├── proselint.vim │ ├── redpen.vim │ ├── rstcheck.vim │ ├── textlint.vim │ ├── vale.vim │ └── writegood.vim ├── ruby │ ├── brakeman.vim │ ├── cspell.vim │ ├── debride.vim │ ├── packwerk.vim │ ├── rails_best_practices.vim │ ├── reek.vim │ ├── rubocop.vim │ ├── ruby.vim │ ├── solargraph.vim │ ├── sorbet.vim │ ├── standardrb.vim │ └── steep.vim ├── rust │ ├── analyzer.vim │ ├── cargo.vim │ ├── cspell.vim │ ├── rls.vim │ └── rustc.vim ├── salt │ └── salt_lint.vim ├── sass │ ├── sasslint.vim │ └── stylelint.vim ├── scala │ ├── cspell.vim │ ├── fsc.vim │ ├── metals.vim │ ├── sbtserver.vim │ ├── scalac.vim │ └── scalastyle.vim ├── scss │ ├── sasslint.vim │ ├── scsslint.vim │ └── stylelint.vim ├── sh │ ├── bashate.vim │ ├── cspell.vim │ ├── language_server.vim │ ├── shell.vim │ └── shellcheck.vim ├── slim │ └── slimlint.vim ├── sml │ ├── smlnj.vim │ └── smlnj_cm.vim ├── solidity │ ├── solc.vim │ ├── solhint.vim │ └── solium.vim ├── spec │ └── rpmlint.vim ├── sql │ ├── sqlfluff.vim │ ├── sqlint.vim │ └── sqllint.vim ├── stylus │ └── stylelint.vim ├── sugarss │ └── stylelint.vim ├── svelte │ └── svelteserver.vim ├── swift │ ├── appleswiftformat.vim │ ├── cspell.vim │ ├── sourcekitlsp.vim │ └── swiftlint.vim ├── systemd │ └── systemd_analyze.vim ├── tcl │ └── nagelfar.vim ├── terraform │ ├── checkov.vim │ ├── terraform.vim │ ├── terraform_ls.vim │ ├── terraform_lsp.vim │ ├── tflint.vim │ └── tfsec.vim ├── testft │ └── testlinter.vim ├── tex │ ├── alex.vim │ ├── chktex.vim │ ├── cspell.vim │ ├── lacheck.vim │ ├── proselint.vim │ ├── redpen.vim │ ├── texlab.vim │ ├── textlint.vim │ ├── vale.vim │ └── writegood.vim ├── texinfo │ ├── alex.vim │ ├── cspell.vim │ ├── proselint.vim │ └── writegood.vim ├── text │ ├── alex.vim │ ├── cspell.vim │ ├── languagetool.vim │ ├── proselint.vim │ ├── redpen.vim │ ├── textlint.vim │ ├── vale.vim │ └── writegood.vim ├── thrift │ ├── thrift.vim │ └── thriftcheck.vim ├── typescript │ ├── biome.vim │ ├── cspell.vim │ ├── deno.vim │ ├── eslint.vim │ ├── standard.vim │ ├── tslint.vim │ ├── tsserver.vim │ ├── typecheck.vim │ └── xo.vim ├── v │ └── v.vim ├── vala │ └── vala_lint.vim ├── verilog │ ├── hdl_checker.vim │ ├── iverilog.vim │ ├── slang.vim │ ├── verilator.vim │ ├── vlog.vim │ ├── xvlog.vim │ └── yosys.vim ├── vhdl │ ├── ghdl.vim │ ├── hdl_checker.vim │ ├── vcom.vim │ └── xvhdl.vim ├── vim │ ├── ale_custom_linting_rules.vim │ ├── vimls.vim │ └── vint.vim ├── vue │ ├── cspell.vim │ ├── vls.vim │ └── volar.vim ├── wgsl │ └── naga.vim ├── xhtml │ ├── alex.vim │ ├── cspell.vim │ ├── proselint.vim │ └── writegood.vim ├── xml │ └── xmllint.vim ├── yaml │ ├── actionlint.vim │ ├── circleci.vim │ ├── gitlablint.vim │ ├── ls.vim │ ├── spectral.vim │ ├── swaglint.vim │ ├── yamllint.vim │ └── yq.vim ├── yang │ └── yang_lsp.vim ├── yara │ └── yls.vim ├── zeek │ └── zeek.vim └── zig │ ├── zlint.vim │ └── zls.vim ├── autoload ├── ale.vim ├── ale │ ├── ant.vim │ ├── args.vim │ ├── assert.vim │ ├── balloon.vim │ ├── c.vim │ ├── code_action.vim │ ├── codefix.vim │ ├── command.vim │ ├── completion.vim │ ├── completion │ │ └── python.vim │ ├── cursor.vim │ ├── d.vim │ ├── debugging.vim │ ├── definition.vim │ ├── dhall.vim │ ├── engine.vim │ ├── engine │ │ └── ignore.vim │ ├── events.vim │ ├── filename_mapping.vim │ ├── filerename.vim │ ├── filetypes.vim │ ├── fix.vim │ ├── fix │ │ └── registry.vim │ ├── fixers │ │ ├── alejandra.vim │ │ ├── apkbuild_fixer.vim │ │ ├── appleswiftformat.vim │ │ ├── astyle.vim │ │ ├── autoflake.vim │ │ ├── autoimport.vim │ │ ├── autopep8.vim │ │ ├── bibclean.vim │ │ ├── biome.vim │ │ ├── black.vim │ │ ├── brittany.vim │ │ ├── buf_format.vim │ │ ├── buildifier.vim │ │ ├── clangformat.vim │ │ ├── clangtidy.vim │ │ ├── cljfmt.vim │ │ ├── cmakeformat.vim │ │ ├── crystal.vim │ │ ├── css_beautify.vim │ │ ├── dart_format.vim │ │ ├── dartfmt.vim │ │ ├── deno.vim │ │ ├── dfmt.vim │ │ ├── dhall_format.vim │ │ ├── dhall_freeze.vim │ │ ├── dhall_lint.vim │ │ ├── djlint.vim │ │ ├── dotnet_format.vim │ │ ├── dprint.vim │ │ ├── dune.vim │ │ ├── elm_format.vim │ │ ├── erbformatter.vim │ │ ├── erblint.vim │ │ ├── erlang_mode.vim │ │ ├── erlfmt.vim │ │ ├── eslint.vim │ │ ├── fecs.vim │ │ ├── fish_indent.vim │ │ ├── fixjson.vim │ │ ├── floskell.vim │ │ ├── forge.vim │ │ ├── fourmolu.vim │ │ ├── generic.vim │ │ ├── generic_python.vim │ │ ├── gleam_format.vim │ │ ├── gnatpp.vim │ │ ├── gofmt.vim │ │ ├── gofumpt.vim │ │ ├── goimports.vim │ │ ├── golangci_lint.vim │ │ ├── golines.vim │ │ ├── gomod.vim │ │ ├── google_java_format.vim │ │ ├── gopls.vim │ │ ├── hackfmt.vim │ │ ├── help.vim │ │ ├── hfmt.vim │ │ ├── hindent.vim │ │ ├── hlint.vim │ │ ├── html_beautify.vim │ │ ├── htmlbeautifier.vim │ │ ├── hurlfmt.vim │ │ ├── importjs.vim │ │ ├── isort.vim │ │ ├── jq.vim │ │ ├── json_pytool.vim │ │ ├── jsonnetfmt.vim │ │ ├── ktlint.vim │ │ ├── kulala_fmt.vim │ │ ├── latexindent.vim │ │ ├── lua_format.vim │ │ ├── luafmt.vim │ │ ├── mix_format.vim │ │ ├── nickel_format.vim │ │ ├── nimpretty.vim │ │ ├── nixfmt.vim │ │ ├── nixpkgsfmt.vim │ │ ├── npmgroovylint.vim │ │ ├── ocamlformat.vim │ │ ├── ocp_indent.vim │ │ ├── opafmt.vim │ │ ├── ormolu.vim │ │ ├── packer.vim │ │ ├── pandoc.vim │ │ ├── perltidy.vim │ │ ├── pgformatter.vim │ │ ├── php_cs_fixer.vim │ │ ├── phpcbf.vim │ │ ├── pint.vim │ │ ├── prettier.vim │ │ ├── prettier_eslint.vim │ │ ├── prettier_standard.vim │ │ ├── protolint.vim │ │ ├── ptop.vim │ │ ├── puppetlint.vim │ │ ├── purs_tidy.vim │ │ ├── purty.vim │ │ ├── pycln.vim │ │ ├── pyflyby.vim │ │ ├── qmlfmt.vim │ │ ├── raco_fmt.vim │ │ ├── refmt.vim │ │ ├── remark_lint.vim │ │ ├── reorder_python_imports.vim │ │ ├── roc_annotate.vim │ │ ├── roc_format.vim │ │ ├── rubocop.vim │ │ ├── rubyfmt.vim │ │ ├── ruff.vim │ │ ├── ruff_format.vim │ │ ├── rufo.vim │ │ ├── rustfmt.vim │ │ ├── rustywind.vim │ │ ├── scadformat.vim │ │ ├── scalafmt.vim │ │ ├── shfmt.vim │ │ ├── sorbet.vim │ │ ├── sqlfluff.vim │ │ ├── sqlfmt.vim │ │ ├── sqlformat.vim │ │ ├── standard.vim │ │ ├── standardrb.vim │ │ ├── statix.vim │ │ ├── stylelint.vim │ │ ├── styler.vim │ │ ├── stylish_haskell.vim │ │ ├── stylua.vim │ │ ├── swiftformat.vim │ │ ├── syntax_tree.vim │ │ ├── terraform.vim │ │ ├── textlint.vim │ │ ├── tidy.vim │ │ ├── tslint.vim │ │ ├── typstyle.vim │ │ ├── uncrustify.vim │ │ ├── vfmt.vim │ │ ├── xmllint.vim │ │ ├── xo.vim │ │ ├── yamlfix.vim │ │ ├── yamlfmt.vim │ │ ├── yapf.vim │ │ ├── yq.vim │ │ └── zigfmt.vim │ ├── floating_preview.vim │ ├── go.vim │ ├── gradle.vim │ ├── gradle │ │ └── init.gradle │ ├── handlers │ │ ├── alex.vim │ │ ├── atools.vim │ │ ├── biome.vim │ │ ├── c3lsp.vim │ │ ├── cairo.vim │ │ ├── ccls.vim │ │ ├── cppcheck.vim │ │ ├── cpplint.vim │ │ ├── cspell.vim │ │ ├── css.vim │ │ ├── deadnix.vim │ │ ├── deno.vim │ │ ├── djlint.vim │ │ ├── elixir.vim │ │ ├── embertemplatelint.vim │ │ ├── eslint.vim │ │ ├── fecs.vim │ │ ├── flawfinder.vim │ │ ├── gawk.vim │ │ ├── gcc.vim │ │ ├── go.vim │ │ ├── haskell.vim │ │ ├── haskell_stack.vim │ │ ├── hdl_checker.vim │ │ ├── hlint.vim │ │ ├── inko.vim │ │ ├── ktlint.vim │ │ ├── languagetool.vim │ │ ├── markdownlint.vim │ │ ├── naga.vim │ │ ├── ocamllsp.vim │ │ ├── ols.vim │ │ ├── openscad.vim │ │ ├── pony.vim │ │ ├── redpen.vim │ │ ├── ruby.vim │ │ ├── rust.vim │ │ ├── scala.vim │ │ ├── sh.vim │ │ ├── shellcheck.vim │ │ ├── sml.vim │ │ ├── spectral.vim │ │ ├── statix.vim │ │ ├── textlint.vim │ │ ├── tslint.vim │ │ ├── tsserver.vim │ │ ├── unix.vim │ │ ├── vale.vim │ │ ├── writegood.vim │ │ ├── xo.vim │ │ └── yamllint.vim │ ├── highlight.vim │ ├── history.vim │ ├── hover.vim │ ├── java.vim │ ├── job.vim │ ├── julia.vim │ ├── linter.vim │ ├── list.vim │ ├── loclist_jumping.vim │ ├── lsp.vim │ ├── lsp │ │ ├── message.vim │ │ ├── reset.vim │ │ ├── response.vim │ │ └── tsserver_message.vim │ ├── lsp_linter.vim │ ├── lsp_window.vim │ ├── lua.vim │ ├── maven.vim │ ├── node.vim │ ├── organize_imports.vim │ ├── other_source.vim │ ├── path.vim │ ├── pattern_options.vim │ ├── powershell.vim │ ├── preview.vim │ ├── python.vim │ ├── racket.vim │ ├── references.vim │ ├── rename.vim │ ├── ruby.vim │ ├── semver.vim │ ├── sign.vim │ ├── socket.vim │ ├── statusline.vim │ ├── swift.vim │ ├── symbol.vim │ ├── test.vim │ ├── toggle.vim │ ├── uri.vim │ ├── uri │ │ └── jdt.vim │ ├── util.vim │ └── virtualtext.vim └── asyncomplete │ └── sources │ └── ale.vim ├── doc ├── ale-ada.txt ├── ale-ansible.txt ├── ale-apkbuild.txt ├── ale-asciidoc.txt ├── ale-asm.txt ├── ale-astro.txt ├── ale-avra.txt ├── ale-awk.txt ├── ale-bats.txt ├── ale-bazel.txt ├── ale-bib.txt ├── ale-bicep.txt ├── ale-bindzone.txt ├── ale-bitbake.txt ├── ale-c.txt ├── ale-c3.txt ├── ale-cairo.txt ├── ale-chef.txt ├── ale-clojure.txt ├── ale-cloudformation.txt ├── ale-cmake.txt ├── ale-cpp.txt ├── ale-cs.txt ├── ale-css.txt ├── ale-cuda.txt ├── ale-d.txt ├── ale-dafny.txt ├── ale-dart.txt ├── ale-desktop.txt ├── ale-development.txt ├── ale-dhall.txt ├── ale-dockerfile.txt ├── ale-elixir.txt ├── ale-elm.txt ├── ale-erlang.txt ├── ale-eruby.txt ├── ale-fish.txt ├── ale-fortran.txt ├── ale-fountain.txt ├── ale-fuse.txt ├── ale-gitcommit.txt ├── ale-gleam.txt ├── ale-glsl.txt ├── ale-go.txt ├── ale-gohtmltmpl.txt ├── ale-graphql.txt ├── ale-groovy.txt ├── ale-hack.txt ├── ale-handlebars.txt ├── ale-haskell.txt ├── ale-hcl.txt ├── ale-help.txt ├── ale-html.txt ├── ale-htmlangular.txt ├── ale-htmldjango.txt ├── ale-http.txt ├── ale-hurl.txt ├── ale-idris.txt ├── ale-ink.txt ├── ale-inko.txt ├── ale-ispc.txt ├── ale-java.txt ├── ale-javascript.txt ├── ale-jinja.txt ├── ale-json.txt ├── ale-json5.txt ├── ale-jsonc.txt ├── ale-jsonnet.txt ├── ale-julia.txt ├── ale-kotlin.txt ├── ale-latex.txt ├── ale-lean.txt ├── ale-less.txt ├── ale-llvm.txt ├── ale-lua.txt ├── ale-make.txt ├── ale-markdown.txt ├── ale-mercury.txt ├── ale-nasm.txt ├── ale-nickel.txt ├── ale-nim.txt ├── ale-nix.txt ├── ale-nroff.txt ├── ale-nunjucks.txt ├── ale-objc.txt ├── ale-objcpp.txt ├── ale-ocaml.txt ├── ale-odin.txt ├── ale-openapi.txt ├── ale-openscad.txt ├── ale-packer.txt ├── ale-pascal.txt ├── ale-pawn.txt ├── ale-perl.txt ├── ale-perl6.txt ├── ale-php.txt ├── ale-po.txt ├── ale-pod.txt ├── ale-pony.txt ├── ale-powershell.txt ├── ale-prolog.txt ├── ale-proto.txt ├── ale-pug.txt ├── ale-puppet.txt ├── ale-purescript.txt ├── ale-pyrex.txt ├── ale-python.txt ├── ale-qml.txt ├── ale-r.txt ├── ale-racket.txt ├── ale-reasonml.txt ├── ale-rego.txt ├── ale-rest.txt ├── ale-restructuredtext.txt ├── ale-robot.txt ├── ale-roc.txt ├── ale-ruby.txt ├── ale-rust.txt ├── ale-salt.tmt ├── ale-sass.txt ├── ale-scala.txt ├── ale-scss.txt ├── ale-sh.txt ├── ale-sml.txt ├── ale-solidity.txt ├── ale-spec.txt ├── ale-sql.txt ├── ale-stylus.txt ├── ale-sugarss.txt ├── ale-supported-languages-and-tools.txt ├── ale-svelte.txt ├── ale-swift.txt ├── ale-systemd.txt ├── ale-tcl.txt ├── ale-terraform.txt ├── ale-tex.txt ├── ale-texinfo.txt ├── ale-text.txt ├── ale-thrift.txt ├── ale-toml.txt ├── ale-typescript.txt ├── ale-typst.html ├── ale-v.txt ├── ale-vala.txt ├── ale-verilog.txt ├── ale-vhdl.txt ├── ale-vim-help.txt ├── ale-vim.txt ├── ale-vue.txt ├── ale-wgsl.txt ├── ale-xhtml.txt ├── ale-xml.txt ├── ale-yaml.txt ├── ale-yang.txt ├── ale-yara.txt ├── ale-zeek.txt ├── ale-zig.txt └── ale.txt ├── ftplugin ├── ale-fix-suggest.vim ├── ale-info.vim ├── ale-preview-selection.vim └── ale-preview.vim ├── lspconfig.vim ├── lua └── ale │ ├── diagnostics.lua │ ├── init.lua │ ├── lsp.lua │ └── util.lua ├── plugin └── ale.vim ├── rplugin └── python3 │ └── deoplete │ └── sources │ └── ale.py ├── supported-tools.md ├── syntax ├── ale-fix-suggest.vim ├── ale-info.vim └── ale-preview-selection.vim └── test-files └── python └── no_uv └── whatever.py /ale_linters/ada/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Ada files. 4 | 5 | call ale#handlers#cspell#DefineLinter('ada') 6 | -------------------------------------------------------------------------------- /ale_linters/apkbuild/apkbuild_lint.vim: -------------------------------------------------------------------------------- 1 | " Author: Leo 2 | " Description: apkbuild-lint from atools linter for APKBUILDs 3 | 4 | call ale#Set('apkbuild_apkbuild_lint_executable', 'apkbuild-lint') 5 | 6 | call ale#linter#Define('apkbuild', { 7 | \ 'name': 'apkbuild_lint', 8 | \ 'output_stream': 'stdout', 9 | \ 'executable': {b -> ale#Var(b, 'apkbuild_apkbuild_lint_executable')}, 10 | \ 'command': '%e %t', 11 | \ 'callback': 'ale#handlers#atools#Handle', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/apkbuild/secfixes_check.vim: -------------------------------------------------------------------------------- 1 | " Author: Leo 2 | " Description: secfixes-check from atools linter for APKBUILDs 3 | 4 | call ale#Set('apkbuild_secfixes_check_executable', 'secfixes-check') 5 | 6 | call ale#linter#Define('apkbuild', { 7 | \ 'name': 'secfixes_check', 8 | \ 'output_stream': 'stdout', 9 | \ 'executable': {b -> ale#Var(b, 'apkbuild_secfixes_check_executable')}, 10 | \ 'command': '%e %t', 11 | \ 'callback': 'ale#handlers#atools#Handle', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/asciidoc/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for asciidoc files 3 | 4 | call ale#handlers#alex#DefineLinter('asciidoc', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/asciidoc/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for ASCIIDoc files. 4 | 5 | call ale#handlers#cspell#DefineLinter('asciidoc') 6 | -------------------------------------------------------------------------------- /ale_linters/asciidoc/languagetool.vim: -------------------------------------------------------------------------------- 1 | " Author: Horacio Sanson (hsanson [ät] gmail.com) 2 | " Description: languagetool for asciidoc files, copied from markdown. 3 | 4 | 5 | call ale#handlers#languagetool#DefineLinter('asciidoc') 6 | -------------------------------------------------------------------------------- /ale_linters/asciidoc/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel M. Capella https://github.com/polyzen 2 | " Description: proselint for AsciiDoc files 3 | 4 | call ale#linter#Define('asciidoc', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/asciidoc/redpen.vim: -------------------------------------------------------------------------------- 1 | " Author: rhysd https://rhysd.github.io 2 | " Description: Redpen, a proofreading tool (http://redpen.cc) 3 | 4 | call ale#linter#Define('asciidoc', { 5 | \ 'name': 'redpen', 6 | \ 'executable': 'redpen', 7 | \ 'command': 'redpen -f asciidoc -r json %t', 8 | \ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/asciidoc/textlint.vim: -------------------------------------------------------------------------------- 1 | " Author: TANIGUCHI Masaya 2 | " Description: textlint for AsciiDoc files 3 | 4 | call ale#linter#Define('asciidoc', { 5 | \ 'name': 'textlint', 6 | \ 'executable': function('ale#handlers#textlint#GetExecutable'), 7 | \ 'command': function('ale#handlers#textlint#GetCommand'), 8 | \ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/asciidoc/vale.vim: -------------------------------------------------------------------------------- 1 | " Author: Jeff Kreeftmeijer https://github.com/jeffkreeftmeijer 2 | " Description: vale for AsciiDoc files 3 | 4 | call ale#linter#Define('asciidoc', { 5 | \ 'name': 'vale', 6 | \ 'executable': 'vale', 7 | \ 'command': 'vale --output=line %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/asciidoc/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for AsciiDoc files 3 | 4 | call ale#handlers#writegood#DefineLinter('asciidoc') 5 | -------------------------------------------------------------------------------- /ale_linters/astro/eslint.vim: -------------------------------------------------------------------------------- 1 | " Author: Hyuksang Kwon 2 | " Description: eslint for astro files 3 | 4 | call ale#linter#Define('astro', { 5 | \ 'name': 'eslint', 6 | \ 'output_stream': 'both', 7 | \ 'executable': function('ale#handlers#eslint#GetExecutable'), 8 | \ 'cwd': function('ale#handlers#eslint#GetCwd'), 9 | \ 'command': function('ale#handlers#eslint#GetCommand'), 10 | \ 'callback': 'ale#handlers#eslint#HandleJSON', 11 | \}) 12 | -------------------------------------------------------------------------------- /ale_linters/bats/shellcheck.vim: -------------------------------------------------------------------------------- 1 | " Author: Ian2020 2 | " Description: shellcheck linter for bats scripts. 3 | 4 | call ale#handlers#shellcheck#DefineLinter('bats') 5 | -------------------------------------------------------------------------------- /ale_linters/c/ccls.vim: -------------------------------------------------------------------------------- 1 | " Author: Ye Jingchen , Ben Falconer , jtalowell 2 | " Description: A language server for C 3 | 4 | call ale#Set('c_ccls_executable', 'ccls') 5 | call ale#Set('c_ccls_init_options', {}) 6 | call ale#Set('c_build_dir', '') 7 | 8 | call ale#linter#Define('c', { 9 | \ 'name': 'ccls', 10 | \ 'lsp': 'stdio', 11 | \ 'executable': {b -> ale#Var(b, 'c_ccls_executable')}, 12 | \ 'command': '%e', 13 | \ 'project_root': function('ale#handlers#ccls#GetProjectRoot'), 14 | \ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'c_ccls_init_options')}, 15 | \}) 16 | -------------------------------------------------------------------------------- /ale_linters/c/clangd.vim: -------------------------------------------------------------------------------- 1 | " Author: Andrey Melentyev 2 | " Description: Clangd language server 3 | 4 | call ale#Set('c_clangd_executable', 'clangd') 5 | call ale#Set('c_clangd_options', '') 6 | call ale#Set('c_build_dir', '') 7 | 8 | function! ale_linters#c#clangd#GetCommand(buffer) abort 9 | let l:build_dir = ale#c#GetBuildDirectory(a:buffer) 10 | 11 | return '%e' 12 | \ . ale#Pad(ale#Var(a:buffer, 'c_clangd_options')) 13 | \ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '') 14 | endfunction 15 | 16 | call ale#linter#Define('c', { 17 | \ 'name': 'clangd', 18 | \ 'lsp': 'stdio', 19 | \ 'executable': {b -> ale#Var(b, 'c_clangd_executable')}, 20 | \ 'command': function('ale_linters#c#clangd#GetCommand'), 21 | \ 'project_root': function('ale#c#FindProjectRoot'), 22 | \}) 23 | -------------------------------------------------------------------------------- /ale_linters/c/cpplint.vim: -------------------------------------------------------------------------------- 1 | " Author: Justin Huang 2 | " Description: cpplint for c files 3 | 4 | call ale#Set('c_cpplint_executable', 'cpplint') 5 | call ale#Set('c_cpplint_options', '') 6 | 7 | function! ale_linters#c#cpplint#GetCommand(buffer) abort 8 | let l:options = ale#Var(a:buffer, 'c_cpplint_options') 9 | 10 | return '%e' . ale#Pad(l:options) . ' %s' 11 | endfunction 12 | 13 | call ale#linter#Define('c', { 14 | \ 'name': 'cpplint', 15 | \ 'output_stream': 'stderr', 16 | \ 'executable': {b -> ale#Var(b, 'c_cpplint_executable')}, 17 | \ 'command': function('ale_linters#c#cpplint#GetCommand'), 18 | \ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat', 19 | \ 'lint_file': 1, 20 | \}) 21 | -------------------------------------------------------------------------------- /ale_linters/c/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for C files. 4 | 5 | call ale#handlers#cspell#DefineLinter('c') 6 | -------------------------------------------------------------------------------- /ale_linters/c3/c3lsp.vim: -------------------------------------------------------------------------------- 1 | " Author: Koni Marti 2 | " Description: A Language Server implementation for C3 3 | 4 | call ale#Set('c3_c3lsp_executable', 'c3lsp') 5 | call ale#Set('c3_c3lsp_options', '') 6 | call ale#Set('c3_c3lsp_init_options', {}) 7 | 8 | function! ale_linters#c3#c3lsp#GetCommand(buffer) abort 9 | let l:executable = ale#Var(a:buffer, 'c3_c3lsp_executable') 10 | 11 | return ale#Escape(l:executable) . ale#Pad(ale#Var(a:buffer, 'c3_c3lsp_options')) 12 | endfunction 13 | 14 | 15 | call ale#linter#Define('c3', { 16 | \ 'name': 'c3lsp', 17 | \ 'lsp': 'stdio', 18 | \ 'executable': {b -> ale#Var(b, 'c3_c3lsp_executable')}, 19 | \ 'command': function('ale_linters#c3#c3lsp#GetCommand'), 20 | \ 'project_root': function('ale#handlers#c3lsp#GetProjectRoot'), 21 | \ 'lsp_config': {b -> ale#handlers#c3lsp#GetInitOpts(b, 'c3_c3lsp_init_options')}, 22 | \}) 23 | -------------------------------------------------------------------------------- /ale_linters/coffee/coffee.vim: -------------------------------------------------------------------------------- 1 | " Author: KabbAmine - https://github.com/KabbAmine 2 | " Description: Coffee for checking coffee files 3 | 4 | function! ale_linters#coffee#coffee#GetExecutable(buffer) abort 5 | return ale#path#ResolveLocalPath( 6 | \ a:buffer, 7 | \ 'node_modules/.bin/coffee', 8 | \ 'coffee' 9 | \) 10 | endfunction 11 | 12 | function! ale_linters#coffee#coffee#GetCommand(buffer) abort 13 | return ale_linters#coffee#coffee#GetExecutable(a:buffer) 14 | \ . ' -cp -s' 15 | endfunction 16 | 17 | call ale#linter#Define('coffee', { 18 | \ 'name': 'coffee', 19 | \ 'executable': function('ale_linters#coffee#coffee#GetExecutable'), 20 | \ 'command': function('ale_linters#coffee#coffee#GetCommand'), 21 | \ 'output_stream': 'stderr', 22 | \ 'callback': 'ale#handlers#gcc#HandleGCCFormat', 23 | \}) 24 | -------------------------------------------------------------------------------- /ale_linters/cpp/ccls.vim: -------------------------------------------------------------------------------- 1 | " Author: Ye Jingchen , Ben Falconer , jtalowell 2 | " Description: A language server for C++ 3 | 4 | call ale#Set('cpp_ccls_executable', 'ccls') 5 | call ale#Set('cpp_ccls_init_options', {}) 6 | call ale#Set('c_build_dir', '') 7 | 8 | call ale#linter#Define('cpp', { 9 | \ 'name': 'ccls', 10 | \ 'lsp': 'stdio', 11 | \ 'executable': {b -> ale#Var(b, 'cpp_ccls_executable')}, 12 | \ 'command': '%e', 13 | \ 'project_root': function('ale#handlers#ccls#GetProjectRoot'), 14 | \ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'cpp_ccls_init_options')}, 15 | \}) 16 | -------------------------------------------------------------------------------- /ale_linters/cpp/clangd.vim: -------------------------------------------------------------------------------- 1 | " Author: Andrey Melentyev 2 | " Description: Clangd language server 3 | 4 | call ale#Set('cpp_clangd_executable', 'clangd') 5 | call ale#Set('cpp_clangd_options', '') 6 | call ale#Set('c_build_dir', '') 7 | 8 | function! ale_linters#cpp#clangd#GetCommand(buffer) abort 9 | let l:build_dir = ale#c#GetBuildDirectory(a:buffer) 10 | 11 | return '%e' 12 | \ . ale#Pad(ale#Var(a:buffer, 'cpp_clangd_options')) 13 | \ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '') 14 | endfunction 15 | 16 | call ale#linter#Define('cpp', { 17 | \ 'name': 'clangd', 18 | \ 'lsp': 'stdio', 19 | \ 'executable': {b -> ale#Var(b, 'cpp_clangd_executable')}, 20 | \ 'command': function('ale_linters#cpp#clangd#GetCommand'), 21 | \ 'project_root': function('ale#c#FindProjectRoot'), 22 | \}) 23 | -------------------------------------------------------------------------------- /ale_linters/cpp/cpplint.vim: -------------------------------------------------------------------------------- 1 | " Author: Dawid Kurek https://github.com/dawikur 2 | " Description: cpplint for cpp files 3 | 4 | call ale#Set('cpp_cpplint_executable', 'cpplint') 5 | call ale#Set('cpp_cpplint_options', '') 6 | 7 | function! ale_linters#cpp#cpplint#GetCommand(buffer) abort 8 | let l:options = ale#Var(a:buffer, 'cpp_cpplint_options') 9 | 10 | return '%e' . ale#Pad(l:options) . ' %s' 11 | endfunction 12 | 13 | call ale#linter#Define('cpp', { 14 | \ 'name': 'cpplint', 15 | \ 'output_stream': 'stderr', 16 | \ 'executable': {b -> ale#Var(b, 'cpp_cpplint_executable')}, 17 | \ 'command': function('ale_linters#cpp#cpplint#GetCommand'), 18 | \ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat', 19 | \ 'lint_file': 1, 20 | \}) 21 | -------------------------------------------------------------------------------- /ale_linters/cpp/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for C++ files. 4 | 5 | call ale#handlers#cspell#DefineLinter('cpp') 6 | -------------------------------------------------------------------------------- /ale_linters/cs/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for C# files. 4 | 5 | call ale#handlers#cspell#DefineLinter('cs') 6 | -------------------------------------------------------------------------------- /ale_linters/css/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for CSS files. 4 | 5 | call ale#handlers#cspell#DefineLinter('css') 6 | -------------------------------------------------------------------------------- /ale_linters/css/csslint.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: This file adds support for checking CSS code with csslint. 3 | 4 | function! ale_linters#css#csslint#GetCommand(buffer) abort 5 | let l:csslintrc = ale#path#FindNearestFile(a:buffer, '.csslintrc') 6 | let l:config_option = !empty(l:csslintrc) 7 | \ ? '--config=' . ale#Escape(l:csslintrc) 8 | \ : '' 9 | 10 | return 'csslint --format=compact ' . l:config_option . ' %t' 11 | endfunction 12 | 13 | call ale#linter#Define('css', { 14 | \ 'name': 'csslint', 15 | \ 'executable': 'csslint', 16 | \ 'command': function('ale_linters#css#csslint#GetCommand'), 17 | \ 'callback': 'ale#handlers#css#HandleCSSLintFormat', 18 | \}) 19 | -------------------------------------------------------------------------------- /ale_linters/css/fecs.vim: -------------------------------------------------------------------------------- 1 | " Author: harttle 2 | " Description: fecs for CSS files 3 | 4 | call ale#linter#Define('css', { 5 | \ 'name': 'fecs', 6 | \ 'executable': function('ale#handlers#fecs#GetExecutable'), 7 | \ 'command': function('ale#handlers#fecs#GetCommand'), 8 | \ 'callback': 'ale#handlers#fecs#Handle', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/css/stylelint.vim: -------------------------------------------------------------------------------- 1 | " Author: diartyz 2 | 3 | call ale#Set('css_stylelint_executable', 'stylelint') 4 | call ale#Set('css_stylelint_options', '') 5 | call ale#Set('css_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | function! ale_linters#css#stylelint#GetCommand(buffer) abort 8 | return '%e ' . ale#Pad(ale#Var(a:buffer, 'css_stylelint_options')) 9 | \ . ' --stdin-filename %s' 10 | endfunction 11 | 12 | call ale#linter#Define('css', { 13 | \ 'name': 'stylelint', 14 | \ 'output_stream': 'both', 15 | \ 'executable': {b -> ale#path#FindExecutable(b, 'css_stylelint', [ 16 | \ 'node_modules/.bin/stylelint', 17 | \ ])}, 18 | \ 'command': function('ale_linters#css#stylelint#GetCommand'), 19 | \ 'callback': 'ale#handlers#css#HandleStyleLintFormat', 20 | \}) 21 | -------------------------------------------------------------------------------- /ale_linters/css/vscodecss.vim: -------------------------------------------------------------------------------- 1 | " Author: Dalius Dobravolskas 2 | " Description: VSCode css language server 3 | 4 | function! ale_linters#css#vscodecss#GetProjectRoot(buffer) abort 5 | let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') 6 | 7 | return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' 8 | endfunction 9 | 10 | call ale#linter#Define('css', { 11 | \ 'name': 'vscodecss', 12 | \ 'lsp': 'stdio', 13 | \ 'executable': 'vscode-css-language-server', 14 | \ 'command': '%e --stdio', 15 | \ 'project_root': function('ale_linters#css#vscodecss#GetProjectRoot'), 16 | \}) 17 | -------------------------------------------------------------------------------- /ale_linters/cypher/cypher_lint.vim: -------------------------------------------------------------------------------- 1 | " Author: Francisco Lopes 2 | " Description: Linting for Neo4j's Cypher 3 | 4 | function! ale_linters#cypher#cypher_lint#Handle(buffer, lines) abort 5 | let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+): (.*)$' 6 | let l:output = [] 7 | 8 | for l:match in ale#util#GetMatches(a:lines, l:pattern) 9 | call add(l:output, { 10 | \ 'lnum': l:match[2] + 0, 11 | \ 'col': l:match[3] + 0, 12 | \ 'text': l:match[4], 13 | \ 'type': 'E', 14 | \}) 15 | endfor 16 | 17 | return l:output 18 | endfunction 19 | 20 | call ale#linter#Define('cypher', { 21 | \ 'name': 'cypher_lint', 22 | \ 'executable': 'cypher-lint', 23 | \ 'command': 'cypher-lint', 24 | \ 'output_stream': 'stderr', 25 | \ 'callback': 'ale_linters#cypher#cypher_lint#Handle', 26 | \}) 27 | -------------------------------------------------------------------------------- /ale_linters/d/dls.vim: -------------------------------------------------------------------------------- 1 | " Author: aurieh 2 | " Description: A Language Server implementation for D 3 | 4 | call ale#Set('d_dls_executable', 'dls') 5 | 6 | function! ale_linters#d#dls#GetExecutable(buffer) abort 7 | return ale#Var(a:buffer, 'd_dls_executable') 8 | endfunction 9 | 10 | function! ale_linters#d#dls#FindProjectRoot(buffer) abort 11 | " Note: this will return . if dub config is empty 12 | " dls can run outside DUB projects just fine 13 | return fnamemodify(ale#d#FindDUBConfig(a:buffer), ':h') 14 | endfunction 15 | 16 | call ale#linter#Define('d', { 17 | \ 'name': 'dls', 18 | \ 'lsp': 'stdio', 19 | \ 'executable': function('ale_linters#d#dls#GetExecutable'), 20 | \ 'command': function('ale_linters#d#dls#GetExecutable'), 21 | \ 'project_root': function('ale_linters#d#dls#FindProjectRoot'), 22 | \}) 23 | -------------------------------------------------------------------------------- /ale_linters/dart/language_server.vim: -------------------------------------------------------------------------------- 1 | " Author: aurieh 2 | " Description: A language server for dart 3 | 4 | call ale#Set('dart_language_server_executable', 'dart_language_server') 5 | 6 | function! ale_linters#dart#language_server#GetProjectRoot(buffer) abort 7 | " Note: pub only looks for pubspec.yaml, there's no point in adding 8 | " support for pubspec.yml 9 | let l:pubspec = ale#path#FindNearestFile(a:buffer, 'pubspec.yaml') 10 | 11 | return !empty(l:pubspec) ? fnamemodify(l:pubspec, ':h:h') : '' 12 | endfunction 13 | 14 | call ale#linter#Define('dart', { 15 | \ 'name': 'language_server', 16 | \ 'lsp': 'stdio', 17 | \ 'executable': {b -> ale#Var(b, 'dart_language_server_executable')}, 18 | \ 'command': '%e', 19 | \ 'project_root': function('ale_linters#dart#language_server#GetProjectRoot'), 20 | \}) 21 | -------------------------------------------------------------------------------- /ale_linters/elixir/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Elixir files. 4 | 5 | call ale#handlers#cspell#DefineLinter('elixir') 6 | -------------------------------------------------------------------------------- /ale_linters/elixir/lexical.vim: -------------------------------------------------------------------------------- 1 | " Author: Axel Clark 2 | " Description: Lexical integration (https://github.com/lexical-lsp/lexical) 3 | 4 | call ale#Set('elixir_lexical_release', 'lexical') 5 | 6 | function! ale_linters#elixir#lexical#GetExecutable(buffer) abort 7 | let l:dir = ale#path#Simplify(ale#Var(a:buffer, 'elixir_lexical_release')) 8 | let l:cmd = has('win32') ? '\start_lexical.bat' : '/start_lexical.sh' 9 | 10 | return l:dir . l:cmd 11 | endfunction 12 | 13 | call ale#linter#Define('elixir', { 14 | \ 'name': 'lexical', 15 | \ 'lsp': 'stdio', 16 | \ 'executable': function('ale_linters#elixir#lexical#GetExecutable'), 17 | \ 'command': function('ale_linters#elixir#lexical#GetExecutable'), 18 | \ 'project_root': function('ale#handlers#elixir#FindMixUmbrellaRoot'), 19 | \}) 20 | -------------------------------------------------------------------------------- /ale_linters/fortran/language_server.vim: -------------------------------------------------------------------------------- 1 | " Author: unpairedbracket ben.spiers22@gmail.com 2 | " Description: A language server for fortran 3 | 4 | call ale#Set('fortran_language_server_executable', 'fortls') 5 | call ale#Set('fortran_language_server_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | function! ale_linters#fortran#language_server#GetProjectRoot(buffer) abort 8 | let l:fortls_file = ale#path#FindNearestFile(a:buffer, '.fortls') 9 | 10 | return !empty(l:fortls_file) ? fnamemodify(l:fortls_file, ':h') : '' 11 | endfunction 12 | 13 | call ale#linter#Define('fortran', { 14 | \ 'name': 'language_server', 15 | \ 'aliases': ['fortls'], 16 | \ 'lsp': 'stdio', 17 | \ 'executable': {b -> ale#Var(b, 'fortran_language_server_executable')}, 18 | \ 'command': '%e', 19 | \ 'project_root': function('ale_linters#fortran#language_server#GetProjectRoot'), 20 | \}) 21 | -------------------------------------------------------------------------------- /ale_linters/fountain/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Jansen Mitchell https://github.com/JansenMitchell 2 | " Description: proselint for Fountain files 3 | 4 | call ale#linter#Define('fountain', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/gleam/gleamlsp.vim: -------------------------------------------------------------------------------- 1 | " Author: Jonathan Palardt https://github.com/jpalardy 2 | " Description: Support for Gleam Language Server 3 | 4 | call ale#Set('gleam_gleamlsp_executable', 'gleam') 5 | 6 | function! ale_linters#gleam#gleamlsp#GetProjectRoot(buffer) abort 7 | let l:gleam_toml = ale#path#FindNearestFile(a:buffer, 'gleam.toml') 8 | 9 | return !empty(l:gleam_toml) ? fnamemodify(l:gleam_toml, ':p:h') : '' 10 | endfunction 11 | 12 | call ale#linter#Define('gleam', { 13 | \ 'name': 'gleamlsp', 14 | \ 'lsp': 'stdio', 15 | \ 'executable': {buffer -> ale#Var(buffer, 'gleam_gleamlsp_executable')}, 16 | \ 'command': '%e lsp', 17 | \ 'project_root': function('ale_linters#gleam#gleamlsp#GetProjectRoot'), 18 | \}) 19 | -------------------------------------------------------------------------------- /ale_linters/glimmer/embertemplatelint.vim: -------------------------------------------------------------------------------- 1 | " Author: Sam Saffron 2 | " Description: Ember-template-lint for checking GJS (Glimmer JS) files 3 | 4 | scriptencoding utf-8 5 | 6 | call ale#handlers#embertemplatelint#DefineLinter('glimmer') 7 | -------------------------------------------------------------------------------- /ale_linters/go/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Go files. 4 | 5 | call ale#handlers#cspell#DefineLinter('go') 6 | -------------------------------------------------------------------------------- /ale_linters/go/gofmt.vim: -------------------------------------------------------------------------------- 1 | " Author: neersighted 2 | " Description: gofmt for Go files 3 | 4 | function! ale_linters#go#gofmt#GetCommand(buffer) abort 5 | return ale#go#EnvString(a:buffer) 6 | \ . '%e -e %t' 7 | endfunction 8 | 9 | call ale#linter#Define('go', { 10 | \ 'name': 'gofmt', 11 | \ 'output_stream': 'stderr', 12 | \ 'executable': 'gofmt', 13 | \ 'command': function('ale_linters#go#gofmt#GetCommand'), 14 | \ 'callback': 'ale#handlers#unix#HandleAsError', 15 | \}) 16 | -------------------------------------------------------------------------------- /ale_linters/go/gosimple.vim: -------------------------------------------------------------------------------- 1 | " Author: Ben Reedy 2 | " Description: gosimple for Go files 3 | 4 | call ale#linter#Define('go', { 5 | \ 'name': 'gosimple', 6 | \ 'executable': 'gosimple', 7 | \ 'cwd': '%s:h', 8 | \ 'command': {b -> ale#go#EnvString(b) . 'gosimple .'}, 9 | \ 'callback': 'ale#handlers#go#Handler', 10 | \ 'output_stream': 'both', 11 | \ 'lint_file': 1, 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/go/gotype.vim: -------------------------------------------------------------------------------- 1 | " Author: Jelte Fennema 2 | " Description: gotype for Go files 3 | 4 | function! ale_linters#go#gotype#GetExecutable(buffer) abort 5 | if expand('#' . a:buffer . ':p') =~# '_test\.go$' 6 | return '' 7 | endif 8 | 9 | return 'gotype' 10 | endfunction 11 | 12 | function! ale_linters#go#gotype#GetCommand(buffer) abort 13 | return ale#go#EnvString(a:buffer) . 'gotype -e .' 14 | endfunction 15 | 16 | call ale#linter#Define('go', { 17 | \ 'name': 'gotype', 18 | \ 'output_stream': 'stderr', 19 | \ 'executable': function('ale_linters#go#gotype#GetExecutable'), 20 | \ 'cwd': '%s:h', 21 | \ 'command': function('ale_linters#go#gotype#GetCommand'), 22 | \ 'callback': 'ale#handlers#go#Handler', 23 | \ 'lint_file': 1, 24 | \}) 25 | -------------------------------------------------------------------------------- /ale_linters/go/govet.vim: -------------------------------------------------------------------------------- 1 | " Author: neersighted , John Eikenberry 2 | " Description: go vet for Go files 3 | 4 | call ale#Set('go_go_executable', 'go') 5 | call ale#Set('go_govet_options', '') 6 | 7 | call ale#linter#Define('go', { 8 | \ 'name': 'govet', 9 | \ 'aliases': ['go vet'], 10 | \ 'output_stream': 'stderr', 11 | \ 'executable': {b -> ale#Var(b, 'go_go_executable')}, 12 | \ 'cwd': '%s:h', 13 | \ 'command': {b -> 14 | \ ale#go#EnvString(b) 15 | \ . '%e vet' 16 | \ . ale#Pad(ale#Var(b, 'go_govet_options')) 17 | \ . ' .' 18 | \ }, 19 | \ 'callback': 'ale#handlers#go#Handler', 20 | \ 'lint_file': 1, 21 | \}) 22 | -------------------------------------------------------------------------------- /ale_linters/go/revive.vim: -------------------------------------------------------------------------------- 1 | " Author: Penghui Liao 2 | " Description: Adds support for revive 3 | 4 | call ale#Set('go_revive_executable', 'revive') 5 | call ale#Set('go_revive_options', '') 6 | 7 | function! ale_linters#go#revive#GetCommand(buffer) abort 8 | let l:options = ale#Var(a:buffer, 'go_revive_options') 9 | 10 | return ale#go#EnvString(a:buffer) . '%e' 11 | \ . (!empty(l:options) ? ' ' . l:options : '') 12 | \ . ' %t' 13 | endfunction 14 | 15 | call ale#linter#Define('go', { 16 | \ 'name': 'revive', 17 | \ 'output_stream': 'both', 18 | \ 'executable': {b -> ale#Var(b, 'go_revive_executable')}, 19 | \ 'command': function('ale_linters#go#revive#GetCommand'), 20 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 21 | \}) 22 | -------------------------------------------------------------------------------- /ale_linters/gohtmltmpl/djlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Adrian Vollmer 2 | " Description: djlint for Django HTML template files 3 | 4 | call ale#Set('html_djlint_executable', 'djlint') 5 | call ale#Set('html_djlint_options', '') 6 | 7 | call ale#linter#Define('gohtmltmpl', { 8 | \ 'name': 'djlint', 9 | \ 'executable': function('ale#handlers#djlint#GetExecutable'), 10 | \ 'command': function('ale#handlers#djlint#GetCommand'), 11 | \ 'callback': 'ale#handlers#djlint#Handle', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/graphql/eslint.vim: -------------------------------------------------------------------------------- 1 | " Author: Benjie Gillam 2 | " Description: eslint for GraphQL files 3 | 4 | call ale#linter#Define('graphql', { 5 | \ 'name': 'eslint', 6 | \ 'executable': function('ale#handlers#eslint#GetExecutable'), 7 | \ 'cwd': function('ale#handlers#eslint#GetCwd'), 8 | \ 'command': function('ale#handlers#eslint#GetCommand'), 9 | \ 'callback': 'ale#handlers#eslint#HandleJSON', 10 | \}) 11 | -------------------------------------------------------------------------------- /ale_linters/graphql/gqlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Michiel Westerbeek 2 | " Description: Linter for GraphQL Schemas 3 | 4 | call ale#linter#Define('graphql', { 5 | \ 'name': 'gqlint', 6 | \ 'executable': 'gqlint', 7 | \ 'cwd': '%s:h', 8 | \ 'command': 'gqlint --reporter=simple %t', 9 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 10 | \}) 11 | -------------------------------------------------------------------------------- /ale_linters/hack/hack.vim: -------------------------------------------------------------------------------- 1 | " Author: Fred Emmott 2 | " Description: Hack support via `hack lsp` 3 | 4 | call ale#Set('hack_hack_executable', 'hh_client') 5 | 6 | function! ale_linters#hack#hack#GetProjectRoot(buffer) abort 7 | let l:hhconfig = ale#path#FindNearestFile(a:buffer, '.hhconfig') 8 | 9 | return !empty(l:hhconfig) ? fnamemodify(l:hhconfig, ':h') : '' 10 | endfunction 11 | 12 | function! ale_linters#hack#hack#GetExecutable(buffer) abort 13 | return ale#Var(a:buffer, 'hack_hack_executable') 14 | endfunction 15 | 16 | call ale#linter#Define('hack', { 17 | \ 'name': 'hack', 18 | \ 'lsp': 'stdio', 19 | \ 'executable': function('ale_linters#hack#hack#GetExecutable'), 20 | \ 'command': '%e lsp --from vim-ale', 21 | \ 'project_root': function('ale_linters#hack#hack#GetProjectRoot'), 22 | \}) 23 | -------------------------------------------------------------------------------- /ale_linters/handlebars/djlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Adrian Vollmer 2 | " Description: djlint for Django HTML template files 3 | 4 | call ale#Set('html_djlint_executable', 'djlint') 5 | call ale#Set('html_djlint_options', '') 6 | 7 | call ale#linter#Define('handlebars', { 8 | \ 'name': 'djlint', 9 | \ 'executable': function('ale#handlers#djlint#GetExecutable'), 10 | \ 'command': function('ale#handlers#djlint#GetCommand'), 11 | \ 'callback': 'ale#handlers#djlint#Handle', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/handlebars/embertemplatelint.vim: -------------------------------------------------------------------------------- 1 | " Author: Adrian Zalewski 2 | " Description: Ember-template-lint for checking Handlebars files 3 | 4 | scriptencoding utf-8 5 | 6 | call ale#handlers#embertemplatelint#DefineLinter('handlebars') 7 | -------------------------------------------------------------------------------- /ale_linters/haskell/cabal_ghc.vim: -------------------------------------------------------------------------------- 1 | " Author: Eric Wolf 2 | " Description: ghc for Haskell files called with cabal exec 3 | 4 | call ale#Set('haskell_cabal_ghc_options', '-fno-code -v0') 5 | 6 | function! ale_linters#haskell#cabal_ghc#GetCommand(buffer) abort 7 | return 'cabal exec -- ghc ' 8 | \ . ale#Var(a:buffer, 'haskell_cabal_ghc_options') 9 | \ . ' %t' 10 | endfunction 11 | 12 | call ale#linter#Define('haskell', { 13 | \ 'name': 'cabal_ghc', 14 | \ 'aliases': ['cabal-ghc'], 15 | \ 'output_stream': 'stderr', 16 | \ 'executable': 'cabal', 17 | \ 'cwd': '%s:h', 18 | \ 'command': function('ale_linters#haskell#cabal_ghc#GetCommand'), 19 | \ 'callback': 'ale#handlers#haskell#HandleGHCFormat', 20 | \}) 21 | -------------------------------------------------------------------------------- /ale_linters/haskell/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Haskell files. 4 | 5 | call ale#handlers#cspell#DefineLinter('haskell') 6 | -------------------------------------------------------------------------------- /ale_linters/haskell/ghc.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: ghc for Haskell files 3 | 4 | call ale#Set('haskell_ghc_options', '-fno-code -v0') 5 | 6 | function! ale_linters#haskell#ghc#GetCommand(buffer) abort 7 | return 'ghc ' 8 | \ . ale#Var(a:buffer, 'haskell_ghc_options') 9 | \ . ' %t' 10 | endfunction 11 | 12 | call ale#linter#Define('haskell', { 13 | \ 'name': 'ghc', 14 | \ 'output_stream': 'stderr', 15 | \ 'executable': 'ghc', 16 | \ 'command': function('ale_linters#haskell#ghc#GetCommand'), 17 | \ 'callback': 'ale#handlers#haskell#HandleGHCFormat', 18 | \}) 19 | -------------------------------------------------------------------------------- /ale_linters/haskell/ghc_mod.vim: -------------------------------------------------------------------------------- 1 | " Author: wizzup 2 | " Description: ghc-mod for Haskell files 3 | 4 | call ale#Set('haskell_ghc_mod_executable', 'ghc-mod') 5 | 6 | function! ale_linters#haskell#ghc_mod#GetCommand (buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'haskell_ghc_mod_executable') 8 | 9 | return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'ghc-mod') 10 | \ . ' --map-file %s=%t check %s' 11 | endfunction 12 | 13 | call ale#linter#Define('haskell', { 14 | \ 'name': 'ghc_mod', 15 | \ 'aliases': ['ghc-mod'], 16 | \ 'executable': {b -> ale#Var(b, 'haskell_ghc_mod_executable')}, 17 | \ 'command': function('ale_linters#haskell#ghc_mod#GetCommand'), 18 | \ 'callback': 'ale#handlers#haskell#HandleGHCFormat', 19 | \}) 20 | -------------------------------------------------------------------------------- /ale_linters/haskell/stack_ghc.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: ghc for Haskell files, using Stack 3 | 4 | call ale#Set('haskell_stack_ghc_options', '-fno-code -v0') 5 | 6 | function! ale_linters#haskell#stack_ghc#GetCommand(buffer) abort 7 | return ale#handlers#haskell#GetStackExecutable(a:buffer) 8 | \ . ' ghc -- ' 9 | \ . ale#Var(a:buffer, 'haskell_stack_ghc_options') 10 | \ . ' %t' 11 | endfunction 12 | 13 | call ale#linter#Define('haskell', { 14 | \ 'name': 'stack_ghc', 15 | \ 'aliases': ['stack-ghc'], 16 | \ 'output_stream': 'stderr', 17 | \ 'executable': function('ale#handlers#haskell#GetStackExecutable'), 18 | \ 'cwd': '%s:h', 19 | \ 'command': function('ale_linters#haskell#stack_ghc#GetCommand'), 20 | \ 'callback': 'ale#handlers#haskell#HandleGHCFormat', 21 | \}) 22 | -------------------------------------------------------------------------------- /ale_linters/help/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for help files 3 | 4 | call ale#handlers#alex#DefineLinter('help', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/help/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for help files. 4 | 5 | call ale#handlers#cspell#DefineLinter('help') 6 | -------------------------------------------------------------------------------- /ale_linters/help/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel M. Capella https://github.com/polyzen 2 | " Description: proselint for Vim help files 3 | 4 | call ale#linter#Define('help', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/help/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for vim Help files 3 | 4 | call ale#handlers#writegood#DefineLinter('help') 5 | -------------------------------------------------------------------------------- /ale_linters/html/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for HTML files 3 | 4 | call ale#handlers#alex#DefineLinter('html', '--html') 5 | -------------------------------------------------------------------------------- /ale_linters/html/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for HTML files. 4 | 5 | call ale#handlers#cspell#DefineLinter('html') 6 | -------------------------------------------------------------------------------- /ale_linters/html/djlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Vivian De Smedt 2 | " Description: Adds support for djlint 3 | 4 | call ale#Set('html_djlint_executable', 'djlint') 5 | call ale#Set('html_djlint_options', '') 6 | 7 | call ale#linter#Define('html', { 8 | \ 'name': 'djlint', 9 | \ 'executable': function('ale#handlers#djlint#GetExecutable'), 10 | \ 'command': function('ale#handlers#djlint#GetCommand'), 11 | \ 'callback': 'ale#handlers#djlint#Handle', 12 | \}) 13 | 14 | " vim:ts=4:sw=4:et: 15 | -------------------------------------------------------------------------------- /ale_linters/html/eslint.vim: -------------------------------------------------------------------------------- 1 | " Author: Victor Ananyev 2 | " Description: eslint for js snippets in HTML files 3 | 4 | 5 | call ale#linter#Define('html', { 6 | \ 'name': 'eslint', 7 | \ 'output_stream': 'both', 8 | \ 'executable': function('ale#handlers#eslint#GetExecutable'), 9 | \ 'cwd': function('ale#handlers#eslint#GetCwd'), 10 | \ 'command': function('ale#handlers#eslint#GetCommand'), 11 | \ 'callback': 'ale#handlers#eslint#HandleJSON', 12 | \ }) 13 | -------------------------------------------------------------------------------- /ale_linters/html/fecs.vim: -------------------------------------------------------------------------------- 1 | " Author: harttle 2 | " Description: fecs for HTMl files 3 | 4 | call ale#linter#Define('html', { 5 | \ 'name': 'fecs', 6 | \ 'executable': function('ale#handlers#fecs#GetExecutable'), 7 | \ 'command': function('ale#handlers#fecs#GetCommand'), 8 | \ 'callback': 'ale#handlers#fecs#Handle', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/html/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel M. Capella https://github.com/polyzen 2 | " Description: proselint for HTML files 3 | 4 | call ale#linter#Define('html', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/html/vscodehtml.vim: -------------------------------------------------------------------------------- 1 | " Author: Dalius Dobravolskas 2 | " Description: VSCode html language server 3 | 4 | function! ale_linters#html#vscodehtml#GetProjectRoot(buffer) abort 5 | let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') 6 | 7 | return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' 8 | endfunction 9 | 10 | call ale#linter#Define('html', { 11 | \ 'name': 'vscodehtml', 12 | \ 'lsp': 'stdio', 13 | \ 'executable': 'vscode-html-language-server', 14 | \ 'command': '%e --stdio', 15 | \ 'project_root': function('ale_linters#html#vscodehtml#GetProjectRoot'), 16 | \}) 17 | -------------------------------------------------------------------------------- /ale_linters/html/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for html files 3 | 4 | call ale#handlers#writegood#DefineLinter('html') 5 | -------------------------------------------------------------------------------- /ale_linters/htmlangular/djlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Adrian Vollmer 2 | " Description: djlint for Django HTML template files 3 | 4 | call ale#Set('html_djlint_executable', 'djlint') 5 | call ale#Set('html_djlint_options', '') 6 | 7 | call ale#linter#Define('htmlangular', { 8 | \ 'name': 'djlint', 9 | \ 'executable': function('ale#handlers#djlint#GetExecutable'), 10 | \ 'command': function('ale#handlers#djlint#GetCommand'), 11 | \ 'callback': 'ale#handlers#djlint#Handle', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/htmldjango/djlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Adrian Vollmer 2 | " Description: djlint for Django HTML template files 3 | 4 | call ale#Set('html_djlint_executable', 'djlint') 5 | call ale#Set('html_djlint_options', '') 6 | 7 | call ale#linter#Define('htmldjango', { 8 | \ 'name': 'djlint', 9 | \ 'executable': function('ale#handlers#djlint#GetExecutable'), 10 | \ 'command': function('ale#handlers#djlint#GetCommand'), 11 | \ 'callback': 'ale#handlers#djlint#Handle', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/java/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Java files. 4 | 5 | call ale#handlers#cspell#DefineLinter('java') 6 | -------------------------------------------------------------------------------- /ale_linters/javascript/biome.vim: -------------------------------------------------------------------------------- 1 | " Author: Filip Gospodinov 2 | " Description: biome for JavaScript files 3 | 4 | call ale#linter#Define('javascript', { 5 | \ 'name': 'biome', 6 | \ 'lsp': 'stdio', 7 | \ 'language': function('ale#handlers#biome#GetLanguage'), 8 | \ 'executable': function('ale#handlers#biome#GetExecutable'), 9 | \ 'command': '%e lsp-proxy', 10 | \ 'project_root': function('ale#handlers#biome#GetProjectRoot'), 11 | \}) 12 | -------------------------------------------------------------------------------- /ale_linters/javascript/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for JavaScript files. 4 | 5 | call ale#handlers#cspell#DefineLinter('javascript') 6 | -------------------------------------------------------------------------------- /ale_linters/javascript/deno.vim: -------------------------------------------------------------------------------- 1 | " Author: Arnold Chand 2 | " Description: Deno lsp linter for JavaScript files. 3 | 4 | call ale#linter#Define('javascript', { 5 | \ 'name': 'deno', 6 | \ 'lsp': 'stdio', 7 | \ 'executable': function('ale#handlers#deno#GetExecutable'), 8 | \ 'command': '%e lsp', 9 | \ 'project_root': function('ale#handlers#deno#GetProjectRoot'), 10 | \ 'initialization_options': function('ale#handlers#deno#GetInitializationOptions'), 11 | \}) 12 | -------------------------------------------------------------------------------- /ale_linters/javascript/eslint.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: eslint for JavaScript files 3 | 4 | call ale#linter#Define('javascript', { 5 | \ 'name': 'eslint', 6 | \ 'output_stream': 'both', 7 | \ 'executable': function('ale#handlers#eslint#GetExecutable'), 8 | \ 'cwd': function('ale#handlers#eslint#GetCwd'), 9 | \ 'command': function('ale#handlers#eslint#GetCommand'), 10 | \ 'callback': 'ale#handlers#eslint#HandleJSON', 11 | \}) 12 | -------------------------------------------------------------------------------- /ale_linters/javascript/fecs.vim: -------------------------------------------------------------------------------- 1 | " Author: harttle 2 | " Description: fecs for JavaScript files 3 | 4 | call ale#linter#Define('javascript', { 5 | \ 'name': 'fecs', 6 | \ 'executable': function('ale#handlers#fecs#GetExecutable'), 7 | \ 'command': function('ale#handlers#fecs#GetCommand'), 8 | \ 'read_buffer': 0, 9 | \ 'callback': 'ale#handlers#fecs#Handle', 10 | \}) 11 | -------------------------------------------------------------------------------- /ale_linters/javascript/tsserver.vim: -------------------------------------------------------------------------------- 1 | " Author: Chaucerbao, w0rp 2 | " Description: tsserver integration for ALE 3 | 4 | call ale#Set('javascript_tsserver_executable', 'tsserver') 5 | call ale#Set('javascript_tsserver_config_path', '') 6 | call ale#Set('javascript_tsserver_use_global', get(g:, 'ale_use_global_executables', 0)) 7 | 8 | call ale#linter#Define('javascript', { 9 | \ 'name': 'tsserver', 10 | \ 'lsp': 'tsserver', 11 | \ 'executable': {b -> ale#path#FindExecutable(b, 'javascript_tsserver', [ 12 | \ 'node_modules/.bin/tsserver', 13 | \ ])}, 14 | \ 'command': '%e', 15 | \ 'project_root': function('ale#handlers#tsserver#GetProjectRoot'), 16 | \ 'language': '', 17 | \}) 18 | -------------------------------------------------------------------------------- /ale_linters/javascript/xo.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel Lupu 2 | " Description: xo for JavaScript files 3 | 4 | call ale#linter#Define('javascript', { 5 | \ 'name': 'xo', 6 | \ 'executable': function('ale#handlers#xo#GetExecutable'), 7 | \ 'command': function('ale#handlers#xo#GetLintCommand'), 8 | \ 'callback': 'ale#handlers#xo#HandleJSON', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/jinja/djlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Adrian Vollmer 2 | " Description: djlint for Django HTML template files 3 | 4 | call ale#Set('html_djlint_executable', 'djlint') 5 | call ale#Set('html_djlint_options', '') 6 | 7 | call ale#linter#Define('jinja', { 8 | \ 'name': 'djlint', 9 | \ 'executable': function('ale#handlers#djlint#GetExecutable'), 10 | \ 'command': function('ale#handlers#djlint#GetCommand'), 11 | \ 'callback': 'ale#handlers#djlint#Handle', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/json/biome.vim: -------------------------------------------------------------------------------- 1 | " Description: biome for json files 2 | 3 | call ale#linter#Define('json', { 4 | \ 'name': 'biome', 5 | \ 'lsp': 'stdio', 6 | \ 'language': function('ale#handlers#biome#GetLanguage'), 7 | \ 'executable': function('ale#handlers#biome#GetExecutable'), 8 | \ 'command': '%e lsp-proxy', 9 | \ 'project_root': function('ale#handlers#biome#GetProjectRoot'), 10 | \}) 11 | -------------------------------------------------------------------------------- /ale_linters/json/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for JSON files. 4 | 5 | call ale#handlers#cspell#DefineLinter('json') 6 | -------------------------------------------------------------------------------- /ale_linters/json/eslint.vim: -------------------------------------------------------------------------------- 1 | " Author: João Pesce 2 | " Description: eslint for JSON files. 3 | " 4 | " Requires eslint-plugin-jsonc or a similar plugin to work 5 | " 6 | " Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp 7 | " 8 | 9 | call ale#linter#Define('json', { 10 | \ 'name': 'eslint', 11 | \ 'output_stream': 'both', 12 | \ 'executable': function('ale#handlers#eslint#GetExecutable'), 13 | \ 'cwd': function('ale#handlers#eslint#GetCwd'), 14 | \ 'command': function('ale#handlers#eslint#GetCommand'), 15 | \ 'callback': 'ale#handlers#eslint#HandleJSON', 16 | \}) 17 | -------------------------------------------------------------------------------- /ale_linters/json/jq.vim: -------------------------------------------------------------------------------- 1 | " Author: jD91mZM2 2 | call ale#Set('json_jq_executable', 'jq') 3 | call ale#Set('json_jq_options', '') 4 | call ale#Set('json_jq_filters', '.') 5 | 6 | " Matches patterns like the following: 7 | " parse error: Expected another key-value pair at line 4, column 3 8 | let s:pattern = 'parse error: \(.\+\) at line \(\d\+\), column \(\d\+\)$' 9 | 10 | function! ale_linters#json#jq#Handle(buffer, lines) abort 11 | return ale#util#MapMatches(a:lines, s:pattern, {match -> { 12 | \ 'text': match[1], 13 | \ 'lnum': match[2] + 0, 14 | \ 'col': match[3] + 0, 15 | \}}) 16 | endfunction 17 | 18 | call ale#linter#Define('json', { 19 | \ 'name': 'jq', 20 | \ 'executable': {b -> ale#Var(b, 'json_jq_executable')}, 21 | \ 'output_stream': 'stderr', 22 | \ 'command': '%e', 23 | \ 'callback': 'ale_linters#json#jq#Handle', 24 | \}) 25 | -------------------------------------------------------------------------------- /ale_linters/json/spectral.vim: -------------------------------------------------------------------------------- 1 | " Author: t2h5 2 | " Description: Integration of Stoplight Spectral CLI with ALE. 3 | 4 | call ale#Set('json_spectral_executable', 'spectral') 5 | call ale#Set('json_spectral_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | call ale#linter#Define('json', { 8 | \ 'name': 'spectral', 9 | \ 'executable': {b -> ale#path#FindExecutable(b, 'json_spectral', [ 10 | \ 'node_modules/.bin/spectral', 11 | \ ])}, 12 | \ 'command': '%e lint --ignore-unknown-format -q -f text %t', 13 | \ 'callback': 'ale#handlers#spectral#HandleSpectralOutput' 14 | \}) 15 | -------------------------------------------------------------------------------- /ale_linters/json5/eslint.vim: -------------------------------------------------------------------------------- 1 | " Author: João Pesce 2 | " Description: eslint for JSON5 files. 3 | " 4 | " Requires eslint-plugin-jsonc or a similar plugin to work 5 | " 6 | " Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp 7 | " 8 | 9 | call ale#linter#Define('json5', { 10 | \ 'name': 'eslint', 11 | \ 'output_stream': 'both', 12 | \ 'executable': function('ale#handlers#eslint#GetExecutable'), 13 | \ 'cwd': function('ale#handlers#eslint#GetCwd'), 14 | \ 'command': function('ale#handlers#eslint#GetCommand'), 15 | \ 'callback': 'ale#handlers#eslint#HandleJSON', 16 | \}) 17 | -------------------------------------------------------------------------------- /ale_linters/jsonc/biome.vim: -------------------------------------------------------------------------------- 1 | " Description: biome for jsonc files 2 | 3 | call ale#linter#Define('jsonc', { 4 | \ 'name': 'biome', 5 | \ 'lsp': 'stdio', 6 | \ 'language': function('ale#handlers#biome#GetLanguage'), 7 | \ 'executable': function('ale#handlers#biome#GetExecutable'), 8 | \ 'command': '%e lsp-proxy', 9 | \ 'project_root': function('ale#handlers#biome#GetProjectRoot'), 10 | \}) 11 | -------------------------------------------------------------------------------- /ale_linters/jsonc/eslint.vim: -------------------------------------------------------------------------------- 1 | " Author: João Pesce 2 | " Description: eslint for JSONC files. 3 | " 4 | " Requires eslint-plugin-jsonc or a similar plugin to work 5 | " 6 | " Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp 7 | " 8 | 9 | call ale#linter#Define('jsonc', { 10 | \ 'name': 'eslint', 11 | \ 'output_stream': 'both', 12 | \ 'executable': function('ale#handlers#eslint#GetExecutable'), 13 | \ 'cwd': function('ale#handlers#eslint#GetCwd'), 14 | \ 'command': function('ale#handlers#eslint#GetCommand'), 15 | \ 'callback': 'ale#handlers#eslint#HandleJSON', 16 | \}) 17 | -------------------------------------------------------------------------------- /ale_linters/kotlin/ktlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Francis Agyapong 2 | " Description: Lint kotlin files using ktlint 3 | 4 | call ale#linter#Define('kotlin', { 5 | \ 'name': 'ktlint', 6 | \ 'executable': 'ktlint', 7 | \ 'command': function('ale#handlers#ktlint#GetCommand'), 8 | \ 'callback': 'ale#handlers#ktlint#Handle', 9 | \ 'output_stream': 'stderr' 10 | \}) 11 | -------------------------------------------------------------------------------- /ale_linters/less/stylelint.vim: -------------------------------------------------------------------------------- 1 | " Author: diartyz , w0rp 2 | 3 | call ale#Set('less_stylelint_executable', 'stylelint') 4 | call ale#Set('less_stylelint_options', '') 5 | call ale#Set('less_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | function! ale_linters#less#stylelint#GetCommand(buffer) abort 8 | let l:options = ale#Var(a:buffer, 'less_stylelint_options') 9 | 10 | return '%e' . ale#Pad(l:options) . ' --stdin-filename %s' 11 | endfunction 12 | 13 | call ale#linter#Define('less', { 14 | \ 'name': 'stylelint', 15 | \ 'output_stream': 'both', 16 | \ 'executable': {b -> ale#path#FindExecutable(b, 'less_stylelint', [ 17 | \ 'node_modules/.bin/stylelint', 18 | \ ])}, 19 | \ 'command': function('ale_linters#less#stylelint#GetCommand'), 20 | \ 'callback': 'ale#handlers#css#HandleStyleLintFormat', 21 | \}) 22 | -------------------------------------------------------------------------------- /ale_linters/lua/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Lua files. 4 | 5 | call ale#handlers#cspell#DefineLinter('lua') 6 | -------------------------------------------------------------------------------- /ale_linters/lua/lua_language_server.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: lua-language-server integration (https://github.com/LuaLS/lua-language-server) 3 | 4 | call ale#Set('lua_language_server_executable', 'lua-language-server') 5 | call ale#Set('lua_language_server_config', {}) 6 | 7 | call ale#linter#Define('lua', { 8 | \ 'name': 'lua_language_server', 9 | \ 'aliases': ['lua-language-server', 'lua_ls'], 10 | \ 'lsp': 'stdio', 11 | \ 'executable': {b -> ale#Var(b, 'lua_language_server_executable')}, 12 | \ 'command': '%e', 13 | \ 'project_root': function('ale#lua#FindProjectRoot'), 14 | \ 'lsp_config': {b -> ale#Var(b, 'lua_language_server_config')}, 15 | \}) 16 | -------------------------------------------------------------------------------- /ale_linters/mail/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for mail files 3 | 4 | call ale#handlers#alex#DefineLinter('mail', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/mail/languagetool.vim: -------------------------------------------------------------------------------- 1 | " Author: Vincent (wahrwolf [at] wolfpit.net) 2 | " Description: languagetool for mails 3 | 4 | 5 | call ale#handlers#languagetool#DefineLinter('mail') 6 | -------------------------------------------------------------------------------- /ale_linters/mail/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel M. Capella https://github.com/polyzen 2 | " Description: proselint for mail files 3 | 4 | call ale#linter#Define('mail', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/mail/vale.vim: -------------------------------------------------------------------------------- 1 | " Author: chew-z https://github.com/chew-z 2 | " Description: vale for Markdown files 3 | 4 | call ale#linter#Define('mail', { 5 | \ 'name': 'vale', 6 | \ 'executable': 'vale', 7 | \ 'command': 'vale --output=JSON %t', 8 | \ 'callback': 'ale#handlers#vale#Handle', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/markdown/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for markdown files 3 | 4 | call ale#handlers#alex#DefineLinter('markdown', '') 5 | -------------------------------------------------------------------------------- /ale_linters/markdown/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Markdown files. 4 | 5 | call ale#handlers#cspell#DefineLinter('markdown') 6 | -------------------------------------------------------------------------------- /ale_linters/markdown/languagetool.vim: -------------------------------------------------------------------------------- 1 | " Author: Vincent (wahrwolf [at] wolfpit.net) 2 | " Description: languagetool for markdown files 3 | 4 | 5 | call ale#handlers#languagetool#DefineLinter('markdown') 6 | -------------------------------------------------------------------------------- /ale_linters/markdown/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: poohzrn https://github.com/poohzrn 2 | " Description: proselint for Markdown files 3 | 4 | call ale#linter#Define('markdown', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/markdown/redpen.vim: -------------------------------------------------------------------------------- 1 | " Author: rhysd https://rhysd.github.io 2 | " Description: Redpen, a proofreading tool (http://redpen.cc) 3 | 4 | call ale#linter#Define('markdown', { 5 | \ 'name': 'redpen', 6 | \ 'executable': 'redpen', 7 | \ 'command': 'redpen -f markdown -r json %t', 8 | \ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/markdown/textlint.vim: -------------------------------------------------------------------------------- 1 | " Author: tokida https://rouger.info, Yasuhiro Kiyota 2 | " Description: textlint, a proofreading tool (https://textlint.github.io/) 3 | 4 | call ale#linter#Define('markdown', { 5 | \ 'name': 'textlint', 6 | \ 'executable': function('ale#handlers#textlint#GetExecutable'), 7 | \ 'command': function('ale#handlers#textlint#GetCommand'), 8 | \ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/markdown/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for Markdown files 3 | 4 | call ale#handlers#writegood#DefineLinter('markdown') 5 | -------------------------------------------------------------------------------- /ale_linters/nix/deadnix.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('nix_deadnix_executable', 'deadnix') 2 | call ale#Set('nix_deadnix_options', '') 3 | 4 | function! ale_linters#nix#deadnix#GetCommand(buffer) abort 5 | return '%e -o json' . ale#Pad(ale#Var(a:buffer, 'nix_deadnix_options')) . ' -- %t' 6 | endfunction 7 | 8 | call ale#linter#Define('nix', { 9 | \ 'name': 'deadnix', 10 | \ 'executable': {b -> ale#Var(b, 'nix_deadnix_executable')}, 11 | \ 'command': function('ale_linters#nix#deadnix#GetCommand'), 12 | \ 'callback': 'ale#handlers#deadnix#Handle', 13 | \}) 14 | -------------------------------------------------------------------------------- /ale_linters/nix/rnix_lsp.vim: -------------------------------------------------------------------------------- 1 | " Author: jD91mZM2 2 | " Description: rnix-lsp language client 3 | 4 | function! ale_linters#nix#rnix_lsp#GetProjectRoot(buffer) abort 5 | " rnix-lsp does not yet use the project root, so getting it right is not 6 | " important 7 | return fnamemodify(a:buffer, ':h') 8 | endfunction 9 | 10 | call ale#linter#Define('nix', { 11 | \ 'name': 'rnix_lsp', 12 | \ 'aliases': ['rnix'], 13 | \ 'lsp': 'stdio', 14 | \ 'executable': 'rnix-lsp', 15 | \ 'command': '%e', 16 | \ 'project_root': function('ale_linters#nix#rnix_lsp#GetProjectRoot'), 17 | \}) 18 | -------------------------------------------------------------------------------- /ale_linters/nix/statix.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: statix analysis and suggestions for Nix files 4 | 5 | call ale#Set('nix_statix_check_executable', 'statix') 6 | call ale#Set('nix_statix_check_options', '') 7 | 8 | function! ale_linters#nix#statix#GetCommand(buffer) abort 9 | return '%e check -o errfmt --stdin' 10 | \ . ale#Pad(ale#Var(a:buffer, 'nix_statix_check_options')) 11 | endfunction 12 | 13 | call ale#linter#Define('nix', { 14 | \ 'name': 'statix', 15 | \ 'executable': {b -> ale#Var(b, 'nix_statix_check_executable')}, 16 | \ 'command': function('ale_linters#nix#statix#GetCommand'), 17 | \ 'callback': 'ale#handlers#statix#Handle', 18 | \}) 19 | -------------------------------------------------------------------------------- /ale_linters/nroff/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for nroff files 3 | 4 | call ale#handlers#alex#DefineLinter('nroff', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/nroff/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel M. Capella https://github.com/polyzen 2 | " Description: proselint for nroff files 3 | 4 | call ale#linter#Define('nroff', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/nroff/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for nroff files 3 | 4 | call ale#handlers#writegood#DefineLinter('nroff') 5 | -------------------------------------------------------------------------------- /ale_linters/nunjucks/djlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Adrian Vollmer 2 | " Description: djlint for Django HTML template files 3 | 4 | call ale#Set('html_djlint_executable', 'djlint') 5 | call ale#Set('html_djlint_options', '') 6 | 7 | call ale#linter#Define('nunjucks', { 8 | \ 'name': 'djlint', 9 | \ 'executable': function('ale#handlers#djlint#GetExecutable'), 10 | \ 'command': function('ale#handlers#djlint#GetCommand'), 11 | \ 'callback': 'ale#handlers#djlint#Handle', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/objc/ccls.vim: -------------------------------------------------------------------------------- 1 | " Author: Ye Jingchen , Ben Falconer , jtalowell 2 | " Description: A language server for Objective-C 3 | 4 | call ale#Set('objc_ccls_executable', 'ccls') 5 | call ale#Set('objc_ccls_init_options', {}) 6 | call ale#Set('c_build_dir', '') 7 | 8 | call ale#linter#Define('objc', { 9 | \ 'name': 'ccls', 10 | \ 'lsp': 'stdio', 11 | \ 'executable': {b -> ale#Var(b, 'objc_ccls_executable')}, 12 | \ 'command': '%e', 13 | \ 'project_root': function('ale#handlers#ccls#GetProjectRoot'), 14 | \ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'objc_ccls_init_options')}, 15 | \}) 16 | -------------------------------------------------------------------------------- /ale_linters/objc/clangd.vim: -------------------------------------------------------------------------------- 1 | " Author: Andrey Melentyev 2 | " Description: Clangd language server 3 | 4 | call ale#Set('objc_clangd_executable', 'clangd') 5 | call ale#Set('objc_clangd_options', '') 6 | 7 | function! ale_linters#objc#clangd#GetCommand(buffer) abort 8 | return '%e' . ale#Pad(ale#Var(a:buffer, 'objc_clangd_options')) 9 | endfunction 10 | 11 | call ale#linter#Define('objc', { 12 | \ 'name': 'clangd', 13 | \ 'lsp': 'stdio', 14 | \ 'executable': {b -> ale#Var(b, 'objc_clangd_executable')}, 15 | \ 'command': function('ale_linters#objc#clangd#GetCommand'), 16 | \ 'project_root': function('ale#c#FindProjectRoot'), 17 | \}) 18 | -------------------------------------------------------------------------------- /ale_linters/objcpp/clangd.vim: -------------------------------------------------------------------------------- 1 | " Author: Andrey Melentyev 2 | " Description: Clangd language server 3 | 4 | call ale#Set('objcpp_clangd_executable', 'clangd') 5 | call ale#Set('objcpp_clangd_options', '') 6 | 7 | function! ale_linters#objcpp#clangd#GetCommand(buffer) abort 8 | return '%e' . ale#Pad(ale#Var(a:buffer, 'objcpp_clangd_options')) 9 | endfunction 10 | 11 | call ale#linter#Define('objcpp', { 12 | \ 'name': 'clangd', 13 | \ 'lsp': 'stdio', 14 | \ 'executable': {b -> ale#Var(b, 'objcpp_clangd_executable')}, 15 | \ 'command': function('ale_linters#objcpp#clangd#GetCommand'), 16 | \ 'project_root': function('ale#c#FindProjectRoot'), 17 | \}) 18 | -------------------------------------------------------------------------------- /ale_linters/ocaml/merlin.vim: -------------------------------------------------------------------------------- 1 | " Author: Andrey Popp -- @andreypopp 2 | " Description: Report errors in OCaml code with Merlin 3 | 4 | if !exists('g:merlin') 5 | finish 6 | endif 7 | 8 | function! ale_linters#ocaml#merlin#Handle(buffer, lines) abort 9 | return merlin#ErrorLocList() 10 | endfunction 11 | 12 | call ale#linter#Define('ocaml', { 13 | \ 'name': 'merlin', 14 | \ 'executable': 'ocamlmerlin', 15 | \ 'command': 'true', 16 | \ 'callback': 'ale_linters#ocaml#merlin#Handle', 17 | \}) 18 | -------------------------------------------------------------------------------- /ale_linters/ocaml/ocamllsp.vim: -------------------------------------------------------------------------------- 1 | " Author: Risto Stevcev 2 | " Description: The official language server for OCaml 3 | 4 | call ale#Set('ocaml_ocamllsp_use_opam', 1) 5 | 6 | call ale#linter#Define('ocaml', { 7 | \ 'name': 'ocamllsp', 8 | \ 'lsp': 'stdio', 9 | \ 'executable': function('ale#handlers#ocamllsp#GetExecutable'), 10 | \ 'command': function('ale#handlers#ocamllsp#GetCommand'), 11 | \ 'language': function('ale#handlers#ocamllsp#GetLanguage'), 12 | \ 'project_root': function('ale#handlers#ocamllsp#GetProjectRoot'), 13 | \}) 14 | -------------------------------------------------------------------------------- /ale_linters/ocaml/ols.vim: -------------------------------------------------------------------------------- 1 | " Author: Michael Jungo 2 | " Description: A language server for OCaml 3 | 4 | call ale#Set('ocaml_ols_executable', 'ocaml-language-server') 5 | call ale#Set('ocaml_ols_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | call ale#linter#Define('ocaml', { 8 | \ 'name': 'ols', 9 | \ 'aliases': ['ocaml-language-server'], 10 | \ 'lsp': 'stdio', 11 | \ 'executable': function('ale#handlers#ols#GetExecutable'), 12 | \ 'command': function('ale#handlers#ols#GetCommand'), 13 | \ 'language': function('ale#handlers#ols#GetLanguage'), 14 | \ 'project_root': function('ale#handlers#ols#GetProjectRoot'), 15 | \}) 16 | -------------------------------------------------------------------------------- /ale_linters/ocamlinterface/merlin.vim: -------------------------------------------------------------------------------- 1 | " Author: Andrey Popp -- @andreypopp 2 | " Description: Report errors in OCaml code with Merlin 3 | 4 | if !exists('g:merlin') 5 | finish 6 | endif 7 | 8 | function! ale_linters#ocamlinterface#merlin#Handle(buffer, lines) abort 9 | return merlin#ErrorLocList() 10 | endfunction 11 | 12 | call ale#linter#Define('ocamlinterface', { 13 | \ 'name': 'merlin', 14 | \ 'executable': 'ocamlmerlin', 15 | \ 'command': 'true', 16 | \ 'callback': 'ale_linters#ocamlinterface#merlin#Handle', 17 | \}) 18 | -------------------------------------------------------------------------------- /ale_linters/ocamlinterface/ocamllsp.vim: -------------------------------------------------------------------------------- 1 | " Author: Risto Stevcev 2 | " Description: The official language server for OCaml 3 | 4 | call ale#Set('ocaml_ocamllsp_use_opam', 1) 5 | 6 | call ale#linter#Define('ocamlinterface', { 7 | \ 'name': 'ocamllsp', 8 | \ 'lsp': 'stdio', 9 | \ 'executable': function('ale#handlers#ocamllsp#GetExecutable'), 10 | \ 'command': function('ale#handlers#ocamllsp#GetCommand'), 11 | \ 'language': function('ale#handlers#ocamllsp#GetLanguage'), 12 | \ 'project_root': function('ale#handlers#ocamllsp#GetProjectRoot'), 13 | \}) 14 | -------------------------------------------------------------------------------- /ale_linters/odin/ols.vim: -------------------------------------------------------------------------------- 1 | " Author: Benjamin Block 2 | " Description: A language server for Odin. 3 | 4 | function! ale_linters#odin#ols#GetProjectRoot(buffer) abort 5 | return fnamemodify('', ':h') 6 | endfunction 7 | 8 | call ale#Set('odin_ols_executable', 'ols') 9 | call ale#Set('odin_ols_config', {}) 10 | 11 | call ale#linter#Define('odin', { 12 | \ 'name': 'ols', 13 | \ 'lsp': 'stdio', 14 | \ 'language': 'odin', 15 | \ 'lsp_config': {b -> ale#Var(b, 'odin_ols_config')}, 16 | \ 'executable': {b -> ale#Var(b, 'odin_ols_executable')}, 17 | \ 'command': '%e', 18 | \ 'project_root': function('ale_linters#odin#ols#GetProjectRoot'), 19 | \}) 20 | -------------------------------------------------------------------------------- /ale_linters/openapi/yamllint.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('yaml_yamllint_executable', 'yamllint') 2 | call ale#Set('yaml_yamllint_options', '') 3 | 4 | call ale#linter#Define('openapi', { 5 | \ 'name': 'yamllint', 6 | \ 'executable': {b -> ale#Var(b, 'yaml_yamllint_executable')}, 7 | \ 'command': function('ale#handlers#yamllint#GetCommand'), 8 | \ 'callback': 'ale#handlers#yamllint#Handle', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/php/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for PHP files. 4 | 5 | call ale#handlers#cspell#DefineLinter('php') 6 | -------------------------------------------------------------------------------- /ale_linters/php/phpactor.vim: -------------------------------------------------------------------------------- 1 | " Author: Arizard 2 | " Description: PHPactor integration for ALE 3 | 4 | " Copied from langserver.vim 5 | function! ale_linters#php#phpactor#GetProjectRoot(buffer) abort 6 | let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json') 7 | 8 | if (!empty(l:composer_path)) 9 | return fnamemodify(l:composer_path, ':h') 10 | endif 11 | 12 | let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git') 13 | 14 | return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : '' 15 | endfunction 16 | 17 | call ale#linter#Define('php', { 18 | \ 'name': 'phpactor', 19 | \ 'lsp': 'stdio', 20 | \ 'executable': 'phpactor', 21 | \ 'command': '%e language-server', 22 | \ 'project_root': function('ale_linters#php#phpactor#GetProjectRoot'), 23 | \}) 24 | -------------------------------------------------------------------------------- /ale_linters/po/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Cian Butler https://github.com/butlerx 2 | " Description: alex for PO files 3 | 4 | call ale#handlers#alex#DefineLinter('po', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/po/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Cian Butler https://github.com/butlerx 2 | " Description: proselint for PO files 3 | 4 | call ale#linter#Define('po', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/po/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Cian Butler https://github.com/butlerx 2 | " Description: write-good for PO files 3 | 4 | call ale#handlers#writegood#DefineLinter('po') 5 | -------------------------------------------------------------------------------- /ale_linters/pod/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for pod files 3 | 4 | call ale#handlers#alex#DefineLinter('pod', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/pod/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel M. Capella https://github.com/polyzen 2 | " Description: proselint for Pod files 3 | 4 | call ale#linter#Define('pod', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/pod/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for Pod files 3 | 4 | call ale#handlers#writegood#DefineLinter('pod') 5 | -------------------------------------------------------------------------------- /ale_linters/pony/ponyc.vim: -------------------------------------------------------------------------------- 1 | " Description: ponyc linter for pony files 2 | 3 | call ale#Set('pony_ponyc_executable', 'ponyc') 4 | call ale#Set('pony_ponyc_options', '--pass paint') 5 | 6 | function! ale_linters#pony#ponyc#GetCommand(buffer) abort 7 | return '%e' . ale#Pad(ale#Var(a:buffer, 'pony_ponyc_options')) 8 | endfunction 9 | 10 | call ale#linter#Define('pony', { 11 | \ 'name': 'ponyc', 12 | \ 'output_stream': 'stderr', 13 | \ 'executable': {b -> ale#Var(b, 'pony_ponyc_executable')}, 14 | \ 'command': function('ale_linters#pony#ponyc#GetCommand'), 15 | \ 'callback': 'ale#handlers#pony#HandlePonycFormat', 16 | \}) 17 | -------------------------------------------------------------------------------- /ale_linters/powershell/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for PowerShell files. 4 | 5 | call ale#handlers#cspell#DefineLinter('powershell') 6 | -------------------------------------------------------------------------------- /ale_linters/proto/protolint.vim: -------------------------------------------------------------------------------- 1 | " Author: Yohei Yoshimuta 2 | " Description: run the protolint for Protocol Buffer files 3 | 4 | call ale#Set('proto_protolint_executable', 'protolint') 5 | call ale#Set('proto_protolint_config', '') 6 | 7 | function! ale_linters#proto#protolint#GetCommand(buffer) abort 8 | let l:config = ale#Var(a:buffer, 'proto_protolint_config') 9 | 10 | return '%e lint' 11 | \ . (!empty(l:config) ? ' -config_path=' . ale#Escape(l:config) : '') 12 | \ . ' -reporter=unix' 13 | \ . ' %s' 14 | endfunction 15 | 16 | call ale#linter#Define('proto', { 17 | \ 'name': 'protolint', 18 | \ 'lint_file': 1, 19 | \ 'output_stream': 'stderr', 20 | \ 'executable': {b -> ale#Var(b, 'proto_protolint_executable')}, 21 | \ 'command': function('ale_linters#proto#protolint#GetCommand'), 22 | \ 'callback': 'ale#handlers#unix#HandleAsError', 23 | \}) 24 | 25 | -------------------------------------------------------------------------------- /ale_linters/puppet/puppetlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Alexander Olofsson , Robert Flechtner 2 | " Description: puppet-lint for puppet files 3 | 4 | call ale#Set('puppet_puppetlint_executable', 'puppet-lint') 5 | call ale#Set('puppet_puppetlint_options', '--no-autoloader_layout-check') 6 | 7 | function! ale_linters#puppet#puppetlint#GetCommand(buffer) abort 8 | return '%e' . ale#Pad(ale#Var(a:buffer, 'puppet_puppetlint_options')) 9 | \ . ' --log-format "-:%{line}:%{column}: %{kind}: [%{check}] %{message}"' 10 | \ . ' %t' 11 | endfunction 12 | 13 | call ale#linter#Define('puppet', { 14 | \ 'name': 'puppetlint', 15 | \ 'executable': {b -> ale#Var(b, 'puppet_puppetlint_executable')}, 16 | \ 'command': function('ale_linters#puppet#puppetlint#GetCommand'), 17 | \ 'callback': 'ale#handlers#gcc#HandleGCCFormat', 18 | \}) 19 | -------------------------------------------------------------------------------- /ale_linters/python/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Python files. 4 | 5 | call ale#handlers#cspell#DefineLinter('python') 6 | -------------------------------------------------------------------------------- /ale_linters/qml/qmlfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: pylipp (www.github.com/pylipp) 2 | " Description: qmlfmt for QML files 3 | 4 | call ale#Set('qml_qmlfmt_executable', 'qmlfmt') 5 | 6 | " Find lines like 7 | " Error:11:1: Expected token `}' 8 | function! ale_linters#qml#qmlfmt#Handle(buffer, lines) abort 9 | let l:pattern = '\v^(Error|Warning):(\d+):(\d+): (.+)$' 10 | 11 | return map(ale#util#GetMatches(a:lines, l:pattern), "{ 12 | \ 'lnum': v:val[2] + 0, 13 | \ 'col': v:val[3] + 0, 14 | \ 'text': v:val[4], 15 | \ 'type': v:val[1] is# 'Warning' ? 'W' : 'E', 16 | \}") 17 | endfunction 18 | 19 | call ale#linter#Define('qml', { 20 | \ 'name': 'qmlfmt', 21 | \ 'output_stream': 'stderr', 22 | \ 'executable': {b -> ale#Var(b, 'qml_qmlfmt_executable')}, 23 | \ 'command': '%e -e', 24 | \ 'callback': 'ale_linters#qml#qmlfmt#Handle', 25 | \}) 26 | -------------------------------------------------------------------------------- /ale_linters/racket/langserver.vim: -------------------------------------------------------------------------------- 1 | call ale#linter#Define('racket', { 2 | \ 'name': 'racket_langserver', 3 | \ 'lsp': 'stdio', 4 | \ 'executable': 'racket', 5 | \ 'command': '%e -l racket-langserver', 6 | \ 'project_root': function('ale#racket#FindProjectRoot'), 7 | \}) 8 | -------------------------------------------------------------------------------- /ale_linters/reason/ls.vim: -------------------------------------------------------------------------------- 1 | " Author: David Buchan-Swanson 2 | " Description: Integrate ALE with reason-language-server. 3 | 4 | call ale#Set('reason_ls_executable', '') 5 | 6 | function! ale_linters#reason#ls#FindProjectRoot(buffer) abort 7 | let l:reason_config = ale#path#FindNearestFile(a:buffer, 'bsconfig.json') 8 | 9 | if !empty(l:reason_config) 10 | return fnamemodify(l:reason_config, ':h') 11 | endif 12 | 13 | return '' 14 | endfunction 15 | 16 | call ale#linter#Define('reason', { 17 | \ 'name': 'reason-language-server', 18 | \ 'aliases': ['reason_ls'], 19 | \ 'lsp': 'stdio', 20 | \ 'executable': {buffer -> ale#Var(buffer, 'reason_ls_executable')}, 21 | \ 'command': '%e', 22 | \ 'project_root': function('ale_linters#reason#ls#FindProjectRoot'), 23 | \ 'language': 'reason', 24 | \}) 25 | -------------------------------------------------------------------------------- /ale_linters/reason/merlin.vim: -------------------------------------------------------------------------------- 1 | " Author: Andrey Popp -- @andreypopp 2 | " Description: Report errors in ReasonML code with Merlin 3 | 4 | if !exists('g:merlin') 5 | finish 6 | endif 7 | 8 | function! ale_linters#reason#merlin#Handle(buffer, lines) abort 9 | return merlin#ErrorLocList() 10 | endfunction 11 | 12 | call ale#linter#Define('reason', { 13 | \ 'name': 'merlin', 14 | \ 'executable': 'ocamlmerlin', 15 | \ 'command': 'true', 16 | \ 'callback': 'ale_linters#reason#merlin#Handle', 17 | \}) 18 | -------------------------------------------------------------------------------- /ale_linters/reason/ols.vim: -------------------------------------------------------------------------------- 1 | " Author: Michael Jungo 2 | " Description: A language server for Reason 3 | 4 | call ale#Set('reason_ols_executable', 'ocaml-language-server') 5 | call ale#Set('reason_ols_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | call ale#linter#Define('reason', { 8 | \ 'name': 'ols', 9 | \ 'aliases': ['ocaml-language-server'], 10 | \ 'lsp': 'stdio', 11 | \ 'executable': function('ale#handlers#ols#GetExecutable'), 12 | \ 'command': function('ale#handlers#ols#GetCommand'), 13 | \ 'language': function('ale#handlers#ols#GetLanguage'), 14 | \ 'project_root': function('ale#handlers#ols#GetProjectRoot'), 15 | \}) 16 | -------------------------------------------------------------------------------- /ale_linters/rego/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Description: cspell support for rego files. 3 | 4 | call ale#handlers#cspell#DefineLinter('rego') 5 | -------------------------------------------------------------------------------- /ale_linters/review/redpen.vim: -------------------------------------------------------------------------------- 1 | " Author: rhysd https://rhysd.github.io 2 | " Description: Redpen, a proofreading tool (http://redpen.cc) 3 | 4 | call ale#linter#Define('review', { 5 | \ 'name': 'redpen', 6 | \ 'executable': 'redpen', 7 | \ 'command': 'redpen -f review -r json %t', 8 | \ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/rst/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for rst files 3 | 4 | call ale#handlers#alex#DefineLinter('rst', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/rst/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for ReStructuredText files. 4 | 5 | call ale#handlers#cspell#DefineLinter('rst') 6 | -------------------------------------------------------------------------------- /ale_linters/rst/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel M. Capella https://github.com/polyzen 2 | " Description: proselint for reStructuredText files 3 | 4 | call ale#linter#Define('rst', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/rst/redpen.vim: -------------------------------------------------------------------------------- 1 | " Author: rhysd https://rhysd.github.io 2 | " Description: Redpen, a proofreading tool (http://redpen.cc) 3 | 4 | call ale#linter#Define('rst', { 5 | \ 'name': 'redpen', 6 | \ 'executable': 'redpen', 7 | \ 'command': 'redpen -f rest -r json %t', 8 | \ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/rst/textlint.vim: -------------------------------------------------------------------------------- 1 | " Author: hokorobi 2 | " Description: textlint, a proofreading tool (https://textlint.github.io/) 3 | 4 | call ale#linter#Define('rst', { 5 | \ 'name': 'textlint', 6 | \ 'executable': function('ale#handlers#textlint#GetExecutable'), 7 | \ 'command': function('ale#handlers#textlint#GetCommand'), 8 | \ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/rst/vale.vim: -------------------------------------------------------------------------------- 1 | " Author: chew-z https://github.com/chew-z 2 | " Description: vale for RST files 3 | 4 | call ale#linter#Define('rst', { 5 | \ 'name': 'vale', 6 | \ 'executable': 'vale', 7 | \ 'command': 'vale --output=JSON %t', 8 | \ 'callback': 'ale#handlers#vale#Handle', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/rst/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for reStructuredText files 3 | 4 | call ale#handlers#writegood#DefineLinter('rst') 5 | -------------------------------------------------------------------------------- /ale_linters/ruby/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Ruby files. 4 | 5 | call ale#handlers#cspell#DefineLinter('ruby') 6 | -------------------------------------------------------------------------------- /ale_linters/ruby/ruby.vim: -------------------------------------------------------------------------------- 1 | " Author: Brandon Roehl - https://github.com/BrandonRoehl 2 | " Description: Ruby MRI for Ruby files 3 | 4 | call ale#Set('ruby_ruby_executable', 'ruby') 5 | 6 | call ale#linter#Define('ruby', { 7 | \ 'name': 'ruby', 8 | \ 'executable': {b -> ale#Var(b, 'ruby_ruby_executable')}, 9 | \ 'command': '%e -w -c %t', 10 | \ 'output_stream': 'stderr', 11 | \ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/rust/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Rust files. 4 | 5 | call ale#handlers#cspell#DefineLinter('rust') 6 | -------------------------------------------------------------------------------- /ale_linters/sass/stylelint.vim: -------------------------------------------------------------------------------- 1 | " Author: diartyz 2 | 3 | call ale#Set('sass_stylelint_executable', 'stylelint') 4 | call ale#Set('sass_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) 5 | 6 | call ale#linter#Define('sass', { 7 | \ 'name': 'stylelint', 8 | \ 'output_stream': 'both', 9 | \ 'executable': {b -> ale#path#FindExecutable(b, 'sass_stylelint', [ 10 | \ 'node_modules/.bin/stylelint', 11 | \ ])}, 12 | \ 'command': '%e --stdin-filename %s', 13 | \ 'callback': 'ale#handlers#css#HandleStyleLintFormat', 14 | \}) 15 | -------------------------------------------------------------------------------- /ale_linters/scala/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Scala files. 4 | 5 | call ale#handlers#cspell#DefineLinter('scala') 6 | -------------------------------------------------------------------------------- /ale_linters/scala/fsc.vim: -------------------------------------------------------------------------------- 1 | " Author: Nils Leuzinger - https://github.com/PawkyPenguin 2 | " Description: Basic scala support using fsc 3 | 4 | function! s:IsSbt(buffer) abort 5 | return index(split(getbufvar(a:buffer, '&filetype'), '\.'), 'sbt') >= 0 6 | endfunction 7 | 8 | call ale#linter#Define('scala', { 9 | \ 'name': 'fsc', 10 | \ 'executable': {buf -> s:IsSbt(buf) ? '' : 'fsc'}, 11 | \ 'command': '%e -Ystop-after:parser %t', 12 | \ 'callback': 'ale#handlers#scala#HandleScalacLintFormat', 13 | \ 'output_stream': 'stderr', 14 | \}) 15 | -------------------------------------------------------------------------------- /ale_linters/scala/scalac.vim: -------------------------------------------------------------------------------- 1 | " Author: Zoltan Kalmar - https://github.com/kalmiz, 2 | " w0rp 3 | " Description: Basic scala support using scalac 4 | 5 | function! s:IsSbt(buffer) abort 6 | return index(split(getbufvar(a:buffer, '&filetype'), '\.'), 'sbt') >= 0 7 | endfunction 8 | 9 | call ale#linter#Define('scala', { 10 | \ 'name': 'scalac', 11 | \ 'executable': {buf -> s:IsSbt(buf) ? '' : 'scalac'}, 12 | \ 'command': '%e -Ystop-after:parser %t', 13 | \ 'callback': 'ale#handlers#scala#HandleScalacLintFormat', 14 | \ 'output_stream': 'stderr', 15 | \}) 16 | -------------------------------------------------------------------------------- /ale_linters/scss/stylelint.vim: -------------------------------------------------------------------------------- 1 | " Author: diartyz 2 | 3 | call ale#Set('scss_stylelint_executable', 'stylelint') 4 | call ale#Set('scss_stylelint_options', '') 5 | call ale#Set('scss_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | function! ale_linters#scss#stylelint#GetCommand(buffer) abort 8 | return '%e ' . ale#Pad(ale#Var(a:buffer, 'scss_stylelint_options')) 9 | \ . ' --stdin-filename %s' 10 | endfunction 11 | 12 | call ale#linter#Define('scss', { 13 | \ 'name': 'stylelint', 14 | \ 'output_stream': 'both', 15 | \ 'executable': {b -> ale#path#FindExecutable(b, 'scss_stylelint', [ 16 | \ 'node_modules/.bin/stylelint', 17 | \ ])}, 18 | \ 'command': function('ale_linters#scss#stylelint#GetCommand'), 19 | \ 'callback': 'ale#handlers#css#HandleStyleLintFormat', 20 | \}) 21 | -------------------------------------------------------------------------------- /ale_linters/sh/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for shell scripts. 4 | 5 | call ale#handlers#cspell#DefineLinter('sh') 6 | -------------------------------------------------------------------------------- /ale_linters/sh/shellcheck.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: shellcheck linter for shell scripts. 3 | 4 | call ale#handlers#shellcheck#DefineLinter('sh') 5 | -------------------------------------------------------------------------------- /ale_linters/sml/smlnj.vim: -------------------------------------------------------------------------------- 1 | " Author: Paulo Alem , Jake Zimmerman 2 | " Description: Single-file SML checking with SML/NJ compiler 3 | 4 | call ale#linter#Define('sml', { 5 | \ 'name': 'smlnj', 6 | \ 'executable': function('ale#handlers#sml#GetExecutableSmlnjFile'), 7 | \ 'command': 'sml', 8 | \ 'callback': 'ale#handlers#sml#Handle', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/sml/smlnj_cm.vim: -------------------------------------------------------------------------------- 1 | " Author: Jake Zimmerman 2 | " Description: SML checking with SML/NJ Compilation Manager 3 | 4 | function! ale_linters#sml#smlnj_cm#GetCommand(buffer) abort 5 | let l:cmfile = ale#handlers#sml#GetCmFile(a:buffer) 6 | 7 | return 'sml -m ' . l:cmfile . ' < /dev/null' 8 | endfunction 9 | 10 | " Using CM requires that we set "lint_file: 1", since it reads the files 11 | " from the disk itself. 12 | call ale#linter#Define('sml', { 13 | \ 'name': 'smlnj_cm', 14 | \ 'aliases': ['smlnj-cm'], 15 | \ 'executable': function('ale#handlers#sml#GetExecutableSmlnjCm'), 16 | \ 'lint_file': 1, 17 | \ 'command': function('ale_linters#sml#smlnj_cm#GetCommand'), 18 | \ 'callback': 'ale#handlers#sml#Handle', 19 | \}) 20 | 21 | " vim:ts=4:sts=4:sw=4 22 | -------------------------------------------------------------------------------- /ale_linters/solidity/solium.vim: -------------------------------------------------------------------------------- 1 | " Author: Jeff Sutherland - https://github.com/jdsutherland 2 | " Description: Report errors in Solidity code with solium 3 | 4 | call ale#linter#Define('solidity', { 5 | \ 'name': 'solium', 6 | \ 'executable': 'solium', 7 | \ 'command': 'solium --reporter gcc --file %t', 8 | \ 'callback': 'ale#handlers#gcc#HandleGCCFormat', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/sql/sqlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Adriaan Zonnenberg 2 | " Description: sqlint for SQL files 3 | 4 | function! ale_linters#sql#sqlint#Handle(buffer, lines) abort 5 | " Matches patterns like the following: 6 | " 7 | " stdin:3:1:ERROR syntax error at or near "WIBBLE" 8 | let l:pattern = '\v^[^:]+:(\d+):(\d+):(\u+) (.*)' 9 | let l:output = [] 10 | 11 | for l:match in ale#util#GetMatches(a:lines, l:pattern) 12 | call add(l:output, { 13 | \ 'lnum': l:match[1] + 0, 14 | \ 'col': l:match[2] + 0, 15 | \ 'type': l:match[3][0], 16 | \ 'text': l:match[4], 17 | \}) 18 | endfor 19 | 20 | return l:output 21 | endfunction 22 | 23 | call ale#linter#Define('sql', { 24 | \ 'name': 'sqlint', 25 | \ 'executable': 'sqlint', 26 | \ 'command': 'sqlint', 27 | \ 'callback': 'ale_linters#sql#sqlint#Handle', 28 | \}) 29 | -------------------------------------------------------------------------------- /ale_linters/stylus/stylelint.vim: -------------------------------------------------------------------------------- 1 | " Author: diartyz , w0rp 2 | 3 | call ale#Set('stylus_stylelint_executable', 'stylelint') 4 | call ale#Set('stylus_stylelint_options', '') 5 | call ale#Set('stylus_stylelint_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | function! ale_linters#stylus#stylelint#GetCommand(buffer) abort 8 | return '%e' 9 | \ . ale#Pad(ale#Var(a:buffer, 'stylus_stylelint_options')) 10 | \ . ' --stdin-filename %s' 11 | endfunction 12 | 13 | call ale#linter#Define('stylus', { 14 | \ 'name': 'stylelint', 15 | \ 'output_stream': 'both', 16 | \ 'executable': {b -> ale#path#FindExecutable(b, 'stylus_stylelint', [ 17 | \ 'node_modules/.bin/stylelint', 18 | \ ])}, 19 | \ 'command': function('ale_linters#stylus#stylelint#GetCommand'), 20 | \ 'callback': 'ale#handlers#css#HandleStyleLintFormat', 21 | \}) 22 | -------------------------------------------------------------------------------- /ale_linters/swift/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Swift files. 4 | 5 | call ale#handlers#cspell#DefineLinter('swift') 6 | -------------------------------------------------------------------------------- /ale_linters/swift/sourcekitlsp.vim: -------------------------------------------------------------------------------- 1 | " Author: Dan Loman 2 | " Description: Support for sourcekit-lsp https://github.com/apple/sourcekit-lsp 3 | 4 | call ale#Set('sourcekit_lsp_executable', 'sourcekit-lsp') 5 | 6 | call ale#linter#Define('swift', { 7 | \ 'name': 'sourcekitlsp', 8 | \ 'aliases': ['sourcekit'], 9 | \ 'lsp': 'stdio', 10 | \ 'executable': {b -> ale#Var(b, 'sourcekit_lsp_executable')}, 11 | \ 'command': '%e', 12 | \ 'project_root': function('ale#swift#FindProjectRoot'), 13 | \ 'language': 'swift', 14 | \}) 15 | -------------------------------------------------------------------------------- /ale_linters/systemd/systemd_analyze.vim: -------------------------------------------------------------------------------- 1 | function! ale_linters#systemd#systemd_analyze#Handle(buffer, lines) abort 2 | return ale#util#MapMatches(a:lines, '\v(.+):([0-9]+): (.+)', {match -> { 3 | \ 'lnum': str2nr(match[2]), 4 | \ 'col': 1, 5 | \ 'type': 'W', 6 | \ 'text': match[3], 7 | \}}) 8 | endfunction 9 | 10 | call ale#linter#Define('systemd', { 11 | \ 'name': 'systemd_analyze', 12 | \ 'aliases': ['systemd-analyze'], 13 | \ 'executable': 'systemd-analyze', 14 | \ 'command': 'SYSTEMD_LOG_COLOR=0 %e --user verify %s', 15 | \ 'callback': 'ale_linters#systemd#systemd_analyze#Handle', 16 | \ 'output_stream': 'both', 17 | \ 'lint_file': 1, 18 | \}) 19 | -------------------------------------------------------------------------------- /ale_linters/testft/testlinter.vim: -------------------------------------------------------------------------------- 1 | " Author: neersighted 2 | " Description: dummy linter to use in tests 3 | 4 | call ale#linter#Define('testft', { 5 | \ 'name': 'testlinter', 6 | \ 'output_stream': 'stdout', 7 | \ 'executable': 'testlinter', 8 | \ 'command': 'testlinter', 9 | \ 'callback': 'testCB', 10 | \}) 11 | -------------------------------------------------------------------------------- /ale_linters/tex/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for TeX files 3 | 4 | call ale#handlers#alex#DefineLinter('tex', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/tex/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for TeX files. 4 | 5 | call ale#handlers#cspell#DefineLinter('tex') 6 | -------------------------------------------------------------------------------- /ale_linters/tex/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: poohzrn https://github.com/poohzrn 2 | " Description: proselint for TeX files 3 | 4 | call ale#linter#Define('tex', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/tex/redpen.vim: -------------------------------------------------------------------------------- 1 | " Author: rhysd https://rhysd.github.io 2 | " Description: Redpen, a proofreading tool (http://redpen.cc) 3 | 4 | call ale#linter#Define('tex', { 5 | \ 'name': 'redpen', 6 | \ 'executable': 'redpen', 7 | \ 'command': 'redpen -f latex -r json %t', 8 | \ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/tex/textlint.vim: -------------------------------------------------------------------------------- 1 | " Author: TANIGUCHI Masaya 2 | " Description: textlint for LaTeX files 3 | 4 | call ale#linter#Define('tex', { 5 | \ 'name': 'textlint', 6 | \ 'executable': function('ale#handlers#textlint#GetExecutable'), 7 | \ 'command': function('ale#handlers#textlint#GetCommand'), 8 | \ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/tex/vale.vim: -------------------------------------------------------------------------------- 1 | " Author: chew-z https://github.com/chew-z 2 | " Description: vale for LaTeX files 3 | 4 | call ale#linter#Define('tex', { 5 | \ 'name': 'vale', 6 | \ 'executable': 'vale', 7 | \ 'command': 'vale --output=JSON %t', 8 | \ 'callback': 'ale#handlers#vale#Handle', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/tex/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for TeX files 3 | 4 | call ale#handlers#writegood#DefineLinter('tex') 5 | -------------------------------------------------------------------------------- /ale_linters/texinfo/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for texinfo files 3 | 4 | call ale#handlers#alex#DefineLinter('texinfo', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/texinfo/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for TeXInfo files. 4 | 5 | call ale#handlers#cspell#DefineLinter('texinfo') 6 | -------------------------------------------------------------------------------- /ale_linters/texinfo/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel M. Capella https://github.com/polyzen 2 | " Description: proselint for Texinfo files 3 | 4 | call ale#linter#Define('texinfo', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/texinfo/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for Texinfo files 3 | 4 | call ale#handlers#writegood#DefineLinter('texinfo') 5 | -------------------------------------------------------------------------------- /ale_linters/text/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for text files 3 | 4 | call ale#handlers#alex#DefineLinter('text', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/text/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for general text files. 4 | 5 | call ale#handlers#cspell#DefineLinter('text') 6 | -------------------------------------------------------------------------------- /ale_linters/text/languagetool.vim: -------------------------------------------------------------------------------- 1 | " Author: Vincent (wahrwolf [ät] wolfpit.net) 2 | " Description: languagetool for text files 3 | 4 | call ale#handlers#languagetool#DefineLinter('text') 5 | -------------------------------------------------------------------------------- /ale_linters/text/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: poohzrn https://github.com/poohzrn 2 | " Description: proselint for text files 3 | 4 | call ale#linter#Define('text', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/text/redpen.vim: -------------------------------------------------------------------------------- 1 | " Author: rhysd https://rhysd.github.io 2 | " Description: Redpen, a proofreading tool (http://redpen.cc) 3 | 4 | call ale#linter#Define('text', { 5 | \ 'name': 'redpen', 6 | \ 'executable': 'redpen', 7 | \ 'command': 'redpen -f plain -r json %t', 8 | \ 'callback': 'ale#handlers#redpen#HandleRedpenOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/text/textlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Yasuhiro Kiyota 2 | " Description: textlint, a proofreading tool (https://textlint.github.io/) 3 | 4 | call ale#linter#Define('text', { 5 | \ 'name': 'textlint', 6 | \ 'executable': function('ale#handlers#textlint#GetExecutable'), 7 | \ 'command': function('ale#handlers#textlint#GetCommand'), 8 | \ 'callback': 'ale#handlers#textlint#HandleTextlintOutput', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/text/vale.vim: -------------------------------------------------------------------------------- 1 | " Author: chew-z https://github.com/chew-z 2 | " Description: vale for text files 3 | 4 | call ale#linter#Define('text', { 5 | \ 'name': 'vale', 6 | \ 'executable': 'vale', 7 | \ 'command': 'vale --output=JSON %t', 8 | \ 'callback': 'ale#handlers#vale#Handle', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/text/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for text files 3 | 4 | call ale#handlers#writegood#DefineLinter('text') 5 | -------------------------------------------------------------------------------- /ale_linters/typescript/biome.vim: -------------------------------------------------------------------------------- 1 | " Author: Filip Gospodinov 2 | " Description: biome for TypeScript files 3 | 4 | call ale#linter#Define('typescript', { 5 | \ 'name': 'biome', 6 | \ 'lsp': 'stdio', 7 | \ 'language': function('ale#handlers#biome#GetLanguage'), 8 | \ 'executable': function('ale#handlers#biome#GetExecutable'), 9 | \ 'command': '%e lsp-proxy', 10 | \ 'project_root': function('ale#handlers#biome#GetProjectRoot'), 11 | \}) 12 | -------------------------------------------------------------------------------- /ale_linters/typescript/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for TypeScript files. 4 | 5 | call ale#handlers#cspell#DefineLinter('typescript') 6 | -------------------------------------------------------------------------------- /ale_linters/typescript/deno.vim: -------------------------------------------------------------------------------- 1 | " Author: Mohammed Chelouti - https://github.com/motato1 2 | " Arnold Chand 3 | " Description: Deno lsp linter for TypeScript files. 4 | 5 | call ale#linter#Define('typescript', { 6 | \ 'name': 'deno', 7 | \ 'lsp': 'stdio', 8 | \ 'executable': function('ale#handlers#deno#GetExecutable'), 9 | \ 'command': '%e lsp', 10 | \ 'project_root': function('ale#handlers#deno#GetProjectRoot'), 11 | \ 'initialization_options': function('ale#handlers#deno#GetInitializationOptions'), 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/typescript/eslint.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: eslint for JavaScript files 3 | 4 | call ale#linter#Define('typescript', { 5 | \ 'name': 'eslint', 6 | \ 'executable': function('ale#handlers#eslint#GetExecutable'), 7 | \ 'cwd': function('ale#handlers#eslint#GetCwd'), 8 | \ 'command': function('ale#handlers#eslint#GetCommand'), 9 | \ 'callback': 'ale#handlers#eslint#HandleJSON', 10 | \}) 11 | -------------------------------------------------------------------------------- /ale_linters/typescript/tsserver.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: tsserver integration for ALE 3 | 4 | call ale#Set('typescript_tsserver_executable', 'tsserver') 5 | call ale#Set('typescript_tsserver_config_path', '') 6 | call ale#Set('typescript_tsserver_use_global', get(g:, 'ale_use_global_executables', 0)) 7 | 8 | call ale#linter#Define('typescript', { 9 | \ 'name': 'tsserver', 10 | \ 'lsp': 'tsserver', 11 | \ 'executable': {b -> ale#path#FindExecutable(b, 'typescript_tsserver', [ 12 | \ '.yarn/sdks/typescript/bin/tsserver', 13 | \ 'node_modules/.bin/tsserver', 14 | \ ])}, 15 | \ 'command': '%e', 16 | \ 'project_root': function('ale#handlers#tsserver#GetProjectRoot'), 17 | \ 'language': '', 18 | \}) 19 | -------------------------------------------------------------------------------- /ale_linters/typescript/xo.vim: -------------------------------------------------------------------------------- 1 | call ale#linter#Define('typescript', { 2 | \ 'name': 'xo', 3 | \ 'executable': function('ale#handlers#xo#GetExecutable'), 4 | \ 'command': function('ale#handlers#xo#GetLintCommand'), 5 | \ 'callback': 'ale#handlers#xo#HandleJSON', 6 | \}) 7 | -------------------------------------------------------------------------------- /ale_linters/verilog/hdl_checker.vim: -------------------------------------------------------------------------------- 1 | " Author: suoto 2 | " Description: Adds support for HDL Code Checker, which wraps vcom/vlog, ghdl 3 | " or xvhdl. More info on https://github.com/suoto/hdl_checker 4 | 5 | call ale#handlers#hdl_checker#DefineLinter('verilog') 6 | -------------------------------------------------------------------------------- /ale_linters/vhdl/hdl_checker.vim: -------------------------------------------------------------------------------- 1 | " Author: suoto 2 | " Description: Adds support for HDL Code Checker, which wraps vcom/vlog, ghdl 3 | " or xvhdl. More info on https://github.com/suoto/hdl_checker 4 | 5 | call ale#handlers#hdl_checker#DefineLinter('vhdl') 6 | -------------------------------------------------------------------------------- /ale_linters/vue/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for Vue files. 4 | 5 | call ale#handlers#cspell#DefineLinter('vue') 6 | -------------------------------------------------------------------------------- /ale_linters/vue/vls.vim: -------------------------------------------------------------------------------- 1 | " Author: Alexander Olofsson 2 | " Description: Vue vls Language Server integration for ALE 3 | 4 | call ale#Set('vue_vls_executable', 'vls') 5 | call ale#Set('vue_vls_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | function! ale_linters#vue#vls#GetProjectRoot(buffer) abort 8 | let l:package_path = ale#path#FindNearestFile(a:buffer, 'package.json') 9 | 10 | return !empty(l:package_path) ? fnamemodify(l:package_path, ':h') : '' 11 | endfunction 12 | 13 | call ale#linter#Define('vue', { 14 | \ 'name': 'vls', 15 | \ 'aliases': ['vuels'], 16 | \ 'lsp': 'stdio', 17 | \ 'executable': {b -> ale#path#FindExecutable(b, 'vue_vls', [ 18 | \ 'node_modules/.bin/vls', 19 | \ ])}, 20 | \ 'command': '%e --stdio', 21 | \ 'language': 'vue', 22 | \ 'project_root': function('ale_linters#vue#vls#GetProjectRoot'), 23 | \}) 24 | -------------------------------------------------------------------------------- /ale_linters/wgsl/naga.vim: -------------------------------------------------------------------------------- 1 | " Author: rhysd 2 | " Description: naga-cli linter for WGSL syntax. 3 | 4 | call ale#Set('wgsl_naga_executable', 'naga') 5 | 6 | call ale#linter#Define('wgsl', { 7 | \ 'name': 'naga', 8 | \ 'executable': {b -> ale#Var(b, 'wgsl_naga_executable')}, 9 | \ 'output_stream': 'stderr', 10 | \ 'command': {b -> '%e --stdin-file-path %s'}, 11 | \ 'callback': 'ale#handlers#naga#Handle', 12 | \}) 13 | -------------------------------------------------------------------------------- /ale_linters/xhtml/alex.vim: -------------------------------------------------------------------------------- 1 | " Author: Johannes Wienke 2 | " Description: alex for XHTML files 3 | 4 | call ale#handlers#alex#DefineLinter('xhtml', '--text') 5 | -------------------------------------------------------------------------------- /ale_linters/xhtml/cspell.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: cspell support for XHTML files. 4 | 5 | call ale#handlers#cspell#DefineLinter('xhtml') 6 | -------------------------------------------------------------------------------- /ale_linters/xhtml/proselint.vim: -------------------------------------------------------------------------------- 1 | " Author: Daniel M. Capella https://github.com/polyzen 2 | " Description: proselint for XHTML files 3 | 4 | call ale#linter#Define('xhtml', { 5 | \ 'name': 'proselint', 6 | \ 'executable': 'proselint', 7 | \ 'command': 'proselint %t', 8 | \ 'callback': 'ale#handlers#unix#HandleAsWarning', 9 | \}) 10 | -------------------------------------------------------------------------------- /ale_linters/xhtml/writegood.vim: -------------------------------------------------------------------------------- 1 | " Author: Sumner Evans 2 | " Description: write-good for XHTML files 3 | 4 | call ale#handlers#writegood#DefineLinter('xhtml') 5 | -------------------------------------------------------------------------------- /ale_linters/yaml/spectral.vim: -------------------------------------------------------------------------------- 1 | " Author: t2h5 2 | " Description: Integration of Stoplight Spectral CLI with ALE. 3 | 4 | call ale#Set('yaml_spectral_executable', 'spectral') 5 | call ale#Set('yaml_spectral_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | 7 | call ale#linter#Define('yaml', { 8 | \ 'name': 'spectral', 9 | \ 'executable': {b -> ale#path#FindExecutable(b, 'yaml_spectral', [ 10 | \ 'node_modules/.bin/spectral', 11 | \ ])}, 12 | \ 'command': '%e lint --ignore-unknown-format -q -f text %t', 13 | \ 'callback': 'ale#handlers#spectral#HandleSpectralOutput' 14 | \}) 15 | -------------------------------------------------------------------------------- /ale_linters/yaml/yamllint.vim: -------------------------------------------------------------------------------- 1 | " Author: KabbAmine 2 | 3 | call ale#Set('yaml_yamllint_executable', 'yamllint') 4 | call ale#Set('yaml_yamllint_options', '') 5 | 6 | call ale#linter#Define('yaml', { 7 | \ 'name': 'yamllint', 8 | \ 'executable': {b -> ale#Var(b, 'yaml_yamllint_executable')}, 9 | \ 'command': function('ale#handlers#yamllint#GetCommand'), 10 | \ 'callback': 'ale#handlers#yamllint#Handle', 11 | \}) 12 | -------------------------------------------------------------------------------- /ale_linters/yaml/yq.vim: -------------------------------------------------------------------------------- 1 | " Author: axhav 2 | call ale#Set('yaml_yq_executable', 'yq') 3 | call ale#Set('yaml_yq_options', '') 4 | call ale#Set('yaml_yq_filters', '.') 5 | 6 | " Matches patterns like the following: 7 | let s:pattern = '^Error\:.* line \(\d\+\)\: \(.\+\)$' 8 | 9 | function! ale_linters#yaml#yq#Handle(buffer, lines) abort 10 | return ale#util#MapMatches(a:lines, s:pattern, {match -> { 11 | \ 'lnum': match[1] + 0, 12 | \ 'text': match[2], 13 | \}}) 14 | endfunction 15 | 16 | call ale#linter#Define('yaml', { 17 | \ 'name': 'yq', 18 | \ 'executable': {b -> ale#Var(b, 'yaml_yq_executable')}, 19 | \ 'output_stream': 'stderr', 20 | \ 'command': '%e', 21 | \ 'callback': 'ale_linters#yaml#yq#Handle', 22 | \}) 23 | -------------------------------------------------------------------------------- /ale_linters/yang/yang_lsp.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('yang_lsp_executable', 'yang-language-server') 2 | 3 | function! ale_linters#yang#yang_lsp#GetProjectRoot(buffer) abort 4 | let l:project_root = ale#path#FindNearestFile(a:buffer, 'yang.settings') 5 | 6 | return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' 7 | endfunction 8 | 9 | call ale#linter#Define('yang', { 10 | \ 'name': 'yang_lsp', 11 | \ 'lsp': 'stdio', 12 | \ 'executable': {b -> ale#Var(b, 'yang_lsp_executable')}, 13 | \ 'project_root': function('ale_linters#yang#yang_lsp#GetProjectRoot'), 14 | \ 'command': '%e', 15 | \}) 16 | -------------------------------------------------------------------------------- /ale_linters/yara/yls.vim: -------------------------------------------------------------------------------- 1 | " Author: TcM1911 2 | " Description: A language server for Yara. 3 | 4 | call ale#Set('yara_yls_executable', 'yls') 5 | 6 | function! ale_linters#yara#yls#FindProjectRoot(buffer) abort 7 | let l:project_root = ale#path#FindNearestDirectory(a:buffer, '.git') 8 | 9 | return !empty(l:project_root) ? (ale#path#Upwards(l:project_root)[1]) : '' 10 | endfunction 11 | 12 | call ale#linter#Define('yara', { 13 | \ 'name': 'yls', 14 | \ 'lsp': 'stdio', 15 | \ 'executable': {b -> ale#Var(b, 'yara_yls_executable')}, 16 | \ 'command': '%e -v', 17 | \ 'project_root': function('ale_linters#yara#yls#FindProjectRoot'), 18 | \}) 19 | -------------------------------------------------------------------------------- /ale_linters/zeek/zeek.vim: -------------------------------------------------------------------------------- 1 | " Author: Benjamin Bannier 2 | " Description: Support for checking Zeek files. 3 | " 4 | call ale#Set('zeek_zeek_executable', 'zeek') 5 | 6 | function! ale_linters#zeek#zeek#HandleErrors(buffer, lines) abort 7 | let l:pattern = '\(error\|warning\) in \v.*, line (\d+): (.*)$' 8 | 9 | return map(ale#util#GetMatches(a:lines, l:pattern), "{ 10 | \ 'lnum': str2nr(v:val[2]), 11 | \ 'text': v:val[3], 12 | \ 'type': (v:val[1] is# 'error') ? 'E': 'W', 13 | \}") 14 | endfunction 15 | 16 | call ale#linter#Define('zeek', { 17 | \ 'name': 'zeek', 18 | \ 'executable': {b -> ale#Var(b, 'zeek_zeek_executable')}, 19 | \ 'output_stream': 'stderr', 20 | \ 'command': {-> '%e --parse-only %s'}, 21 | \ 'callback': 'ale_linters#zeek#zeek#HandleErrors', 22 | \ 'lint_file': 1, 23 | \}) 24 | -------------------------------------------------------------------------------- /ale_linters/zig/zls.vim: -------------------------------------------------------------------------------- 1 | " Author: CherryMan 2 | " Description: A language server for Zig 3 | 4 | call ale#Set('zig_zls_executable', 'zls') 5 | call ale#Set('zig_zls_config', {}) 6 | 7 | function! ale_linters#zig#zls#GetProjectRoot(buffer) abort 8 | let l:build_rs = ale#path#FindNearestFile(a:buffer, 'build.zig') 9 | 10 | return !empty(l:build_rs) ? fnamemodify(l:build_rs, ':h') : '' 11 | endfunction 12 | 13 | call ale#linter#Define('zig', { 14 | \ 'name': 'zls', 15 | \ 'lsp': 'stdio', 16 | \ 'lsp_config': {b -> ale#Var(b, 'zig_zls_config')}, 17 | \ 'executable': {b -> ale#Var(b, 'zig_zls_executable')}, 18 | \ 'command': '%e', 19 | \ 'project_root': function('ale_linters#zig#zls#GetProjectRoot'), 20 | \}) 21 | -------------------------------------------------------------------------------- /autoload/ale/completion/python.vim: -------------------------------------------------------------------------------- 1 | function! ale#completion#python#CompletionItemFilter(buffer, item) abort 2 | return a:item.label !~# '\v^__[a-z_]+__' 3 | endfunction 4 | -------------------------------------------------------------------------------- /autoload/ale/d.vim: -------------------------------------------------------------------------------- 1 | " Author: Auri 2 | " Description: Functions for integrating with D linters. 3 | 4 | function! ale#d#FindDUBConfig(buffer) abort 5 | " Find a DUB configuration file in ancestor paths. 6 | " The most DUB-specific names will be tried first. 7 | for l:possible_filename in ['dub.sdl', 'dub.json', 'package.json'] 8 | let l:dub_file = ale#path#FindNearestFile(a:buffer, l:possible_filename) 9 | 10 | if !empty(l:dub_file) 11 | return l:dub_file 12 | endif 13 | endfor 14 | 15 | return '' 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/alejandra.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('nix_alejandra_executable', 'alejandra') 2 | call ale#Set('nix_alejandra_options', '') 3 | 4 | function! ale#fixers#alejandra#Fix(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'nix_alejandra_executable') 6 | let l:options = ale#Var(a:buffer, 'nix_alejandra_options') 7 | 8 | return { 9 | \ 'command': ale#Escape(l:executable) 10 | \ . (empty(l:options) ? '' : ' ' . l:options) 11 | \ . ' -- -' 12 | \} 13 | endfunction 14 | -------------------------------------------------------------------------------- /autoload/ale/fixers/appleswiftformat.vim: -------------------------------------------------------------------------------- 1 | " Author: (bosr) 2 | " Description: Integration of apple/swift-format formatter with ALE. 3 | 4 | function! ale#fixers#appleswiftformat#Fix(buffer) abort 5 | let l:command_args = ale#swift#GetAppleSwiftFormatCommand(a:buffer) . ' format --in-place %t' 6 | let l:config_args = ale#swift#GetAppleSwiftFormatConfigArgs(a:buffer) 7 | 8 | if l:config_args isnot# '' 9 | let l:command_args = l:command_args . ' ' . l:config_args 10 | endif 11 | 12 | return { 13 | \ 'read_temporary_file': 1, 14 | \ 'command': l:command_args, 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/bibclean.vim: -------------------------------------------------------------------------------- 1 | " Author: Horacio Sanson - https://github.com/hsanson 2 | " Description: Support for bibclean fixer for BibTeX files. 3 | 4 | call ale#Set('bib_bibclean_executable', 'bibclean') 5 | call ale#Set('bib_bibclean_options', '-align-equals') 6 | 7 | function! ale#fixers#bibclean#Fix(buffer) abort 8 | let l:options = ale#Var(a:buffer, 'bib_bibclean_options') 9 | let l:executable = ale#Var(a:buffer, 'bib_bibclean_executable') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' ' . (empty(l:options) ? '' : l:options), 14 | \} 15 | endfunction 16 | -------------------------------------------------------------------------------- /autoload/ale/fixers/biome.vim: -------------------------------------------------------------------------------- 1 | function! ale#fixers#biome#Fix(buffer) abort 2 | let l:executable = ale#handlers#biome#GetExecutable(a:buffer) 3 | let l:options = ale#Var(a:buffer, 'biome_options') 4 | let l:apply = ale#Var(a:buffer, 'biome_fixer_apply_unsafe') ? '--write --unsafe' : '--write' 5 | 6 | return { 7 | \ 'read_temporary_file': 1, 8 | \ 'command': ale#Escape(l:executable) . ' check ' . l:apply 9 | \ . (!empty(l:options) ? ' ' . l:options : '') 10 | \ . ' %t' 11 | \} 12 | endfunction 13 | -------------------------------------------------------------------------------- /autoload/ale/fixers/brittany.vim: -------------------------------------------------------------------------------- 1 | " Author: eborden , ifyouseewendy , aspidiets 2 | " Description: Integration of brittany with ALE. 3 | 4 | call ale#Set('haskell_brittany_executable', 'brittany') 5 | 6 | function! ale#fixers#brittany#GetExecutable(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'haskell_brittany_executable') 8 | 9 | return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'brittany') 10 | endfunction 11 | 12 | function! ale#fixers#brittany#Fix(buffer) abort 13 | let l:executable = ale#fixers#brittany#GetExecutable(a:buffer) 14 | 15 | return { 16 | \ 'command': l:executable 17 | \ . ' --write-mode inplace' 18 | \ . ' %t', 19 | \ 'read_temporary_file': 1, 20 | \} 21 | endfunction 22 | 23 | -------------------------------------------------------------------------------- /autoload/ale/fixers/buf_format.vim: -------------------------------------------------------------------------------- 1 | " Author: Alex McKinney 2 | " Description: Run buf format. 3 | 4 | call ale#Set('proto_buf_format_executable', 'buf') 5 | 6 | function! ale#fixers#buf_format#Fix(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'proto_buf_format_executable') 8 | 9 | return { 10 | \ 'command': ale#Escape(l:executable) . ' format %t', 11 | \} 12 | endfunction 13 | -------------------------------------------------------------------------------- /autoload/ale/fixers/cljfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: rudolf ordoyne 2 | " Description: Support for cljfmt https://github.com/weavejester/cljfmt 3 | 4 | call ale#Set('clojure_cljfmt_executable', 'cljfmt') 5 | 6 | function! ale#fixers#cljfmt#Fix(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'clojure_cljfmt_executable') 8 | 9 | return { 10 | \ 'command': ale#Escape(l:executable) . ' fix %t', 11 | \ 'read_temporary_file': 1, 12 | \} 13 | endfunction 14 | 15 | -------------------------------------------------------------------------------- /autoload/ale/fixers/cmakeformat.vim: -------------------------------------------------------------------------------- 1 | " Author: Attila Maczak 2 | " Description: Integration of cmakeformat with ALE. 3 | 4 | call ale#Set('cmake_cmakeformat_executable', 'cmake-format') 5 | call ale#Set('cmake_cmakeformat_options', '') 6 | 7 | function! ale#fixers#cmakeformat#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'cmake_cmakeformat_executable') 9 | let l:options = ale#Var(a:buffer, 'cmake_cmakeformat_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . (empty(l:options) ? '' : ' ' . l:options) 14 | \ . ' -' 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/crystal.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('crystal_format_executable', 'crystal') 2 | call ale#Set('crystal_format_options', '') 3 | 4 | function! ale#fixers#crystal#Fix(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'crystal_format_executable') 6 | let l:options = ale#Var(a:buffer, 'crystal_format_options') 7 | 8 | return { 9 | \ 'command': ale#Escape(l:executable) 10 | \ . ' tool format' 11 | \ . ale#Pad(l:options) 12 | \ . ' -' 13 | \} 14 | endfunction 15 | -------------------------------------------------------------------------------- /autoload/ale/fixers/css_beautify.vim: -------------------------------------------------------------------------------- 1 | " Author: https://github.com/Spixmaster 2 | " Description: Format CSS using css-beautify from js-beautify. 3 | 4 | call ale#Set('css_css_beautify_executable', 'css-beautify') 5 | call ale#Set('css_css_beautify_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | call ale#Set('css_css_beautify_options', '') 7 | 8 | function! ale#fixers#css_beautify#Fix(buffer) abort 9 | let l:executable = ale#python#FindExecutable( 10 | \ a:buffer, 11 | \ 'css_css_beautify', 12 | \ ['css-beautify'] 13 | \) 14 | 15 | let l:options = ale#Var(a:buffer, 'css_css_beautify_options') 16 | 17 | return { 18 | \ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -', 19 | \} 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/dart_format.vim: -------------------------------------------------------------------------------- 1 | " Author: ghsang 2 | " Description: Integration of dart format with ALE. 3 | 4 | call ale#Set('dart_format_executable', 'dart') 5 | call ale#Set('dart_format_options', '') 6 | 7 | function! ale#fixers#dart_format#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'dart_format_executable') 9 | let l:options = ale#Var(a:buffer, 'dart_format_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' format' 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \ . ' %t', 16 | \ 'read_temporary_file': 1, 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/dartfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: reisub0 2 | " Description: Integration of dartfmt with ALE. 3 | 4 | call ale#Set('dart_dartfmt_executable', 'dartfmt') 5 | call ale#Set('dart_dartfmt_options', '') 6 | 7 | function! ale#fixers#dartfmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'dart_dartfmt_executable') 9 | let l:options = ale#Var(a:buffer, 'dart_dartfmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' -w' 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \ . ' %t', 16 | \ 'read_temporary_file': 1, 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/deno.vim: -------------------------------------------------------------------------------- 1 | function! ale#fixers#deno#Fix(buffer) abort 2 | let l:executable = ale#handlers#deno#GetExecutable(a:buffer) 3 | 4 | if !executable(l:executable) 5 | return 0 6 | endif 7 | 8 | let l:options = ' fmt -' 9 | 10 | if ale#Var(a:buffer, 'deno_unstable') 11 | let l:options = l:options . ' --unstable' 12 | endif 13 | 14 | return { 15 | \ 'command': ale#Escape(l:executable) . l:options 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/dfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: theoldmoon0602 2 | " Description: Integration of dfmt with ALE. 3 | 4 | call ale#Set('d_dfmt_executable', 'dfmt') 5 | call ale#Set('d_dfmt_options', '') 6 | 7 | function! ale#fixers#dfmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'd_dfmt_executable') 9 | let l:options = ale#Var(a:buffer, 'd_dfmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' -i' 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \ . ' %t', 16 | \ 'read_temporary_file': 1, 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/dhall_format.vim: -------------------------------------------------------------------------------- 1 | " Author: toastal 2 | " Description: Dhall’s built-in formatter 3 | " 4 | function! ale#fixers#dhall_format#Fix(buffer) abort 5 | let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer) 6 | 7 | return { 8 | \ 'command': l:executable 9 | \ . ' format' 10 | \} 11 | endfunction 12 | -------------------------------------------------------------------------------- /autoload/ale/fixers/dhall_freeze.vim: -------------------------------------------------------------------------------- 1 | " Author: toastal 2 | " Description: Dhall’s package freezing 3 | 4 | call ale#Set('dhall_freeze_options', '') 5 | 6 | function! ale#fixers#dhall_freeze#Freeze(buffer) abort 7 | let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer) 8 | 9 | return { 10 | \ 'command': l:executable 11 | \ . ' freeze' 12 | \ . ale#Pad(ale#Var(a:buffer, 'dhall_freeze_options')) 13 | \} 14 | endfunction 15 | -------------------------------------------------------------------------------- /autoload/ale/fixers/dhall_lint.vim: -------------------------------------------------------------------------------- 1 | " Author: toastal 2 | " Description: Dhall’s built-in linter/formatter 3 | 4 | function! ale#fixers#dhall_lint#Fix(buffer) abort 5 | let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer) 6 | 7 | return { 8 | \ 'command': l:executable 9 | \ . ' lint' 10 | \} 11 | endfunction 12 | -------------------------------------------------------------------------------- /autoload/ale/fixers/dotnet_format.vim: -------------------------------------------------------------------------------- 1 | " Author: ghsang 2 | " Description: Integration of dotnet format with ALE. 3 | 4 | call ale#Set('cs_dotnet_format_executable', 'dotnet') 5 | call ale#Set('cs_dotnet_format_options', '') 6 | 7 | function! ale#fixers#dotnet_format#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'cs_dotnet_format_executable') 9 | let l:options = ale#Var(a:buffer, 'cs_dotnet_format_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' format' 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \ . ' --folder --include %t "$(dirname %t)"', 16 | \ 'read_temporary_file': 1, 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/dune.vim: -------------------------------------------------------------------------------- 1 | " Author: Albert Peschar 2 | " Description: Fix files with dune format. 3 | 4 | call ale#Set('ocaml_dune_executable', 'dune') 5 | call ale#Set('ocaml_dune_options', '') 6 | 7 | function! ale#fixers#dune#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'ocaml_dune_executable') 9 | let l:options = ale#Var(a:buffer, 'ocaml_dune_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' format' 14 | \ . (empty(l:options) ? '' : ' ' . l:options), 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/elm_format.vim: -------------------------------------------------------------------------------- 1 | " Author: soywod 2 | " Description: Integration of elm-format with ALE. 3 | 4 | call ale#Set('elm_format_executable', 'elm-format') 5 | call ale#Set('elm_format_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | call ale#Set('elm_format_options', '--yes') 7 | 8 | function! ale#fixers#elm_format#GetExecutable(buffer) abort 9 | return ale#path#FindExecutable(a:buffer, 'elm_format', [ 10 | \ 'node_modules/.bin/elm-format', 11 | \]) 12 | endfunction 13 | 14 | function! ale#fixers#elm_format#Fix(buffer) abort 15 | let l:options = ale#Var(a:buffer, 'elm_format_options') 16 | 17 | return { 18 | \ 'command': ale#Escape(ale#fixers#elm_format#GetExecutable(a:buffer)) 19 | \ . ' %t' 20 | \ . (empty(l:options) ? '' : ' ' . l:options), 21 | \ 'read_temporary_file': 1, 22 | \} 23 | endfunction 24 | -------------------------------------------------------------------------------- /autoload/ale/fixers/erbformatter.vim: -------------------------------------------------------------------------------- 1 | " Author: Arash Mousavi 2 | " Description: Support for ERB::Formetter https://github.com/nebulab/erb-formatter 3 | 4 | call ale#Set('eruby_erbformatter_executable', 'erb-formatter') 5 | 6 | function! ale#fixers#erbformatter#Fix(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'eruby_erbformatter_executable') 8 | 9 | return { 10 | \ 'command': ale#Escape(l:executable) . ' -w %t', 11 | \ 'read_temporary_file': 1, 12 | \} 13 | endfunction 14 | -------------------------------------------------------------------------------- /autoload/ale/fixers/erlfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: AntoineGagne - https://github.com/AntoineGagne 2 | " Description: Integration of erlfmt with ALE. 3 | 4 | call ale#Set('erlang_erlfmt_executable', 'erlfmt') 5 | call ale#Set('erlang_erlfmt_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | call ale#Set('erlang_erlfmt_options', '') 7 | 8 | function! ale#fixers#erlfmt#GetExecutable(buffer) abort 9 | return ale#path#FindExecutable(a:buffer, 'erlang_erlfmt', ['erlfmt']) 10 | endfunction 11 | 12 | function! ale#fixers#erlfmt#Fix(buffer) abort 13 | let l:options = ale#Var(a:buffer, 'erlang_erlfmt_options') 14 | let l:executable = ale#fixers#erlfmt#GetExecutable(a:buffer) 15 | 16 | let l:command = ale#Escape(l:executable) . ale#Pad(l:options) . ' -' 17 | 18 | return {'command': l:command} 19 | endfunction 20 | -------------------------------------------------------------------------------- /autoload/ale/fixers/fecs.vim: -------------------------------------------------------------------------------- 1 | " Author: harttle 2 | " Description: Apply fecs format to a file. 3 | 4 | function! ale#fixers#fecs#Fix(buffer) abort 5 | let l:executable = ale#handlers#fecs#GetExecutable(a:buffer) 6 | 7 | if !executable(l:executable) 8 | return 0 9 | endif 10 | 11 | let l:config_options = ' format --replace=true %t' 12 | 13 | return { 14 | \ 'command': ale#Escape(l:executable) . l:config_options, 15 | \ 'read_temporary_file': 1, 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/fish_indent.vim: -------------------------------------------------------------------------------- 1 | " Author: Chen YuanYuan 2 | " Description: Integration of fish_indent with ALE. 3 | 4 | call ale#Set('fish_fish_indent_executable', 'fish_indent') 5 | call ale#Set('fish_fish_indent_options', '') 6 | 7 | function! ale#fixers#fish_indent#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'fish_fish_indent_executable') 9 | let l:options = ale#Var(a:buffer, 'fish_fish_indent_options') 10 | let l:filename = ale#Escape(bufname(a:buffer)) 11 | 12 | return { 13 | \ 'command': ale#Escape(l:executable) 14 | \ . ' -w ' 15 | \ . (empty(l:options) ? '' : ' ' . l:options) 16 | \ . ' %t', 17 | \ 'read_temporary_file': 1, 18 | \} 19 | endfunction 20 | -------------------------------------------------------------------------------- /autoload/ale/fixers/floskell.vim: -------------------------------------------------------------------------------- 1 | " Author: robertjlooby 2 | " Description: Integration of floskell with ALE. 3 | 4 | call ale#Set('haskell_floskell_executable', 'floskell') 5 | 6 | function! ale#fixers#floskell#GetExecutable(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'haskell_floskell_executable') 8 | 9 | return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'floskell') 10 | endfunction 11 | 12 | function! ale#fixers#floskell#Fix(buffer) abort 13 | let l:executable = ale#fixers#floskell#GetExecutable(a:buffer) 14 | 15 | return { 16 | \ 'command': l:executable 17 | \ . ' %t', 18 | \ 'read_temporary_file': 1, 19 | \} 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/forge.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('solidity_forge_executable', 'forge') 2 | 3 | function! ale#fixers#forge#Fix(buffer) abort 4 | let l:executable = ale#Var(a:buffer, 'solidity_forge_executable') 5 | 6 | return { 7 | \ 'command': ale#Escape(l:executable) 8 | \ . ' fmt %t', 9 | \ 'read_temporary_file': 1, 10 | \} 11 | endfunction 12 | -------------------------------------------------------------------------------- /autoload/ale/fixers/fourmolu.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('haskell_fourmolu_executable', 'fourmolu') 2 | call ale#Set('haskell_fourmolu_options', '') 3 | 4 | function! ale#fixers#fourmolu#GetExecutable(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'haskell_fourmolu_executable') 6 | 7 | return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'fourmolu') 8 | endfunction 9 | 10 | function! ale#fixers#fourmolu#Fix(buffer) abort 11 | let l:executable = ale#fixers#fourmolu#GetExecutable(a:buffer) 12 | let l:options = ale#Var(a:buffer, 'haskell_fourmolu_options') 13 | 14 | return { 15 | \ 'command': l:executable 16 | \ . (empty(l:options) ? '' : ' ' . l:options) 17 | \ . ' --stdin-input-file ' 18 | \ . ale#Escape(@%), 19 | \} 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/generic.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: Generic functions for fixing files with. 3 | 4 | function! ale#fixers#generic#RemoveTrailingBlankLines(buffer, lines) abort 5 | let l:end_index = len(a:lines) - 1 6 | 7 | while l:end_index > 0 && empty(a:lines[l:end_index]) 8 | let l:end_index -= 1 9 | endwhile 10 | 11 | return a:lines[:l:end_index] 12 | endfunction 13 | 14 | " Remove all whitespaces at the end of lines 15 | function! ale#fixers#generic#TrimWhitespace(buffer, lines) abort 16 | let l:index = 0 17 | let l:lines_new = range(len(a:lines)) 18 | 19 | for l:line in a:lines 20 | let l:lines_new[l:index] = substitute(l:line, '\s\+$', '', 'g') 21 | let l:index = l:index + 1 22 | endfor 23 | 24 | return l:lines_new 25 | endfunction 26 | -------------------------------------------------------------------------------- /autoload/ale/fixers/gleam_format.vim: -------------------------------------------------------------------------------- 1 | " Author: Jonathan Palardt https://github.com/jpalardy 2 | " Description: Integration of 'gleam format' with ALE. 3 | 4 | call ale#Set('gleam_format_executable', 'gleam') 5 | 6 | function! ale#fixers#gleam_format#GetExecutable(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'gleam_format_executable') 8 | 9 | return ale#Escape(l:executable) 10 | endfunction 11 | 12 | function! ale#fixers#gleam_format#Fix(buffer) abort 13 | let l:executable = ale#fixers#gleam_format#GetExecutable(a:buffer) 14 | 15 | return { 16 | \ 'command': l:executable . ' format %t', 17 | \ 'read_temporary_file': 1, 18 | \} 19 | endfunction 20 | -------------------------------------------------------------------------------- /autoload/ale/fixers/gnatpp.vim: -------------------------------------------------------------------------------- 1 | " Author: tim 2 | " Description: Fix files with gnatpp. 3 | 4 | call ale#Set('ada_gnatpp_executable', 'gnatpp') 5 | call ale#Set('ada_gnatpp_options', '') 6 | 7 | function! ale#fixers#gnatpp#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'ada_gnatpp_executable') 9 | let l:options = ale#Var(a:buffer, 'ada_gnatpp_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . (!empty(l:options) ? ' ' . l:options : '') 14 | \ . ' %t', 15 | \ 'read_temporary_file': 1, 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/gofmt.vim: -------------------------------------------------------------------------------- 1 | " Author: aliou 2 | " Description: Integration of gofmt with ALE. 3 | 4 | call ale#Set('go_gofmt_executable', 'gofmt') 5 | call ale#Set('go_gofmt_options', '') 6 | 7 | function! ale#fixers#gofmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'go_gofmt_executable') 9 | let l:options = ale#Var(a:buffer, 'go_gofmt_options') 10 | let l:env = ale#go#EnvString(a:buffer) 11 | 12 | return { 13 | \ 'command': l:env . ale#Escape(l:executable) 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/gofumpt.vim: -------------------------------------------------------------------------------- 1 | " Author: David Houston 2 | " Description: A stricter gofmt implementation. 3 | 4 | call ale#Set('go_gofumpt_executable', 'gofumpt') 5 | call ale#Set('go_gofumpt_options', '') 6 | 7 | function! ale#fixers#gofumpt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'go_gofumpt_executable') 9 | let l:options = ale#Var(a:buffer, 'go_gofumpt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ale#Pad(l:options) 14 | \ . ' -w -- %t', 15 | \ 'read_temporary_file': 1, 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/goimports.vim: -------------------------------------------------------------------------------- 1 | " Author: Jeff Willette 2 | " Description: Integration of goimports with ALE. 3 | 4 | call ale#Set('go_goimports_executable', 'goimports') 5 | call ale#Set('go_goimports_options', '') 6 | 7 | function! ale#fixers#goimports#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'go_goimports_executable') 9 | let l:options = ale#Var(a:buffer, 'go_goimports_options') 10 | let l:env = ale#go#EnvString(a:buffer) 11 | 12 | if !executable(l:executable) 13 | return 0 14 | endif 15 | 16 | return { 17 | \ 'command': l:env . ale#Escape(l:executable) 18 | \ . ' -l -w -srcdir %s' 19 | \ . (empty(l:options) ? '' : ' ' . l:options) 20 | \ . ' %t', 21 | \ 'read_temporary_file': 1, 22 | \} 23 | endfunction 24 | -------------------------------------------------------------------------------- /autoload/ale/fixers/golines.vim: -------------------------------------------------------------------------------- 1 | " Author Pig Frown 2 | " Description: Fix Go files long lines with golines" 3 | 4 | call ale#Set('go_golines_executable', 'golines') 5 | 6 | call ale#Set('go_golines_options', '') 7 | 8 | function! ale#fixers#golines#Fix(buffer) abort 9 | let l:executable = ale#Var(a:buffer, 'go_golines_executable') 10 | let l:options = ale#Var(a:buffer, 'go_golines_options') 11 | let l:env = ale#go#EnvString(a:buffer) 12 | 13 | if !executable(l:executable) 14 | return 0 15 | endif 16 | 17 | return { 18 | \ 'command': l:env . ale#Escape(l:executable) 19 | \ . (empty(l:options) ? '' : ' ' . l:options) 20 | \} 21 | endfunction 22 | -------------------------------------------------------------------------------- /autoload/ale/fixers/gomod.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('go_go_executable', 'go') 2 | 3 | function! ale#fixers#gomod#Fix(buffer) abort 4 | let l:executable = ale#Var(a:buffer, 'go_go_executable') 5 | let l:env = ale#go#EnvString(a:buffer) 6 | 7 | return { 8 | \ 'command': l:env . ale#Escape(l:executable) . ' mod edit -fmt %t', 9 | \ 'read_temporary_file': 1, 10 | \} 11 | endfunction 12 | -------------------------------------------------------------------------------- /autoload/ale/fixers/gopls.vim: -------------------------------------------------------------------------------- 1 | " Author: Sean Enck 2 | " Description: Integration of gopls format with ALE. 3 | 4 | call ale#Set('go_gopls_fix_executable', 'gopls') 5 | call ale#Set('go_gopls_fix_options', '') 6 | 7 | function! ale#fixers#gopls#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'go_gopls_fix_executable') 9 | let l:options = ale#Var(a:buffer, 'go_gopls_fix_options') 10 | let l:env = ale#go#EnvString(a:buffer) 11 | 12 | if !executable(l:executable) 13 | return 0 14 | endif 15 | 16 | return { 17 | \ 'command': l:env . ale#Escape(l:executable) 18 | \ . ' format' 19 | \ . ale#Pad(l:options) 20 | \ . ' -l -w %t', 21 | \ 'read_temporary_file': 1, 22 | \} 23 | endfunction 24 | -------------------------------------------------------------------------------- /autoload/ale/fixers/hackfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: Sam Howie 2 | " Description: Integration of hackfmt with ALE. 3 | 4 | call ale#Set('hack_hackfmt_executable', 'hackfmt') 5 | call ale#Set('hack_hackfmt_options', '') 6 | 7 | function! ale#fixers#hackfmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'hack_hackfmt_executable') 9 | let l:options = ale#Var(a:buffer, 'hack_hackfmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' -i' 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \ . ' %t', 16 | \ 'read_temporary_file': 1, 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/help.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: Generic fixer functions for Vim help documents. 3 | 4 | function! ale#fixers#help#AlignTags(buffer, lines) abort 5 | let l:new_lines = [] 6 | 7 | for l:line in a:lines 8 | if len(l:line) != 79 9 | let l:match = matchlist(l:line, '\v +(\*[^*]+\*)$') 10 | 11 | if !empty(l:match) 12 | let l:start = l:line[:-len(l:match[0]) - 1] 13 | let l:tag = l:match[1] 14 | let l:spaces = repeat(' ', 79 - len(l:start) - len(l:tag)) 15 | 16 | let l:line = l:start . l:spaces . l:tag 17 | endif 18 | endif 19 | 20 | call add(l:new_lines, l:line) 21 | endfor 22 | 23 | return l:new_lines 24 | endfunction 25 | -------------------------------------------------------------------------------- /autoload/ale/fixers/hfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: zack 2 | " Description: Integration of hfmt with ALE. 3 | 4 | call ale#Set('haskell_hfmt_executable', 'hfmt') 5 | 6 | function! ale#fixers#hfmt#Fix(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'haskell_hfmt_executable') 8 | 9 | return { 10 | \ 'command': ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hfmt') 11 | \ . ' -w' 12 | \ . ' %t', 13 | \ 'read_temporary_file': 1, 14 | \} 15 | endfunction 16 | 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/hindent.vim: -------------------------------------------------------------------------------- 1 | " Author: AlexeiDrake 2 | " Description: Integration of hindent formatting with ALE. 3 | " 4 | call ale#Set('haskell_hindent_executable', 'hindent') 5 | 6 | function! ale#fixers#hindent#GetExecutable(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'haskell_hindent_executable') 8 | 9 | return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hindent') 10 | endfunction 11 | 12 | function! ale#fixers#hindent#Fix(buffer) abort 13 | let l:executable = ale#fixers#hindent#GetExecutable(a:buffer) 14 | 15 | return { 16 | \ 'command': l:executable 17 | \ . ' %t', 18 | \ 'read_temporary_file': 1, 19 | \} 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/hlint.vim: -------------------------------------------------------------------------------- 1 | " Author: eborden 2 | " Description: Integration of hlint refactor with ALE. 3 | " 4 | 5 | function! ale#fixers#hlint#Fix(buffer) abort 6 | return { 7 | \ 'command': ale#handlers#hlint#GetExecutable(a:buffer) 8 | \ . ' --refactor' 9 | \ . ' --refactor-options="--inplace"' 10 | \ . ' %t', 11 | \ 'read_temporary_file': 1, 12 | \} 13 | endfunction 14 | -------------------------------------------------------------------------------- /autoload/ale/fixers/html_beautify.vim: -------------------------------------------------------------------------------- 1 | " Author: WhyNotHugo 2 | " Description: Format HTML files with html-beautify. 3 | 4 | call ale#Set('html_beautify_executable', 'html-beautify') 5 | call ale#Set('html_beautify_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | call ale#Set('html_beautify_options', '') 7 | 8 | function! ale#fixers#html_beautify#Fix(buffer) abort 9 | let l:executable = ale#python#FindExecutable( 10 | \ a:buffer, 11 | \ 'html_beautify', 12 | \ ['html-beautify'] 13 | \) 14 | 15 | let l:options = ale#Var(a:buffer, 'html_beautify_options') 16 | 17 | return { 18 | \ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -', 19 | \} 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/htmlbeautifier.vim: -------------------------------------------------------------------------------- 1 | " Author: Arash Mousavi 2 | " Description: Support for HTML Beautifier https://github.com/threedaymonk/htmlbeautifier 3 | 4 | call ale#Set('eruby_htmlbeautifier_executable', 'htmlbeautifier') 5 | 6 | function! ale#fixers#htmlbeautifier#Fix(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'eruby_htmlbeautifier_executable') 8 | 9 | return { 10 | \ 'command': ale#Escape(l:executable) . ' %t', 11 | \ 'read_temporary_file': 1, 12 | \} 13 | endfunction 14 | -------------------------------------------------------------------------------- /autoload/ale/fixers/hurlfmt.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('hurl_hurlfmt_executable', 'hurlfmt') 2 | 3 | function! ale#fixers#hurlfmt#GetCommand(buffer) abort 4 | let l:executable = ale#Var(a:buffer, 'hurl_hurlfmt_executable') 5 | 6 | return ale#Escape(l:executable) 7 | \ . ' --out hurl' 8 | endfunction 9 | 10 | function! ale#fixers#hurlfmt#Fix(buffer) abort 11 | return { 12 | \ 'command': ale#fixers#hurlfmt#GetCommand(a:buffer) 13 | \} 14 | endfunction 15 | 16 | -------------------------------------------------------------------------------- /autoload/ale/fixers/importjs.vim: -------------------------------------------------------------------------------- 1 | " Author: Jeff Willette 2 | " Description: Integration of importjs with ALE. 3 | 4 | call ale#Set('javascript_importjs_executable', 'importjs') 5 | 6 | function! ale#fixers#importjs#ProcessOutput(buffer, output) abort 7 | let l:result = ale#util#FuzzyJSONDecode(a:output, []) 8 | 9 | return split(get(l:result, 'fileContent', ''), "\n") 10 | endfunction 11 | 12 | function! ale#fixers#importjs#Fix(buffer) abort 13 | let l:executable = ale#Var(a:buffer, 'javascript_importjs_executable') 14 | 15 | if !executable(l:executable) 16 | return 0 17 | endif 18 | 19 | return { 20 | \ 'command': ale#Escape(l:executable) 21 | \ . ' fix' 22 | \ . ' %s', 23 | \ 'process_with': 'ale#fixers#importjs#ProcessOutput', 24 | \} 25 | endfunction 26 | -------------------------------------------------------------------------------- /autoload/ale/fixers/jq.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('json_jq_executable', 'jq') 2 | call ale#Set('json_jq_options', '') 3 | call ale#Set('json_jq_filters', '.') 4 | 5 | function! ale#fixers#jq#GetExecutable(buffer) abort 6 | return ale#Var(a:buffer, 'json_jq_executable') 7 | endfunction 8 | 9 | function! ale#fixers#jq#Fix(buffer) abort 10 | let l:options = ale#Var(a:buffer, 'json_jq_options') 11 | let l:filters = ale#Var(a:buffer, 'json_jq_filters') 12 | 13 | if empty(l:filters) 14 | return 0 15 | endif 16 | 17 | return { 18 | \ 'command': ale#Escape(ale#fixers#jq#GetExecutable(a:buffer)) 19 | \ . ' ' . l:filters . ' ' 20 | \ . l:options, 21 | \} 22 | endfunction 23 | -------------------------------------------------------------------------------- /autoload/ale/fixers/json_pytool.vim: -------------------------------------------------------------------------------- 1 | " Author: idbrii 2 | " Description: json formatter as ALE fixer using python's json.tool 3 | 4 | call ale#Set('json_pytool_executable', 'python') 5 | call ale#Set('json_pytool_options', '') 6 | call ale#Set('json_pytool_use_global', get(g:, 'ale_use_global_executables', 0)) 7 | 8 | function! ale#fixers#json_pytool#GetExecutable(buffer) abort 9 | return ale#path#FindExecutable(a:buffer, 'json_pytool', ['python']) 10 | endfunction 11 | 12 | function! ale#fixers#json_pytool#Fix(buffer) abort 13 | let l:executable = ale#Escape(ale#fixers#json_pytool#GetExecutable(a:buffer)) 14 | let l:opts = ale#Var(a:buffer, 'json_pytool_options') 15 | let l:command = printf('%s -m json.tool %s -', l:executable, l:opts) 16 | 17 | return { 18 | \ 'command': l:command 19 | \ } 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/jsonnetfmt.vim: -------------------------------------------------------------------------------- 1 | " Authors: Trevor Whitney and Takuya Kosugiyama 2 | " Description: Integration of jsonnetfmt with ALE. 3 | 4 | call ale#Set('jsonnet_jsonnetfmt_executable', 'jsonnetfmt') 5 | call ale#Set('jsonnet_jsonnetfmt_options', '') 6 | 7 | function! ale#fixers#jsonnetfmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'jsonnet_jsonnetfmt_executable') 9 | let l:options = ale#Var(a:buffer, 'jsonnet_jsonnetfmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' -i' 14 | \ . ale#Pad(l:options) 15 | \ . ' %t', 16 | \ 'read_temporary_file': 1, 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/ktlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Michael Phillips 2 | " Description: Fix Kotlin files with ktlint. 3 | 4 | function! ale#fixers#ktlint#Fix(buffer) abort 5 | return { 6 | \ 'command': ale#handlers#ktlint#GetCommand(a:buffer) . ' --format' 7 | \} 8 | endfunction 9 | -------------------------------------------------------------------------------- /autoload/ale/fixers/kulala_fmt.vim: -------------------------------------------------------------------------------- 1 | " Author: hsanson 2 | " Description: kulala_fmt fixer for http and rest files. 3 | 4 | call ale#Set('http_kulala_fmt_executable', 'kulala-fmt') 5 | 6 | function! ale#fixers#kulala_fmt#Fix(buffer) abort 7 | return { 8 | \ 'command': ale#Escape(ale#Var(a:buffer, 'http_kulala_fmt_executable')) . ' format %t > /dev/null', 9 | \ 'read_temporary_file': 1 10 | \ } 11 | endfunction 12 | -------------------------------------------------------------------------------- /autoload/ale/fixers/latexindent.vim: -------------------------------------------------------------------------------- 1 | " Author: riley-martine 2 | " Description: Integration of latexindent with ALE. 3 | 4 | call ale#Set('tex_latexindent_executable', 'latexindent') 5 | call ale#Set('tex_latexindent_options', '') 6 | 7 | function! ale#fixers#latexindent#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'tex_latexindent_executable') 9 | let l:options = ale#Var(a:buffer, 'tex_latexindent_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' -l' 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/lua_format.vim: -------------------------------------------------------------------------------- 1 | " Author: Mathias Jean Johansen 2 | " Description: Integration of LuaFormatter with ALE. 3 | 4 | call ale#Set('lua_lua_format_executable', 'lua-format') 5 | call ale#Set('lua_lua_format_options', '') 6 | 7 | function! ale#fixers#lua_format#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'lua_lua_format_executable') 9 | let l:options = ale#Var(a:buffer, 'lua_lua_format_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ale#Pad(l:options) 14 | \ . ' -i', 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/luafmt.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('lua_luafmt_executable', 'luafmt') 2 | call ale#Set('lua_luafmt_options', '') 3 | 4 | function! ale#fixers#luafmt#Fix(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'lua_luafmt_executable') 6 | let l:options = ale#Var(a:buffer, 'lua_luafmt_options') 7 | 8 | return { 9 | \ 'command': ale#Escape(l:executable) 10 | \ . (empty(l:options) ? '' : ' ' . l:options) 11 | \ . ' --stdin', 12 | \} 13 | endfunction 14 | -------------------------------------------------------------------------------- /autoload/ale/fixers/nickel_format.vim: -------------------------------------------------------------------------------- 1 | " Author: Yining 2 | " Description: nickel format as ALE fixer for Nickel files 3 | 4 | call ale#Set('nickel_nickel_format_executable', 'nickel') 5 | call ale#Set('nickel_nickel_format_options', '') 6 | 7 | function! ale#fixers#nickel_format#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'nickel_nickel_format_executable') 9 | let l:options = ale#Var(a:buffer, 'nickel_nickel_format_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) . ' format' 13 | \ . (empty(l:options) ? '' : ' ' . l:options) 14 | \} 15 | endfunction 16 | 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/nimpretty.vim: -------------------------------------------------------------------------------- 1 | " Author: Nhan 2 | " Description: Integration of nimpretty with ALE. 3 | 4 | call ale#Set('nim_nimpretty_executable', 'nimpretty') 5 | call ale#Set('nim_nimpretty_options', '--maxLineLen:80') 6 | 7 | function! ale#fixers#nimpretty#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'nim_nimpretty_executable') 9 | let l:options = ale#Var(a:buffer, 'nim_nimpretty_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) . ' %t' . ale#Pad(l:options), 13 | \ 'read_temporary_file': 1, 14 | \} 15 | endfunction 16 | -------------------------------------------------------------------------------- /autoload/ale/fixers/nixfmt.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: houstdav000 3 | " Description: Fix files with nixfmt 4 | 5 | call ale#Set('nix_nixfmt_executable', 'nixfmt') 6 | call ale#Set('nix_nixfmt_options', '') 7 | 8 | function! ale#fixers#nixfmt#Fix(buffer) abort 9 | let l:executable = ale#Var(a:buffer, 'nix_nixfmt_executable') 10 | let l:options = ale#Var(a:buffer, 'nix_nixfmt_options') 11 | 12 | return { 13 | \ 'command': ale#Escape(l:executable) . ale#Pad(l:options), 14 | \} 15 | endfunction 16 | -------------------------------------------------------------------------------- /autoload/ale/fixers/nixpkgsfmt.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('nix_nixpkgsfmt_executable', 'nixpkgs-fmt') 2 | call ale#Set('nix_nixpkgsfmt_options', '') 3 | 4 | function! ale#fixers#nixpkgsfmt#Fix(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'nix_nixpkgsfmt_executable') 6 | let l:options = ale#Var(a:buffer, 'nix_nixpkgsfmt_options') 7 | 8 | return { 9 | \ 'command': ale#Escape(l:executable) 10 | \ . (empty(l:options) ? '' : ' ' . l:options), 11 | \} 12 | endfunction 13 | -------------------------------------------------------------------------------- /autoload/ale/fixers/npmgroovylint.vim: -------------------------------------------------------------------------------- 1 | " Author: lucas-str 2 | " Description: Integration of npm-groovy-lint for Groovy files. 3 | 4 | call ale#Set('groovy_npmgroovylint_fix_options', '--fix') 5 | 6 | function! ale#fixers#npmgroovylint#Fix(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'groovy_npmgroovylint_executable') 8 | let l:options = ale#Var(a:buffer, 'groovy_npmgroovylint_fix_options') 9 | 10 | return { 11 | \ 'command': ale#Escape(l:executable) 12 | \ . (!empty(l:options) ? ' ' . l:options : '') 13 | \ . ' %t', 14 | \ 'read_temporary_file': 1, 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/ocamlformat.vim: -------------------------------------------------------------------------------- 1 | " Author: Stephen Lumenta <@sbl> 2 | " Description: Integration of ocamlformat with ALE. 3 | 4 | call ale#Set('ocaml_ocamlformat_executable', 'ocamlformat') 5 | call ale#Set('ocaml_ocamlformat_options', '') 6 | 7 | function! ale#fixers#ocamlformat#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'ocaml_ocamlformat_executable') 9 | let l:options = ale#Var(a:buffer, 'ocaml_ocamlformat_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . (empty(l:options) ? '' : ' ' . l:options) 14 | \ . ' --name=%s' 15 | \ . ' -' 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/ocp_indent.vim: -------------------------------------------------------------------------------- 1 | " Author: Kanenobu Mitsuru 2 | " Description: Integration of ocp-indent with ALE. 3 | 4 | call ale#Set('ocaml_ocp_indent_executable', 'ocp-indent') 5 | call ale#Set('ocaml_ocp_indent_options', '') 6 | call ale#Set('ocaml_ocp_indent_config', '') 7 | 8 | function! ale#fixers#ocp_indent#Fix(buffer) abort 9 | let l:executable = ale#Var(a:buffer, 'ocaml_ocp_indent_executable') 10 | let l:config = ale#Var(a:buffer, 'ocaml_ocp_indent_config') 11 | let l:options = ale#Var(a:buffer, 'ocaml_ocp_indent_options') 12 | 13 | return { 14 | \ 'command': ale#Escape(l:executable) 15 | \ . (empty(l:config) ? '' : ' --config=' . ale#Escape(l:config)) 16 | \ . (empty(l:options) ? '': ' ' . l:options) 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/opafmt.vim: -------------------------------------------------------------------------------- 1 | " Description: Fixer for rego files 2 | 3 | call ale#Set('opa_fmt_executable', 'opa') 4 | call ale#Set('opa_fmt_options', '') 5 | 6 | function! ale#fixers#opafmt#Fix(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'opa_fmt_executable') 8 | let l:options = ale#Var(a:buffer, 'opa_fmt_options') 9 | 10 | return { 11 | \ 'command': ale#Escape(l:executable) 12 | \ . ' fmt' 13 | \ . (empty(l:options) ? '' : ' ' . l:options) 14 | \} 15 | endfunction 16 | -------------------------------------------------------------------------------- /autoload/ale/fixers/ormolu.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('haskell_ormolu_executable', 'ormolu') 2 | call ale#Set('haskell_ormolu_options', '') 3 | 4 | function! ale#fixers#ormolu#Fix(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'haskell_ormolu_executable') 6 | let l:options = ale#Var(a:buffer, 'haskell_ormolu_options') 7 | 8 | return { 9 | \ 'command': ale#Escape(l:executable) 10 | \ . (empty(l:options) ? '' : ' ' . l:options), 11 | \} 12 | endfunction 13 | -------------------------------------------------------------------------------- /autoload/ale/fixers/packer.vim: -------------------------------------------------------------------------------- 1 | " Author: Zhuoyun Wei 2 | " Description: Fixer for Packer HCL files 3 | 4 | call ale#Set('packer_fmt_executable', 'packer') 5 | call ale#Set('packer_fmt_options', '') 6 | 7 | function! ale#fixers#packer#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'packer_fmt_executable') 9 | let l:options = ale#Var(a:buffer, 'packer_fmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' fmt' 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \ . ' -' 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/pandoc.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: Jesse Hathaway 3 | " Description: Fix markdown files with pandoc. 4 | 5 | call ale#Set('markdown_pandoc_executable', 'pandoc') 6 | call ale#Set('markdown_pandoc_options', '-f gfm -t gfm -s -') 7 | 8 | function! ale#fixers#pandoc#Fix(buffer) abort 9 | let l:executable = ale#Var(a:buffer, 'markdown_pandoc_executable') 10 | let l:options = ale#Var(a:buffer, 'markdown_pandoc_options') 11 | 12 | return { 13 | \ 'command': ale#Escape(l:executable) 14 | \ . ' ' . l:options, 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/perltidy.vim: -------------------------------------------------------------------------------- 1 | " Author: kfly8 2 | " Description: Integration of perltidy with ALE. 3 | 4 | call ale#Set('perl_perltidy_executable', 'perltidy') 5 | call ale#Set('perl_perltidy_options', '') 6 | 7 | function! ale#fixers#perltidy#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'perl_perltidy_executable') 9 | let l:options = ale#Var(a:buffer, 'perl_perltidy_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' -b' 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \ . ' %t', 16 | \ 'read_temporary_file': 1, 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/pgformatter.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('sql_pgformatter_executable', 'pg_format') 2 | call ale#Set('sql_pgformatter_options', '') 3 | 4 | function! ale#fixers#pgformatter#Fix(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'sql_pgformatter_executable') 6 | let l:options = ale#Var(a:buffer, 'sql_pgformatter_options') 7 | 8 | return { 9 | \ 'command': ale#Escape(l:executable) 10 | \ . (empty(l:options) ? '' : ' ' . l:options), 11 | \} 12 | endfunction 13 | -------------------------------------------------------------------------------- /autoload/ale/fixers/pint.vim: -------------------------------------------------------------------------------- 1 | " Author: Michael Dyrynda 2 | " Description: Fixing files with Laravel Pint. 3 | 4 | call ale#Set('php_pint_executable', 'pint') 5 | call ale#Set('php_pint_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | call ale#Set('php_pint_options', '') 7 | 8 | function! ale#fixers#pint#GetExecutable(buffer) abort 9 | return ale#path#FindExecutable(a:buffer, 'php_pint', [ 10 | \ 'vendor/bin/pint', 11 | \ 'pint' 12 | \]) 13 | endfunction 14 | 15 | function! ale#fixers#pint#Fix(buffer) abort 16 | let l:executable = ale#fixers#pint#GetExecutable(a:buffer) 17 | 18 | return { 19 | \ 'command': ale#Escape(l:executable) 20 | \ . ' ' . ale#Var(a:buffer, 'php_pint_options') 21 | \ . ' %t', 22 | \ 'read_temporary_file': 1, 23 | \} 24 | endfunction 25 | 26 | -------------------------------------------------------------------------------- /autoload/ale/fixers/ptop.vim: -------------------------------------------------------------------------------- 1 | " Author: BarrOff https://github.com/BarrOff 2 | " Description: Integration of ptop with ALE. 3 | 4 | call ale#Set('pascal_ptop_executable', 'ptop') 5 | call ale#Set('pascal_ptop_options', '') 6 | 7 | function! ale#fixers#ptop#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'pascal_ptop_executable') 9 | let l:options = ale#Var(a:buffer, 'pascal_ptop_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . (empty(l:options) ? '' : ' ' . l:options) 14 | \ . ' %s %t', 15 | \ 'read_temporary_file': 1, 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/puppetlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Alexander Olofsson 2 | " Description: puppet-lint fixer 3 | 4 | if !exists('g:ale_puppet_puppetlint_executable') 5 | let g:ale_puppet_puppetlint_executable = 'puppet-lint' 6 | endif 7 | 8 | if !exists('g:ale_puppet_puppetlint_options') 9 | let g:ale_puppet_puppetlint_options = '' 10 | endif 11 | 12 | function! ale#fixers#puppetlint#Fix(buffer) abort 13 | let l:executable = ale#Var(a:buffer, 'puppet_puppetlint_executable') 14 | 15 | return { 16 | \ 'command': ale#Escape(l:executable) 17 | \ . ' ' . ale#Var(a:buffer, 'puppet_puppetlint_options') 18 | \ . ' --fix' 19 | \ . ' %t', 20 | \ 'read_temporary_file': 1, 21 | \} 22 | endfunction 23 | -------------------------------------------------------------------------------- /autoload/ale/fixers/purty.vim: -------------------------------------------------------------------------------- 1 | " Author: iclanzan 2 | " Description: Integration of purty with ALE. 3 | 4 | call ale#Set('purescript_purty_executable', 'purty') 5 | 6 | function! ale#fixers#purty#GetExecutable(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'purescript_purty_executable') 8 | 9 | return ale#Escape(l:executable) 10 | endfunction 11 | 12 | function! ale#fixers#purty#Fix(buffer) abort 13 | let l:executable = ale#fixers#purty#GetExecutable(a:buffer) 14 | 15 | return { 16 | \ 'command': l:executable 17 | \ . ' --write' 18 | \ . ' %t', 19 | \ 'read_temporary_file': 1, 20 | \} 21 | endfunction 22 | 23 | -------------------------------------------------------------------------------- /autoload/ale/fixers/qmlfmt.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('qml_qmlfmt_executable', 'qmlfmt') 2 | 3 | function! ale#fixers#qmlfmt#GetExecutable(buffer) abort 4 | return ale#Var(a:buffer, 'qml_qmlfmt_executable') 5 | endfunction 6 | 7 | function! ale#fixers#qmlfmt#Fix(buffer) abort 8 | return { 9 | \ 'command': ale#Escape(ale#fixers#qmlfmt#GetExecutable(a:buffer)), 10 | \} 11 | endfunction 12 | -------------------------------------------------------------------------------- /autoload/ale/fixers/raco_fmt.vim: -------------------------------------------------------------------------------- 1 | " Author: Jeremy Cantrell 2 | " Description: Integration of raco fmt with ALE. 3 | 4 | call ale#Set('racket_raco_fmt_executable', 'raco') 5 | call ale#Set('racket_raco_fmt_options', '') 6 | 7 | function! ale#fixers#raco_fmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'racket_raco_fmt_executable') 9 | let l:options = ale#Var(a:buffer, 'racket_raco_fmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) . ' fmt' 13 | \ . (empty(l:options) ? '' : ' ' . l:options), 14 | \} 15 | endfunction 16 | -------------------------------------------------------------------------------- /autoload/ale/fixers/refmt.vim: -------------------------------------------------------------------------------- 1 | " Author: Ahmed El Gabri <@ahmedelgabri> 2 | " Description: Integration of refmt with ALE. 3 | 4 | call ale#Set('reasonml_refmt_executable', 'refmt') 5 | call ale#Set('reasonml_refmt_options', '') 6 | 7 | function! ale#fixers#refmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'reasonml_refmt_executable') 9 | let l:options = ale#Var(a:buffer, 'reasonml_refmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . (empty(l:options) ? '' : ' ' . l:options) 14 | \ . ' --in-place' 15 | \ . ' %t', 16 | \ 'read_temporary_file': 1, 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/roc_annotate.vim: -------------------------------------------------------------------------------- 1 | " Author: Benjamin Block 2 | " Description: Official type annotation tool for Roc. 3 | 4 | call ale#Set('roc_roc_annotate_executable', 'roc') 5 | call ale#Set('roc_roc_annotate_options', '') 6 | 7 | function! ale#fixers#roc_annotate#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'roc_roc_annotate_executable') 9 | let l:command = l:executable . ' format annotate' 10 | let l:options = ale#Var(a:buffer, 'roc_roc_annotate_options') 11 | 12 | if l:options isnot# '' 13 | let l:command .= ' ' . l:options 14 | endif 15 | 16 | return { 17 | \ 'command': l:command . ' %t', 18 | \ 'read_temporary_file': 1, 19 | \} 20 | endfunction 21 | 22 | -------------------------------------------------------------------------------- /autoload/ale/fixers/roc_format.vim: -------------------------------------------------------------------------------- 1 | " Author: Benjamin Block 2 | " Description: Official formatter for Roc. 3 | 4 | call ale#Set('roc_roc_format_executable', 'roc') 5 | call ale#Set('roc_roc_format_options', '') 6 | 7 | function! ale#fixers#roc_format#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'roc_roc_format_executable') 9 | let l:command = l:executable . ' format' 10 | let l:options = ale#Var(a:buffer, 'roc_roc_format_options') 11 | 12 | if l:options isnot# '' 13 | let l:command .= ' ' . l:options 14 | endif 15 | 16 | return { 17 | \ 'command': l:command . ' %t', 18 | \ 'read_temporary_file': 1, 19 | \} 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/rubyfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: Yining 2 | " Description: support rubyfmt as ALE fixer for Ruby files 3 | 4 | call ale#Set('ruby_rubyfmt_executable', 'rubyfmt') 5 | call ale#Set('ruby_rubyfmt_options', '') 6 | 7 | function! ale#fixers#rubyfmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'ruby_rubyfmt_executable') 9 | let l:options = ale#Var(a:buffer, 'ruby_rubyfmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . (empty(l:options) ? '' : ' ' . l:options) 14 | \} 15 | endfunction 16 | 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/rufo.vim: -------------------------------------------------------------------------------- 1 | " Author: Fohte (Hayato Kawai) https://github.com/fohte 2 | " Description: Integration of Rufo with ALE. 3 | 4 | call ale#Set('ruby_rufo_executable', 'rufo') 5 | 6 | function! ale#fixers#rufo#GetCommand(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'ruby_rufo_executable') 8 | let l:exec_args = l:executable =~? 'bundle$' 9 | \ ? ' exec rufo' 10 | \ : '' 11 | 12 | return ale#Escape(l:executable) . l:exec_args . ' %t' 13 | endfunction 14 | 15 | function! ale#fixers#rufo#Fix(buffer) abort 16 | return { 17 | \ 'command': ale#fixers#rufo#GetCommand(a:buffer), 18 | \ 'read_temporary_file': 1, 19 | \} 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/rustfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: Kelly Fox 2 | " Description: Integration of rustfmt with ALE. 3 | 4 | call ale#Set('rust_rustfmt_executable', 'rustfmt') 5 | call ale#Set('rust_rustfmt_options', '') 6 | 7 | function! ale#fixers#rustfmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'rust_rustfmt_executable') 9 | let l:options = ale#Var(a:buffer, 'rust_rustfmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . (empty(l:options) ? '' : ' ' . l:options), 14 | \} 15 | endfunction 16 | -------------------------------------------------------------------------------- /autoload/ale/fixers/rustywind.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: Guillermo Roig 3 | " Description: Sort TailwindCSS classes with rustywind 4 | 5 | call ale#Set('html_rustywind_executable', 'rustywind') 6 | call ale#Set('html_rustywind_options', '') 7 | 8 | function! ale#fixers#rustywind#Fix(buffer) abort 9 | let l:executable = ale#Var(a:buffer, 'html_rustywind_executable') 10 | let l:options = ale#Var(a:buffer, 'html_rustywind_options') 11 | 12 | return { 13 | \ 'command': ale#Escape(l:executable) 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \ . ' --stdin' 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/scadformat.vim: -------------------------------------------------------------------------------- 1 | " Author: tony o'dell 2 | " Description: Fix scad files with scadformat 3 | 4 | call ale#Set('openscad_scadformat_executable', 'scadformat') 5 | call ale#Set('openscad_scadformat_options', '') 6 | 7 | function! ale#fixers#scadformat#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'openscad_scadformat_executable') 9 | let l:options = ale#Var(a:buffer, 'openscad_scadformat_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . (empty(l:options) ? '' : ' ' . l:options), 14 | \} 15 | endfunction 16 | -------------------------------------------------------------------------------- /autoload/ale/fixers/shfmt.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: Simon Bugert 3 | " Description: Fix sh files with shfmt. 4 | 5 | call ale#Set('sh_shfmt_executable', 'shfmt') 6 | call ale#Set('sh_shfmt_options', '') 7 | 8 | function! ale#fixers#shfmt#Fix(buffer) abort 9 | let l:executable = ale#Var(a:buffer, 'sh_shfmt_executable') 10 | let l:options = ale#Var(a:buffer, 'sh_shfmt_options') 11 | 12 | return { 13 | \ 'command': ale#Escape(l:executable) 14 | \ . ' -filename=%s' 15 | \ . (empty(l:options) ? '' : ' ' . l:options) 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/sorbet.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('ruby_sorbet_executable', 'srb') 2 | call ale#Set('ruby_sorbet_options', '') 3 | 4 | function! ale#fixers#sorbet#GetCommand(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable') 6 | let l:options = ale#Var(a:buffer, 'ruby_sorbet_options') 7 | 8 | return ale#ruby#EscapeExecutable(l:executable, 'srb') 9 | \ . ' tc' 10 | \ . (!empty(l:options) ? ' ' . l:options : '') 11 | \ . ' --autocorrect --file %t' 12 | endfunction 13 | 14 | function! ale#fixers#sorbet#Fix(buffer) abort 15 | return { 16 | \ 'command': ale#fixers#sorbet#GetCommand(a:buffer), 17 | \ 'read_temporary_file': 1, 18 | \} 19 | endfunction 20 | -------------------------------------------------------------------------------- /autoload/ale/fixers/sqlfluff.vim: -------------------------------------------------------------------------------- 1 | " Author: Carl Smedstad 2 | " Description: Fixing SQL files with sqlfluff 3 | 4 | call ale#Set('sql_sqlfluff_executable', 'sqlfluff') 5 | 6 | function! ale#fixers#sqlfluff#Fix(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'sql_sqlfluff_executable') 8 | 9 | let l:cmd = 10 | \ ale#Escape(l:executable) 11 | \ . ' fix --force' 12 | 13 | let l:config_file = ale#path#FindNearestFile(a:buffer, '.sqlfluff') 14 | 15 | if !empty(l:config_file) 16 | let l:cmd .= ' --config ' . ale#Escape(l:config_file) 17 | else 18 | let l:cmd .= ' --dialect ansi' 19 | endif 20 | 21 | return { 22 | \ 'command': l:cmd . ' %t > /dev/null', 23 | \ 'read_temporary_file': 1, 24 | \} 25 | endfunction 26 | -------------------------------------------------------------------------------- /autoload/ale/fixers/sqlfmt.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('sql_sqlfmt_executable', 'sqlfmt') 2 | call ale#Set('sql_sqlfmt_options', '') 3 | 4 | function! ale#fixers#sqlfmt#Fix(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'sql_sqlfmt_executable') 6 | let l:options = ale#Var(a:buffer, 'sql_sqlfmt_options') 7 | 8 | return { 9 | \ 'command': ale#Escape(l:executable) 10 | \ . ' -w' 11 | \ . (empty(l:options) ? '' : ' ' . l:options), 12 | \} 13 | endfunction 14 | -------------------------------------------------------------------------------- /autoload/ale/fixers/sqlformat.vim: -------------------------------------------------------------------------------- 1 | " Author: Cluas 2 | " Description: Fixing files with sqlformat. 3 | 4 | call ale#Set('sql_sqlformat_executable', 'sqlformat') 5 | call ale#Set('sql_sqlformat_options', '') 6 | 7 | function! ale#fixers#sqlformat#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'sql_sqlformat_executable') 9 | let l:options = ale#Var(a:buffer, 'sql_sqlformat_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . (!empty(l:options) ? ' ' . l:options : '') 14 | \ . ' -' 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/statix.vim: -------------------------------------------------------------------------------- 1 | " Author: David Houston 2 | " Description: Provide statix fix as a fixer for simple Nix antipatterns. 3 | 4 | call ale#Set('nix_statix_fix_executable', 'statix') 5 | call ale#Set('nix_statix_fix_options', '') 6 | 7 | function! ale#fixers#statix#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'nix_statix_fix_executable') 9 | let l:options = ale#Var(a:buffer, 'nix_statix_fix_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ale#Pad('fix') 14 | \ . ale#Pad('--stdin') 15 | \ . ale#Pad(l:options), 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/styler.vim: -------------------------------------------------------------------------------- 1 | " Author: tvatter 2 | " Description: Fixing R files with styler. 3 | 4 | call ale#Set('r_styler_executable', 'Rscript') 5 | call ale#Set('r_styler_options', 'tidyverse_style()') 6 | 7 | function! ale#fixers#styler#Fix(buffer) abort 8 | return { 9 | \ 'command': 'Rscript --vanilla -e ' 10 | \ . '"suppressPackageStartupMessages(library(styler));' 11 | \ . 'style_file(commandArgs(TRUE), transformers = ' 12 | \ . ale#Var(a:buffer, 'r_styler_options') . ')"' 13 | \ . ' %t', 14 | \ 'read_temporary_file': 1, 15 | \} 16 | endfunction 17 | -------------------------------------------------------------------------------- /autoload/ale/fixers/stylish_haskell.vim: -------------------------------------------------------------------------------- 1 | " Author: eborden 2 | " Description: Integration of stylish-haskell formatting with ALE. 3 | " 4 | call ale#Set('haskell_stylish_haskell_executable', 'stylish-haskell') 5 | 6 | function! ale#fixers#stylish_haskell#GetExecutable(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'haskell_stylish_haskell_executable') 8 | 9 | return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'stylish-haskell') 10 | endfunction 11 | 12 | function! ale#fixers#stylish_haskell#Fix(buffer) abort 13 | let l:executable = ale#fixers#stylish_haskell#GetExecutable(a:buffer) 14 | 15 | return { 16 | \ 'command': l:executable 17 | \ . ' --inplace' 18 | \ . ' %t', 19 | \ 'read_temporary_file': 1, 20 | \} 21 | endfunction 22 | -------------------------------------------------------------------------------- /autoload/ale/fixers/syntax_tree.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('ruby_syntax_tree_options', '') 2 | call ale#Set('ruby_syntax_tree_executable', 'stree') 3 | 4 | function! ale#fixers#syntax_tree#GetCommand(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'ruby_syntax_tree_executable') 6 | let l:options = ale#Var(a:buffer, 'ruby_syntax_tree_options') 7 | 8 | return ale#ruby#EscapeExecutable(l:executable, 'stree') 9 | \ . ' format' 10 | \ . (!empty(l:options) ? ' ' . l:options : '') 11 | \ . ' %t' 12 | endfunction 13 | 14 | function! ale#fixers#syntax_tree#Fix(buffer) abort 15 | return { 16 | \ 'command': ale#fixers#syntax_tree#GetCommand(a:buffer), 17 | \} 18 | endfunction 19 | -------------------------------------------------------------------------------- /autoload/ale/fixers/terraform.vim: -------------------------------------------------------------------------------- 1 | " Author: dsifford 2 | " Description: Fixer for terraform and .hcl files 3 | 4 | call ale#Set('terraform_fmt_executable', 'terraform') 5 | call ale#Set('terraform_fmt_options', '') 6 | 7 | function! ale#fixers#terraform#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'terraform_fmt_executable') 9 | let l:options = ale#Var(a:buffer, 'terraform_fmt_options') 10 | 11 | return { 12 | \ 'command': ale#Escape(l:executable) 13 | \ . ' fmt' 14 | \ . (empty(l:options) ? '' : ' ' . l:options) 15 | \ . ' -' 16 | \} 17 | endfunction 18 | -------------------------------------------------------------------------------- /autoload/ale/fixers/textlint.vim: -------------------------------------------------------------------------------- 1 | " Author: TANIGUCHI Masaya 2 | " Description: Integration of textlint with ALE. 3 | 4 | function! ale#fixers#textlint#Fix(buffer) abort 5 | let l:executable = ale#handlers#textlint#GetExecutable(a:buffer) 6 | let l:options = ale#Var(a:buffer, 'textlint_options') 7 | 8 | return { 9 | \ 'command': ale#Escape(l:executable) 10 | \ . ' --fix' 11 | \ . (empty(l:options) ? '' : ' ' . l:options) 12 | \ . ' %t', 13 | \ 'read_temporary_file': 1, 14 | \} 15 | endfunction 16 | -------------------------------------------------------------------------------- /autoload/ale/fixers/tslint.vim: -------------------------------------------------------------------------------- 1 | " Author: carakan 2 | " Description: Fixing files with tslint. 3 | 4 | function! ale#fixers#tslint#Fix(buffer) abort 5 | let l:executable = ale#handlers#tslint#GetExecutable(a:buffer) 6 | 7 | let l:tslint_config_path = ale#path#ResolveLocalPath( 8 | \ a:buffer, 9 | \ 'tslint.json', 10 | \ ale#Var(a:buffer, 'typescript_tslint_config_path') 11 | \) 12 | let l:tslint_config_option = !empty(l:tslint_config_path) 13 | \ ? ' -c ' . ale#Escape(l:tslint_config_path) 14 | \ : '' 15 | 16 | return { 17 | \ 'command': ale#node#Executable(a:buffer, l:executable) 18 | \ . l:tslint_config_option 19 | \ . ' --outputAbsolutePaths --fix %t', 20 | \ 'read_temporary_file': 1, 21 | \} 22 | endfunction 23 | -------------------------------------------------------------------------------- /autoload/ale/fixers/typstyle.vim: -------------------------------------------------------------------------------- 1 | " Author: Adrian Vollmer (computerfluesterer@protonmail.com) 2 | " Description: Typst formatter using typstyle 3 | 4 | call ale#Set('typst_typstyle_executable', 'typstyle') 5 | call ale#Set('typst_typstyle_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | call ale#Set('typst_typstyle_options', '') 7 | 8 | function! ale#fixers#typstyle#Fix(buffer) abort 9 | let l:executable = ale#path#FindExecutable( 10 | \ a:buffer, 11 | \ 'typst_typstyle', 12 | \ ['typstyle'] 13 | \) 14 | 15 | let l:options = ale#Var(a:buffer, 'typst_typstyle_options') 16 | 17 | return { 18 | \ 'command': ale#Escape(l:executable) . ' ' . l:options, 19 | \} 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/vfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: fiatjaf 2 | " Description: Integration of `v fmt` with ALE. 3 | 4 | call ale#Set('v_vfmt_options', '') 5 | 6 | function! ale#fixers#vfmt#Fix(buffer) abort 7 | let l:executable = ale#Var(a:buffer, 'v_v_executable') 8 | let l:options = ale#Var(a:buffer, 'v_vfmt_options') 9 | 10 | return { 11 | \ 'command': ale#Escape(l:executable) . ' fmt' . ale#Pad(l:options) 12 | \} 13 | endfunction 14 | -------------------------------------------------------------------------------- /autoload/ale/fixers/yamlfix.vim: -------------------------------------------------------------------------------- 1 | " Author: lyz-code 2 | " Description: Fixing yaml files with yamlfix. 3 | 4 | call ale#Set('yaml_yamlfix_executable', 'yamlfix') 5 | call ale#Set('yaml_yamlfix_options', '') 6 | call ale#Set('yaml_yamlfix_use_global', get(g:, 'ale_use_global_executables', 0)) 7 | 8 | function! ale#fixers#yamlfix#Fix(buffer) abort 9 | let l:options = ale#Var(a:buffer, 'yaml_yamlfix_options') 10 | let l:executable = ale#python#FindExecutable( 11 | \ a:buffer, 12 | \ 'yaml_yamlfix', 13 | \ ['yamlfix'], 14 | \) 15 | 16 | if !executable(l:executable) 17 | return 0 18 | endif 19 | 20 | return { 21 | \ 'cwd': '%s:h', 22 | \ 'command': ale#Escape(l:executable) 23 | \ . (!empty(l:options) ? ' ' . l:options : '') . ' -', 24 | \} 25 | endfunction 26 | -------------------------------------------------------------------------------- /autoload/ale/fixers/yamlfmt.vim: -------------------------------------------------------------------------------- 1 | " Author: https://github.com/Spixmaster 2 | " Description: Format YAML files with yamlfmt. 3 | 4 | call ale#Set('yaml_yamlfmt_executable', 'yamlfmt') 5 | call ale#Set('yaml_yamlfmt_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | call ale#Set('yaml_yamlfmt_options', '') 7 | 8 | function! ale#fixers#yamlfmt#Fix(buffer) abort 9 | let l:executable = ale#python#FindExecutable( 10 | \ a:buffer, 11 | \ 'yaml_yamlfmt', 12 | \ ['yamlfmt'] 13 | \) 14 | 15 | let l:options = ale#Var(a:buffer, 'yaml_yamlfmt_options') 16 | 17 | return { 18 | \ 'command': ale#Escape(l:executable) . ' ' . l:options . ' -in', 19 | \} 20 | endfunction 21 | -------------------------------------------------------------------------------- /autoload/ale/fixers/yq.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('yaml_yq_executable', 'yq') 2 | call ale#Set('yaml_yq_options', '') 3 | call ale#Set('yaml_yq_filters', '.') 4 | 5 | function! ale#fixers#yq#GetExecutable(buffer) abort 6 | return ale#Var(a:buffer, 'yaml_yq_executable') 7 | endfunction 8 | 9 | function! ale#fixers#yq#Fix(buffer) abort 10 | let l:options = ale#Var(a:buffer, 'yaml_yq_options') 11 | let l:filters = ale#Var(a:buffer, 'yaml_yq_filters') 12 | 13 | if empty(l:filters) 14 | return 0 15 | endif 16 | 17 | return { 18 | \ 'command': ale#Escape(ale#fixers#yq#GetExecutable(a:buffer)) 19 | \ . ' ' . l:filters . ' ' 20 | \ . l:options, 21 | \} 22 | endfunction 23 | -------------------------------------------------------------------------------- /autoload/ale/fixers/zigfmt.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: Arash Mousavi 3 | " Description: Official formatter for Zig. 4 | 5 | call ale#Set('zig_zigfmt_executable', 'zig') 6 | 7 | function! ale#fixers#zigfmt#Fix(buffer) abort 8 | let l:executable = ale#Var(a:buffer, 'zig_zigfmt_executable') 9 | 10 | return { 11 | \ 'command': ale#Escape(l:executable) . ' fmt %t', 12 | \ 'read_temporary_file': 1, 13 | \} 14 | endfunction 15 | -------------------------------------------------------------------------------- /autoload/ale/gradle/init.gradle: -------------------------------------------------------------------------------- 1 | class ClasspathPlugin implements Plugin { 2 | void apply(Project project) { 3 | project.task('printClasspath') { 4 | doLast { 5 | project 6 | .rootProject 7 | .allprojects 8 | .configurations 9 | .flatten() 10 | .findAll { it.name.endsWith('Classpath') } 11 | .collect { it.resolve() } 12 | .flatten() 13 | .unique() 14 | .findAll { it.exists() } 15 | .each { println it } 16 | } 17 | } 18 | } 19 | } 20 | 21 | rootProject { 22 | apply plugin: ClasspathPlugin 23 | } 24 | -------------------------------------------------------------------------------- /autoload/ale/handlers/c3lsp.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: Koni Marti 3 | " Description: Utilities for c3lsp 4 | 5 | function! ale#handlers#c3lsp#GetProjectRoot(buffer) abort 6 | let l:config = ale#path#FindNearestFile(a:buffer, 'project.json') 7 | 8 | if !empty(l:config) 9 | return fnamemodify(l:config, ':h') 10 | endif 11 | 12 | return expand('#' . a:buffer . ':p:h') 13 | endfunction 14 | 15 | function! ale#handlers#c3lsp#GetInitOpts(buffer, init_options_var) abort 16 | let l:init_options = {} 17 | 18 | return extend(l:init_options, ale#Var(a:buffer, a:init_options_var)) 19 | endfunction 20 | -------------------------------------------------------------------------------- /autoload/ale/handlers/cpplint.vim: -------------------------------------------------------------------------------- 1 | " Author: Dawid Kurek https://github.com/dawikur 2 | " Description: Handle errors for cpplint. 3 | 4 | function! ale#handlers#cpplint#HandleCppLintFormat(buffer, lines) abort 5 | " Look for lines like the following. 6 | " test.cpp:5: Estra space after ( in function call [whitespace/parents] [4] 7 | let l:pattern = '^.\{-}:\(\d\+\): *\(.\+\) *\[\(.*/.*\)\] ' 8 | let l:output = [] 9 | 10 | for l:match in ale#util#GetMatches(a:lines, l:pattern) 11 | call add(l:output, { 12 | \ 'lnum': l:match[1] + 0, 13 | \ 'col': 0, 14 | \ 'text': join(split(l:match[2])), 15 | \ 'code': l:match[3], 16 | \ 'type': 'W', 17 | \}) 18 | endfor 19 | 20 | return l:output 21 | endfunction 22 | -------------------------------------------------------------------------------- /autoload/ale/handlers/haskell_stack.vim: -------------------------------------------------------------------------------- 1 | function! ale#handlers#haskell_stack#EscapeExecutable(executable, stack_exec) abort 2 | let l:exec_args = a:executable =~? 'stack$' 3 | \ ? ' exec ' . ale#Escape(a:stack_exec) . ' --' 4 | \ : '' 5 | 6 | return ale#Escape(a:executable) . l:exec_args 7 | endfunction 8 | -------------------------------------------------------------------------------- /autoload/ale/handlers/hlint.vim: -------------------------------------------------------------------------------- 1 | call ale#Set('haskell_hlint_executable', 'hlint') 2 | call ale#Set('haskell_hlint_options', get(g:, 'hlint_options', '')) 3 | 4 | function! ale#handlers#hlint#GetExecutable(buffer) abort 5 | let l:executable = ale#Var(a:buffer, 'haskell_hlint_executable') 6 | 7 | return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hlint') 8 | endfunction 9 | -------------------------------------------------------------------------------- /autoload/ale/handlers/markdownlint.vim: -------------------------------------------------------------------------------- 1 | " Author: Ty-Lucas Kelley 2 | " Description: Adds support for markdownlint 3 | 4 | function! ale#handlers#markdownlint#Handle(buffer, lines) abort 5 | let l:pattern=': \?\(\d\+\)\(:\(\d\+\)\?\)\? \(MD\d\{3}/[A-Za-z0-9-/]\+\) \(.*\)$' 6 | let l:output=[] 7 | 8 | for l:match in ale#util#GetMatches(a:lines, l:pattern) 9 | let l:result = ({ 10 | \ 'lnum': l:match[1] + 0, 11 | \ 'code': l:match[4], 12 | \ 'text': l:match[5], 13 | \ 'type': 'W', 14 | \}) 15 | 16 | if len(l:match[3]) > 0 17 | let l:result.col = (l:match[3] + 0) 18 | endif 19 | 20 | call add(l:output, l:result) 21 | endfor 22 | 23 | return l:output 24 | endfunction 25 | -------------------------------------------------------------------------------- /autoload/ale/handlers/statix.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | " Author: David Houston 3 | " Description: This file defines a handler function for statix's errorformat 4 | " output. 5 | 6 | function! ale#handlers#statix#Handle(buffer, lines) abort 7 | " Look for lines like the following. 8 | " 9 | " flake.nix>46:13:W:3:This assignment is better written with `inherit` 10 | let l:pattern = '\v^.*\>(\d+):(\d+):([A-Z]):(\d+):(.*)$' 11 | let l:output = [] 12 | 13 | for l:match in ale#util#GetMatches(a:lines, l:pattern) 14 | call add(l:output, { 15 | \ 'lnum': l:match[1] + 0, 16 | \ 'col': l:match[2] + 0, 17 | \ 'type': l:match[3], 18 | \ 'code': l:match[4], 19 | \ 'text': l:match[5], 20 | \}) 21 | endfor 22 | 23 | return l:output 24 | endfunction 25 | -------------------------------------------------------------------------------- /autoload/ale/handlers/tslint.vim: -------------------------------------------------------------------------------- 1 | function! ale#handlers#tslint#InitVariables() abort 2 | call ale#Set('typescript_tslint_executable', 'tslint') 3 | call ale#Set('typescript_tslint_config_path', '') 4 | call ale#Set('typescript_tslint_rules_dir', '') 5 | call ale#Set('typescript_tslint_use_global', get(g:, 'ale_use_global_executables', 0)) 6 | call ale#Set('typescript_tslint_ignore_empty_files', 0) 7 | endfunction 8 | 9 | function! ale#handlers#tslint#GetExecutable(buffer) abort 10 | return ale#path#FindExecutable(a:buffer, 'typescript_tslint', [ 11 | \ 'node_modules/.bin/tslint', 12 | \]) 13 | endfunction 14 | -------------------------------------------------------------------------------- /autoload/ale/handlers/tsserver.vim: -------------------------------------------------------------------------------- 1 | " Author: Derek Sifford 2 | " Description: Handlers for tsserver 3 | 4 | function! ale#handlers#tsserver#GetProjectRoot(buffer) abort 5 | let l:tsconfig_file = ale#path#FindNearestFile(a:buffer, 'tsconfig.json') 6 | 7 | return !empty(l:tsconfig_file) ? fnamemodify(l:tsconfig_file, ':h') : '' 8 | endfunction 9 | -------------------------------------------------------------------------------- /autoload/ale/handlers/unix.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: Error handling for errors in a Unix format. 3 | 4 | function! s:HandleUnixFormat(buffer, lines, type) abort 5 | let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):?(\d+)?:? ?(.+)$' 6 | let l:output = [] 7 | 8 | for l:match in ale#util#GetMatches(a:lines, l:pattern) 9 | call add(l:output, { 10 | \ 'lnum': l:match[1] + 0, 11 | \ 'col': l:match[2] + 0, 12 | \ 'text': l:match[3], 13 | \ 'type': a:type, 14 | \}) 15 | endfor 16 | 17 | return l:output 18 | endfunction 19 | 20 | function! ale#handlers#unix#HandleAsError(buffer, lines) abort 21 | return s:HandleUnixFormat(a:buffer, a:lines, 'E') 22 | endfunction 23 | 24 | function! ale#handlers#unix#HandleAsWarning(buffer, lines) abort 25 | return s:HandleUnixFormat(a:buffer, a:lines, 'W') 26 | endfunction 27 | -------------------------------------------------------------------------------- /autoload/ale/java.vim: -------------------------------------------------------------------------------- 1 | " Author: Horacio Sanson https://github.com/hsanson 2 | " Description: Functions for integrating with Java tools 3 | 4 | " Find the nearest dir contining a gradle or pom file and assume it 5 | " the root of a java app. 6 | function! ale#java#FindProjectRoot(buffer) abort 7 | let l:gradle_root = ale#gradle#FindProjectRoot(a:buffer) 8 | 9 | if !empty(l:gradle_root) 10 | return l:gradle_root 11 | endif 12 | 13 | let l:maven_pom_file = ale#path#FindNearestFile(a:buffer, 'pom.xml') 14 | 15 | if !empty(l:maven_pom_file) 16 | return fnamemodify(l:maven_pom_file, ':h') 17 | endif 18 | 19 | let l:ant_root = ale#ant#FindProjectRoot(a:buffer) 20 | 21 | if !empty(l:ant_root) 22 | return l:ant_root 23 | endif 24 | 25 | return '' 26 | endfunction 27 | -------------------------------------------------------------------------------- /autoload/ale/julia.vim: -------------------------------------------------------------------------------- 1 | " Author: Bartolomeo Stellato bartolomeo.stellato@gmail.com 2 | " Description: Functions for integrating with Julia tools 3 | 4 | " Find the nearest dir containing a julia project 5 | let s:__ale_julia_project_filenames = ['REQUIRE', 'Manifest.toml', 'Project.toml'] 6 | 7 | function! ale#julia#FindProjectRoot(buffer) abort 8 | for l:project_filename in s:__ale_julia_project_filenames 9 | let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename) 10 | 11 | if !empty(l:full_path) 12 | let l:path = fnamemodify(l:full_path, ':p:h') 13 | 14 | return l:path 15 | endif 16 | endfor 17 | 18 | return '' 19 | endfunction 20 | -------------------------------------------------------------------------------- /autoload/ale/node.vim: -------------------------------------------------------------------------------- 1 | " Author: w0rp 2 | " Description: Functions for working with Node executables. 3 | 4 | call ale#Set('windows_node_executable_path', 'node.exe') 5 | 6 | " Create a executable string which executes a Node.js script command with a 7 | " Node.js executable if needed. 8 | " 9 | " The executable string should not be escaped before passing it to this 10 | " function, the executable string will be escaped when returned by this 11 | " function. 12 | " 13 | " The executable is only prefixed for Windows machines 14 | function! ale#node#Executable(buffer, executable) abort 15 | if has('win32') && a:executable =~? '\.js$' 16 | let l:node = ale#Var(a:buffer, 'windows_node_executable_path') 17 | 18 | return ale#Escape(l:node) . ' ' . ale#Escape(a:executable) 19 | endif 20 | 21 | return ale#Escape(a:executable) 22 | endfunction 23 | -------------------------------------------------------------------------------- /autoload/ale/racket.vim: -------------------------------------------------------------------------------- 1 | function! ale#racket#FindProjectRoot(buffer) abort 2 | let l:cwd = expand('#' . a:buffer . ':p:h') 3 | let l:highest_init = l:cwd 4 | 5 | for l:path in ale#path#Upwards(l:cwd) 6 | if filereadable(l:path.'/init.rkt') 7 | let l:highest_init = l:path 8 | endif 9 | endfor 10 | 11 | return l:highest_init 12 | endfunction 13 | -------------------------------------------------------------------------------- /doc/ale-astro.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Astro Integration *ale-astro-options* 3 | 4 | 5 | =============================================================================== 6 | eslint *ale-astro-eslint* 7 | 8 | See |ale-javascript-eslint| for information about the available options. 9 | 10 | =============================================================================== 11 | prettier *ale-astro-prettier* 12 | 13 | See |ale-javascript-prettier| for information about the available options. 14 | 15 | =============================================================================== 16 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 17 | -------------------------------------------------------------------------------- /doc/ale-bats.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Bats Integration *ale-bats-options* 3 | 4 | 5 | =============================================================================== 6 | shellcheck *ale-bats-shellcheck* 7 | 8 | The `shellcheck` linter for Bats uses the sh options for `shellcheck`; see: 9 | |ale-sh-shellcheck|. 10 | 11 | 12 | =============================================================================== 13 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 14 | -------------------------------------------------------------------------------- /doc/ale-fountain.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Fountain Integration *ale-fountain-options* 3 | 4 | 5 | =============================================================================== 6 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 7 | -------------------------------------------------------------------------------- /doc/ale-gohtmltmpl.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Go HTML Template Integration *ale-gohtmltmpl-options* 3 | 4 | 5 | =============================================================================== 6 | djlint *ale-gohtmltmpl-djlint* 7 | 8 | See |ale-html-djlint| 9 | 10 | =============================================================================== 11 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 12 | -------------------------------------------------------------------------------- /doc/ale-hcl.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE HCL Integration *ale-hcl-options* 3 | 4 | 5 | =============================================================================== 6 | packer-fmt *ale-hcl-packer-fmt* 7 | 8 | See |ale-packer-fmt-fixer| for information about the available options. 9 | 10 | =============================================================================== 11 | terraform-fmt *ale-hcl-terraform-fmt* 12 | 13 | See |ale-terraform-fmt-fixer| for information about the available options. 14 | 15 | =============================================================================== 16 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 17 | -------------------------------------------------------------------------------- /doc/ale-help.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Help Integration *ale-help-options* 3 | 4 | 5 | =============================================================================== 6 | cspell *ale-help-cspell* 7 | 8 | See |ale-cspell-options| 9 | 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-htmlangular.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE HTML Angular Template Integration *ale-htmlangular-options* 3 | 4 | 5 | 6 | =============================================================================== 7 | djlint *ale-htmlangular-djlint* 8 | 9 | See |ale-html-djlint| 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-htmldjango.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE HTML Django Template Integration *ale-htmldjango-options* 3 | 4 | 5 | 6 | =============================================================================== 7 | djlint *ale-htmldjango-djlint* 8 | 9 | See |ale-html-djlint| 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-http.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE HTTP Integration *ale-http-options* 3 | 4 | 5 | =============================================================================== 6 | kulala_fmt *ale-http-kulala_fmt* 7 | 8 | *ale-options.http_kulala_fmt_executable* 9 | *g:ale_http_kulala_fmt_executable* 10 | *b:ale_http_kulala_fmt_executable* 11 | http_kulala_fmt 12 | g:ale_http_kulala_fmt 13 | Type: |String| 14 | Default: `'kulala_fmt'` 15 | 16 | Override the invoked kulala_fmt binary. 17 | 18 | 19 | =============================================================================== 20 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 21 | -------------------------------------------------------------------------------- /doc/ale-hurl.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Hurl Integration *ale-hurl-options* 3 | 4 | 5 | =============================================================================== 6 | hurlfmt *ale-hurl-hurlfmt* 7 | 8 | *ale-options.hurl_hurlfmt_executable* 9 | *g:ale_hurl_hurlfmt_executable* 10 | *b:ale_hurl_hurlfmt_executable* 11 | hurl_hurlfmt_executable 12 | g:ale_hurl_hurlfmt_executable 13 | Type: |String| 14 | Default: `'hurlfmt'` 15 | 16 | Override the invoked hurlfmt binary. 17 | 18 | 19 | =============================================================================== 20 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 21 | -------------------------------------------------------------------------------- /doc/ale-jinja.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Jinja Integration *ale-jinja-options* 3 | 4 | 5 | 6 | =============================================================================== 7 | djlint *ale-jinja-djlint* 8 | 9 | See |ale-html-djlint| 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-json5.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE JSON5 Integration *ale-json5-options* 3 | 4 | 5 | =============================================================================== 6 | eslint *ale-json5-eslint* 7 | 8 | The `eslint` linter for JSON uses the JavaScript options for `eslint`; see: 9 | |ale-javascript-eslint|. 10 | 11 | You will need a JSON5 ESLint plugin installed for this to work. 12 | 13 | 14 | =============================================================================== 15 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 16 | -------------------------------------------------------------------------------- /doc/ale-nroff.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE nroff Integration *ale-nroff-options* 3 | 4 | 5 | =============================================================================== 6 | write-good *ale-nroff-write-good* 7 | 8 | See |ale-write-good-options| 9 | 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-nunjucks.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Nunjucks Integration *ale-nunjucks-options* 3 | 4 | 5 | 6 | =============================================================================== 7 | djlint *ale-nunjucks-djlint* 8 | 9 | See |ale-html-djlint| 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-pawn.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Pawn Integration *ale-pawn-options* 3 | 4 | 5 | =============================================================================== 6 | uncrustify *ale-pawn-uncrustify* 7 | 8 | See |ale-c-uncrustify| for information about the available options. 9 | 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-po.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE PO Integration *ale-po-options* 3 | 4 | 5 | =============================================================================== 6 | write-good *ale-po-write-good* 7 | 8 | See |ale-write-good-options| 9 | 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-pod.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Pod Integration *ale-pod-options* 3 | 4 | 5 | =============================================================================== 6 | write-good *ale-pod-write-good* 7 | 8 | See |ale-write-good-options| 9 | 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-rest.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE REST Integration *ale-rest-options* 3 | 4 | 5 | =============================================================================== 6 | kulala_fmt *ale-rest-kulala_fmt* 7 | 8 | See |ale-http-kulala_fmt| 9 | 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-robot.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Robot Integration *ale-robot-options* 3 | 4 | 5 | =============================================================================== 6 | rflint *ale-robot-rflint* 7 | 8 | *ale-options.robot_rflint_executable* 9 | *g:ale_robot_rflint_executable* 10 | *b:ale_robot_rflint_executable* 11 | robot_rflint_executable 12 | g:ale_robot_rflint_executable 13 | Type: |String| 14 | Default: `'rflint'` 15 | 16 | 17 | =============================================================================== 18 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 19 | -------------------------------------------------------------------------------- /doc/ale-systemd.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE systemd Integration *ale-systemd-options* 3 | 4 | 5 | =============================================================================== 6 | systemd-analyze *ale-systemd-analyze* 7 | 8 | ALE supports checking user systemd units with `systemd-analyze --user verify` 9 | Checks will only work with user unit files in their proper location. There 10 | aren't any options, and checks can only run after saving the file. 11 | 12 | 13 | =============================================================================== 14 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 15 | -------------------------------------------------------------------------------- /doc/ale-texinfo.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Texinfo Integration *ale-texinfo-options* 3 | 4 | 5 | =============================================================================== 6 | cspell *ale-texinfo-cspell* 7 | 8 | See |ale-cspell-options| 9 | 10 | 11 | =============================================================================== 12 | write-good *ale-texinfo-write-good* 13 | 14 | See |ale-write-good-options| 15 | 16 | 17 | =============================================================================== 18 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 19 | -------------------------------------------------------------------------------- /doc/ale-toml.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE TOML Integration *ale-toml-options* 3 | 4 | 5 | =============================================================================== 6 | dprint *ale-toml-dprint* 7 | 8 | See |ale-dprint-options| and https://dprint.dev/plugins/toml 9 | 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-vim-help.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE Vim help Integration *ale-vim-help-options* 3 | 4 | 5 | =============================================================================== 6 | write-good *ale-vim-help-write-good* 7 | 8 | See |ale-write-good-options| 9 | 10 | 11 | =============================================================================== 12 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 13 | -------------------------------------------------------------------------------- /doc/ale-xhtml.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | ALE XHTML Integration *ale-xhtml-options* 3 | 4 | 5 | =============================================================================== 6 | cspell *ale-xhtml-cspell* 7 | 8 | See |ale-cspell-options| 9 | 10 | 11 | =============================================================================== 12 | write-good *ale-xhtml-write-good* 13 | 14 | See |ale-write-good-options| 15 | 16 | 17 | =============================================================================== 18 | vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: 19 | -------------------------------------------------------------------------------- /ftplugin/ale-fix-suggest.vim: -------------------------------------------------------------------------------- 1 | " Close the ALEFixSuggest window with the q key. 2 | noremap q :q! 3 | 4 | let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'execute') 5 | let b:undo_ftplugin .= ' | execute "silent! unmap q"' 6 | -------------------------------------------------------------------------------- /ftplugin/ale-info.vim: -------------------------------------------------------------------------------- 1 | " Close the ALEInfo preview window with the q key. 2 | noremap q :q! 3 | 4 | " Explicitly use the default synmaxcol for ale-info. 5 | setlocal synmaxcol=3000 6 | 7 | function! ALEInfoOpenHelp() abort 8 | let l:variable = matchstr(getline('.'), '\v[gb]:ale_[a-z0-9_]+') 9 | 10 | if !empty(l:variable) 11 | execute('help ' . l:variable) 12 | endif 13 | endfunction 14 | 15 | " Press space to open :help for an ALE Variable 16 | nnoremap :call ALEInfoOpenHelp() 17 | 18 | let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'execute') 19 | let b:undo_ftplugin .= ' | setlocal synmaxcol<' 20 | let b:undo_ftplugin .= ' | execute "silent! unmap q"' 21 | let b:undo_ftplugin .= ' | execute "silent! nunmap "' 22 | let b:undo_ftplugin .= ' | if exists(''*ALEInfoOpenHelp'') | delfunction ALEInfoOpenHelp | endif' 23 | -------------------------------------------------------------------------------- /ftplugin/ale-preview.vim: -------------------------------------------------------------------------------- 1 | " Close the ALEPreviewWindow window with the q key. 2 | noremap q :q! 3 | 4 | let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'execute') 5 | let b:undo_ftplugin .= ' | execute "silent! unmap q"' 6 | -------------------------------------------------------------------------------- /lspconfig.vim: -------------------------------------------------------------------------------- 1 | if get(g:, 'lspconfig', 0) 2 | " lspconfig is installed. 3 | endif 4 | -------------------------------------------------------------------------------- /lua/ale/util.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.configured_lspconfig_servers() 4 | local configs = require 'lspconfig.configs' 5 | local keys = {} 6 | 7 | for key, _ in pairs(configs) do 8 | table.insert(keys, key) 9 | end 10 | 11 | return keys 12 | end 13 | 14 | return M 15 | -------------------------------------------------------------------------------- /syntax/ale-fix-suggest.vim: -------------------------------------------------------------------------------- 1 | if exists('b:current_syntax') 2 | finish 3 | endif 4 | 5 | syn match aleFixerComment /^.*$/ 6 | syn match aleFixerName /\(^ *\|, \)'[^']*'/ 7 | syn match aleFixerHelp /^See :help ale-fix-configuration/ 8 | 9 | hi def link aleFixerComment Comment 10 | hi def link aleFixerName String 11 | hi def link aleFixerHelp Statement 12 | 13 | let b:current_syntax = 'ale-fix-suggest' 14 | -------------------------------------------------------------------------------- /syntax/ale-preview-selection.vim: -------------------------------------------------------------------------------- 1 | if exists('b:current_syntax') 2 | finish 3 | endif 4 | 5 | syn match alePreviewSelectionFilename /\v^([a-zA-Z]?:?[^:]+)/ 6 | syn match alPreviewNumber /\v:\d+:\d+$/ 7 | 8 | hi def link alePreviewSelectionFilename String 9 | hi def link alePreviewNumber Number 10 | 11 | let b:current_syntax = 'ale-preview-selection' 12 | -------------------------------------------------------------------------------- /test-files/python/no_uv/whatever.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dense-analysis/ale/80ff84db84ba172bfcdee5e2748924bb2249134b/test-files/python/no_uv/whatever.py --------------------------------------------------------------------------------