Skip to content

Latest commit

 

History

History
3473 lines (2223 loc) · 74 KB

BUILTINS.md

File metadata and controls

3473 lines (2223 loc) · 74 KB

Built-in Sources

This is an automatically generated list of all null-ls built-in sources.

See BUILTIN_CONFIG to learn how to set up and configure these sources.

Code Actions

Injects actions to fix ESLint issues or ignore broken rules.

Usage

local sources = { null_ls.builtins.code_actions.eslint }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue" }
  • Method: code_action
  • Command: eslint
  • Args: { "-f", "json", "--stdin", "--stdin-filename", "$FILENAME" }

Injects actions to fix ESLint issues or ignore broken rules. Like ESLint, but faster.

Usage

local sources = { null_ls.builtins.code_actions.eslint_d }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue" }
  • Method: code_action
  • Command: eslint_d
  • Args: { "-f", "json", "--stdin", "--stdin-filename", "$FILENAME" }

Notes

  • Once spawned, the server will continue to run in the background. This is normal and not related to null-ls. You can stop it by running eslint_d stop from the command line.

gitrebase

Injects actions to change gitrebase command (e.g. using squash instead of pick).

Usage

local sources = { null_ls.builtins.code_actions.gitrebase }

Defaults

  • Filetypes: { "gitrebase" }
  • Method: code_action

Injects code actions for Git operations at the current cursor position (stage / preview / reset hunks, blame, etc.).

Usage

local sources = { null_ls.builtins.code_actions.gitsigns }

Defaults

  • Filetypes: {}
  • Method: code_action

An English prose linter. Can fix some issues via code actions.

Usage

local sources = { null_ls.builtins.code_actions.proselint }

Defaults

  • Filetypes: { "markdown", "tex" }
  • Method: code_action
  • Command: proselint
  • Args: { "--json" }

The Refactoring library based off the Refactoring book by Martin Fowler.

Usage

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.range_code_action() (for the default handler) or :'<,'>Telescope lsp_range_code_actions (for Telescope).

Provides actions to disable ShellCheck errors/warnings, either for the current line or for the entire file.

Usage

local sources = { null_ls.builtins.code_actions.shellcheck }

Defaults

  • Filetypes: { "sh" }
  • Method: code_action
  • Command: shellcheck
  • Args: { "--format", "json1", "--source-path=$DIRNAME", "--external-sources", "-" }

Notes

  • Running the action to disable a rule for the current line adds a disable directive above the line or appends the rule to an existing disable directive for that line.
  • Running the action to disable a rule for the current file adds a disable directive at the top of the file or appends the rule to an existing file disable directive.
  • The first non-comment line in a script is not eligible for a line-level disable directive. See shellcheck#1877.

Lints and suggestions for the nix programming language.

Usage

local sources = { null_ls.builtins.code_actions.statix }

Defaults

  • Filetypes: { "nix" }
  • Method: code_action
  • Command: statix
  • Args: { "check", "--stdin", "--format=json" }

❤️ JavaScript/TypeScript linter (ESLint wrapper) with great defaults

Usage

local sources = { null_ls.builtins.code_actions.xo }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact" }
  • Method: code_action
  • Command: xo
  • Args: { "--reporter", "json", "--stdin", "--stdin-filename", "$FILENAME" }

Completion

Snippet engine for Neovim, written in Lua.

Usage

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 to set up keymaps for expansion and jumping.

spell

Spell suggestions completion source.

Usage

local sources = { null_ls.builtins.completion.spell }

Defaults

  • Filetypes: {}
  • Method: completion

tags

Tags completion source.

Usage

local sources = { null_ls.builtins.completion.tags }

Defaults

  • Filetypes: {}
  • Method: completion

Snippets managed by vim-vsnip.

Usage

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 for setup instructions.

Diagnostics

Actionlint is a static checker for GitHub Actions workflow files.

Usage

local sources = { null_ls.builtins.diagnostics.actionlint }

Defaults

  • Filetypes: { "yaml" }
  • Method: diagnostics
  • Command: actionlint
  • Args: { "-no-color", "-format", "{{json .}}", "-" }

Catch insensitive, inconsiderate writing.

Usage

local sources = { null_ls.builtins.diagnostics.alex }

Defaults

  • Filetypes: { "markdown" }
  • Method: diagnostics
  • Command: alex
  • Args: { "--stdin", "--quiet" }

Linter for Ansible playbooks, roles and collections.

Usage

local sources = { null_ls.builtins.diagnostics.ansiblelint }

Defaults

  • Filetypes: { "yaml.ansible" }
  • Method: diagnostics
  • Command: ansible-lint
  • Args: { "-f", "codeclimate", "-q", "--nocolor", "$FILENAME" }

A new way of working with Protocol Buffers.

Usage

local sources = { null_ls.builtins.diagnostics.buf }

Defaults

  • Filetypes: { "proto" }
  • Method: diagnostics_on_save
  • Command: buf
  • Args: { "lint", "$FILENAME#include_package_files=true" }

buildifier is a tool for formatting and linting bazel BUILD, WORKSPACE, and .bzl files.

Usage

local sources = { null_ls.builtins.diagnostics.buildifier }

Defaults

  • Filetypes: { "bzl" }
  • Method: diagnostics
  • Command: buildifier
  • Args: { "-mode=check", "-lint=warn", "-format=json", "-path=$FILENAME" }

Validate AWS CloudFormation yaml/json templates against the AWS CloudFormation Resource Specification

Usage

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.

make linter.

Usage

local sources = { null_ls.builtins.diagnostics.checkmake }

Defaults

  • Filetypes: { "make" }
  • Method: diagnostics
  • Command: checkmake
  • Args: { "--format='{{.LineNumber}}:{{.Rule}}:{{.Violation}}'", "$FILENAME" }

latex semantic linter.

Usage

local sources = { null_ls.builtins.diagnostics.chktex }

Defaults

  • Filetypes: { "tex" }
  • Method: diagnostics
  • Command: chktex
  • Args: { "-q", "-f%l:%c:%d:%k:%n:%m\n" }

A linter for clojure code that sparks joy

Usage

local sources = { null_ls.builtins.diagnostics.clj_kondo }

Defaults

  • Filetypes: { "clojure" }
  • Method: diagnostics
  • Command: clj-kondo
  • Args: { "--cache", "--lint", "-", "--filename", "$FILENAME" }

Codespell finds common misspellings in text files.

Usage

local sources = { null_ls.builtins.diagnostics.codespell }

Defaults

  • Filetypes: {}
  • Method: diagnostics
  • Command: codespell
  • Args: { "-" }

A tool for fast static analysis of C/C++ code.

Usage

local sources = { null_ls.builtins.diagnostics.cppcheck }

