Built-in Sources

December 29, 2025 · View on GitHub

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

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

gitsigns

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

Config

filter_actions (function)

Callback to filter out unwanted actions.

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

Go tool to modify struct field tags

Usage

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

Defaults

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

Notes

  • Requires installing the Go tree-sitter parser.

impl

impl generates method stubs for implementing an interface.

Usage

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

Defaults

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

Notes

  • Requires installing the Go tree-sitter parser.

proselint

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: { "check", "--output-format=json" }

refactoring

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.code_action()

regal

Allows ignoring broken rules from Regal linter.

Usage

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

Defaults

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

statix

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

textlint

Linter for text and Markdown. Can fix some issues via code actions.

Usage

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

A framework for running functions on Tree-sitter nodes, and updating the buffer with the result.

Usage

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

Defaults

  • Filetypes: {}
  • Method: code_action

Completion

luasnip

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.

nvim_snippets

Snippets managed by nvim-snippets.

Usage

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

Defaults

  • Filetypes: {}
  • Method: completion

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

vsnip

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

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: dynamically resolved (see source)

alex

Catch insensitive, inconsiderate writing.

Usage

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

Defaults

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

ansiblelint

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

bean_check

Beancount: text-based double-entry accounting tool

Usage

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

Defaults

  • Filetypes: { "beancount" }
  • Method: diagnostics_on_save

bslint

A brighterscript CLI tool to lint your code without compiling your project.

Usage

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

Defaults

  • Filetypes: { "brs" }
  • Method: diagnostics
  • Command: bslint
  • Args: { "--files", "$FILENAME" }

buf

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

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

cfn_lint

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.

checkmake

make linter.

Usage

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

Defaults

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

checkstyle

Checkstyle is a tool for checking Java source code for adherence to a Code Standard or set of validation rules (best practices).

Usage

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:
#!/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

Qt-oriented static code analyzer based on the Clang framework

Usage

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):
local sources = {
    null_ls.builtins.diagnostics.clazy.with({
        extra_args = { "-p=$ROOT/build" },
    }),
}

clj_kondo

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

cmake_lint

Check cmake listfiles for style violations, common mistakes, and anti-patterns.

Usage

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

Defaults

  • Filetypes: { "cmake" }
  • Method: diagnostics_on_save
  • Command: cmake-lint
  • Args: { "$FILENAME" }

codespell

Codespell finds common misspellings in text files.

Usage

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

Defaults

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

commitlint

commitlint checks if your commit messages meet the conventional commit format.

Usage

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.

cppcheck

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

credo

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.

cue_fmt

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: { "vet", "$FILENAME" }

deadnix

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

djlint

✨ 📜 🪄 ✨ HTML Template Linter and Formatter.

Usage

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

Defaults

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

dotenv_linter

Lightning-fast linter for .env files.

Usage

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

Defaults

  • Filetypes: { "sh" }
  • Method: diagnostics
  • Command: dotenv-linter
  • Args: { "$FILENAME" }

editorconfig_checker

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: editorconfig-checker
  • Args: { "-no-color", "$FILENAME" }

erb_lint

Lint your ERB or HTML files

Usage

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

Defaults

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

fish

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

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

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

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

gitleaks

Gitleaks is a SAST tool for detecting and preventing hardcoded secrets like passwords, API keys, and tokens in git repos.

Usage

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

Linter for Git commit messages.

Usage

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

Defaults

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

glslc

Shader to SPIR-V compiler.

Usage

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(<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

A Go linter aggregator.

Usage

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

Defaults

  • Filetypes: { "go" }
  • Method: diagnostics_on_save
  • Command: golangci-lint
  • Args: dynamically resolved (see source)

hadolint

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

haml_lint

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

ktlint

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", "--log-level=none", "**/*.kt", "**/*.kts" }

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

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

Defaults

  • Filetypes: { "helm", "yaml" }
  • Method: diagnostics
  • Command: kube-linter
  • Args: { "lint", "--format", "json", "$ROOT" }

ltrs

LanguageTool-Rust (LTRS) is both an executable and a Rust library that aims to provide correct and safe bindings for the LanguageTool API.

Usage

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

Defaults

  • Filetypes: { "text", "markdown", "markdown" }
  • Method: diagnostics
  • Command: ltrs
  • Args: { "check", "-m", "-r", "--text", "$TEXT" }

markdownlint

Markdown style and syntax checker.

Usage

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

Defaults

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

markdownlint_cli2

A fast, flexible, configuration-based command-line interface for linting Markdown/CommonMark files with the markdownlint library

Usage

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

Defaults

  • Filetypes: { "markdown" }
  • Method: diagnostics_on_save
  • Command: markdownlint-cli2
  • Args: { "$FILENAME" }

Notes

markuplint

A linter for all markup developers.

Usage

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

Defaults

  • Filetypes: { "html" }
  • Method: diagnostics
  • Command: markuplint
  • Args: { "--format", "JSON", "$FILENAME" }

mdl

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

mlint

Linter for MATLAB files

Usage

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

Defaults

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

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

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

Defaults

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

npm_groovy_lint

Lint, format and auto-fix Groovy, Jenkinsfile, and Gradle files.

Usage

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)

