# Built-in Sources This is an automatically generated list of all null-ls built-in sources. See [BUILTIN_CONFIG](BUILTIN_CONFIG.md) to learn how to set up and configure these sources. - [Code Actions](#code-actions) - [Completion](#completion) - [Diagnostics](#diagnostics) - [Formatting](#formatting) - [Hover](#hover) ## Code Actions ### gitrebase Injects actions to change `gitrebase` command (e.g. using `squash` instead of `pick`). #### Usage ```lua local sources = { null_ls.builtins.code_actions.gitrebase } ``` #### Defaults - Filetypes: `{ "gitrebase" }` - Method: `code_action` ### [gitsigns](https://github.com/lewis6991/gitsigns.nvim) Injects code actions for Git operations at the current cursor position (stage / preview / reset hunks, blame, etc.). #### Usage ```lua local sources = { null_ls.builtins.code_actions.gitsigns } ``` #### Defaults - Filetypes: `{}` - Method: `code_action` #### Config ##### `filter_actions` (function) Callback to filter out unwanted actions. ```lua local gitsigns = null_ls.builtins.code_actions.gitsigns.with({ config = { filter_actions = function(title) return title:lower():match("blame") == nil -- filter out blame actions end, }, }) ``` ### [gomodifytags](https://github.com/fatih/gomodifytags) Go tool to modify struct field tags #### Usage ```lua local sources = { null_ls.builtins.code_actions.gomodifytags } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `code_action` #### Notes - Requires installing the Go tree-sitter parser. ### [impl](https://github.com/josharian/impl) impl generates method stubs for implementing an interface. #### Usage ```lua local sources = { null_ls.builtins.code_actions.impl } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `code_action` #### Notes - Requires installing the Go tree-sitter parser. ### [proselint](https://github.com/amperser/proselint) An English prose linter. Can fix some issues via code actions. #### Usage ```lua local sources = { null_ls.builtins.code_actions.proselint } ``` #### Defaults - Filetypes: `{ "markdown", "tex" }` - Method: `code_action` - Command: `proselint` - Args: `{ "check", "--output-format=json" }` ### [refactoring](https://github.com/ThePrimeagen/refactoring.nvim) The Refactoring library based off the Refactoring book by Martin Fowler. #### Usage ```lua local sources = { null_ls.builtins.code_actions.refactoring } ``` #### Defaults - Filetypes: `{ "go", "javascript", "lua", "python", "typescript" }` - Method: `code_action` #### Notes - Requires visually selecting the code you want to refactor and calling `:'<,'>lua vim.lsp.buf.code_action()` ### [regal](https://docs.styra.com/regal) Allows ignoring broken rules from Regal linter. #### Usage ```lua local sources = { null_ls.builtins.code_actions.regal } ``` #### Defaults - Filetypes: `{ "rego" }` - Method: `code_action` ### [statix](https://github.com/nerdypepper/statix) Lints and suggestions for the nix programming language. #### Usage ```lua local sources = { null_ls.builtins.code_actions.statix } ``` #### Defaults - Filetypes: `{ "nix" }` - Method: `code_action` - Command: `statix` - Args: `{ "check", "--stdin", "--format=json" }` ### [textlint](https://github.com/textlint/textlint) Linter for text and Markdown. Can fix some issues via code actions. #### Usage ```lua local sources = { null_ls.builtins.code_actions.textlint } ``` #### Defaults - Filetypes: `{ "text", "markdown" }` - Method: `code_action` - Command: `textlint` - Args: `{ "-f", "json", "--stdin", "--stdin-filename", "$FILENAME" }` ### [ts_node_action](https://github.com/CKolkey/ts-node-action) A framework for running functions on Tree-sitter nodes, and updating the buffer with the result. #### Usage ```lua local sources = { null_ls.builtins.code_actions.ts_node_action } ``` #### Defaults - Filetypes: `{}` - Method: `code_action` ## Completion ### [luasnip](https://github.com/L3MON4D3/LuaSnip) Snippet engine for Neovim, written in Lua. #### Usage ```lua local sources = { null_ls.builtins.completion.luasnip } ``` #### Defaults - Filetypes: `{}` - Method: `completion` #### Notes - Registering this source will show available snippets in the completion list, but luasnip is in charge of expanding them. Consult [luasnip's documentation](https://github.com/L3MON4D3/LuaSnip#keymaps) to set up keymaps for expansion and jumping. ### [nvim_snippets](https://github.com/garymjr/nvim-snippets) Snippets managed by nvim-snippets. #### Usage ```lua local sources = { null_ls.builtins.completion.nvim_snippets } ``` #### Defaults - Filetypes: `{}` - Method: `completion` ### spell Spell suggestions completion source. #### Usage ```lua local sources = { null_ls.builtins.completion.spell } ``` #### Defaults - Filetypes: `{}` - Method: `completion` ### tags Tags completion source. #### Usage ```lua local sources = { null_ls.builtins.completion.tags } ``` #### Defaults - Filetypes: `{}` - Method: `completion` ### [vsnip](https://github.com/hrsh7th/vim-vsnip) Snippets managed by vim-vsnip. #### Usage ```lua local sources = { null_ls.builtins.completion.vsnip } ``` #### Defaults - Filetypes: `{}` - Method: `completion` #### Notes - Registering this source will show available snippets in the completion list, but vim-vsnip is in charge of expanding them. See [vim-vsnip's documentation](https://github.com/hrsh7th/vim-vsnip#2-setting) for setup instructions. ## Diagnostics ### [actionlint](https://github.com/rhysd/actionlint) Actionlint is a static checker for GitHub Actions workflow files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.actionlint } ``` #### Defaults - Filetypes: `{ "yaml" }` - Method: `diagnostics` - Command: `actionlint` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/diagnostics/actionlint.lua)) ### [alex](https://github.com/get-alex/alex) Catch insensitive, inconsiderate writing. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.alex } ``` #### Defaults - Filetypes: `{ "markdown" }` - Method: `diagnostics` - Command: `alex` - Args: `{ "--stdin", "--quiet" }` ### [ansiblelint](https://github.com/ansible-community/ansible-lint) Linter for Ansible playbooks, roles and collections. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.ansiblelint } ``` #### Defaults - Filetypes: `{ "yaml.ansible" }` - Method: `diagnostics` - Command: `ansible-lint` - Args: `{ "-f", "codeclimate", "-q", "--nocolor", "$FILENAME" }` ### [bean_check](https://github.com/beancount/beancount) Beancount: text-based double-entry accounting tool #### Usage ```lua local sources = { null_ls.builtins.diagnostics.bean_check } ``` #### Defaults - Filetypes: `{ "beancount" }` - Method: `diagnostics_on_save` ### [bslint](https://github.com/rokucommunity/bslint) A brighterscript CLI tool to lint your code without compiling your project. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.bslint } ``` #### Defaults - Filetypes: `{ "brs" }` - Method: `diagnostics` - Command: `bslint` - Args: `{ "--files", "$FILENAME" }` ### [buf](https://github.com/bufbuild/buf) A new way of working with Protocol Buffers. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.buf } ``` #### Defaults - Filetypes: `{ "proto" }` - Method: `diagnostics_on_save` - Command: `buf` - Args: `{ "lint", "$FILENAME#include_package_files=true" }` ### [buildifier](https://github.com/bazelbuild/buildtools/tree/master/buildifier) buildifier is a tool for formatting and linting bazel BUILD, WORKSPACE, and .bzl files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.buildifier } ``` #### Defaults - Filetypes: `{ "bzl" }` - Method: `diagnostics` - Command: `buildifier` - Args: `{ "-mode=check", "-lint=warn", "-format=json", "-path=$FILENAME" }` ### [cfn_lint](https://github.com/aws-cloudformation/cfn-lint) Validate AWS CloudFormation yaml/json templates against the AWS CloudFormation Resource Specification #### Usage ```lua local sources = { null_ls.builtins.diagnostics.cfn_lint } ``` #### Defaults - Filetypes: `{ "yaml", "json" }` - Method: `diagnostics` - Command: `cfn-lint` - Args: `{ "--format", "parseable" }` #### Notes - Once a supported file type is opened null-ls will try and determine if the file looks like an AWS Cloudformation template. - A file will be considered an AWS Cloudformation template if it contains a "Resources" or "AWSTemplateFormatVersion" key. - To prevent cfn-lint running on all YAML and JSON files that contain a "Resources" key. - The file must contain at least one AWS Cloudformation Resource Type, e.g "Type": "AWS::S3::Bucket" - This check will run only once when entering the buffer. - This means if "Resources" or "AWSTemplateFormatVersion" is added to a file after this check is run, the cfn-lint diagnostics will not be generated. - To fix this you must restart Neovim. ### [checkmake](https://github.com/mrtazz/checkmake) `make` linter. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.checkmake } ``` #### Defaults - Filetypes: `{ "make" }` - Method: `diagnostics` - Command: `checkmake` - Args: `{ "--format='{{.LineNumber}}:{{.Rule}}:{{.Violation}}\n'", "$FILENAME" }` ### [checkstyle](https://checkstyle.org) Checkstyle is a tool for checking Java source code for adherence to a Code Standard or set of validation rules (best practices). #### Usage ```lua local sources = { null_ls.builtins.diagnostics.checkstyle.with({ extra_args = { "-c", "/google_checks.xml" }, -- or "/sun_checks.xml" or path to self written rules }), } ``` #### Defaults - Filetypes: `{ "java" }` - Method: `diagnostics_on_save` - Command: `checkstyle` - Args: `{ "-f", "sarif", "$ROOT" }` #### Notes - Checkstyle only offers a jar file as download. It is recommended to put an executable wrapper script in your path. Example wrapper script: ```bash #!/usr/bin/env bash java -jar path/to/checkstyle.jar "$@" ``` - Checkstyle needs a mandatory `-c` argument. Use `extra_args` to add yours. `extra_args` can also be a function to build more sophisticated logic. ### [clazy](https://github.com/KDE/clazy) Qt-oriented static code analyzer based on the Clang framework #### Usage ```lua local sources = { null_ls.builtins.diagnostics.clazy } ``` #### Defaults - Filetypes: `{ "cpp" }` - Method: `diagnostics_on_save` - Command: `clazy-standalone` - Args: `{ "--ignore-included-files", "--header-filter=$ROOT/.*", "$FILENAME" }` #### Notes - `clazy` needs a compilation database (`compile_commands.json`) to work. By default `clazy` will search for a compilation database in all parent folders of the input file. - If the compilation database is not in a parent folder, the `-p` option can be used to point to the corresponding folder (e.g. the projects build directory): ```lua local sources = { null_ls.builtins.diagnostics.clazy.with({ extra_args = { "-p=$ROOT/build" }, }), } ``` - Alternatively, `compile_commands.json` can be linked into the project's root directory. For more information see https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html - `clazy` will be run only when files are saved to disk, so that `compile_commands.json` can be used. ### [clj_kondo](https://github.com/clj-kondo/clj-kondo) A linter for clojure code that sparks joy #### Usage ```lua local sources = { null_ls.builtins.diagnostics.clj_kondo } ``` #### Defaults - Filetypes: `{ "clojure" }` - Method: `diagnostics` - Command: `clj-kondo` - Args: `{ "--cache", "--lint", "-", "--filename", "$FILENAME" }` ### [cmake_lint](https://github.com/cheshirekow/cmake_format) Check cmake listfiles for style violations, common mistakes, and anti-patterns. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.cmake_lint } ``` #### Defaults - Filetypes: `{ "cmake" }` - Method: `diagnostics_on_save` - Command: `cmake-lint` - Args: `{ "$FILENAME" }` ### [codespell](https://github.com/codespell-project/codespell) Codespell finds common misspellings in text files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.codespell } ``` #### Defaults - Filetypes: `{}` - Method: `diagnostics` - Command: `codespell` - Args: `{ "-" }` ### [commitlint](https://commitlint.js.org) commitlint checks if your commit messages meet the conventional commit format. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.commitlint } ``` #### Defaults - Filetypes: `{ "gitcommit" }` - Method: `diagnostics` - Command: `commitlint` - Args: `{ "--format", "commitlint-format-json" }` #### Notes - Needs npm packages commitlint and a json formatter: `@commitlint/{config-conventional,cli}` and `commitlint-format-json`. - It works with the packages installed globally but watch out for [some common issues](https://github.com/conventional-changelog/commitlint/issues/613). ### [cppcheck](https://github.com/danmar/cppcheck) A tool for fast static analysis of C/C++ code. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.cppcheck } ``` #### Defaults - Filetypes: `{ "cpp", "c" }` - Method: `diagnostics` - Command: `cppcheck` - Args: `{ "--enable=warning,style,performance,portability", "--template=gcc", "$FILENAME" }` ### [credo](https://hexdocs.pm/credo) Static analysis of `elixir` files for enforcing code consistency. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.credo } ``` #### Defaults - Filetypes: `{ "elixir" }` - Method: `diagnostics` - Command: `mix` - Args: `{ "credo", "suggest", "--format", "json", "--read-from-stdin", "$FILENAME" }` #### Notes - Searches upwards from the buffer to the project root and tries to find the first `.credo.exs` file in case the project has nested `credo` configs. ### [cue_fmt](https://github.com/cue-lang/cue) Reports on formatting errors in .cue language files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.cue_fmt } ``` #### Defaults - Filetypes: `{ "cue" }` - Method: `diagnostics` - Command: `cue` - Args: `{ "vet", "$FILENAME" }` ### [deadnix](https://github.com/astro/deadnix) Scan Nix files for dead code. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.deadnix } ``` #### Defaults - Filetypes: `{ "nix" }` - Method: `diagnostics` - Command: `deadnix` - Args: `{ "--output-format=json", "$FILENAME" }` ### [djlint](https://github.com/Riverside-Healthcare/djLint) ✨ 📜 🪄 ✨ HTML Template Linter and Formatter. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.djlint } ``` #### Defaults - Filetypes: `{ "django", "jinja.html", "htmldjango" }` - Method: `diagnostics` - Command: `djlint` - Args: `{ "--quiet", "-" }` ### [dotenv_linter](https://github.com/dotenv-linter/dotenv-linter) Lightning-fast linter for .env files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.dotenv_linter } ``` #### Defaults - Filetypes: `{ "sh" }` - Method: `diagnostics` - Command: `dotenv-linter` - Args: `{ "$FILENAME" }` ### [editorconfig_checker](https://github.com/editorconfig-checker/editorconfig-checker) A tool to verify that your files are in harmony with your `.editorconfig`. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.editorconfig_checker } ``` #### Defaults - Filetypes: `{}` - Method: `diagnostics` - Command: `editorconfig-checker` - Args: `{ "-no-color", "$FILENAME" }` ### [erb_lint](https://github.com/Shopify/erb-lint) Lint your ERB or HTML files #### Usage ```lua local sources = { null_ls.builtins.diagnostics.erb_lint } ``` #### Defaults - Filetypes: `{ "eruby" }` - Method: `diagnostics` - Command: `erb_lint` - Args: `{ "--format", "json", "--stdin", "$FILENAME" }` ### [fish](https://github.com/fish-shell/fish-shell) Basic linting is available for fish scripts using `fish --no-execute`. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.fish } ``` #### Defaults - Filetypes: `{ "fish" }` - Method: `diagnostics` - Command: `fish` - Args: `{ "--no-execute", "$FILENAME" }` ### [gccdiag](https://gitlab.com/andrejr/gccdiag) gccdiag is a wrapper for any C/C++ compiler (gcc, avr-gcc, arm-none-eabi-gcc, etc) that automatically uses the correct compiler arguments for a file in your project by parsing the `compile_commands.json` file at the root of your project. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.gccdiag } ``` #### Defaults - Filetypes: `{ "c", "cpp" }` - Method: `diagnostics_on_save` - Command: `gccdiag` - Args: `{ "--default-args", "-S -x $FILEEXT", "-i", "-fdiagnostics-color", "--", "$FILENAME" }` ### [gdlint](https://github.com/Scony/godot-gdscript-toolkit) A linter that performs a static analysis on gdscript code according to some predefined configuration. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.gdlint } ``` #### Defaults - Filetypes: `{ "gdscript" }` - Method: `diagnostics` - Command: `gdlint` - Args: `{ "$FILENAME" }` ### [gitleaks](https://github.com/gitleaks/gitleaks) Gitleaks is a SAST tool for detecting and preventing hardcoded secrets like passwords, API keys, and tokens in git repos. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.gitleaks } ``` #### Defaults - Filetypes: `{}` - Method: `diagnostics` - Command: `gitleaks` - Args: `{ "stdin", "--report-format", "json", "--report-path", "-", "--exit-code", "0", "--no-banner" }` ### [gitlint](https://jorisroovers.com/gitlint/) Linter for Git commit messages. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.gitlint } ``` #### Defaults - Filetypes: `{ "gitcommit" }` - Method: `diagnostics` - Command: `gitlint` - Args: `{ "--msg-filename", "$FILENAME" }` ### [glslc](https://github.com/google/shaderc) Shader to SPIR-V compiler. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.glslc.with({ extra_args = { "--target-env=opengl" }, -- use opengl instead of vulkan1.0 }), } ``` #### Defaults - Filetypes: `{ "glsl" }` - Method: `diagnostics` - Command: `glslc` - Args: `{ "-o", "-", "$FILENAME" }` #### Notes - The shader stage can be extracted from the file extension (`.vert`, `.geom`, `.frag`, etc.), but note that these file extensions are at the time of writing not natively recognized to be glsl files (only `.glsl` is). The shader stage can also be extracted from the file contents by adding a `#pragma shader_stage()`. For more information see `man glslc`. - the `--target-env` can be specified in `extra_args`. Defaults to vulkan1.0. Check `man glslc` for more possible targets environments. ### [golangci_lint](https://golangci-lint.run/) A Go linter aggregator. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.golangci_lint } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `diagnostics_on_save` - Command: `golangci-lint` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/diagnostics/golangci_lint.lua)) ### [hadolint](https://github.com/hadolint/hadolint) A smarter Dockerfile linter that helps you build best practice Docker images. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.hadolint } ``` #### Defaults - Filetypes: `{ "dockerfile" }` - Method: `diagnostics` - Command: `hadolint` - Args: `{ "--no-fail", "--format=json", "-" }` ### [haml_lint](https://github.com/sds/haml-lint) Tool for writing clean and consistent HAML. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.haml_lint } ``` #### Defaults - Filetypes: `{ "haml" }` - Method: `diagnostics` - Command: `haml-lint` - Args: `{ "--reporter", "json", "$FILENAME" }` ### [ktlint](https://ktlint.github.io/) An anti-bikeshedding Kotlin linter with built-in formatter. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.ktlint } ``` #### Defaults - Filetypes: `{ "kotlin" }` - Method: `diagnostics_on_save` - Command: `ktlint` - Args: `{ "--relative", "--reporter=json", "--log-level=none", "**/*.kt", "**/*.kts" }` ### [kube_linter](https://github.com/stackrox/kube-linter) KubeLinter is a static analysis tool that checks Kubernetes YAML files and Helm charts to ensure the applications represented in them adhere to best practices. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.kube_linter } ``` #### Defaults - Filetypes: `{ "helm", "yaml" }` - Method: `diagnostics` - Command: `kube-linter` - Args: `{ "lint", "--format", "json", "$ROOT" }` ### [ltrs](https://github.com/jeertmans/languagetool-rust) LanguageTool-Rust (LTRS) is both an executable and a Rust library that aims to provide correct and safe bindings for the LanguageTool API. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.ltrs } ``` #### Defaults - Filetypes: `{ "text", "markdown", "markdown" }` - Method: `diagnostics` - Command: `ltrs` - Args: `{ "check", "-m", "-r", "--text", "$TEXT" }` ### [markdownlint](https://github.com/DavidAnson/markdownlint) Markdown style and syntax checker. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.markdownlint } ``` #### Defaults - Filetypes: `{ "markdown" }` - Method: `diagnostics` - Command: `markdownlint` - Args: `{ "--stdin" }` ### [markdownlint_cli2](https://github.com/DavidAnson/markdownlint-cli2) A fast, flexible, configuration-based command-line interface for linting Markdown/CommonMark files with the markdownlint library #### Usage ```lua local sources = { null_ls.builtins.diagnostics.markdownlint_cli2 } ``` #### Defaults - Filetypes: `{ "markdown" }` - Method: `diagnostics_on_save` - Command: `markdownlint-cli2` - Args: `{ "$FILENAME" }` #### Notes - Must be configured using a [configuration file](https://github.com/DavidAnson/markdownlint-cli2#configuration). - See [the documentation](https://github.com/DavidAnson/markdownlint-cli2#overview) to understand the differences between markdownlint-cli2 and markdownlint-cli. ### [markuplint](https://github.com/markuplint/markuplint) A linter for all markup developers. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.markuplint } ``` #### Defaults - Filetypes: `{ "html" }` - Method: `diagnostics` - Command: `markuplint` - Args: `{ "--format", "JSON", "$FILENAME" }` ### [mdl](https://github.com/markdownlint/markdownlint) A tool to check Markdown files and flag style issues. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.mdl } ``` #### Defaults - Filetypes: `{ "markdown" }` - Method: `diagnostics` - Command: `mdl` - Args: `{ "--json" }` ### [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html) Linter for MATLAB files #### Usage ```lua local sources = { null_ls.builtins.diagnostics.mlint } ``` #### Defaults - Filetypes: `{ "matlab", "octave" }` - Method: `diagnostics_on_save` - Command: `mlint` - Args: `{ "$FILENAME" }` ### [mypy](https://github.com/python/mypy) Mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.mypy } ``` #### Defaults - Filetypes: `{ "python" }` - Method: `diagnostics` - Command: `mypy` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/diagnostics/mypy.lua)) ### [npm_groovy_lint](https://github.com/nvuillam/npm-groovy-lint) Lint, format and auto-fix Groovy, Jenkinsfile, and Gradle files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.npm_groovy_lint } ``` #### Defaults - Filetypes: `{ "groovy", "java", "Jenkinsfile" }` - Method: `diagnostics` - Command: `npm-groovy-lint` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/diagnostics/npm_groovy_lint.lua)) ### [opacheck](https://www.openpolicyagent.org/docs/latest/cli/#opa-check) Check Rego source files for parse and compilation errors. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.opacheck } ``` #### Defaults - Filetypes: `{ "rego" }` - Method: `diagnostics_on_save` - Command: `opa` - Args: `{ "check", "-f", "json", "--strict", "$ROOT", "--ignore=*.yaml", "--ignore=*.yml", "--ignore=*.json", "--ignore=.git/**/*" }` ### [opentofu_validate](https://opentofu.org/docs/cli/commands/validate) OpenTofu `validate` is a subcommand of OpenTofu to validate configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.opentofu_validate } ``` #### Defaults - Filetypes: `{ "terraform", "tf", "terraform-vars" }` - Method: `diagnostics_on_save` - Command: `tofu` - Args: `{ "validate", "-json" }` ### [perlimports](https://metacpan.org/dist/App-perlimports/view/script/perlimports) A command line utility for cleaning up imports in your Perl code #### Usage ```lua local sources = { null_ls.builtins.diagnostics.perlimports } ``` #### Defaults - Filetypes: `{ "perl" }` - Method: `diagnostics` - Command: `perlimports` - Args: `{ "--lint", "--read-stdin", "--filename", "$FILENAME" }` ### [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) PHP_CodeSniffer is a script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.phpcs } ``` #### Defaults - Filetypes: `{ "php" }` - Method: `diagnostics` - Command: `phpcs` - Args: `{ "--report=json", "-q", "-s", "--runtime-set", "ignore_warnings_on_exit", "1", "--runtime-set", "ignore_errors_on_exit", "1", "--stdin-path=$FILENAME", "--basepath=" }` ### [phpmd](https://github.com/phpmd/phpmd/) Runs PHP Mess Detector against PHP files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.phpmd } ``` #### Defaults - Filetypes: `{ "php" }` - Method: `diagnostics` - Command: `phpmd` - Args: `{ "$FILENAME", "json" }` ### [phpstan](https://github.com/phpstan/phpstan) PHP static analysis tool. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.phpstan } ``` #### Defaults - Filetypes: `{ "php" }` - Method: `diagnostics` - Command: `phpstan` - Args: `{ "analyze", "--error-format", "json", "--no-progress", "$FILENAME" }` #### Notes - Requires a valid `phpstan.neon` at root. - If in place validation is required set `method` to `diagnostics_on_save` and `to_temp_file` to `false` ### [pmd](https://pmd.github.io) An extensible cross-language static code analyzer. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.pmd.with({ extra_args = { "--rulesets", "category/java/bestpractices.xml,category/jsp/bestpractices.xml" -- or path to self-written ruleset }, }), } ``` #### Defaults - Filetypes: `{ "java", "jsp" }` - Method: `diagnostics_on_save` - Command: `pmd` - Args: `{ "--format", "json", "--dir", "$ROOT" }` #### Notes - PMD only offers parameterized wrapper scripts as download. It is recommended to put an executable wrapper script in your path. Example wrapper script: ```bash #!/usr/bin/env bash path/to/pmd/bin/run.sh pmd "$@" ``` - PMD needs a mandatory `--rulesets`/`-rulesets`/`-R` argument. Use `extra_args` to add yours. `extra_args` can also be a function to build more sophisticated logic. ### [proselint](https://github.com/amperser/proselint) An English prose linter. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.proselint } ``` #### Defaults - Filetypes: `{ "markdown", "tex" }` - Method: `diagnostics` - Command: `proselint` - Args: `{ "check", "--output-format=json" }` ### [protolint](https://github.com/yoheimuta/protolint) A pluggable linter and fixer to enforce Protocol Buffer style and conventions. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.protolint } ``` #### Defaults - Filetypes: `{ "proto" }` - Method: `diagnostics` - Command: `protolint` - Args: `{ "--reporter", "json", "$FILENAME" }` ### [puppet_lint](http://puppet-lint.com/) Check that your Puppet manifest conforms to the style guide. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.puppet_lint } ``` #### Defaults - Filetypes: `{ "puppet", "epuppet" }` - Method: `diagnostics` - Command: `puppet-lint` - Args: `{ "--json", "$FILENAME" }` ### [pydoclint](https://github.com/jsh9/pydoclint) Pydoclint is a Python docstring linter to check whether a docstring's sections (arguments, returns, raises, ...) match the function signature or function implementation. To see all violation codes go to [pydoclint](https://jsh9.github.io/pydoclint/violation_codes.html) #### Usage ```lua local sources = { null_ls.builtins.diagnostics.pydoclint } ``` #### Defaults - Filetypes: `{ "python" }` - Method: `diagnostics` - Command: `pydoclint` - Args: `{ "--show-filenames-in-every-violation-message=true", "-q", "$FILENAME" }` ### [pylint](https://github.com/PyCQA/pylint) Pylint is a Python static code analysis tool which looks for programming errors, helps enforcing a coding standard, sniffs for code smells and offers simple refactoring suggestions. If you prefer to use the older "message-id" names for these errors (i.e. "W0612" instead of "unused-variable"), you can customize pylint's resulting diagnostics like so: ```lua null_ls = require("null-ls") null_ls.setup({ sources = { null_ls.builtins.diagnostics.pylint.with({ diagnostics_postprocess = function(diagnostic) diagnostic.code = diagnostic.message_id end, }), null_ls.builtins.formatting.isort, null_ls.builtins.formatting.black, ..., }, }) ``` #### Usage ```lua local sources = { null_ls.builtins.diagnostics.pylint } ``` #### Defaults - Filetypes: `{ "python" }` - Method: `diagnostics` - Command: `pylint` - Args: `{ "--from-stdin", "$FILENAME", "-f", "json" }` ### [qmllint](https://doc-snapshots.qt.io/qt6-dev/qtquick-tools-and-utilities.html#qmllint) qmllint is a tool shipped with Qt that verifies the syntactic validity of QML files. It also warns about some QML anti-patterns. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.qmllint } ``` #### Defaults - Filetypes: `{ "qml" }` - Method: `diagnostics` - Command: `qmllint` - Args: `{ "$FILENAME" }` ### [reek](https://github.com/troessner/reek) Code smell detector for Ruby #### Usage ```lua local sources = { null_ls.builtins.diagnostics.reek } ``` #### Defaults - Filetypes: `{ "ruby" }` - Method: `diagnostics` - Command: `reek` - Args: `{ "--format", "json", "--stdin-filename", "$FILENAME" }` ### [regal](https://docs.styra.com/regal) Regal is a linter for Rego, with the goal of making your Rego magnificent!. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.regal } ``` #### Defaults - Filetypes: `{ "rego" }` - Method: `diagnostics_on_save` - Command: `regal` - Args: `{ "lint", "-f", "json", "$ROOT" }` ### [revive](https://revive.run/) Fast, configurable, extensible, flexible, and beautiful linter for Go. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.revive } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `diagnostics_on_save` - Command: `revive` - Args: `{ "-formatter", "json", "./..." }` #### Notes - `extra_args` does not work with this linter, since it does not support additional non-file arguments after the first file or `./...` is specified. Overwrite `args` instead. ### [rpmspec](https://rpm.org/) Command line tool to parse RPM spec files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.rpmspec } ``` #### Defaults - Filetypes: `{ "spec" }` - Method: `diagnostics` - Command: `rpmspec` - Args: `{ "-P", "$FILENAME" }` ### [rstcheck](https://github.com/myint/rstcheck) Checks syntax of reStructuredText and code blocks nested within it. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.rstcheck } ``` #### Defaults - Filetypes: `{ "rst" }` - Method: `diagnostics_on_save` - Command: `rstcheck` - Args: `{ "-r", "$DIRNAME" }` ### [rubocop](https://rubocop.org/) The Ruby Linter/Formatter that Serves and Protects. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.rubocop } ``` #### Defaults - Filetypes: `{ "ruby" }` - Method: `diagnostics` - Command: `rubocop` - Args: `{ "-f", "json", "--force-exclusion", "--stdin", "$FILENAME" }` ### [saltlint](https://github.com/warpnet/salt-lint) A command-line utility that checks for best practices in SaltStack. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.saltlint } ``` #### Defaults - Filetypes: `{ "sls" }` - Method: `diagnostics_on_save` - Command: `salt-lint` - Args: `{ "--nocolor", "--json", "$FILENAME" }` ### [selene](https://kampfkarren.github.io/selene/) Command line tool designed to help write correct and idiomatic Lua code. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.selene } ``` #### Defaults - Filetypes: `{ "lua", "luau" }` - Method: `diagnostics` - Command: `selene` - Args: `{ "--display-style", "json2", "-" }` ### [semgrep](https://semgrep.dev/) Semgrep is a fast, open-source, static analysis tool for finding bugs and enforcing code standards at editor, commit, and CI time. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.semgrep } ``` #### Defaults - Filetypes: `{ "typescript", "typescriptreact", "ruby", "python", "java", "go" }` - Method: `diagnostics` - Command: `semgrep` - Args: `{ "-q", "--json", "$FILENAME" }` ### [solhint](https://protofire.github.io/solhint/) An open source project for linting Solidity code. It provides both security and style guide validations. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.solhint } ``` #### Defaults - Filetypes: `{ "solidity" }` - Method: `diagnostics` - Command: `solhint` - Args: `{ "$FILENAME", "--formatter", "unix" }` ### [spectral](https://github.com/stoplightio/spectral) A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v3.1, v3.0, and v2.0. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.spectral } ``` #### Defaults - Filetypes: `{ "yaml", "json" }` - Method: `diagnostics` - Command: `spectral` - Args: `{ "lint", "--stdin-filepath", "$FILENAME", "-f", "json" }` ### [sqlfluff](https://github.com/sqlfluff/sqlfluff) A SQL linter and auto-formatter for Humans #### Usage ```lua local sources = { null_ls.builtins.diagnostics.sqlfluff.with({ extra_args = { "--dialect", "postgres" }, -- change to your dialect }), } ``` #### Defaults - Filetypes: `{ "sql" }` - Method: `diagnostics` - Command: `sqlfluff` - Args: `{ "lint", "--disable-progress-bar", "-f", "github-annotation", "-n", "$FILENAME" }` #### Notes - SQLFluff needs a mandatory `--dialect` argument. Use `extra_args` to add yours, or create a .sqlfluff file in the same directory as the SQL file to specify the dialect (see the sqlfluff docs for details). `extra_args` can also be a function to build more sophisticated logic. ### [sqruff](https://github.com/quarylabs/sqruff) A high-speed SQL linter written in Rust. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.sqruff } ``` #### Defaults - Filetypes: `{ "sql" }` - Method: `diagnostics` - Command: `sqruff` - Args: `{ "lint", "--format", "github-annotation-native", "$FILENAME" }` ### [staticcheck](https://staticcheck.io/) Advanced Go linter. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.staticcheck } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `diagnostics_on_save` - Command: `staticcheck` - Args: `{ "-f", "json", "./..." }` #### Notes - `extra_args` does not work with this linter, since it does not support additional non-file arguments after the first file or `./...` is specified. Overwrite `args` instead. ### [statix](https://github.com/nerdypepper/statix) Lints and suggestions for the Nix programming language. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.statix } ``` #### Defaults - Filetypes: `{ "nix" }` - Method: `diagnostics` - Command: `statix` - Args: `{ "check", "--stdin", "--format=errfmt" }` ### [stylelint](https://github.com/stylelint/stylelint) A mighty, modern linter that helps you avoid errors and enforce conventions in your styles. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.stylelint } ``` #### Defaults - Filetypes: `{ "scss", "less", "css", "sass" }` - Method: `diagnostics` - Command: `stylelint` - Args: `{ "--formatter", "json", "--stdin-filename", "$FILENAME" }` ### [stylint](https://github.com/SimenB/stylint) A linter for the Stylus CSS preprocessor. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.stylint } ``` #### Defaults - Filetypes: `{ "stylus" }` - Method: `diagnostics` - Command: `stylint` - Args: `{ "$FILENAME" }` ### [swiftlint](https://github.com/realm/SwiftLint) A tool to enforce Swift style and conventions. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.swiftlint } ``` #### Defaults - Filetypes: `{ "swift" }` - Method: `diagnostics` - Command: `swiftlint` - Args: `{ "--reporter", "json", "--use-stdin", "--quiet" }` ### [teal](https://github.com/teal-language/tl) The compiler for Teal, a typed dialect of Lua. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.teal } ``` #### Defaults - Filetypes: `{ "teal" }` - Method: `diagnostics` - Command: `tl` - Args: `{ "check", "$FILENAME" }` ### [terraform_validate](https://github.com/hashicorp/terraform) Terraform validate is is a subcommand of terraform to validate configuration files in a directory #### Usage ```lua local sources = { null_ls.builtins.diagnostics.terraform_validate } ``` #### Defaults - Filetypes: `{ "terraform", "tf", "terraform-vars" }` - Method: `diagnostics_on_save` - Command: `terraform` - Args: `{ "validate", "-json" }` ### [terragrunt_validate](https://terragrunt.gruntwork.io/docs/reference/cli-options/#validate-inputs) Terragrunt validate is is a subcommand of terragrunt to validate configuration files in a directory #### Usage ```lua local sources = { null_ls.builtins.diagnostics.terragrunt_validate } ``` #### Defaults - Filetypes: `{ "hcl" }` - Method: `diagnostics_on_save` - Command: `terragrunt` - Args: `{ "hclvalidate", "--terragrunt-hclvalidate-json" }` ### [textidote](https://github.com/sylvainhalle/textidote) Spelling, grammar and style checking on LaTeX documents. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.textidote } ``` #### Defaults - Filetypes: `{ "markdown", "tex" }` - Methods: `diagnostics_on_open, diagnostics_on_save` - Command: `textidote` - Args: `{ "--read-all", "--output", "singleline", "--no-color", "--check", "en", "--quiet", "$FILENAME" }` ### [textlint](https://github.com/textlint/textlint) The pluggable linting tool for text and Markdown. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.textlint } ``` #### Defaults - Filetypes: `{ "txt", "markdown" }` - Method: `diagnostics` - Command: `textlint` - Args: `{ "-f", "json", "--stdin", "--stdin-filename", "$FILENAME" }` ### [tfsec](https://github.com/aquasecurity/tfsec) Security scanner for Terraform code #### Usage ```lua local sources = { null_ls.builtins.diagnostics.tfsec } ``` #### Defaults - Filetypes: `{ "terraform", "tf", "terraform-vars" }` - Method: `diagnostics_on_save` - Command: `tfsec` - Args: `{ "-s", "-f", "json", "$DIRNAME" }` ### [tidy](https://www.html-tidy.org/) Tidy corrects and cleans up HTML and XML documents by fixing markup errors and upgrading legacy code to modern standards. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.tidy } ``` #### Defaults - Filetypes: `{ "html", "xml" }` - Method: `diagnostics` - Command: `tidy` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/diagnostics/tidy.lua)) ### todo_comments Uses inbuilt Lua code and treesitter to detect lines with TODO comments and show a diagnostic warning on each line where it's present. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.todo_comments } ``` #### Defaults - Filetypes: `{}` - Method: `diagnostics` ### trail_space Uses inbuilt Lua code to detect lines with trailing whitespace and show a diagnostic warning on each line where it's present. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.trail_space } ``` #### Defaults - Filetypes: `{}` - Method: `diagnostics` ### [trivy](https://github.com/aquasecurity/trivy) Find misconfigurations and vulnerabilities #### Usage ```lua local sources = { null_ls.builtins.diagnostics.trivy } ``` #### Defaults - Filetypes: `{ "terraform", "tf", "terraform-vars", "helm", "dockerfile" }` - Method: `diagnostics_on_save` - Command: `trivy` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/diagnostics/trivy.lua)) ### [twigcs](https://github.com/friendsoftwig/twigcs) Runs Twigcs against Twig files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.twigcs } ``` #### Defaults - Filetypes: `{ "twig" }` - Method: `diagnostics` - Command: `twigcs` - Args: `{ "--reporter", "json", "$FILENAME" }` ### [vacuum](https://quobix.com/vacuum) The world’s fastest and most scalable OpenAPI linter. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.vacuum } ``` #### Defaults - Filetypes: `{ "yaml", "json" }` - Method: `diagnostics` - Command: `vacuum` - Args: `{ "report", "--stdin", "--stdout" }` ### [vale](https://vale.sh/) Syntax-aware linter for prose built with speed and extensibility in mind. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.vale } ``` #### Defaults - Filetypes: `{ "markdown", "tex", "asciidoc" }` - Method: `diagnostics` - Command: `vale` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/diagnostics/vale.lua)) #### Notes - vale doesn't include a syntax by itself, so you need to [create a `vale.ini`](https://vale.sh/generator)) and download [styles](https://vale.sh/docs/vale-cli/structure/#styles) with `vale sync`. ### [verilator](https://www.veripool.org/verilator/) Verilog and SystemVerilog linter power by Verilator #### Usage ```lua local sources = { null_ls.builtins.diagnostics.verilator } ``` #### Defaults - Filetypes: `{ "verilog", "systemverilog" }` - Method: `diagnostics` - Command: `verilator` - Args: `{ "-lint-only", "-Wno-fatal", "$FILENAME" }` ### [vint](https://github.com/Vimjas/vint) Linter for Vimscript. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.vint } ``` #### Defaults - Filetypes: `{ "vim" }` - Method: `diagnostics` - Command: `vint` - Args: `{ "--style-problem", "--json", "$FILENAME" }` ### [write_good](https://github.com/btford/write-good) English prose linter. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.write_good } ``` #### Defaults - Filetypes: `{ "markdown" }` - Method: `diagnostics` - Command: `write-good` - Args: `{ "--text=$TEXT", "--parse" }` ### [yamllint](https://github.com/adrienverge/yamllint) A linter for YAML files. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.yamllint } ``` #### Defaults - Filetypes: `{ "yaml" }` - Method: `diagnostics` - Command: `yamllint` - Args: `{ "--format", "parsable", "-" }` ### [zsh](https://www.zsh.org/) Uses zsh's own -n option to evaluate, but not execute, zsh scripts. Effectively, this acts somewhat like a linter, although it only really checks for serious errors - and will likely only show the first error. #### Usage ```lua local sources = { null_ls.builtins.diagnostics.zsh } ``` #### Defaults - Filetypes: `{ "zsh" }` - Method: `diagnostics` - Command: `zsh` - Args: `{ "-n", "$FILENAME" }` ## Formatting ### [alejandra](https://github.com/kamadorueda/alejandra) The Uncompromising Nix Code Formatter #### Usage ```lua local sources = { null_ls.builtins.formatting.alejandra } ``` #### Defaults - Filetypes: `{ "nix" }` - Method: `formatting` - Command: `alejandra` - Args: `{ "--quiet" }` ### [asmfmt](https://github.com/klauspost/asmfmt) Format your assembler code in a similar way that `gofmt` formats your `go` code. #### Usage ```lua local sources = { null_ls.builtins.formatting.asmfmt } ``` #### Defaults - Filetypes: `{ "asm" }` - Method: `formatting` - Command: `asmfmt` ### [astyle](http://astyle.sourceforge.net/) Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective‑C, C# and Java programming languages. This formatter works well for [Arduino](https://www.arduino.cc/) project files and is the same formatter used in the Arduino IDE. #### Usage ```lua local sources = { null_ls.builtins.formatting.astyle } ``` #### Defaults - Filetypes: `{ "arduino", "c", "cpp", "cs", "java" }` - Method: `formatting` - Command: `astyle` - Args: `{ "--quiet" }` ### [atlas_fmt](https://atlasgo.io/cli-reference#atlas-schema-fmt) atlas fmt command rewrites `atlas` config and schema files to a canonical format and style. #### Usage ```lua local sources = { null_ls.builtins.formatting.atlas_fmt } ``` #### Defaults - Filetypes: `{ "hcl", "atlas-config", "atlas-schema-mysql", "atlas-schema-sqlite", "atlas-schema-mariadb", "atlas-schema-redshift", "atlas-schema-clickhouse", "atlas-schema-postgresql", "atlas-schema-mssql", "atlas-plan", "atlas-test" }` - Method: `formatting` - Command: `atlas` - Args: `{ "schema", "fmt", "$FILENAME" }` ### [bean_format](https://beancount.github.io/docs/running_beancount_and_generating_reports.html#bean-format) This pure text processing tool will reformat `beancount` input to right-align all the numbers at the same, minimal column. #### Usage ```lua local sources = { null_ls.builtins.formatting.bean_format } ``` #### Defaults - Filetypes: `{ "beancount" }` - Method: `formatting` - Command: `bean-format` - Args: `{ "-" }` #### Notes - It left-aligns all the currencies. - It only modifies whitespace. ### [bibclean](https://www.ctan.org/pkg/bibclean) A portable program (written in C) that will pretty-print, syntax check, and generally sort out a BibTeX database file. #### Usage ```lua local sources = { null_ls.builtins.formatting.bibclean } ``` #### Defaults - Filetypes: `{ "bib" }` - Method: `formatting` - Command: `bibclean` - Args: `{ "-align-equals", "-delete-empty-values" }` #### Notes - See [bibclean: prettyprint and syntax check BibTeX and Scribe bibliography data base files](https://ftp.math.utah.edu/pub/bibclean/) for latest version. ### [biome](https://biomejs.dev) Formatter, linter, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, CSS and GraphQL. #### Usage ```lua local sources = { null_ls.builtins.formatting.biome } ``` #### Defaults - Filetypes: `{ "javascript", "typescript", "javascriptreact", "typescriptreact", "json", "jsonc", "css", "graphql" }` - Method: `formatting` - Command: `biome` - Args: `{ "format", "--stdin-file-path", "$FILENAME" }` #### Notes - Currently support only JavaScript, TypeScript, JSON, CSS and GraphQL. See status [here](https://biomejs.dev/internals/language-support/) ### [black](https://github.com/psf/black) The uncompromising Python code formatter #### Usage ```lua local sources = { null_ls.builtins.formatting.black } ``` #### Defaults - Filetypes: `{ "python" }` - Methods: `formatting, range_formatting` - Command: `black` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/black.lua)) ### [blackd](https://github.com/psf/black) blackd is a small HTTP server that exposes Black’s functionality over a simple protocol. The main benefit of using it is to avoid the cost of starting up a new Black process every time you want to blacken a file. The only way to configure the formatter is by using the provided config options, it will not pick up on config files. #### Usage ```lua local sources = { null_ls.builtins.formatting.blackd } ``` #### Defaults - Filetypes: `{ "python" }` - Method: `formatting` #### Config ##### `hostname` (string) Address to bind the server to. Defaults to localhost. ##### `port` (string) Port to listen on. Defaults to 45484. ##### `line_length` (number) Set how many characters per line to allow. Defaults to 88. ##### `skip_source_first_line` (boolean) If set to true, the first line of the source code will be ignored. Defaults to false. ##### `skip_string_normalization` (boolean) If set to true, no string normalization will be performed. Defaults to false. ##### `skip_magic_trailing_comma` (boolean) If set to true, trailing commas will not be used as a reason to split lines. Defaults to false. ##### `preview` (boolean) If set to true, experimental and potentially disruptive style changes will be used. Defaults to false. ##### `fast` (boolean) If set to true, Black will not perform an AST safety check after formatting. Defaults to false. ##### `python_variant` (string) If set to pyi, Black will format all input files like typing stubs regardless of the file extension. Otherwise, its value must correspond to a Python version or a set of comma-separated Python versions, optionally prefixed with py. (e.g. py3.5,py3.6). Defaults to empty string. ### [blade_formatter](https://github.com/shufo/blade-formatter) An opinionated blade template formatter for Laravel that respects readability #### Usage ```lua local sources = { null_ls.builtins.formatting.blade_formatter } ``` #### Defaults - Filetypes: `{ "blade" }` - Method: `formatting` - Command: `blade-formatter` - Args: `{ "--write", "$FILENAME" }` ### [bsfmt](https://github.com/rokucommunity/brighterscript-formatter) A code formatter for BrightScript and BrighterScript. #### Usage ```lua local sources = { null_ls.builtins.formatting.bsfmt } ``` #### Defaults - Filetypes: `{ "brs" }` - Method: `formatting` - Command: `bsfmt` - Args: `{ "$FILENAME" }` ### [buf](https://github.com/bufbuild/buf) A new way of working with Protocol Buffers. #### Usage ```lua local sources = { null_ls.builtins.formatting.buf } ``` #### Defaults - Filetypes: `{ "proto" }` - Method: `formatting` - Command: `buf` - Args: `{ "format", "-w", "$FILENAME" }` ### [buildifier](https://github.com/bazelbuild/buildtools/tree/master/buildifier) buildifier is a tool for formatting and linting bazel BUILD, WORKSPACE, and .bzl files. #### Usage ```lua local sources = { null_ls.builtins.formatting.buildifier } ``` #### Defaults - Filetypes: `{ "bzl" }` - Method: `formatting` - Command: `buildifier` - Args: `{ "-path=$FILENAME" }` ### [cbfmt](https://github.com/lukas-reineke/cbfmt) A tool to format codeblocks inside markdown and org documents. #### Usage ```lua local sources = { null_ls.builtins.formatting.cbfmt } ``` #### Defaults - Filetypes: `{ "markdown", "org" }` - Method: `formatting` - Command: `cbfmt` - Args: `{ "--stdin-filepath", "$FILENAME", "--best-effort" }` ### [clang_format](https://www.kernel.org/doc/html/latest/process/clang-format.html) Tool to format C/C++/… code according to a set of rules and heuristics. #### Usage ```lua local sources = { null_ls.builtins.formatting.clang_format } ``` #### Defaults - Filetypes: `{ "c", "cpp", "cs", "java", "cuda", "proto" }` - Methods: `formatting, range_formatting` - Command: `clang-format` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/clang_format.lua)) ### [cljfmt](https://github.com/weavejester/cljfmt) A tool for formatting Clojure code #### Usage ```lua local sources = { null_ls.builtins.formatting.cljfmt } ``` #### Defaults - Filetypes: `{ "clojure" }` - Method: `formatting` - Command: `cljfmt` - Args: `{ "fix", "-" }` ### [cljstyle](https://github.com/greglook/cljstyle) Formatter for Clojure code. #### Usage ```lua local sources = { null_ls.builtins.formatting.cljstyle } ``` #### Defaults - Filetypes: `{ "clojure" }` - Method: `formatting` - Command: `cljstyle` - Args: `{ "pipe" }` ### [cmake_format](https://github.com/cheshirekow/cmake_format) Parse cmake listfiles and format them nicely. #### Usage ```lua local sources = { null_ls.builtins.formatting.cmake_format } ``` #### Defaults - Filetypes: `{ "cmake" }` - Method: `formatting` - Command: `cmake-format` - Args: `{ "-" }` ### [codespell](https://github.com/codespell-project/codespell) Fix common misspellings in text files. #### Usage ```lua local sources = { null_ls.builtins.formatting.codespell } ``` #### Defaults - Filetypes: `{}` - Method: `formatting` - Command: `codespell` - Args: `{ "--check-hidden", "--write-changes", "$FILENAME" }` ### [crystal_format](https://github.com/crystal-lang/crystal) A tool for automatically checking and correcting the style of code in a project. #### Usage ```lua local sources = { null_ls.builtins.formatting.crystal_format } ``` #### Defaults - Filetypes: `{ "crystal" }` - Method: `formatting` - Command: `crystal` - Args: `{ "tool", "format", "-" }` ### [csharpier](https://csharpier.com/) CSharpier is an opinionated code formatter for c# #### Usage ```lua local sources = { null_ls.builtins.formatting.csharpier } ``` #### Defaults - Filetypes: `{ "cs" }` - Method: `formatting` - Command: `csharpier` - Args: `{ "format", "--write-stdout" }` ### [cueimports](https://pkg.go.dev/github.com/asdine/cueimports) CUE tool that updates your import lines, adding missing ones and removing unused ones. #### Usage ```lua local sources = { null_ls.builtins.formatting.cueimports } ``` #### Defaults - Filetypes: `{ "cue" }` - Method: `formatting` - Command: `cueimports` ### [cue_fmt](https://cuelang.org/) A CUE language formatter. #### Usage ```lua local sources = { null_ls.builtins.formatting.cue_fmt } ``` #### Defaults - Filetypes: `{ "cue" }` - Method: `formatting` - Command: `cue` - Args: `{ "fmt", "$FILENAME" }` ### [d2_fmt](https://github.com/terrastruct/d2) d2 fmt is a tool built into the d2 compiler for formatting d2 diagram source #### Usage ```lua local sources = { null_ls.builtins.formatting.d2_fmt } ``` #### Defaults - Filetypes: `{ "d2" }` - Method: `formatting` - Command: `d2` - Args: `{ "fmt", "-" }` ### [dart_format](https://dart.dev/tools/dart-format) Replace the whitespace in your program with formatting that follows Dart guidelines. #### Usage ```lua local sources = { null_ls.builtins.formatting.dart_format } ``` #### Defaults - Filetypes: `{ "dart" }` - Method: `formatting` - Command: `dart` - Args: `{ "format" }` ### [dfmt](https://github.com/dlang-community/dfmt) Formatter for D source code. #### Usage ```lua local sources = { null_ls.builtins.formatting.dfmt } ``` #### Defaults - Filetypes: `{ "d" }` - Method: `formatting` - Command: `dfmt` ### [djhtml](https://github.com/rtts/djhtml) A pure-Python Django/Jinja template indenter without dependencies. #### Usage ```lua local sources = { null_ls.builtins.formatting.djhtml } ``` #### Defaults - Filetypes: `{ "django", "jinja.html", "htmldjango" }` - Method: `formatting` - Command: `djhtml` - Args: `{ "-" }` ### [djlint](https://github.com/Riverside-Healthcare/djLint) ✨ 📜 🪄 ✨ HTML Template Linter and Formatter. #### Usage ```lua local sources = { null_ls.builtins.formatting.djlint } ``` #### Defaults - Filetypes: `{ "django", "jinja.html", "htmldjango" }` - Method: `formatting` - Command: `djlint` - Args: `{ "--reformat", "-" }` ### [duster](https://github.com/tighten/duster) Automatic configuration for Laravel apps to apply Tighten's standard linting & code standards. #### Usage ```lua local sources = { null_ls.builtins.formatting.duster } ``` #### Defaults - Filetypes: `{ "php" }` - Method: `formatting` - Command: `duster` - Args: `{ "fix", "$FILENAME", "--no-interaction", "--quiet" }` ### [dxfmt](https://github.com/dioxuslabs/dioxus) Format rust file with dioxus cli #### Usage ```lua local sources = { null_ls.builtins.formatting.dxfmt } ``` #### Defaults - Filetypes: `{ "rust" }` - Method: `formatting` - Command: `dx` - Args: `{ "fmt", "--file", "$FILENAME" }` ### [elm_format](https://github.com/avh4/elm-format) elm-format formats Elm source code according to a standard set of rules based on the official [Elm Style Guide](https://elm-lang.org/docs/style-guide). #### Usage ```lua local sources = { null_ls.builtins.formatting.elm_format } ``` #### Defaults - Filetypes: `{ "elm" }` - Method: `formatting` - Command: `elm-format` - Args: `{ "--stdin" }` ### [emacs_scheme_mode](https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html) An extensible, customizable, free/libre text editor — and more. Basically, using emacs in batch mode to format scheme files. #### Usage ```lua local sources = { null_ls.builtins.formatting.emacs_scheme_mode } ``` #### Defaults - Filetypes: `{ "scheme", "scheme.guile" }` - Method: `formatting` - Command: `emacs` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/emacs_scheme_mode.lua)) #### Notes - Adjust the expression evaluated with the `--eval` flag to change settings within emacs. ### [emacs_vhdl_mode](https://guest.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html) VHDL Mode is an Emacs major mode for editing VHDL code. Basically, using emacs in batch mode to format VHDL files. #### Usage ```lua local sources = { null_ls.builtins.formatting.emacs_vhdl_mode } ``` #### Defaults - Filetypes: `{ "vhdl" }` - Method: `formatting` - Command: `emacs` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/emacs_vhdl_mode.lua)) #### Notes - Adjust the expression evaluated with the `--eval` flag to change settings within emacs. ### [erb_format](https://github.com/nebulab/erb-formatter) Format ERB files with speed and precision. #### Usage ```lua local sources = { null_ls.builtins.formatting.erb_format } ``` #### Defaults - Filetypes: `{ "eruby" }` - Method: `formatting` - Command: `erb-format` - Args: `{ "--stdin" }` ### [erb_lint](https://github.com/Shopify/erb-lint) Lint your ERB or HTML files #### Usage ```lua local sources = { null_ls.builtins.formatting.erb_lint } ``` #### Defaults - Filetypes: `{ "eruby" }` - Method: `formatting` - Command: `erb_lint` - Args: `{ "--autocorrect", "--stdin", "$FILENAME" }` ### [erlfmt](https://github.com/WhatsApp/erlfmt) An opinionated Erlang code formatter. #### Usage ```lua local sources = { null_ls.builtins.formatting.erlfmt } ``` #### Defaults - Filetypes: `{ "erlang" }` - Method: `formatting` - Command: `erlfmt` - Args: `{ "-" }` ### [fantomas](https://github.com/fsprojects/fantomas) FSharp source code formatter. #### Usage ```lua local sources = { null_ls.builtins.formatting.fantomas } ``` #### Defaults - Filetypes: `{ "fsharp" }` - Method: `formatting` - Command: `fantomas` - Args: `{ "$FILENAME" }` ### [findent](https://pypi.org/project/findent/) findent indents/beautifies/converts and can optionally generate the dependencies of Fortran sources. #### Usage ```lua local sources = { null_ls.builtins.formatting.findent } ``` #### Defaults - Filetypes: `{ "fortran" }` - Method: `formatting` - Command: `findent` - Args: `{}` ### [fish_indent](https://fishshell.com/docs/current/cmds/fish_indent.html) Indent or otherwise prettify a piece of fish code. #### Usage ```lua local sources = { null_ls.builtins.formatting.fish_indent } ``` #### Defaults - Filetypes: `{ "fish" }` - Method: `formatting` - Command: `fish_indent` ### [fnlfmt](https://git.sr.ht/~technomancy/fnlfmt) fnlfmt is a Fennel code formatter which follows established Lisp conventions when determining how to format a given piece of code. #### Usage ```lua local sources = { null_ls.builtins.formatting.fnlfmt } ``` #### Defaults - Filetypes: `{ "fennel", "fnl" }` - Method: `formatting` - Command: `fnlfmt` - Args: `{ "-" }` ### [forge_fmt](https://book.getfoundry.sh/reference/config/formatter) Formats Solidity source files. #### Usage ```lua local sources = { null_ls.builtins.formatting.forge_fmt } ``` #### Defaults - Filetypes: `{ "solidity" }` - Method: `formatting` - Command: `forge` - Args: `{ "fmt", "$FILENAME" }` ### [format_r](https://github.com/yihui/formatR) Format R code automatically. #### Usage ```lua local sources = { null_ls.builtins.formatting.format_r } ``` #### Defaults - Filetypes: `{ "r", "rmd" }` - Method: `formatting` - Command: `R` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/format_r.lua)) ### [fprettify](https://github.com/pseewald/fprettify) fprettify is an auto-formatter for modern Fortran code that imposes strict whitespace formatting, written in Python. #### Usage ```lua local sources = { null_ls.builtins.formatting.fprettify } ``` #### Defaults - Filetypes: `{ "fortran" }` - Method: `formatting` - Command: `fprettify` - Args: `{ "--silent" }` ### [gdformat](https://github.com/Scony/godot-gdscript-toolkit) A formatter for Godot's gdscript #### Usage ```lua local sources = { null_ls.builtins.formatting.gdformat } ``` #### Defaults - Filetypes: `{ "gd", "gdscript", "gdscript3" }` - Method: `formatting` - Command: `gdformat` - Args: `{ "-" }` ### [gersemi](https://github.com/BlankSpruce/gersemi) A formatter to make your CMake code the real treasure #### Usage ```lua local sources = { null_ls.builtins.formatting.gersemi } ``` #### Defaults - Filetypes: `{ "cmake" }` - Method: `formatting` - Command: `gersemi` - Args: `{ "-" }` ### [gleam_format](https://github.com/gleam-lang/gleam/) Default formater for the Gleam programming language #### Usage ```lua local sources = { null_ls.builtins.formatting.gleam_format } ``` #### Defaults - Filetypes: `{ "gleam" }` - Method: `formatting` - Command: `gleam` - Args: `{ "format", "--stdin" }` ### [gn_format](http://gn.googlesource.com/gn) Format your GN code! #### Usage ```lua local sources = { null_ls.builtins.formatting.gn_format } ``` #### Defaults - Filetypes: `{ "gn" }` - Method: `formatting` - Command: `gn` - Args: `{ "format", "--stdin" }` #### Notes - Install google depot_tools to use gn ### [gofmt](https://pkg.go.dev/cmd/gofmt) Formats go programs. #### Usage ```lua local sources = { null_ls.builtins.formatting.gofmt } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `formatting` - Command: `gofmt` #### Notes - It uses tabs for indentation and blanks for alignment. - Aligntment assumes that the editor is using a fixed-width font. ### [gofumpt](https://github.com/mvdan/gofumpt) Enforce a stricter format than gofmt, while being backwards compatible. That is, gofumpt is happy with a subset of the formats that gofmt is happy with. #### Usage ```lua local sources = { null_ls.builtins.formatting.gofumpt } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `formatting` - Command: `gofumpt` ### [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports) Updates your Go import lines, adding missing ones and removing unreferenced ones. #### Usage ```lua local sources = { null_ls.builtins.formatting.goimports } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `formatting` - Command: `goimports` - Args: `{ "-srcdir", "$DIRNAME" }` ### [goimports_reviser](https://pkg.go.dev/github.com/incu6us/goimports-reviser) Tool for Golang to sort goimports by 3 groups: std, general and project dependencies. #### Usage ```lua local sources = { null_ls.builtins.formatting.goimports_reviser } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `formatting` - Command: `goimports-reviser` - Args: `{ "$FILENAME" }` ### [golines](https://pkg.go.dev/github.com/segmentio/golines) Applies a base formatter (eg. goimports or gofmt), then shortens long lines of code. #### Usage ```lua local sources = { null_ls.builtins.formatting.golines } ``` #### Defaults - Filetypes: `{ "go" }` - Method: `formatting` - Command: `golines` ### [google_java_format](https://github.com/google/google-java-format) Reformats Java source code according to Google Java Style. #### Usage ```lua local sources = { null_ls.builtins.formatting.google_java_format } ``` #### Defaults - Filetypes: `{ "java" }` - Methods: `formatting, range_formatting` - Command: `google-java-format` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/google_java_format.lua)) ### [haxe_formatter](https://github.com/HaxeCheckstyle/haxe-formatter) Haxe code formatter based on tokentree #### Usage ```lua local sources = { null_ls.builtins.formatting.haxe_formatter } ``` #### Defaults - Filetypes: `{ "haxe" }` - Method: `formatting` - Command: `haxelib` - Args: `{ "run", "formatter", "--stdin", "--source", "$FILENAME" }` ### [hclfmt](https://github.com/fatih/hclfmt) Formatter for HCL configuration files #### Usage ```lua local sources = { null_ls.builtins.formatting.hclfmt } ``` #### Defaults - Filetypes: `{ "hcl" }` - Method: `formatting` - Command: `hclfmt` ### [htmlbeautifier](https://github.com/threedaymonk/htmlbeautifier) A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates. #### Usage ```lua local sources = { null_ls.builtins.formatting.htmlbeautifier } ``` #### Defaults - Filetypes: `{ "eruby" }` - Method: `formatting` - Command: `htmlbeautifier` - Args: `{ "$FILENAME" }` ### [isort](https://github.com/PyCQA/isort) Python utility / library to sort imports alphabetically and automatically separate them into sections and by type. #### Usage ```lua local sources = { null_ls.builtins.formatting.isort } ``` #### Defaults - Filetypes: `{ "python" }` - Method: `formatting` - Command: `isort` - Args: `{ "--stdout", "--filename", "$FILENAME", "-" }` ### [isortd](https://github.com/urm8/isortd) isortd is a small HTTP server that exposes isort’s functionality over a simple protocol. The main benefit of using it is to avoid the cost of starting up a new isort process every time you want to format a file. #### Usage ```lua local sources = { null_ls.builtins.formatting.isortd } ``` #### Defaults - Filetypes: `{ "python" }` - Method: `formatting` #### Config ##### `hostname` (string) Address that the isortd server listens on. Defaults to localhost. ##### `port` (string) Port that the isortd server listens on. Defaults to 47393. ### [joker](https://github.com/candid82/joker) joker is a small Clojure interpreter, linter and formatter written in Go. #### Usage ```lua local sources = { null_ls.builtins.formatting.joker } ``` #### Defaults - Filetypes: `{ "clj" }` - Method: `formatting` - Command: `joker` - Args: `{ "--format", "-" }` ### [just](https://just.systems/) Format your Justfile #### Usage ```lua local sources = { null_ls.builtins.formatting.just } ``` #### Defaults - Filetypes: `{ "just" }` - Method: `formatting` - Command: `just` - Args: `{ "--fmt", "--unstable", "-f", "$FILENAME" }` ### [ktlint](https://ktlint.github.io/) An anti-bikeshedding Kotlin linter with built-in formatter. #### Usage ```lua local sources = { null_ls.builtins.formatting.ktlint } ``` #### Defaults - Filetypes: `{ "kotlin" }` - Method: `formatting` - Command: `ktlint` - Args: `{ "--format", "--stdin", "--log-level=none", "**/*.kt", "**/*.kts" }` ### [leptosfmt](https://github.com/bram209/leptosfmt) A formatter for the leptos view! macro #### Usage ```lua local sources = { null_ls.builtins.formatting.leptosfmt } ``` #### Defaults - Filetypes: `{ "rust" }` - Method: `formatting` - Command: `leptosfmt` - Args: `{ "--quiet", "--stdin" }` ### [markdownlint](https://github.com/igorshubovych/markdownlint-cli) A Node.js style checker and lint tool for Markdown/CommonMark files. #### Usage ```lua local sources = { null_ls.builtins.formatting.markdownlint } ``` #### Defaults - Filetypes: `{ "markdown" }` - Method: `formatting` - Command: `markdownlint` - Args: `{ "--fix", "$FILENAME" }` #### Notes - Can fix some (but not all!) markdownlint issues. If possible, use [Prettier](https://github.com/prettier/prettier), which can also fix Markdown files. ### [mdformat](https://github.com/executablebooks/mdformat) An opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files #### Usage ```lua local sources = { null_ls.builtins.formatting.mdformat } ``` #### Defaults - Filetypes: `{ "markdown" }` - Method: `formatting` - Command: `mdformat` - Args: `{ "$FILENAME" }` #### Notes - Mdformat offers an extensible plugin system for both code fence content formatting and Markdown parser extensions (like GFM tables). A comprehensive list of plugins is documented [here](https://mdformat.readthedocs.io/en/stable/users/plugins.html) ### [meson_format](https://mesonbuild.com/Commands.html#format) Meson's builtin formatter #### Usage ```lua local sources = { null_ls.builtins.formatting.meson_format } ``` #### Defaults - Filetypes: `{ "meson" }` - Method: `formatting` - Command: `meson` - Args: `{ "format", "--source-file-path", "$FILENAME", "--", "-" }` ### [mix](https://hexdocs.pm/mix/1.12/Mix.html) Build tool that provides tasks for creating, compiling, and testing elixir projects, managing its dependencies, and more. #### Usage ```lua local sources = { null_ls.builtins.formatting.mix } ``` #### Defaults - Filetypes: `{ "elixir" }` - Method: `formatting` - Command: `mix` - Args: `{ "format", "--stdin-filename", "$FILENAME", "-" }` ### [nginx_beautifier](https://github.com/vasilevich/nginxbeautifier) Beautifies and formats nginx configuration files. #### Usage ```lua local sources = { null_ls.builtins.formatting.nginx_beautifier } ``` #### Defaults - Filetypes: `{ "nginx" }` - Method: `formatting` - Command: `nginxbeautifier` - Args: `{ "-i", "-o", "$FILENAME" }` ### [nimpretty](https://nim-lang.org/docs/tools.html) nimpretty is a Nim source code beautifier, to format code according to the official style guide. #### Usage ```lua local sources = { null_ls.builtins.formatting.nimpretty } ``` #### Defaults - Filetypes: `{ "nim" }` - Method: `formatting` - Command: `nimpretty` - Args: `{ "$FILENAME" }` ### [nixfmt](https://github.com/serokell/nixfmt) nixfmt is a formatter for Nix code, intended to apply a uniform style. #### Usage ```lua local sources = { null_ls.builtins.formatting.nixfmt } ``` #### Defaults - Filetypes: `{ "nix" }` - Method: `formatting` - Command: `nixfmt` ### [nixpkgs_fmt](https://github.com/nix-community/nixpkgs-fmt) nixpkgs-fmt is a Nix code formatter for nixpkgs. #### Usage ```lua local sources = { null_ls.builtins.formatting.nixpkgs_fmt } ``` #### Defaults - Filetypes: `{ "nix" }` - Method: `formatting` - Command: `nixpkgs-fmt` ### [nix_flake_fmt](https://nix.dev/manual/nix/latest/command-ref/new-cli/nix3-fmt) `nix fmt` - reformat your code in the standard style (this is a generic formatter, not to be confused with nixfmt, a formatter for .nix files) #### Usage ```lua local sources = { null_ls.builtins.formatting.nix_flake_fmt } ``` #### Defaults - Filetypes: `{}` - Method: `formatting` - Args: `{ "$FILENAME" }` ### [npm_groovy_lint](https://github.com/nvuillam/npm-groovy-lint) Lint, format and auto-fix Groovy, Jenkinsfile, and Gradle files. #### Usage ```lua local sources = { null_ls.builtins.formatting.npm_groovy_lint } ``` #### Defaults - Filetypes: `{ "groovy", "java", "Jenkinsfile" }` - Method: `formatting` - Command: `npm-groovy-lint` - Args: `{ "--failon", "none", "--format", "-" }` ### [ocamlformat](https://github.com/ocaml-ppx/ocamlformat) Auto-formatter for OCaml code #### Usage ```lua local sources = { null_ls.builtins.formatting.ocamlformat } ``` #### Defaults - Filetypes: `{ "ocaml" }` - Method: `formatting` - Command: `ocamlformat` - Args: `{ "--enable-outside-detected-project", "--name", "$FILENAME", "-" }` ### [ocdc](https://github.com/mdwint/ocdc) A changelog formatter #### Usage ```lua local sources = { null_ls.builtins.formatting.ocdc } ``` #### Defaults - Filetypes: `{ "markdown" }` - Method: `formatting` - Command: `ocdc` - Args: `{ "--path", "-" }` ### [opentofu_fmt](https://opentofu.org/docs/cli/commands/fmt) The OpenTofu `fmt` command rewrites OpenTofu configuration files to a canonical format and style. #### Usage ```lua local sources = { null_ls.builtins.formatting.opentofu_fmt } ``` #### Defaults - Filetypes: `{ "terraform", "tf", "terraform-vars" }` - Method: `formatting` - Command: `tofu` - Args: `{ "fmt", "-" }` ### [packer](https://www.packer.io/docs/commands/fmt) The packer fmt Packer command is used to format HCL2 configuration files to a canonical format and style. #### Usage ```lua local sources = { null_ls.builtins.formatting.packer } ``` #### Defaults - Filetypes: `{ "hcl" }` - Method: `formatting` - Command: `packer` - Args: `{ "fmt", "-" }` ### [pg_format](https://github.com/darold/pgFormatter) PostgreSQL SQL syntax beautifier #### Usage ```lua local sources = { null_ls.builtins.formatting.pg_format } ``` #### Defaults - Filetypes: `{ "sql", "pgsql" }` - Method: `formatting` - Command: `pg_format` ### [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer) Tokenizes PHP files and detects violations of a defined set of coding standards. #### Usage ```lua local sources = { null_ls.builtins.formatting.phpcbf } ``` #### Defaults - Filetypes: `{ "php" }` - Method: `formatting` - Command: `phpcbf` - Args: `{ "-q", "--stdin-path=$FILENAME", "-" }` ### [phpcsfixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) Formatter for php files. #### Usage ```lua local sources = { null_ls.builtins.formatting.phpcsfixer } ``` #### Defaults - Filetypes: `{ "php" }` - Method: `formatting` - Command: `php-cs-fixer` - Args: `{ "--no-interaction", "--quiet", "fix", "$FILENAME" }` ### [pint](https://github.com/laravel/pint) An opinionated PHP code style fixer for minimalists. #### Usage ```lua local sources = { null_ls.builtins.formatting.pint } ``` #### Defaults - Filetypes: `{ "php" }` - Method: `formatting` - Command: `pint` - Args: `{ "--no-interaction", "--quiet", "$FILENAME" }` ### [prettier](https://github.com/prettier/prettier) Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. #### Usage ```lua local sources = { null_ls.builtins.formatting.prettier } ``` #### Defaults - Filetypes: `{ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars", "svelte", "astro", "htmlangular" }` - Methods: `formatting, range_formatting` - Command: `prettier` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/prettier.lua)) #### Notes - [TOML](https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml) via plugins. These filetypes are not enabled by default, but you can follow the instructions [here](BUILTIN_CONFIG.md#filetypes) to define your own list of filetypes. - To increase speed, you may want to try [prettierd](https://github.com/fsouza/prettierd). You can also set up [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) and format via [eslint_d](https://github.com/mantoni/eslint_d.js/). ### [prettierd](https://github.com/fsouza/prettierd) prettier, as a daemon, for ludicrous formatting speed. #### Usage ```lua local sources = { null_ls.builtins.formatting.prettierd } ``` #### Defaults - Filetypes: `{ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "markdown.mdx", "graphql", "handlebars", "svelte", "astro", "htmlangular" }` - Methods: `formatting, range_formatting` - Command: `prettierd` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/prettierd.lua)) ### [pretty_php](https://github.com/lkrms/pretty-php) The opinionated PHP code formatter. #### Usage ```lua local sources = { null_ls.builtins.formatting.pretty_php } ``` #### Defaults - Filetypes: `{ "php" }` - Method: `formatting` - Command: `pretty-php` - Args: `{ "$FILENAME" }` ### [prisma_format](https://github.com/prisma/prisma-engines) Formatter for the prisma filetype. #### Usage ```lua local sources = { null_ls.builtins.formatting.prisma_format } ``` #### Defaults - Filetypes: `{ "prisma" }` - Method: `formatting` - Command: `prisma` - Args: `{ "format", "$FILENAME" }` ### [protolint](https://github.com/yoheimuta/protolint) A pluggable linter and fixer to enforce Protocol Buffer style and conventions. #### Usage ```lua local sources = { null_ls.builtins.formatting.protolint } ``` #### Defaults - Filetypes: `{ "proto" }` - Method: `formatting` - Command: `protolint` - Args: `{ "--fix", "$FILENAME" }` ### [ptop](https://www.freepascal.org/tools/ptop.html) The FPC Pascal configurable source beautifier. Name means 'Pascal-TO-Pascal'. #### Usage ```lua local sources = { null_ls.builtins.formatting.ptop } ``` #### Defaults - Filetypes: `{ "pascal", "delphi" }` - Method: `formatting` - Command: `ptop` - Args: `{ "$FILENAME", "$FILENAME" }` ### [puppet_lint](http://puppet-lint.com/) Check that your Puppet manifest conforms to the style guide #### Usage ```lua local sources = { null_ls.builtins.formatting.puppet_lint } ``` #### Defaults - Filetypes: `{ "puppet", "epuppet" }` - Method: `formatting` - Command: `puppet-lint` - Args: `{ "--fix", "$FILENAME" }` ### [purs_tidy](https://github.com/natefaubion/purescript-tidy) A syntax tidy-upper (formatter) for PureScript. #### Usage ```lua local sources = { null_ls.builtins.formatting.purs_tidy } ``` #### Defaults - Filetypes: `{ "purescript" }` - Method: `formatting` - Command: `purs-tidy` - Args: `{ "format" }` #### Notes - For installation, use npm: npm install -g purs-tidy ### [pyink](https://github.com/google/pyink) The Google Python code formatter #### Usage ```lua local sources = { null_ls.builtins.formatting.pyink } ``` #### Defaults - Filetypes: `{ "python" }` - Methods: `formatting, range_formatting` - Command: `pyink` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/pyink.lua)) ### [qmlformat](https://doc-snapshots.qt.io/qt6-dev/qtquick-tools-and-utilities.html#qmlformat) qmlformat is a tool that automatically formats QML files according to the QML Coding Conventions. #### Usage ```lua local sources = { null_ls.builtins.formatting.qmlformat } ``` #### Defaults - Filetypes: `{ "qml" }` - Method: `formatting` - Command: `qmlformat` - Args: `{ "-i", "$FILENAME" }` ### [racket_fixw](https://github.com/6cdh/racket-fixw) A Racket formatter that add/remove some whitespaces but respects newline. #### Usage ```lua local sources = { null_ls.builtins.formatting.racket_fixw } ``` #### Defaults - Filetypes: `{ "racket" }` - Method: `formatting` - Command: `raco` - Args: `{ "fixw" }` #### Notes - Install with `raco pkg install fixw` ### [raco_fmt](https://docs.racket-lang.org/fmt/) The fmt package provides an extensible tool to format Racket code, using an expressive pretty printer library to compute the optimal layout. #### Usage ```lua local sources = { null_ls.builtins.formatting.raco_fmt } ``` #### Defaults - Filetypes: `{ "racket" }` - Method: `formatting` - Command: `raco` - Args: `{ "fmt" }` #### Notes - Requires Racket 8.0 or later - Install with `raco pkg install fmt` ### [rego](https://www.openpolicyagent.org/docs/latest/policy-language) Rego (opa fmt) Formatter #### Usage ```lua local sources = { null_ls.builtins.formatting.rego } ``` #### Defaults - Filetypes: `{ "rego" }` - Method: `formatting` - Command: `opa` - Args: `{ "fmt" }` ### [remark](https://github.com/remarkjs/remark) remark is an extensive and complex Markdown formatter/prettifier. #### Usage ```lua local sources = { null_ls.builtins.formatting.remark } ``` #### Defaults - Filetypes: `{ "markdown" }` - Method: `formatting` - Command: `remark` - Args: `{ "--no-color", "--silent" }` #### Notes - Depends on [remark-cli](https://github.com/remarkjs/remark/tree/main/packages/remark-cli). ### [rescript](https://rescript-lang.org/) The ReScript format builtin. #### Usage ```lua local sources = { null_ls.builtins.formatting.rescript } ``` #### Defaults - Filetypes: `{ "rescript" }` - Method: `formatting` - Command: `rescript` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/rescript.lua)) ### [rubocop](https://github.com/rubocop/rubocop) Ruby static code analyzer and formatter, based on the community Ruby style guide. #### Usage ```lua local sources = { null_ls.builtins.formatting.rubocop } ``` #### Defaults - Filetypes: `{ "ruby" }` - Method: `formatting` - Command: `rubocop` - Args: `{ "-a", "--server", "-f", "quiet", "--stderr", "--stdin", "$FILENAME" }` ### [rubyfmt](https://github.com/fables-tales/rubyfmt) Format your Ruby code! #### Usage ```lua local sources = { null_ls.builtins.formatting.rubyfmt } ``` #### Defaults - Filetypes: `{ "ruby" }` - Method: `formatting` - Command: `rubyfmt` - Args: `{}` #### Notes - Install to your PATH with `brew install rubyfmt`. Ensure you have the latest version. ### [rufo](https://github.com/ruby-formatter/rufo) Opinionated ruby formatter. #### Usage ```lua local sources = { null_ls.builtins.formatting.rufo } ``` #### Defaults - Filetypes: `{ "ruby" }` - Method: `formatting` - Command: `rufo` - Args: `{ "-x" }` ### [rustywind](https://github.com/avencera/rustywind) CLI for organizing Tailwind CSS classes. #### Usage ```lua local sources = { null_ls.builtins.formatting.rustywind } ``` #### Defaults - Filetypes: `{ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "html" }` - Method: `formatting` - Command: `rustywind` - Args: `{ "--stdin" }` ### [scalafmt](https://github.com/scalameta/scalafmt) Code formatter for Scala #### Usage ```lua local sources = { null_ls.builtins.formatting.scalafmt } ``` #### Defaults - Filetypes: `{ "scala" }` - Method: `formatting` - Command: `scalafmt` - Args: `{ "--stdin" }` ### [shellharden](https://github.com/anordal/shellharden) Hardens shell scripts by quoting variables, replacing `function_call` with `$(function_call)`, and more. #### Usage ```lua local sources = { null_ls.builtins.formatting.shellharden } ``` #### Defaults - Filetypes: `{ "sh" }` - Method: `formatting` - Command: `shellharden` - Args: `{ "--transform", "" }` ### [shfmt](https://github.com/mvdan/sh) A shell parser, formatter, and interpreter with `bash` support. #### Usage ```lua local sources = { null_ls.builtins.formatting.shfmt } ``` #### Defaults - Filetypes: `{ "sh" }` - Method: `formatting` - Command: `shfmt` - Args: `{ "-filename", "$FILENAME" }` ### [smlfmt](https://github.com/shwestrick/smlfmt) A custom parser/auto-formatter for Standard ML #### Usage ```lua local sources = { null_ls.builtins.formatting.smlfmt } ``` #### Defaults - Filetypes: `{ "sml" }` - Method: `formatting` - Command: `smlfmt` - Args: `{ "--force", "$FILENAME" }` ### [sqlfluff](https://github.com/sqlfluff/sqlfluff) A SQL linter and auto-formatter for Humans #### Usage ```lua local sources = { null_ls.builtins.formatting.sqlfluff.with({ extra_args = { "--dialect", "postgres" }, -- change to your dialect }), } ``` #### Defaults - Filetypes: `{ "sql" }` - Method: `formatting` - Command: `sqlfluff` - Args: `{ "fix", "--disable-progress-bar", "-n", "-" }` #### Notes - SQLFluff needs a mandatory `--dialect` argument. Use `extra_args` to add yours. `extra_args` can also be a function to build more sophisticated logic. ### [sqlfmt](https://sqlfmt.com/) Formats your dbt SQL files so you don't have to #### Usage ```lua local sources = { null_ls.builtins.formatting.sqlfmt } ``` #### Defaults - Filetypes: `{ "sql", "jinja" }` - Method: `formatting` - Command: `sqlfmt` - Args: `{ "-" }` #### Notes - Install sqlfmt with `pip install shandy-sqlfmt[jinjafmt]` ### [sqlformat](https://manpages.ubuntu.com/manpages/xenial/man1/sqlformat.1.html) The sqlformat command-line tool can reformat SQL files according to specified options. #### Usage ```lua local sources = { null_ls.builtins.formatting.sqlformat } ``` #### Defaults - Filetypes: `{ "sql" }` - Method: `formatting` - Command: `sqlformat` - Args: `{ "-" }` ### [sql_formatter](https://github.com/sql-formatter-org/sql-formatter) A whitespace formatter for different query languages #### Usage ```lua local sources = { null_ls.builtins.formatting.sql_formatter } ``` #### Defaults - Filetypes: `{ "sql" }` - Method: `formatting` - Command: `sql-formatter` ### [sqruff](https://github.com/quarylabs/sqruff) A high-speed SQL linter written in Rust. #### Usage ```lua local sources = { null_ls.builtins.formatting.sqruff } ``` #### Defaults - Filetypes: `{ "sql" }` - Method: `formatting` - Command: `sqruff` - Args: `{ "fix", "-" }` ### [stylelint](https://github.com/stylelint/stylelint) A mighty, modern linter that helps you avoid errors and enforce conventions in your styles. #### Usage ```lua local sources = { null_ls.builtins.formatting.stylelint } ``` #### Defaults - Filetypes: `{ "scss", "less", "css", "sass" }` - Method: `formatting` - Command: `stylelint` - Args: `{ "--fix", "--stdin", "--stdin-filename", "$FILENAME" }` ### [styler](https://github.com/r-lib/styler) Non-invasive pretty printing of R code. #### Usage ```lua local sources = { null_ls.builtins.formatting.styler } ``` #### Defaults - Filetypes: `{ "r", "rmd" }` - Method: `formatting` - Command: `R` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/styler.lua)) ### [stylua](https://github.com/JohnnyMorganz/StyLua) An opinionated code formatter for Lua. #### Usage ```lua local sources = { null_ls.builtins.formatting.stylua } ``` #### Defaults - Filetypes: `{ "lua", "luau" }` - Methods: `formatting, range_formatting` - Command: `stylua` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/stylua.lua)) ### [surface](https://hexdocs.pm/surface_formatter/readme.html) A code formatter for Surface, the server-side rendering component library for Phoenix. #### Usage ```lua local sources = { null_ls.builtins.formatting.surface } ``` #### Defaults - Filetypes: `{ "elixir", "surface" }` - Method: `formatting` - Command: `mix` - Args: `{ "surface.format", "-" }` ### [swiftformat](https://github.com/nicklockwood/SwiftFormat) SwiftFormat is a code library and command-line tool for reformatting `swift` code on macOS or Linux. #### Usage ```lua local sources = { null_ls.builtins.formatting.swiftformat } ``` #### Defaults - Filetypes: `{ "swift" }` - Method: `formatting` - Command: `swiftformat` - Args: `{ "--stdinpath", "$FILENAME" }` ### [swiftlint](https://github.com/realm/SwiftLint) A tool to enforce Swift style and conventions. #### Usage ```lua local sources = { null_ls.builtins.formatting.swiftlint } ``` #### Defaults - Filetypes: `{ "swift" }` - Method: `formatting` - Command: `swiftlint` - Args: `{ "lint", "--use-stdin", "--fix" }` ### [swift_format](https://github.com/apple/swift-format) Swift formatter from apple. Requires building from source with `swift build` #### Usage ```lua local sources = { null_ls.builtins.formatting.swift_format } ``` #### Defaults - Filetypes: `{ "swift" }` - Method: `formatting` - Command: `swift-format` - Args: `{}` ### [terraform_fmt](https://www.terraform.io/docs/cli/commands/fmt.html) The terraform-fmt command rewrites `terraform` configuration files to a canonical format and style. #### Usage ```lua local sources = { null_ls.builtins.formatting.terraform_fmt } ``` #### Defaults - Filetypes: `{ "terraform", "tf", "terraform-vars" }` - Method: `formatting` - Command: `terraform` - Args: `{ "fmt", "-" }` ### [terragrunt_fmt](https://terragrunt.gruntwork.io/docs/reference/cli-options/#hclfmt) The terragrunt hclfmt command rewrites `terragrunt` configuration files to a canonical format and style. #### Usage ```lua local sources = { null_ls.builtins.formatting.terragrunt_fmt } ``` #### Defaults - Filetypes: `{ "hcl" }` - Method: `formatting` - Command: `terragrunt` - Args: `{ "hclfmt", "$FILENAME" }` ### [textlint](https://github.com/textlint/textlint) The pluggable linting tool for text and Markdown. #### Usage ```lua local sources = { null_ls.builtins.formatting.textlint } ``` #### Defaults - Filetypes: `{ "txt", "markdown" }` - Method: `formatting` - Command: `textlint` - Args: `{ "--fix", "$FILENAME" }` ### [tidy](https://www.html-tidy.org/) Tidy corrects and cleans up HTML and XML documents by fixing markup errors and upgrading legacy code to modern standards. #### Usage ```lua local sources = { null_ls.builtins.formatting.tidy } ``` #### Defaults - Filetypes: `{ "html", "xml" }` - Method: `formatting` - Command: `tidy` - Args: `{ "--tidy-mark", "no", "-quiet", "-indent", "-wrap", "-" }` ### [topiary](https://github.com/tweag/topiary) A uniform formatter for simple languages #### Usage ```lua local sources = { null_ls.builtins.formatting.topiary } ``` #### Defaults - Filetypes: `{ "ncl", "nickel" }` - Method: `formatting` - Command: `topiary` - Args: `{ "-i", "-f", "$FILENAME" }` ### [treefmt](https://github.com/numtide/treefmt) One CLI to format your repo #### Usage ```lua local sources = { null_ls.builtins.formatting.treefmt } ``` #### Defaults - Filetypes: `{}` - Method: `formatting` - Command: `treefmt` - Args: `{ "--allow-missing-formatter", "--stdin", "$FILENAME" }` ### [typstfmt](https://github.com/astrale-sharp/typstfmt) Formatter for typst #### Usage ```lua local sources = { null_ls.builtins.formatting.typstfmt } ``` #### Defaults - Filetypes: `{ "typ", "typst" }` - Method: `formatting` - Command: `typstfmt` - Args: `{ "-o", "-" }` ### [typstyle](https://github.com/Enter-tainer/typstyle/) Beautiful and reliable typst code formatter #### Usage ```lua local sources = { null_ls.builtins.formatting.typstyle } ``` #### Defaults - Filetypes: `{ "typ", "typst" }` - Method: `formatting` - Command: `typstyle` ### [uncrustify](https://github.com/uncrustify/uncrustify) A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and Vala. #### Usage ```lua local sources = { null_ls.builtins.formatting.uncrustify } ``` #### Defaults - Filetypes: `{ "c", "cpp", "cs", "java" }` - Method: `formatting` - Command: `uncrustify` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/uncrustify.lua)) ### [usort](https://github.com/facebookexperimental/usort) Safe, minimal import sorting for Python projects. #### Usage ```lua local sources = { null_ls.builtins.formatting.usort } ``` #### Defaults - Filetypes: `{ "python" }` - Method: `formatting` - Command: `usort` - Args: `{ "format", "-" }` ### [verible_verilog_format](https://github.com/chipsalliance/verible) The verible-verilog-format formatter manages whitespace in accordance with a particular style. The main goal is to relieve humans of having to manually manage whitespace, wrapping, and indentation, and to provide a tool that can be integrated into any editor to enable editor-independent consistency. #### Usage ```lua local sources = { null_ls.builtins.formatting.verible_verilog_format } ``` #### Defaults - Filetypes: `{ "verilog", "systemverilog" }` - Method: `formatting` - Command: `verible-verilog-format` - Args: `{ "--stdin_name", "$FILENAME", "-" }` ### [xmllint](http://xmlsoft.org/xmllint.html) Despite the name, xmllint can be used to format XML files as well as lint them, and that's the mode this builtin is using. #### Usage ```lua local sources = { null_ls.builtins.formatting.xmllint } ``` #### Defaults - Filetypes: `{ "xml" }` - Method: `formatting` - Command: `xmllint` - Args: `{ "--format", "-" }` ### [yamlfix](https://github.com/lyz-code/yamlfix) A configurable YAML formatter that keeps comments. #### Usage ```lua local sources = { null_ls.builtins.formatting.yamlfix } ``` #### Defaults - Filetypes: `{ "yaml" }` - Method: `formatting` - Command: `yamlfix` - Args: `{ "-" }` ### [yamlfmt](https://github.com/google/yamlfmt) yamlfmt is an extensible command line tool or library to format yaml files. #### Usage ```lua local sources = { null_ls.builtins.formatting.yamlfmt } ``` #### Defaults - Filetypes: `{ "yaml" }` - Method: `formatting` - Command: `yamlfmt` - Args: `{ "-" }` ### [yapf](https://github.com/google/yapf) Formatter for Python. #### Usage ```lua local sources = { null_ls.builtins.formatting.yapf } ``` #### Defaults - Filetypes: `{ "python" }` - Methods: `formatting, range_formatting` - Command: `yapf` - Args: dynamically resolved (see [source](https://github.com/nvimtools/none-ls.nvim/blob/main/lua/null-ls/builtins/formatting/yapf.lua)) ### [zprint](https://github.com/kkinnear/zprint) Beautifully format Clojure and Clojurescript source code and s-expressions. #### Usage ```lua local sources = { null_ls.builtins.formatting.zprint } ``` #### Defaults - Filetypes: `{ "clojure" }` - Method: `formatting` - Command: `zprint` #### Notes - Requires that `zprint` is executable and on $PATH. ## Hover ### [dictionary](https://dictionaryapi.dev/) Shows the first available definition for the current word under the cursor. #### Usage ```lua local sources = { null_ls.builtins.hover.dictionary } ``` #### Defaults - Filetypes: `{ "org", "text", "markdown" }` - Method: `hover` #### Notes - Depends on Plenary's `curl` module, which itself depends on having `curl` installed and available on your `$PATH`. ### printenv Shows the value for the current environment variable under the cursor. #### Usage ```lua local sources = { null_ls.builtins.hover.printenv } ``` #### Defaults - Filetypes: `{ "sh", "dosbatch", "ps1" }` - Method: `hover` #### Notes - This source is similar in function to `printenv` where it shows value of environment variable, however this source uses `vim.uv.os_getenv` instead of `printenv` thus making it cross-platform.