Defaults

  • Filetypes: { "cpp", "c" }
  • Method: diagnostics
  • Command: cppcheck
  • Args: { "--enable=warning,style,performance,portability", "--template=gcc", "$FILENAME" }

Static analysis of elixir files for enforcing code consistency.

Usage

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.

cspell is a spell checker for code.

Usage

local sources = { null_ls.builtins.diagnostics.cspell }

Defaults

  • Filetypes: {}
  • Method: diagnostics
  • Command: cspell
  • Args: dynamically resolved (see source)

Reports on formatting errors in .cue language files.

Usage

local sources = { null_ls.builtins.diagnostics.cue_fmt }

Defaults

  • Filetypes: { "cue" }
  • Method: diagnostics
  • Command: cue
  • Args: { "fmt", "$FILENAME" }

Experimental HTML templates linting for Jinja, Nunjucks, Django templates, Twig, and Liquid.

Usage

local sources = { null_ls.builtins.diagnostics.curlylint }

Defaults

  • Filetypes: { "jinja.html", "htmldjango" }
  • Method: diagnostics
  • Command: curlylint
  • Args: { "--quiet", "-", "--format", "json", "--stdin-filepath", "$FILENAME" }

Scan Nix files for dead code.

Usage

local sources = { null_ls.builtins.diagnostics.deadnix }

Defaults

  • Filetypes: { "nix" }
  • Method: diagnostics
  • Command: deadnix
  • Args: { "--output-format=json", "$FILENAME" }

✨ 📜 🪄 ✨ HTML Template Linter and Formatter.

Usage

local sources = { null_ls.builtins.diagnostics.djlint }

Defaults

  • Filetypes: { "django", "jinja.html", "htmldjango" }
  • Method: diagnostics
  • Command: djlint
  • Args: { "$FILENAME" }

A tool to verify that your files are in harmony with your .editorconfig.

Usage

local sources = { null_ls.builtins.diagnostics.editorconfig_checker }

Defaults

  • Filetypes: {}
  • Method: diagnostics
  • Command: ec
  • Args: { "-no-color", "$FILENAME" }

Lint your ERB or HTML files

Usage

local sources = { null_ls.builtins.diagnostics.erb_lint }

Defaults

  • Filetypes: { "eruby" }
  • Method: diagnostics
  • Command: erblint
  • Args: { "--format", "json", "--stdin", "$FILENAME" }

A linter for the JavaScript ecosystem.

Usage

local sources = { null_ls.builtins.diagnostics.eslint }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue" }
  • Method: diagnostics
  • Command: eslint
  • Args: { "-f", "json", "--stdin", "--stdin-filename", "$FILENAME" }

Like ESLint, but faster.

Usage

local sources = { null_ls.builtins.diagnostics.eslint_d }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue" }
  • Method: diagnostics
  • Command: eslint_d
  • Args: { "-f", "json", "--stdin", "--stdin-filename", "$FILENAME" }

Notes

  • Once spawned, the server will continue to run in the background. This is normal and not related to null-ls. You can stop it by running eslint_d stop from the command line.

Basic linting is available for fish scripts using fish --no-execute.

Usage

local sources = { null_ls.builtins.diagnostics.fish }

Defaults

  • Filetypes: { "fish" }
  • Method: diagnostics
  • Command: fish
  • Args: { "--no-execute", "$FILENAME" }

flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of Python code.

Usage

local sources = { null_ls.builtins.diagnostics.flake8 }

Defaults

  • Filetypes: { "python" }
  • Method: diagnostics
  • Command: flake8
  • Args: { "--format", "default", "--stdin-display-name", "$FILENAME", "-" }

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

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" }

A linter that performs a static analysis on gdscript code according to some predefined configuration.

Usage

local sources = { null_ls.builtins.diagnostics.gdlint }

Defaults

  • Filetypes: { "gdscript" }
  • Method: diagnostics
  • Command: gdlint
  • Args: { "$FILENAME" }

Linter for Git commit messages.

Usage

local sources = { null_ls.builtins.diagnostics.gitlint }

Defaults

  • Filetypes: { "gitcommit" }
  • Method: diagnostics
  • Command: gitlint
  • Args: { "--msg-filename", "$FILENAME" }

A Go linter aggregator.

Usage

local sources = { null_ls.builtins.diagnostics.golangci_lint }

Defaults

  • Filetypes: { "go" }
  • Method: diagnostics_on_save
  • Command: golangci-lint
  • Args: { "run", "--fix=false", "--fast", "--out-format=json", "$DIRNAME", "--path-prefix", "$ROOT" }

A smarter Dockerfile linter that helps you build best practice Docker images.

Usage

local sources = { null_ls.builtins.diagnostics.hadolint }

Defaults

  • Filetypes: { "dockerfile" }
  • Method: diagnostics
  • Command: hadolint
  • Args: { "--no-fail", "--format=json", "-" }

Tool for writing clean and consistent HAML.

Usage

local sources = { null_ls.builtins.diagnostics.haml_lint }

Defaults

  • Filetypes: { "haml" }
  • Method: diagnostics
  • Command: haml-lint
  • Args: { "--reporter", "json", "$FILENAME" }

A pure JavaScript version of the service provided at jsonlint.com.

Usage

local sources = { null_ls.builtins.diagnostics.jsonlint }

Defaults

  • Filetypes: { "json" }
  • Method: diagnostics
  • Command: jsonlint
  • Args: { "--compact" }

An anti-bikeshedding Kotlin linter with built-in formatter.

Usage

local sources = { null_ls.builtins.diagnostics.ktlint }

Defaults

  • Filetypes: { "kotlin" }
  • Method: diagnostics_on_save
  • Command: ktlint
  • Args: { "--relative", "--reporter=json" }

A tool for linting and static analysis of Lua code.

Usage

local sources = { null_ls.builtins.diagnostics.luacheck }

Defaults

  • Filetypes: { "lua" }
  • Method: diagnostics
  • Command: luacheck
  • Args: { "--formatter", "plain", "--codes", "--ranges", "--filename", "$FILENAME", "-" }

Markdown style and syntax checker.

Usage

local sources = { null_ls.builtins.diagnostics.markdownlint }

Defaults

  • Filetypes: { "markdown" }
  • Method: diagnostics
  • Command: markdownlint
  • Args: { "--stdin" }

A tool to check Markdown files and flag style issues.

Usage

local sources = { null_ls.builtins.diagnostics.mdl }

Defaults

  • Filetypes: { "markdown" }
  • Method: diagnostics
  • Command: mdl
  • Args: { "--json" }

Checks commonly misspelled English words in source files.

Usage

local sources = { null_ls.builtins.diagnostics.misspell }