opacheck

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", "--ignore=*.yaml", "--ignore=*.yml", "--ignore=*.json", "--ignore=.git/**/*" }

opentofu_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

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

Defaults

  • Filetypes: { "terraform", "tf", "terraform-vars" }
  • Method: diagnostics_on_save
  • Command: tofu
  • Args: { "validate", "-json" }

perlimports

A command line utility for cleaning up imports in your Perl code

Usage

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

Defaults

  • Filetypes: { "perl" }
  • Method: diagnostics
  • Command: perlimports
  • Args: { "--lint", "--read-stdin", "--filename", "$FILENAME" }

phpcs

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

phpmd

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

phpstan

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

pmd

An extensible cross-language static code analyzer.

Usage

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:
#!/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

An English prose linter.

Usage

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

Defaults

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

protolint

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

puppet_lint

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

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

Usage

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

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:

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

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

Defaults

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

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

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

Defaults

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

reek

Code smell detector for Ruby

Usage

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

Defaults

  • Filetypes: { "ruby" }
  • Method: diagnostics
  • Command: reek
  • Args: { "--format", "json", "--stdin-filename", "$FILENAME" }

regal

Regal is a linter for Rego, with the goal of making your Rego magnificent!.

Usage

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

Defaults

  • Filetypes: { "rego" }
  • Method: diagnostics_on_save
  • Command: regal
  • Args: { "lint", "-f", "json", "$ROOT" }

revive

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.

rpmspec

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

rstcheck

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

rubocop

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", "--force-exclusion", "--stdin", "$FILENAME" }

saltlint

A command-line utility that checks for best practices in SaltStack.

Usage

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

Defaults

  • Filetypes: { "sls" }
  • Method: diagnostics_on_save
  • Command: salt-lint
  • Args: { "--nocolor", "--json", "$FILENAME" }

selene

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

Usage

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

Defaults

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

semgrep

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

solhint

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

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

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

Defaults

  • Filetypes: { "yaml", "json" }
  • Method: diagnostics
  • Command: spectral
  • Args: { "lint", "--stdin-filepath", "$FILENAME", "-f", "json" }

sqlfluff

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

A high-speed SQL linter written in Rust.

Usage

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

Defaults

  • Filetypes: { "sql" }
  • Method: diagnostics
  • Command: sqruff
  • Args: { "lint", "--format", "github-annotation-native", "$FILENAME" }

staticcheck

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.

statix

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

stylelint

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

stylint

A linter for the Stylus CSS preprocessor.

Usage

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

Defaults

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

swiftlint

A tool to enforce Swift style and conventions.

Usage

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

Defaults

  • Filetypes: { "swift" }
  • Method: diagnostics
  • Command: swiftlint
  • Args: { "--reporter", "json", "--use-stdin", "--quiet" }

teal

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

terraform_validate

Terraform validate is is a subcommand of terraform to validate configuration files in a directory

Usage

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

Terragrunt validate is is a subcommand of terragrunt to validate configuration files in a directory

Usage

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

Defaults

  • Filetypes: { "hcl" }
  • Method: diagnostics_on_save
  • Command: terragrunt
  • Args: { "hclvalidate", "--terragrunt-hclvalidate-json" }

textidote

Spelling, grammar and style checking on LaTeX documents.

Usage

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

The pluggable linting tool for text and Markdown.

Usage

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

Defaults

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

tfsec

Security scanner for Terraform code

Usage

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

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)

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

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

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

Defaults

  • Filetypes: {}
  • Method: diagnostics

trivy

Find misconfigurations and vulnerabilities

Usage

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)

twigcs

Runs Twigcs against Twig files.

Usage

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

Defaults

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

