black Python code formatter integration for the lite text editor
2a1ab1b7 — Tmpod 3 years ago
Micro tweaks + badges for tickets and lists
7f31cc36 — Tmpod 3 years ago
Simplified the config
616dcefc — Tmpod 3 years ago
Made installing easier


browse  log 



You can also use your local clone with git send-email.

tickets mailing lists


A simple plugin for lite that adds a command and keybind to run black on the current file.


Navigate to your data/plugins directory and then use one of the following methods:

  1. Just download the plugin file into your plugins folder.

    curl -O https://git.sr.ht/~tmpod/black-lite/blob/master/black.lua
  2. Clone this repository into your plugins folder. This allows you to easily update the plugin by doing git pull but it fetches unnecessary files, such as this README.

    git clone https://git.sr.ht/~tmpod/black-lite


The plugin is very easy to use, you just have to either run the Black: Format command, or hit Alt+L.

A message in the status bar will appear letting you know if the black ran successfully or not.


This plugin has two configuration fields. You can set these configurations by editing your init.lua file in the data/user lite directory and modifying the core.config table. Each field name should be prefixed with black_, for example, black_args. Here's a description of each valid configuration field:

Name Type Description
args string[] A table containing extra arguments to pass to the black command. It must only contain strings which will be joined by spaces and inserted onto the command.
keybind string The key-combo to register for the Black: Format command shortcut.


local config = require "core.config"

-- Lines can be 120 chars long
config.black_args = {"-l 120"}


This plugin is licensed under MIT. The license file can be found here.