Defaults

  • Filetypes: {}
  • Method: diagnostics
  • Command: misspell

Linter for MATLAB files

Usage

local sources = { null_ls.builtins.diagnostics.mlint }

Defaults

  • Filetypes: { "matlab" }
  • Method: diagnostics_on_save
  • Command: mlint
  • Args: { "$FILENAME" }

Mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing.

Usage

local sources = { null_ls.builtins.diagnostics.mypy }

Defaults

  • Filetypes: { "python" }
  • Method: diagnostics
  • Command: mypy
  • Args: dynamically resolved (see source)

Check Rego source files for parse and compilation errors.

Usage

local sources = { null_ls.builtins.diagnostics.opacheck }

Defaults

  • Filetypes: { "rego" }
  • Method: diagnostics_on_save
  • Command: opa
  • Args: { "check", "-f", "json", "--strict", "$ROOT/src/", "$ROOT/test/" }

Uses the php command-line tool's built in -l flag to check for syntax errors.

Usage

local sources = { null_ls.builtins.diagnostics.php }

Defaults

  • Filetypes: { "php" }
  • Method: diagnostics
  • Command: php
  • Args: { "-l", "-d", "display_errors=STDERR", "-d", " log_errors=Off" }

PHP_CodeSniffer is a script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard.

Usage

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", "-" }

Runs PHP Mess Detector against PHP files.

Usage

local sources = { null_ls.builtins.diagnostics.phpmd }

Defaults

  • Filetypes: { "php" }
  • Method: diagnostics
  • Command: phpmd
  • Args: { "$FILENAME", "json" }

PHP static analysis tool.

Usage

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

An English prose linter.

Usage

local sources = { null_ls.builtins.diagnostics.proselint }

Defaults

  • Filetypes: { "markdown", "tex" }
  • Method: diagnostics
  • Command: proselint
  • Args: { "--json" }

A plug-in for Google's Protocol Buffers (protobufs) compiler to lint .proto files for style violations.

Usage

local sources = { null_ls.builtins.diagnostics.protoc_gen_lint }

Defaults

  • Filetypes: { "proto" }
  • Method: diagnostics
  • Command: protoc
  • Args: { "--lint_out", "$FILENAME", "-I", "/tmp", "$FILENAME" }

A pluggable linter and fixer to enforce Protocol Buffer style and conventions.

Usage

local sources = { null_ls.builtins.diagnostics.protolint }

Defaults

  • Filetypes: { "proto" }
  • Method: diagnostics
  • Command: protolint
  • Args: { "--reporter", "json", "$FILENAME" }

A static analysis tool for finding errors in PHP applications.

Usage

local sources = { null_ls.builtins.diagnostics.psalm }

Defaults

  • Filetypes: { "php" }
  • Method: diagnostics
  • Command: psalm
  • Args: { "--output-format=json", "--no-progress", "$FILENAME" }

An unopinionated and configurable linter and style checker for Pug.

Usage

local sources = { null_ls.builtins.diagnostics.puglint }

Defaults

  • Filetypes: { "pug" }
  • Method: diagnostics
  • Command: pug-lint
  • Args: { "--reporter=inline", "$FILENAME" }

Check that your Puppet manifest conforms to the style guide.

Usage

local sources = { null_ls.builtins.diagnostics.puppet_lint }

Defaults

  • Filetypes: { "puppet", "epuppet" }
  • Method: diagnostics
  • Command: puppet-lint
  • Args: { "--json", "$FILENAME" }

pydocstyle is a static analysis tool for checking compliance with Python docstring conventions.

Usage

local sources = { null_ls.builtins.diagnostics.pydocstyle }

Defaults

  • Filetypes: { "python" }
  • Method: diagnostics
  • Command: pydocstyle
  • Args: { "$FILENAME" }

Notes

  • May fail to resolve config files. See the wiki for workarounds.

Code audit tool for Python.

Usage

local sources = { null_ls.builtins.diagnostics.pylama }

Defaults

  • Filetypes: { "python" }
  • Method: diagnostics
  • Command: pylama
  • Args: { "--from-stdin", "$FILENAME", "-f", "json" }

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.

Usage

local sources = { null_ls.builtins.diagnostics.pylint }

Defaults

  • Filetypes: { "python" }
  • Method: diagnostics
  • Command: pylint
  • Args: { "--from-stdin", "$FILENAME", "-f", "json" }

pyproject-flake8 is a flake8 wrapper to use with pyproject.toml configuration.

Usage

local sources = { null_ls.builtins.diagnostics.pyproject_flake8 }

Defaults

  • Filetypes: { "python" }
  • Method: diagnostics
  • Command: pflake8
  • Args: { "--format", "default", "--stdin-display-name", "$FILENAME", "-" }

qmllint is a tool shipped with Qt that verifies the syntatic validity of QML files. It also warns about some QML anti-patterns.

Usage

local sources = { null_ls.builtins.diagnostics.qmllint }

Defaults

  • Filetypes: { "qml" }
  • Method: diagnostics
  • Command: qmllint
  • Args: { "$FILENAME" }

Fast, configurable, extensible, flexible, and beautiful linter for Go.

Usage

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.

Command line tool to parse RPM spec files.

Usage

local sources = { null_ls.builtins.diagnostics.rpmspec }

Defaults

  • Filetypes: { "spec" }
  • Method: diagnostics
  • Command: rpmspec
  • Args: { "-P", "$FILENAME" }

Checks syntax of reStructuredText and code blocks nested within it.

Usage

local sources = { null_ls.builtins.diagnostics.rstcheck }

Defaults

  • Filetypes: { "rst" }
  • Method: diagnostics_on_save
  • Command: rstcheck
  • Args: { "-r", "$DIRNAME" }

The Ruby Linter/Formatter that Serves and Protects.

Usage

local sources = { null_ls.builtins.diagnostics.rubocop }

Defaults

  • Filetypes: { "ruby" }
  • Method: diagnostics
  • Command: rubocop
  • Args: { "-f", "json", "--stdin", "$FILENAME" }

Command line tool designed to help write correct and idiomatic Lua code.

Usage

local sources = { null_ls.builtins.diagnostics.selene }

Defaults

  • Filetypes: { "lua" }
  • Method: diagnostics
  • Command: selene
  • Args: { "--display-style", "quiet", "-" }

Semgrep is a fast, open-source, static analysis tool for finding bugs and enforcing code standards at editor, commit, and CI time.

Usage

local sources = { null_ls.builtins.diagnostics.semgrep }

Defaults

  • Filetypes: { "typescript", "typescriptreact", "ruby", "python", "java", "go" }
  • Method: diagnostics
  • Command: semgrep
  • Args: { "-q", "--json", "$FILENAME" }