vacuum

The world’s fastest and most scalable OpenAPI linter.

Usage

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

Defaults

  • Filetypes: { "yaml", "json" }
  • Method: diagnostics
  • Command: vacuum
  • Args: { "report", "--stdin", "--stdout" }

vale

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

verilator

Verilog and SystemVerilog linter power by Verilator

Usage

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

Defaults

  • Filetypes: { "verilog", "systemverilog" }
  • Method: diagnostics
  • Command: verilator
  • Args: { "-lint-only", "-Wno-fatal", "$FILENAME" }

vint

Linter for Vimscript.

Usage

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

Defaults

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

write_good

English prose linter.

Usage

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

Defaults

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

yamllint

A linter for YAML files.

Usage

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

Defaults

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

zsh

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

alejandra

The Uncompromising Nix Code Formatter

Usage

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

Defaults

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

asmfmt

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

astyle

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

atlas_fmt

atlas fmt command rewrites atlas config and schema files to a canonical format and style.

Usage

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

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
  • Args: { "-" }

Notes

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

bibclean

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

biome

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

Usage

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

black

The uncompromising Python code formatter

Usage

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

Defaults

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

blackd

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

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

An opinionated blade template formatter for Laravel that respects readability

Usage

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

Defaults

  • Filetypes: { "blade" }
  • Method: formatting
  • Command: blade-formatter
  • Args: { "--write", "$FILENAME" }

bsfmt

A code formatter for BrightScript and BrighterScript.

Usage

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

Defaults

  • Filetypes: { "brs" }
  • Method: formatting
  • Command: bsfmt
  • Args: { "$FILENAME" }

buf

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

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

cbfmt

A tool to format codeblocks inside markdown and org documents.

Usage

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

Defaults

  • Filetypes: { "markdown", "org" }
  • Method: formatting
  • Command: cbfmt
  • Args: { "--stdin-filepath", "$FILENAME", "--best-effort" }

clang_format

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", "proto" }
  • Methods: formatting, range_formatting
  • Command: clang-format
  • Args: dynamically resolved (see source)

cljfmt

A tool for formatting Clojure code

Usage

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

Defaults

  • Filetypes: { "clojure" }
  • Method: formatting
  • Command: cljfmt
  • Args: { "fix", "-" }

cljstyle

Formatter for Clojure code.

Usage

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

Defaults

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

cmake_format

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

codespell

Fix common misspellings in text files.

Usage

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

Defaults

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

crystal_format

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

csharpier

CSharpier is an opinionated code formatter for c#

Usage

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

Defaults

  • Filetypes: { "cs" }
  • Method: formatting
  • Command: csharpier
  • Args: { "format", "--write-stdout" }

cueimports

CUE tool that updates your import lines, adding missing ones and removing unused ones.

Usage

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

Defaults

  • Filetypes: { "cue" }
  • Method: formatting
  • Command: cueimports

cue_fmt

A CUE language formatter.

Usage

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

Defaults

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

d2_fmt

d2 fmt is a tool built into the d2 compiler for formatting d2 diagram source

Usage

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

Defaults

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

dart_format

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

dfmt

Formatter for D source code.

Usage

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

Defaults

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

djhtml

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
  • Args: { "-" }

djlint

✨ 📜 🪄 ✨ 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", "-" }

duster

Automatic configuration for Laravel apps to apply Tighten's standard linting & code standards.

Usage

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

Defaults

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

dxfmt

Format rust file with dioxus cli

Usage

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

Defaults

  • Filetypes: { "rust" }
  • Method: formatting
  • Command: dx
  • Args: { "fmt", "--file", "$FILENAME" }

elm_format

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

emacs_scheme_mode

An extensible, customizable, free/libre text editor — and more. Basically, using emacs in batch mode to format scheme files.

Usage

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

Defaults

  • Filetypes: { "scheme", "scheme.guile" }
  • Method: formatting
  • Command: emacs
  • Args: dynamically resolved (see source)

Notes

  • Adjust the expression evaluated with the --eval flag to change settings within emacs.

emacs_vhdl_mode

VHDL Mode is an Emacs major mode for editing VHDL code. Basically, using emacs in batch mode to format VHDL files.

Usage

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

Defaults

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

Notes

  • Adjust the expression evaluated with the --eval flag to change settings within emacs.

erb_format

Format ERB files with speed and precision.

Usage

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

Defaults

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

erb_lint

Lint your ERB or HTML files

Usage

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

