{"id":27341858,"url":"https://github.com/chrisgrieser/nvim-justice","last_synced_at":"2025-10-06T14:02:10.955Z","repository":{"id":263439722,"uuid":"890414991","full_name":"chrisgrieser/nvim-justice","owner":"chrisgrieser","description":"Just an integration of `just` in nvim.","archived":false,"fork":false,"pushed_at":"2025-04-12T09:37:03.000Z","size":69,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-12T10:24:20.298Z","etag":null,"topics":["just","justfile","nvim-plugin","task-runner"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisgrieser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":"https://www.paypal.me/ChrisGrieser","ko_fi":"pseudometa"}},"created_at":"2024-11-18T14:27:43.000Z","updated_at":"2025-04-12T09:37:06.000Z","dependencies_parsed_at":"2024-12-03T19:22:34.291Z","dependency_job_id":"4086dd2d-7479-4720-9441-f087e45f0664","html_url":"https://github.com/chrisgrieser/nvim-justice","commit_stats":null,"previous_names":["chrisgrieser/nvim-justice"],"tags_count":0,"template":false,"template_full_name":"chrisgrieser/nvim-pseudometa-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisgrieser%2Fnvim-justice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisgrieser%2Fnvim-justice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisgrieser%2Fnvim-justice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisgrieser%2Fnvim-justice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisgrieser","download_url":"https://codeload.github.com/chrisgrieser/nvim-justice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248596123,"owners_count":21130640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["just","justfile","nvim-plugin","task-runner"],"created_at":"2025-04-12T16:28:32.438Z","updated_at":"2025-10-06T14:02:10.949Z","avatar_url":"https://github.com/chrisgrieser.png","language":"Lua","funding_links":["https://www.paypal.me/ChrisGrieser","https://ko-fi.com/pseudometa","https://ko-fi.com/Y8Y86SQ91'"],"categories":["Code Runner"],"sub_categories":["Quickfix"],"readme":"\u003c!-- LTeX: enabled=false --\u003e\n# nvim-justice ⚖️\n\u003c!-- LTeX: enabled=true --\u003e\n\u003ca href=\"https://dotfyle.com/plugins/chrisgrieser/nvim-justice\"\u003e\n\u003cimg alt=\"badge\" src=\"https://dotfyle.com/plugins/chrisgrieser/nvim-justice/shield\"/\u003e\u003c/a\u003e\n\nJust an integration of [`just`](https://github.com/casey/just) in nvim.\n\n\u003cimg alt=\"Showcase\" width=40% src=\"https://github.com/user-attachments/assets/cb35d791-dd93-4deb-9566-8e574305ad5b\"\u003e\n\n## Table of contents\n\n\u003c!-- toc --\u003e\n\n- [Features](#features)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Usage](#usage)\n- [Advanced usage](#advanced-usage)\n\t* [Using progress bars and streaming output](#using-progress-bars-and-streaming-output)\n- [More `just` tooling for nvim](#more-just-tooling-for-nvim)\n- [About the author](#about-the-author)\n\n\u003c!-- tocstop --\u003e\n\n## Features\n- **Quick-select** recipes via keys shown at the left of the window. Running\n  recipes thus requires only 2–3 keystrokes.\n- As opposed to vim's builtin `:make`, always runs **asynchronously**.\n- **Modes** for running recipes:\n\t* **Default**: results are shown in a notification window\n\t* **Quickfix**: output is added to the quickfix list, using the\n\t  [errorformat](https://neovim.io/doc/user/quickfix.html#errorformat)\n\t* **Streaming**: useful for example when the recipe has a progress bar\n\t* **Terminal**: useful for example when the recipe prompts for further input\n- Support for `just`'s [run\n  parameters](https://just.systems/man/en/recipe-parameters.html). Parameters\n  are read via `vim.ui.input`.\n- Inspect recipes and variable values.\n- Hide specific recipes, helpful to always exclude recipes that require user\n  input.\n\n## Installation\n**Requirements**\n- nvim 0.10+\n- [just](https://github.com/casey/just)\n- *optional:* [snacks.nvim](http://github.com/folke/snacks.nvim) (for streaming\n  output)\n- *optional:* `vim.ui.input` provider, such as\n  [snacks.nvim](http://github.com/folke/snacks.nvim), for nicer recipe parameter\n  input\n- *optional:* Treesitter parser for syntax highlighting (`:TSInstall just`)\n\n```lua\n-- lazy.nvim\nreturn { \n\t\"chrisgrieser/nvim-justice\"\n\t-- optional, for streaming output and nicer parameter input\n\t-- dependencies = \"folke/snacks.nvim\",\n}\n```\n\n## Configuration\nThe `setup` call is optional.\n\n```lua\n-- default settings\nrequire(\"justice\").setup {\n\t-- Defines how recipe modes are determined. For example, if a recipe has\n\t-- \"download\" in the name, or if it has \"streaming\" or \"curl\" in the comment,\n\t-- it will be considered a \"streaming\" recipe.\n\t-- (strings are interpreted as lua patterns, thus `-` needs to be escaped as `%-`)\n\trecipeModes = {\n\t\tstreaming = { -- useful for progress bars (requires `snacks.nvim`)\n\t\t\tname = { \"download\" },\n\t\t\tcomment = { \"streaming\", \"curl\" }, -- comment contains \"streaming\" or \"curl\"\n\t\t},\n\t\tterminal = { -- useful for recipes with input\n\t\t\tname = {},\n\t\t\tcomment = { \"input\", \"terminal\", \"fzf\" },\n\t\t},\n\t\tquickfix = {\n\t\t\tname = { \"%-qf$\" }, -- name ending with \"-qf\"\n\t\t\tcomment = { \"quickfix\" },\n\t\t},\n\t\tignore = { -- hides them from the nvim-justice selection window\n\t\t\tname = {},\n\t\t\tcomment = {},\n\t\t},\n\t},\n\twindow = {\n\t\tborder = getBorder(), -- `vim.o.winborder` on nvim 0.11, otherwise \"rounded\"\n\t\trecipeCommentMaxLen = 35,\n\t\tkeymaps = {\n\t\t\tnext = \"\u003cTab\u003e\",\n\t\t\tprev = \"\u003cS-Tab\u003e\",\n\t\t\trunRecipeUnderCursor = \"\u003cCR\u003e\",\n\t\t\trunFirstRecipe = \"1\",\n\t\t\tcloseWin = { \"q\", \"\u003cEsc\u003e\" },\n\t\t\tshowRecipe = \"\u003cSpace\u003e\",\n\t\t\tshowVariables = \"?\",\n\t\t\tdontUseForQuickKey = { \"j\", \"k\", \"-\", \"_\" },\n\t\t},\n\t\thighlightGroups = {\n\t\t\tquickKey = \"Keyword\",\n\t\t\ticons = \"Function\",\n\t\t},\n\t\ticons = {\n\t\t\tjust = \"󰖷\",\n\t\t\tstreaming = \"ﲋ\",\n\t\t\tquickfix = \"\",\n\t\t\tterminal = \"\",\n\t\t\tignore = \"󰈉\",\n\t\t\trecipeParameters = \"󰘎\",\n\t\t},\n\t},\n\tterminal = {\n\t\theight = 10,\n\t},\n}\n```\n\n## Usage\n\n```lua\nrequire(\"justice\").select()\n```\n\n```vim\n:Justice\n```\n\n**Recipe parameters**  \nIf the recipe expects [parameters from the command\nline](https://just.systems/man/en/recipe-parameters.html), `nvim-justice` will\nautomatically prompt for them.\n\nIf a parameter default has been defined, confirm the prompt with an empty value\nto use the default.\n\n**Keymaps in the selection window**  \n- Navigate the window via `\u003cTab\u003e` \u0026 `\u003cS-Tab\u003e`.\n- Run selected recipe with `\u003cCR\u003e`.\n- **Quick-select** recipes via the highlighted keys.\n- Run the first recipe via `1`.\n- Inspect recipe via `\u003cSpace\u003e`.\n- Show variable values via `?`.\n\n**Use with a specific Justfile (`--justfile`)**  \n\n```lua\nrequire(\"justice\").select({\n\tjustfile = \"path/to/custom/justfile\", -- passed to `--justfile=`\n})\n```\n\n## Advanced usage\n\n### Using progress bars and streaming output\nHere is an example of a `just` recipe that displays a simple progress bar\n\nThis kind of progress bar works the same when triggered in the terminal via\n`just demo-progressbar` or via `nivm-justice`.\n\n```just\n# `opts.recipes.streaming.comment` is configured to make recipes whose comment\n# contains \"streaming\" stream the output\n\n# streaming\ndemo-progressbar:\n    #!/usr/bin/env zsh\n    char=\"+\"\n    progress=\"\"\n    for i in {1..20}; do\n        progress=\"$progress$char\"\n\t\tprintf \"\\33[2K\\r\" # `\\33[2K` fully erase the line, `\\r` moves to start of line\n        printf \"$progress\" # printf (or `echo -n`) needed to not create a newline\n        sleep 0.1\n    done\n    printf \"\\33[2K\\r\"\n    echo \"Done.\"\n```\n\nNote that the following version of a progress bar works in the terminal, but\nnot work in `nvim-justice`, since the plugin prints every unit of data\nindividually.\n\n```just\n# streaming\nprogressbar_not_working_in_nvim_justice:\n    #!/usr/bin/env zsh\n    char=\"+\"\n    for i in {1..20}; do\n        printf \"$char\"\n        sleep 0.1\n    done\n    printf \"\\33[2K\\r\"\n    echo \"Done.\"\n```\n\n## More `just` tooling for nvim\n- [Just-LSP](https://github.com/terror/just-lsp)\n- [Treesitter parser for\n  Just](https://github.com/IndianBoy42/tree-sitter-just) (`:TSInstall just`)\n\n## About the author\nIn my day job, I am a sociologist studying the social mechanisms underlying the\ndigital economy. For my PhD project, I investigate the governance of the app\neconomy and how software ecosystems manage the tension between innovation and\ncompatibility. If you are interested in this subject, feel free to get in touch.\n\n- [Website](https://chris-grieser.de/)\n- [Mastodon](https://pkm.social/@pseudometa)\n- [ResearchGate](https://www.researchgate.net/profile/Christopher-Grieser)\n- [LinkedIn](https://www.linkedin.com/in/christopher-grieser-ba693b17a/)\n\n\u003ca href='https://ko-fi.com/Y8Y86SQ91' target='_blank'\u003e\u003cimg height='36'\nstyle='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3'\nborder='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisgrieser%2Fnvim-justice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisgrieser%2Fnvim-justice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisgrieser%2Fnvim-justice/lists"}