A shell script static analysis tool.

Usage

local sources = { null_ls.builtins.diagnostics.shellcheck }

Defaults

  • Filetypes: { "sh" }
  • Method: diagnostics
  • Command: shellcheck
  • Args: { "--format", "json1", "--source-path=$DIRNAME", "--external-sources", "-" }

An open source project for linting Solidity code. It provides both security and style guide validations.

Usage

local sources = { null_ls.builtins.diagnostics.solhint }

Defaults

  • Filetypes: { "solidity" }
  • Method: diagnostics
  • Command: solhint
  • Args: { "$FILENAME", "--formatter", "unix" }

A SQL linter and auto-formatter for Humans

Usage

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", "-f", "github-annotation", "-n", "--disable_progress_bar", "-" }

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.

JavaScript style guide, linter, and formatter.

Usage

local sources = { null_ls.builtins.diagnostics.standardjs }

Defaults

  • Filetypes: { "javascript", "javascriptreact" }
  • Method: diagnostics
  • Command: standard
  • Args: { "--stdin" }

Ruby style guide, linter, and formatter.

Usage

local sources = { null_ls.builtins.diagnostics.standardrb }

Defaults

  • Filetypes: { "ruby" }
  • Method: diagnostics
  • Command: standardrb
  • Args: { "--no-fix", "-f", "json", "--stdin", "$FILENAME" }

Advanced Go linter.

Usage

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.

Lints and suggestions for the Nix programming language.

Usage

local sources = { null_ls.builtins.diagnostics.statix }

Defaults

  • Filetypes: { "nix" }
  • Method: diagnostics
  • Command: statix
  • Args: { "check", "--stdin", "--format=errfmt" }

A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.

Usage

local sources = { null_ls.builtins.diagnostics.stylelint }

Defaults

  • Filetypes: { "scss", "less", "css", "sass" }
  • Method: diagnostics
  • Command: stylelint
  • Args: { "--formatter", "json", "--stdin-filename", "$FILENAME" }

A linter for the Stylus CSS preprocessor.

Usage

local sources = { null_ls.builtins.diagnostics.stylint }

Defaults

  • Filetypes: { "stylus" }
  • Method: diagnostics
  • Command: stylint
  • Args: { "$FILENAME" }

The compiler for Teal, a typed dialect of Lua.

Usage

local sources = { null_ls.builtins.diagnostics.teal }

Defaults

  • Filetypes: { "teal" }
  • Method: diagnostics
  • Command: tl
  • Args: { "check", "$FILENAME" }

The pluggable linting tool for text and Markdown.

Usage

local sources = { null_ls.builtins.diagnostics.textlint }

Defaults

  • Filetypes: {}
  • Method: diagnostics
  • Command: textlint
  • Args: { "-f", "json", "--stdin", "--stdin-filename", "$FILENAME" }

Tidy corrects and cleans up HTML and XML documents by fixing markup errors and upgrading legacy code to modern standards.

Usage

local sources = { null_ls.builtins.diagnostics.tidy }

Defaults

  • Filetypes: { "html", "xml" }
  • Method: diagnostics
  • Command: tidy
  • Args: dynamically resolved (see source)

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

local sources = { null_ls.builtins.diagnostics.trail_space }

Defaults

  • Filetypes: {}
  • Method: diagnostics

Parses diagnostics from the TypeScript compiler.

Usage

local sources = { null_ls.builtins.diagnostics.tsc }

Defaults

  • Filetypes: { "typescript", "typescriptreact" }
  • Method: diagnostics_on_save
  • Command: tsc
  • Args: { "--pretty", "false", "--noEmit" }

Runs Twigcs against Twig files.

Usage

local sources = { null_ls.builtins.diagnostics.twigcs }

Defaults

  • Filetypes: { "twig" }
  • Method: diagnostics
  • Command: twigcs
  • Args: { "--reporter", "json", "$FILENAME" }

Syntax-aware linter for prose built with speed and extensibility in mind.

Usage

local sources = { null_ls.builtins.diagnostics.vale }

Defaults

  • Filetypes: { "markdown", "tex", "asciidoc" }
  • Method: diagnostics
  • Command: vale
  • Args: dynamically resolved (see source)

Notes

  • vale does not include a syntax by itself, so you probably need to grab a vale.ini (at ~/.vale.ini) and a StylesPath (somewhere, pointed from vale.ini) from the list of configurations.

Linter for Vimscript.

Usage

local sources = { null_ls.builtins.diagnostics.vint }

Defaults

  • Filetypes: { "vim" }
  • Method: diagnostics
  • Command: vint
  • Args: { "--style-problem", "--json", "$FILENAME" }

Vulture finds unused code in Python programs.

Usage

local sources = { null_ls.builtins.diagnostics.vulture }

Defaults

  • Filetypes: { "python" }
  • Method: diagnostics
  • Command: vulture
  • Args: { "$FILENAME" }

English prose linter.

Usage

local sources = { null_ls.builtins.diagnostics.write_good }

Defaults

  • Filetypes: { "markdown" }
  • Method: diagnostics
  • Command: write-good
  • Args: { "--text=$TEXT", "--parse" }

❤️ JavaScript/TypeScript linter (ESLint wrapper) with great defaults.

Usage

local sources = { null_ls.builtins.diagnostics.xo }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact" }
  • Method: diagnostics
  • Command: xo
  • Args: { "--reporter", "json", "--stdin", "--stdin-filename", "$FILENAME" }

A linter for YAML files.

Usage

local sources = { null_ls.builtins.diagnostics.yamllint }

Defaults

  • Filetypes: { "yaml" }
  • Method: diagnostics
  • Command: yamllint
  • Args: { "--format", "parsable", "-" }

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

local sources = { null_ls.builtins.diagnostics.zsh }

Defaults

  • Filetypes: { "zsh" }
  • Method: diagnostics
  • Command: zsh
  • Args: { "-n", "$FILENAME" }

Formatting

The Uncompromising Nix Code Formatter

Usage

local sources = { null_ls.builtins.formatting.alejandra }

Defaults

  • Filetypes: { "nix" }
  • Method: formatting
  • Command: alejandra
  • Args: { "--quiet" }

Format your assembler code in a similar way that gofmt formats your go code.

Usage

local sources = { null_ls.builtins.formatting.asmfmt }

Defaults

  • Filetypes: { "asm" }
  • Method: formatting
  • Command: asmfmt

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 project files and is the same formatter used in the Arduino IDE.

Usage

local sources = { null_ls.builtins.formatting.astyle }

Defaults

  • Filetypes: { "arduino", "c", "cpp", "cs", "java" }
  • Method: formatting
  • Command: astyle
  • Args: { "--quiet" }