Defaults

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

erlfmt

An opinionated Erlang code formatter.

Usage

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

Defaults

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

fantomas

FSharp source code formatter.

Usage

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

Defaults

  • Filetypes: { "fsharp" }
  • Method: formatting
  • Command: fantomas
  • Args: { "$FILENAME" }

findent

findent indents/beautifies/converts and can optionally generate the dependencies of Fortran sources.

Usage

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

Defaults

  • Filetypes: { "fortran" }
  • Method: formatting
  • Command: findent
  • Args: {}

fish_indent

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

fnlfmt

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

forge_fmt

Formats Solidity source files.

Usage

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

Defaults

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

format_r

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)

fprettify

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

gdformat

A formatter for Godot's gdscript

Usage

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

Defaults

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

gersemi

A formatter to make your CMake code the real treasure

Usage

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

Defaults

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

gleam_format

Default formater for the Gleam programming language

Usage

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

Defaults

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

gn_format

Format your GN code!

Usage

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

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.

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

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

Defaults

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

goimports

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

goimports_reviser

Tool for Golang to sort goimports by 3 groups: std, general and project dependencies.

Usage

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

Defaults

  • Filetypes: { "go" }
  • Method: formatting
  • Command: goimports-reviser
  • Args: { "$FILENAME" }

golines

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

google_java_format

Reformats Java source code according to Google Java Style.

Usage

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)

haxe_formatter

Haxe code formatter based on tokentree

Usage

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

Defaults

  • Filetypes: { "haxe" }
  • Method: formatting
  • Command: haxelib
  • Args: { "run", "formatter", "--stdin", "--source", "$FILENAME" }

hclfmt

Formatter for HCL configuration files

Usage

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

Defaults

  • Filetypes: { "hcl" }
  • Method: formatting
  • Command: hclfmt

htmlbeautifier

A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.

Usage

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

Defaults

  • Filetypes: { "eruby" }
  • Method: formatting
  • Command: htmlbeautifier
  • Args: { "$FILENAME" }

isort

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

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

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

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

just

Format your Justfile

Usage

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

Defaults

  • Filetypes: { "just" }
  • Method: formatting
  • Command: just
  • Args: { "--fmt", "--unstable", "-f", "$FILENAME" }

ktlint

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", "--log-level=none", "**/*.kt", "**/*.kts" }

leptosfmt

A formatter for the leptos view! macro

Usage

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

Defaults

  • Filetypes: { "rust" }
  • Method: formatting
  • Command: leptosfmt
  • Args: { "--quiet", "--stdin" }

markdownlint

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.

mdformat

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

meson_format

Meson's builtin formatter

Usage

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

Defaults

  • Filetypes: { "meson" }
  • Method: formatting
  • Command: meson
  • Args: { "format", "--source-file-path", "$FILENAME", "--", "-" }

mix

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", "--stdin-filename", "$FILENAME", "-" }

nginx_beautifier

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

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

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

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

nix_flake_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

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

Defaults

  • Filetypes: {}
  • Method: formatting
  • Args: { "$FILENAME" }

npm_groovy_lint

Lint, format and auto-fix Groovy, Jenkinsfile, and Gradle files.

Usage

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

Auto-formatter for OCaml code

Usage

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

Defaults

  • Filetypes: { "ocaml" }
  • Method: formatting
  • Command: ocamlformat
  • Args: { "--enable-outside-detected-project", "--name", "$FILENAME", "-" }

ocdc

A changelog formatter

Usage

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

Defaults

  • Filetypes: { "markdown" }
  • Method: formatting
  • Command: ocdc
  • Args: { "--path", "-" }

opentofu_fmt

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

Usage

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

Defaults

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

packer

The packer fmt Packer command is used to format HCL2 configuration files to a canonical format and style.

Usage

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

Defaults

  • Filetypes: { "hcl" }
  • Method: formatting
  • Command: packer
  • Args: { "fmt", "-" }

pg_format

PostgreSQL SQL syntax beautifier

Usage

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

Defaults

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

phpcbf

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

phpcsfixer

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

pint

An opinionated PHP code style fixer for minimalists.

Usage

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

Defaults

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

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

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)

Notes

  • 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.

prettierd

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", "markdown.mdx", "graphql", "handlebars", "svelte", "astro", "htmlangular" }
  • Methods: formatting, range_formatting
  • Command: prettierd
  • Args: dynamically resolved (see source)

pretty_php