A tool that automatically formats Python code to conform to the PEP 8 style guide.

Usage

local sources = { null_ls.builtins.formatting.autopep8 }

Defaults

  • Filetypes: { "python" }
  • Methods: formatting, range_formatting
  • Command: autopep8
  • Args: dynamically resolved (see source)

This pure text processing tool will reformat beancount input to right-align all the numbers at the same, minimal column.

Usage

local sources = { null_ls.builtins.formatting.bean_format }

Defaults

  • Filetypes: { "beancount" }
  • Method: formatting
  • Command: bean-format

Notes

  • It left-aligns all the currencies.
  • It only modifies whitespace.

A portable program (written in C) that will pretty-print, syntax check, and generally sort out a BibTeX database file.

Usage

local sources = { null_ls.builtins.formatting.bibclean }

Defaults

  • Filetypes: { "bib" }
  • Method: formatting
  • Command: bibclean
  • Args: { "-align-equals", "-delete-empty-values" }

Notes

The uncompromising Python code formatter

Usage

local sources = { null_ls.builtins.formatting.black }

Defaults

  • Filetypes: { "python" }
  • Method: formatting
  • Command: black
  • Args: { "--stdin-filename", "$FILENAME", "--quiet", "-" }

Blue -- Some folks like black but I prefer blue.

Usage

local sources = { null_ls.builtins.formatting.blue }

Defaults

  • Filetypes: { "python" }
  • Method: formatting
  • Command: blue
  • Args: { "--stdin-filename", "$FILENAME", "--quiet", "-" }

haskell source code formatter

Usage

local sources = { null_ls.builtins.formatting.brittany }

Defaults

  • Filetypes: { "haskell" }
  • Method: formatting
  • Command: brittany

A new way of working with Protocol Buffers.

Usage

local sources = { null_ls.builtins.formatting.buf }

Defaults

  • Filetypes: { "proto" }
  • Method: formatting
  • Command: buf
  • Args: { "format", "-w", "$FILENAME" }

buildifier is a tool for formatting and linting bazel BUILD, WORKSPACE, and .bzl files.

Usage

local sources = { null_ls.builtins.formatting.buildifier }

Defaults

  • Filetypes: { "bzl" }
  • Method: formatting
  • Command: buildifier
  • Args: { "-path=$FILENAME" }

Format .cabal files preserving the original field ordering, and comments.

Usage

local sources = { null_ls.builtins.formatting.cabal_fmt }

Defaults

  • Filetypes: { "cabal" }
  • Method: formatting
  • Command: cabal-fmt

Tool to format C/C++/… code according to a set of rules and heuristics.

Usage

local sources = { null_ls.builtins.formatting.clang_format }

Defaults

  • Filetypes: { "c", "cpp", "cs", "java", "cuda" }
  • Methods: formatting, range_formatting
  • Command: clang-format
  • Args: dynamically resolved (see source)

Formatter for Clojure code.

Usage

local sources = { null_ls.builtins.formatting.cljstyle }

Defaults

  • Filetypes: { "clojure" }
  • Method: formatting
  • Command: cljstyle
  • Args: { "pipe" }

Parse cmake listfiles and format them nicely.

Usage

local sources = { null_ls.builtins.formatting.cmake_format }

Defaults

  • Filetypes: { "cmake" }
  • Method: formatting
  • Command: cmake-format
  • Args: { "-" }

Fix common misspellings in text files.

Usage

local sources = { null_ls.builtins.formatting.codespell }

Defaults

  • Filetypes: {}
  • Method: formatting
  • Command: codespell
  • Args: { "--write-changes", "$FILENAME" }

A tool for automatically checking and correcting the style of code in a project.

Usage

local sources = { null_ls.builtins.formatting.crystal_format }

Defaults

  • Filetypes: { "crystal" }
  • Method: formatting
  • Command: crystal
  • Args: { "tool", "format" }

A CUE language formatter.

Usage

local sources = { null_ls.builtins.formatting.cue_fmt }

Defaults

  • Filetypes: { "cue" }
  • Method: formatting
  • Command: cue
  • Args: { "fmt", "$FILENAME" }

Replace the whitespace in your program with formatting that follows Dart guidelines.

Usage

local sources = { null_ls.builtins.formatting.dart_format }

Defaults

  • Filetypes: { "dart" }
  • Method: formatting
  • Command: dart
  • Args: { "format" }

Use Deno to format TypeScript and JavaScript code.

Usage

local sources = { null_ls.builtins.formatting.deno_fmt }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact" }
  • Method: formatting
  • Command: deno
  • Args: { "fmt", "-" }

Formatter for D source code.

Usage

local sources = { null_ls.builtins.formatting.dfmt }

Defaults

  • Filetypes: { "d" }
  • Method: formatting
  • Command: dfmt

A pure-Python Django/Jinja template indenter without dependencies.

Usage

local sources = { null_ls.builtins.formatting.djhtml }

Defaults

  • Filetypes: { "django", "jinja.html", "htmldjango" }
  • Method: formatting
  • Command: djhtml

✨ 📜 🪄 ✨ HTML Template Linter and Formatter.

Usage

local sources = { null_ls.builtins.formatting.djlint }

Defaults

  • Filetypes: { "django", "jinja.html", "htmldjango" }
  • Method: formatting
  • Command: djlint
  • Args: { "--reformat", "-" }

elm-format formats Elm source code according to a standard set of rules based on the official Elm Style Guide.

Usage

local sources = { null_ls.builtins.formatting.elm_format }

Defaults

  • Filetypes: { "elm" }
  • Method: formatting
  • Command: elm-format
  • Args: { "--stdin" }

Lint your ERB or HTML files

Usage

local sources = { null_ls.builtins.formatting.erb_lint }

Defaults

  • Filetypes: { "eruby" }
  • Method: formatting
  • Command: erblint
  • Args: { "--autocorrect", "--stdin", "$FILENAME" }

An opinionated Erlang code formatter.

Usage

local sources = { null_ls.builtins.formatting.erlfmt }

Defaults

  • Filetypes: { "erlang" }
  • Method: formatting
  • Command: erlfmt
  • Args: { "-" }

Find and fix problems in your JavaScript code.

Usage

local sources = { null_ls.builtins.formatting.eslint }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue" }
  • Method: formatting
  • Command: eslint
  • Args: { "--fix-dry-run", "--format", "json", "--stdin", "--stdin-filename", "$FILENAME" }

Notes

  • Slow and not suitable for formatting on save. If at all possible, use eslint_d.

Like ESLint, but faster.

Usage

local sources = { null_ls.builtins.formatting.eslint_d }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue" }
  • Method: formatting
  • Command: eslint_d
  • Args: { "--fix-to-stdout", "--stdin", "--stdin-filename", "$FILENAME" }

Notes

  • Once spawned, the server will continue to run in the background. This is normal and not related to null-ls. You can stop it by running eslint_d stop from the command line.

Indent or otherwise prettify a piece of fish code.

Usage

local sources = { null_ls.builtins.formatting.fish_indent }

Defaults

  • Filetypes: { "fish" }
  • Method: formatting
  • Command: fish_indent

A JSON file fixer/formatter for humans using (relaxed) JSON5.

Usage

local sources = { null_ls.builtins.formatting.fixjson }

Defaults

  • Filetypes: { "json" }
  • Method: formatting
  • Command: fixjson

fnlfmt is a Fennel code formatter which follows established Lisp conventions when determining how to format a given piece of code.

Usage

local sources = { null_ls.builtins.formatting.fnlfmt }

Defaults

  • Filetypes: { "fennel", "fnl" }
  • Method: formatting
  • Command: fnlfmt
  • Args: { "-" }

Format R code automatically.

Usage

local sources = { null_ls.builtins.formatting.format_r }

Defaults

  • Filetypes: { "r", "rmd" }
  • Method: formatting
  • Command: R
  • Args: dynamically resolved (see source)

Fourmolu is a formatter for Haskell source code.

Usage

local sources = { null_ls.builtins.formatting.fourmolu }

Defaults

  • Filetypes: { "haskell" }
  • Method: formatting
  • Command: fourmolu

fprettify is an auto-formatter for modern Fortran code that imposes strict whitespace formatting, written in Python.

Usage

local sources = { null_ls.builtins.formatting.fprettify }

Defaults

  • Filetypes: { "fortran" }
  • Method: formatting
  • Command: fprettify
  • Args: { "--silent" }

A formatter for Godot's gdscript

Usage

local sources = { null_ls.builtins.formatting.gdformat }

Defaults

  • Filetypes: { "gd", "gdscript", "gdscript3" }
  • Method: formatting
  • Command: gdformat
  • Args: { "-" }

Formats go programs.

Usage

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.

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

local sources = { null_ls.builtins.formatting.gofumpt }

Defaults

  • Filetypes: { "go" }
  • Method: formatting
  • Command: gofumpt

Updates your Go import lines, adding missing ones and removing unreferenced ones.

Usage

local sources = { null_ls.builtins.formatting.goimports }

Defaults

  • Filetypes: { "go" }
  • Method: formatting
  • Command: goimports
  • Args: { "-srcdir", "$DIRNAME" }

Applies a base formatter (eg. goimports or gofmt), then shortens long lines of code.

Usage

local sources = { null_ls.builtins.formatting.golines }

Defaults

  • Filetypes: { "go" }
  • Method: formatting
  • Command: golines

Reformats Java source code according to Google Java Style.

Usage

local sources = { null_ls.builtins.formatting.google_java_format }

Defaults

  • Filetypes: { "java" }
  • Method: formatting
  • Command: google-java-format
  • Args: { "-" }

Python utility / library to sort imports alphabetically and automatically separate them into sections and by type.

Usage

local sources = { null_ls.builtins.formatting.isort }

Defaults

  • Filetypes: { "python" }
  • Method: formatting
  • Command: isort
  • Args: { "--stdout", "--filename", "$FILENAME", "-" }

joker is a small Clojure interpreter, linter and formatter written in Go.

Usage

local sources = { null_ls.builtins.formatting.joker }

Defaults

  • Filetypes: { "clj" }
  • Method: formatting
  • Command: joker
  • Args: { "--format", "-" }

Command-line JSON processor

Usage

local sources = { null_ls.builtins.formatting.jq }

Defaults

  • Filetypes: { "json" }
  • Method: formatting
  • Command: jq

Provides a simple command line interface to validate and pretty-print JSON objects.

Usage

local sources = { null_ls.builtins.formatting.json_tool }

Defaults

  • Filetypes: { "json" }
  • Method: formatting
  • Command: python
  • Args: { "-m", "json.tool" }

An anti-bikeshedding Kotlin linter with built-in formatter.

Usage

local sources = { null_ls.builtins.formatting.ktlint }

Defaults

  • Filetypes: { "kotlin" }
  • Method: formatting
  • Command: ktlint
  • Args: { "--format", "--stdin" }

A perl script for formatting LaTeX files that is generally included in major TeX distributions.

Usage

local sources = { null_ls.builtins.formatting.latexindent }

Defaults

  • Filetypes: { "tex" }
  • Method: formatting
  • Command: latexindent
  • Args: { "-" }

Reformats your Lua source code.

Usage

local sources = { null_ls.builtins.formatting.lua_format }

Defaults

  • Filetypes: { "lua" }
  • Method: formatting
  • Command: lua-format
  • Args: { "-i" }

A Node.js style checker and lint tool for Markdown/CommonMark files.

Usage

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, which can also fix Markdown files.

An opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files

Usage

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

Build tool that provides tasks for creating, compiling, and testing elixir projects, managing its dependencies, and more.

Usage

local sources = { null_ls.builtins.formatting.mix }

Defaults

  • Filetypes: { "elixir" }
  • Method: formatting
  • Command: mix
  • Args: { "format", "-" }

Beautifies and formats nginx configuration files.

Usage

local sources = { null_ls.builtins.formatting.nginx_beautifier }

Defaults

  • Filetypes: { "nginx" }
  • Method: formatting
  • Command: nginxbeautifier
  • Args: { "-i", "-o", "$FILENAME" }

nimpretty is a Nim source code beautifier, to format code according to the official style guide.

Usage

local sources = { null_ls.builtins.formatting.nimpretty }

Defaults

  • Filetypes: { "nim" }
  • Method: formatting
  • Command: nimpretty
  • Args: { "$FILENAME" }

nixfmt is a formatter for Nix code, intended to apply a uniform style.

Usage

local sources = { null_ls.builtins.formatting.nixfmt }

Defaults

  • Filetypes: { "nix" }
  • Method: formatting
  • Command: nixfmt

nixpkgs-fmt is a Nix code formatter for nixpkgs.

Usage

local sources = { null_ls.builtins.formatting.nixpkgs_fmt }

Defaults

  • Filetypes: { "nix" }
  • Method: formatting
  • Command: nixpkgs-fmt

perl script which indents and reformats perl scripts to make them easier to read. If you write perl scripts, or spend much time reading them, you will probably find it useful.

Usage

local sources = { null_ls.builtins.formatting.perltidy }

Defaults

  • Filetypes: { "perl" }
  • Method: formatting
  • Command: perltidy
  • Args: { "-q" }

PostgreSQL SQL syntax beautifier

Usage

local sources = { null_ls.builtins.formatting.pg_format }