The opinionated PHP code formatter.

Usage

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

Defaults

  • Filetypes: { "php" }
  • Method: formatting
  • Command: pretty-php
  • Args: { "$FILENAME" }

prisma_format

Formatter for the prisma filetype.

Usage

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

Defaults

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

protolint

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

ptop

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

puppet_lint

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

purs_tidy

A syntax tidy-upper (formatter) for PureScript.

Usage

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

The Google Python code formatter

Usage

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

Defaults

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

qmlformat

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

racket_fixw

A Racket formatter that add/remove some whitespaces but respects newline.

Usage

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

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

rego

Rego (opa fmt) Formatter

Usage

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

Defaults

  • Filetypes: { "rego" }
  • Method: formatting
  • Command: opa
  • Args: { "fmt" }

remark

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

rescript

The ReScript format builtin.

Usage

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

Defaults

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

rubocop

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: { "-a", "--server", "-f", "quiet", "--stderr", "--stdin", "$FILENAME" }

rubyfmt

Format your Ruby code!

Usage

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

Opinionated ruby formatter.

Usage

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

Defaults

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

rustywind

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

scalafmt

Code formatter for Scala

Usage

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

Defaults

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

shellharden

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

shfmt

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

smlfmt

A custom parser/auto-formatter for Standard ML

Usage

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

Defaults

  • Filetypes: { "sml" }
  • Method: formatting
  • Command: smlfmt
  • Args: { "--force", "$FILENAME" }

sqlfluff

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

Formats your dbt SQL files so you don't have to

Usage

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

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

sql_formatter

A whitespace formatter for different query languages

Usage

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

Defaults

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

sqruff

A high-speed SQL linter written in Rust.

Usage

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

Defaults

  • Filetypes: { "sql" }
  • Method: formatting
  • Command: sqruff
  • Args: { "fix", "-" }

stylelint

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

styler

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)

stylua

An opinionated code formatter for Lua.

Usage

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

Defaults

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

surface

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

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

swiftlint

A tool to enforce Swift style and conventions.

Usage

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

Defaults

  • Filetypes: { "swift" }
  • Method: formatting
  • Command: swiftlint
  • Args: { "lint", "--use-stdin", "--fix" }

swift_format

Swift formatter from apple. Requires building from source with swift build

Usage

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

Defaults

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

terraform_fmt

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", "terraform-vars" }
  • Method: formatting
  • Command: terraform
  • Args: { "fmt", "-" }

terragrunt_fmt

The terragrunt hclfmt command rewrites terragrunt configuration files to a canonical format and style.

Usage

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

Defaults

  • Filetypes: { "hcl" }
  • Method: formatting
  • Command: terragrunt
  • Args: { "hclfmt", "$FILENAME" }

textlint

The pluggable linting tool for text and Markdown.

Usage

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

Defaults

  • Filetypes: { "txt", "markdown" }
  • Method: formatting
  • Command: textlint
  • Args: { "--fix", "$FILENAME" }

tidy

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

topiary

A uniform formatter for simple languages

Usage

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

Defaults

  • Filetypes: { "ncl", "nickel" }
  • Method: formatting
  • Command: topiary
  • Args: { "-i", "-f", "$FILENAME" }

treefmt

One CLI to format your repo

Usage

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

Defaults

  • Filetypes: {}
  • Method: formatting
  • Command: treefmt
  • Args: { "--allow-missing-formatter", "--stdin", "$FILENAME" }

typstfmt

Formatter for typst

Usage

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

Defaults

  • Filetypes: { "typ", "typst" }
  • Method: formatting
  • Command: typstfmt
  • Args: { "-o", "-" }

typstyle

Beautiful and reliable typst code formatter

Usage

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

Defaults

  • Filetypes: { "typ", "typst" }
  • Method: formatting
  • Command: typstyle

uncrustify

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)

usort

Safe, minimal import sorting for Python projects.

Usage

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

Defaults

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

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

xmllint

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

yamlfix

A configurable YAML formatter that keeps comments.

Usage

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

Defaults

  • Filetypes: { "yaml" }
  • Method: formatting
  • Command: yamlfix
  • Args: { "-" }

yamlfmt

yamlfmt is an extensible command line tool or library to format yaml files.

Usage

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

Defaults

  • Filetypes: { "yaml" }
  • Method: formatting
  • Command: yamlfmt
  • Args: { "-" }

yapf

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)

zprint

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

dictionary

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

Usage

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

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.