Defaults

  • Filetypes: { "sql", "pgsql" }
  • Method: formatting
  • Command: pg_format

Tokenizes PHP files and detects violations of a defined set of coding standards.

Usage

local sources = { null_ls.builtins.formatting.phpcbf }

Defaults

  • Filetypes: { "php" }
  • Method: formatting
  • Command: phpcbf
  • Args: { "-q", "--stdin-path=$FILENAME", "-" }

Formatter for php files.

Usage

local sources = { null_ls.builtins.formatting.phpcsfixer }

Defaults

  • Filetypes: { "php" }
  • Method: formatting
  • Command: php-cs-fixer
  • Args: { "--no-interaction", "--quiet", "fix", "$FILENAME" }

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

local sources = { null_ls.builtins.formatting.prettier }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "graphql", "handlebars" }
  • Methods: formatting, range_formatting
  • Command: prettier
  • Args: dynamically resolved (see source)

Notes

  • Supports more filetypes such as Svelte and TOML via plugins. These filetypes are not enabled by default, but you can follow the instructions here to define your own list of filetypes.
  • To increase speed, you may want to try prettierd. You can also set up eslint-plugin-prettier and format via eslint_d.

prettier, as a daemon, for ludicrous formatting speed.

Usage

local sources = { null_ls.builtins.formatting.prettierd }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "graphql", "handlebars" }
  • Method: formatting
  • Command: prettierd
  • Args: { "$FILENAME" }

Makes prettier fast.

Usage

local sources = { null_ls.builtins.formatting.prettier_d_slim }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "css", "scss", "less", "html", "json", "jsonc", "yaml", "markdown", "graphql", "handlebars" }
  • Methods: formatting, range_formatting
  • Command: prettier_d_slim
  • Args: dynamically resolved (see source)

Notes

  • May not work on some filetypes.
  • prettierd is more stable and recommended.

Formats with Prettier and lints with ESLint+Standard! (✿◠‿◠)

Usage

local sources = { null_ls.builtins.formatting.prettier_standard }

Defaults

  • Filetypes: { "javascript", "javascriptreact" }
  • Method: formatting
  • Command: prettier-standard
  • Args: { "--stdin" }

Formatter for the prisma filetype.

Usage

local sources = { null_ls.builtins.formatting.prismaFmt }

Defaults

  • Filetypes: { "prisma" }
  • Method: formatting
  • Command: prisma-fmt
  • Args: { "format", "-i", "$FILENAME" }

A pluggable linter and fixer to enforce Protocol Buffer style and conventions.

Usage

local sources = { null_ls.builtins.formatting.protolint }

Defaults

  • Filetypes: { "proto" }
  • Method: formatting
  • Command: protolint
  • Args: { "--fix", "$FILENAME" }

The FPC Pascal configurable source beautifier. Name means 'Pascal-TO-Pascal'.

Usage

local sources = { null_ls.builtins.formatting.ptop }

Defaults

  • Filetypes: { "pascal", "delphi" }
  • Method: formatting
  • Command: ptop
  • Args: { "$FILENAME", "$FILENAME" }

Check that your Puppet manifest conforms to the style guide

Usage

local sources = { null_ls.builtins.formatting.puppet_lint }

Defaults

  • Filetypes: { "puppet", "epuppet" }
  • Method: formatting
  • Command: puppet-lint
  • Args: { "--fix", "$FILENAME" }

qmlformat is a tool that automatically formats QML files according to the QML Coding Conventions.

Usage

local sources = { null_ls.builtins.formatting.qmlformat }

Defaults

  • Filetypes: { "qml" }
  • Method: formatting
  • Command: qmlformat
  • Args: { "-i", "$FILENAME" }

The fmt package provides an extensible tool to format Racket code, using an expressive pretty printer library to compute the optimal layout.

Usage

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

remark is an extensive and complex Markdown formatter/prettifier.

Usage

local sources = { null_ls.builtins.formatting.remark }

Defaults

  • Filetypes: { "markdown" }
  • Method: formatting
  • Command: remark
  • Args: { "--no-color", "--silent" }

Notes

Tool for automatically reordering python imports. Similar to isort but uses static analysis more.

Usage

local sources = { null_ls.builtins.formatting.reorder_python_imports }

Defaults

  • Filetypes: { "python" }
  • Method: formatting
  • Command: reorder-python-imports
  • Args: { "-", "--exit-zero-even-if-changed" }

The ReScript format builtin.

Usage

local sources = { null_ls.builtins.formatting.rescript }

Defaults

  • Filetypes: { "rescript" }
  • Method: formatting
  • Command: rescript
  • Args: dynamically resolved (see source)

Formatter, linter, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS.

Usage

local sources = { null_ls.builtins.formatting.rome }

Defaults

  • Filetypes: { "javascript", "typescript" }
  • Method: formatting
  • Command: rome
  • Args: { "format", "--write", "$FILENAME" }

Notes

  • Currently support only JavaScript and TypeScript. See status here

Ruby static code analyzer and formatter, based on the community Ruby style guide.

Usage

local sources = { null_ls.builtins.formatting.rubocop }

Defaults

  • Filetypes: { "ruby" }
  • Method: formatting
  • Command: rubocop
  • Args: { "--auto-correct", "-f", "quiet", "--stderr", "--stdin", "$FILENAME" }

Opinionated ruby formatter.

Usage

local sources = { null_ls.builtins.formatting.rufo }

Defaults

  • Filetypes: { "ruby" }
  • Method: formatting
  • Command: rufo
  • Args: { "-x" }

A tool for formatting rust code according to style guidelines.

Usage

local sources = { null_ls.builtins.formatting.rustfmt }

Defaults

  • Filetypes: { "rust" }
  • Method: formatting
  • Command: rustfmt
  • Args: { "--emit=stdout" }

Notes

  • --edition defaults to 2015. To set a different edition, use extra_args.
  • See the wiki for other workarounds.

CLI for organizing Tailwind CSS classes.

Usage

local sources = { null_ls.builtins.formatting.rustywind }

Defaults

  • Filetypes: { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "html" }
  • Method: formatting
  • Command: rustywind
  • Args: { "--stdin" }

Code formatter for Scala

Usage

local sources = { null_ls.builtins.formatting.scalafmt }

Defaults

  • Filetypes: { "scala" }
  • Method: formatting
  • Command: scalafmt
  • Args: { "--stdin" }

Hardens shell scripts by quoting variables, replacing function_call with $(function_call), and more.

Usage

local sources = { null_ls.builtins.formatting.shellharden }

Defaults

  • Filetypes: { "sh" }
  • Method: formatting
  • Command: shellharden
  • Args: { "--transform", "" }

A shell parser, formatter, and interpreter with bash support.

Usage

local sources = { null_ls.builtins.formatting.shfmt }

Defaults

  • Filetypes: { "sh" }
  • Method: formatting
  • Command: shfmt
  • Args: { "-filename", "$FILENAME" }

A SQL linter and auto-formatter for Humans

Usage

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", "-f", "-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.

The sqlformat command-line tool can reformat SQL files according to specified options.

Usage

local sources = { null_ls.builtins.formatting.sqlformat }

Defaults

  • Filetypes: { "sql" }
  • Method: formatting
  • Command: sqlformat
  • Args: { "-" }

A whitespace formatter for different query languages

Usage

local sources = { null_ls.builtins.formatting.sql_formatter }

Defaults

  • Filetypes: { "sql" }
  • Method: formatting
  • Command: sql-formatter

JavaScript Standard Style, a no-configuration automatic code formatter that just works.

Usage

local sources = { null_ls.builtins.formatting.standardjs }

Defaults

  • Filetypes: { "javascript", "javascriptreact" }
  • Method: formatting
  • Command: standard
  • Args: { "--stdin", "--fix" }

Ruby Style Guide, with linter & automatic code fixer. Based on Rubocop.

Usage

local sources = { null_ls.builtins.formatting.standardrb }

Defaults

  • Filetypes: { "ruby" }
  • Method: formatting
  • Command: standardrb
  • Args: { "--fix", "--format", "quiet", "--stderr", "--stdin", "$FILENAME" }

A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.

Usage

local sources = { null_ls.builtins.formatting.stylelint }

Defaults

  • Filetypes: { "scss", "less", "css", "sass" }
  • Method: formatting
  • Command: stylelint
  • Args: { "--fix", "--stdin", "--stdin-filename", "$FILENAME" }

Non-invasive pretty printing of R code.

Usage

local sources = { null_ls.builtins.formatting.styler }

Defaults

  • Filetypes: { "r", "rmd" }
  • Method: formatting
  • Command: R
  • Args: dynamically resolved (see source)

An opinionated code formatter for Lua.

Usage

local sources = { null_ls.builtins.formatting.stylua }

Defaults

  • Filetypes: { "lua" }
  • Methods: formatting, range_formatting
  • Command: stylua
  • Args: dynamically resolved (see source)

A code formatter for Surface, the server-side rendering component library for Phoenix.

Usage

local sources = { null_ls.builtins.formatting.surface }

Defaults

  • Filetypes: { "elixir", "surface" }
  • Method: formatting
  • Command: mix
  • Args: { "surface.format", "-" }

SwiftFormat is a code library and command-line tool for reformatting swift code on macOS or Linux.

Usage

local sources = { null_ls.builtins.formatting.swiftformat }

Defaults

  • Filetypes: { "swift" }
  • Method: formatting
  • Command: swiftformat
  • Args: { "--stdinpath", "$FILENAME" }

A versatile, feature-rich TOML toolkit.

Usage

local sources = { null_ls.builtins.formatting.taplo }

Defaults

  • Filetypes: { "toml" }
  • Method: formatting
  • Command: taplo
  • Args: { "format", "-" }

The terrafmt command formats terraform blocks embedded in Markdown files.

Usage

local sources = { null_ls.builtins.formatting.terrafmt }

Defaults

  • Filetypes: { "markdown" }
  • Method: formatting
  • Command: terrafmt
  • Args: { "fmt", "$FILENAME" }

The terraform-fmt command rewrites terraform configuration files to a canonical format and style.

Usage

local sources = { null_ls.builtins.formatting.terraform_fmt }

Defaults

  • Filetypes: { "terraform", "tf" }
  • Method: formatting
  • Command: terraform
  • Args: { "fmt", "-" }

Tidy corrects and cleans up HTML and XML documents by fixing markup errors and upgrading legacy code to modern standards.

Usage

local sources = { null_ls.builtins.formatting.tidy }

Defaults

  • Filetypes: { "html", "xml" }
  • Method: formatting
  • Command: tidy
  • Args: { "--tidy-mark", "no", "-quiet", "-indent", "-wrap", "-" }

trim_newlines

A simple wrapper around awk to remove trailing newlines.

Usage

local sources = { null_ls.builtins.formatting.trim_newlines }

Defaults

  • Filetypes: {}
  • Method: formatting
  • Command: awk
  • Args: { 'NF{print s $0; s=""; next} {s=s ORS}' }

trim_whitespace

A simple wrapper around awk to remove trailing whitespace.

Usage

local sources = { null_ls.builtins.formatting.trim_whitespace }

Defaults

  • Filetypes: {}
  • Method: formatting
  • Command: awk
  • Args: { '{ sub(/[ \t]+$/, ""); print }' }

A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and Vala.

Usage

local sources = { null_ls.builtins.formatting.uncrustify }

Defaults

  • Filetypes: { "c", "cpp", "cs", "java" }
  • Method: formatting
  • Command: uncrustify
  • Args: dynamically resolved (see source)

Safe, minimal import sorting for Python projects.

Usage

local sources = { null_ls.builtins.formatting.usort }

Defaults

  • Filetypes: { "python" }
  • Method: formatting
  • Command: usort
  • Args: { "format", "-" }

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

local sources = { null_ls.builtins.formatting.verible_verilog_format }

Defaults

  • Filetypes: { "verilog", "systemverilog" }
  • Method: formatting
  • Command: verible-verilog-format
  • Args: { "--stdin_name", "$FILENAME", "-" }

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

local sources = { null_ls.builtins.formatting.xmllint }

Defaults

  • Filetypes: { "xml" }
  • Method: formatting
  • Command: xmllint
  • Args: { "--format", "-" }

Formatter for Python.

Usage

local sources = { null_ls.builtins.formatting.yapf }

Defaults

  • Filetypes: { "python" }
  • Methods: formatting, range_formatting
  • Command: yapf
  • Args: dynamically resolved (see source)

Reformat Zig source into canonical form.

Usage

local sources = { null_ls.builtins.formatting.zigfmt }

Defaults

  • Filetypes: { "zig" }
  • Method: formatting
  • Command: zig
  • Args: { "fmt", "--stdin" }

Beautifully format Clojure and Clojurescript source code and s-expressions.

Usage

local sources = { null_ls.builtins.formatting.zprint }

Defaults

  • Filetypes: { "clojure" }
  • Method: formatting
  • Command: zprint

Notes

  • Requires that zprint is executable and on $PATH.

Hover

Shows the first available definition for the current word under the cursor.

Usage

local sources = { null_ls.builtins.hover.dictionary }

Defaults

  • Filetypes: { "text", "markdown" }
  • Method: hover

Notes

  • Depends on Plenary's curl module, which itself depends on having curl installed and available on your $PATH.