{"id":13412611,"url":"https://github.com/michaelb/sniprun","last_synced_at":"2025-05-14T12:09:09.001Z","repository":{"id":37033143,"uuid":"288282667","full_name":"michaelb/sniprun","owner":"michaelb","description":"A neovim plugin to run lines/blocs of code (independently of the rest of the file), supporting multiples languages","archived":false,"fork":false,"pushed_at":"2025-03-08T19:15:42.000Z","size":15684,"stargazers_count":1566,"open_issues_count":14,"forks_count":49,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-05T10:04:35.079Z","etag":null,"topics":["code","code-runner","compiled-language","hacktoberfest","interpreted-language","interpreter","languages","lua","neovim","neovim-plugin","partial-evaluators","plugin","runner","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/michaelb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/michaelb4sniprun?locale.x=fr_FR"]}},"created_at":"2020-08-17T20:44:45.000Z","updated_at":"2025-04-05T03:13:52.000Z","dependencies_parsed_at":"2023-09-28T18:54:28.267Z","dependency_job_id":"34274ead-2589-457e-beb1-19e9c951d2a8","html_url":"https://github.com/michaelb/sniprun","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelb%2Fsniprun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelb%2Fsniprun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelb%2Fsniprun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelb%2Fsniprun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelb","download_url":"https://codeload.github.com/michaelb/sniprun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248568227,"owners_count":21125988,"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":["code","code-runner","compiled-language","hacktoberfest","interpreted-language","interpreter","languages","lua","neovim","neovim-plugin","partial-evaluators","plugin","runner","rust"],"created_at":"2024-07-30T20:01:26.777Z","updated_at":"2025-04-12T12:39:42.274Z","avatar_url":"https://github.com/michaelb.png","language":"Rust","readme":"\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"ressources/visual_assets/Sniprun_transparent.png\" /\u003e\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\u003cp\u003e\n    \u003ca href=\"https://github.com/michaelb/sniprun/releases/latest\"\u003e\n      \u003cimg alt=\"Latest release\" src=\"https://img.shields.io/github/v/release/michaelb/sniprun\" /\u003e\n    \u003c/a\u003e\n     \u003ca href=\"https://github.com/michaelb/sniprun/actions\"\u003e\n      \u003cimg alt=\"CI build\" src=\"https://github.com/michaelb/sniprun/workflows/Rust/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/michaelb/sniprun/releases\"\u003e\n      \u003cimg alt=\"Total downloads\" src=\"https://img.shields.io/github/downloads/michaelb/sniprun/total\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/michaelb/sniprun/pulse\"\u003e\n      \u003cimg alt=\"Last commit\" src=\"https://img.shields.io/github/last-commit/michaelb/sniprun\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n# Introduction\n\nSniprun is a code runner plugin for neovim written in Lua and Rust.\nIt aims to provide stupidly fast partial code testing for interpreted\n**and compiled** [languages](https://michaelb.github.io/sniprun/sources/README.html#support-levels-and-languages)\n. Sniprun blurs the line between standard save/run workflow, jupyter-like\nnotebook, and REPL/interpreters.\n\n\u003c/br\u003e\n\nTLDR: `Plug 'michaelb/sniprun', {'do': 'sh install.sh'}`, `:SnipRun`, `:'\u003c,'\u003eSnipRun`, `:SnipInfo`\n\n# Installation, configuration, ...\n\nSee [installation instructions](https://michaelb.github.io/sniprun/sources/README.html#installation)\n, [configuration tips](https://michaelb.github.io/sniprun/sources/README.html#configuration)\n, [usage explanations](https://michaelb.github.io/sniprun/sources/README.html#usage)\nand much more useful information on the\n[WIKI](https://michaelb.github.io/sniprun/).\n\n![spacer](ressources/visual_assets/760091.png)\n\n## Demos\n\n##### Send to Sniprun snippets of any language\nA very simple example (in C), play the .gif and look in the command area:\n\n![demo_c](ressources/visual_assets/demo_c.gif)\n\n##### The result can be returned in multiple (even at the same time) ways:\n\n[Classic](ressources/display_classic.md)|  [Virtual Text/Virtual Line](ressources/display_virtualtext.md)\n:------------------------------------------:|:------------------:\n![](ressources/visual_assets/classic.png)   | ![](ressources/visual_assets/virtual_text.png)\n[**Temporary Floating Window**](ressources/display_floating_window.md)  |  [**Terminal**](ressources/display_terminal.md)\n![](ressources/visual_assets/floating_window.png) | ![](ressources/visual_assets/terminal.png)\n[**Notification**](ressources/display_notify.md) | [**API**](API.md)\n![](ressources/visual_assets/nvimnotify.png) | ![](ressources/visual_assets/api.png)\n\n\n##### REPL-like behavior is available for some languages\n\nPython, Julia, Lua, JavaScript \u0026 Typescript (via deno), Clojure, R, Mathematica,\nSage, coming soon for many other interpreted (and compiled) languages.\nWith [REPL-like behavior](https://michaelb.github.io/sniprun/sources/README.html#repl-like-behavior)\n,you can run code dependent on previously executed code, just like in\na REPL, from within your favorite editor.\n\n![spacer](ressources/visual_assets/760091.png)\n\n## Features\n\n**Sniprun is** a way to quickly run small snippets of code, on the fly, and\niterate very quickly and conveniently. To learn a language, to quickly\nexperiment with new features (not yet embedded in classes or a whole project\netc...), or to develop simple code pipelines (like a machine learning exercise)\nthat fit in a unique file, sniprun is probably _the_ best plugin out there.\n\nAs a matter of proof, Sniprun :\n\n- Officially supports [all these languages (compiled \u0026 interpreted)](https://michaelb.github.io/sniprun/sources/README.html#support-levels-and-languages),\n   and virtually [any language](https://michaelb.github.io/sniprun/sources/interpreters/Generic.html#community-examples-for-non-officially-supported-languages)\n- can create and connect to REPLs in order to present an interactive and\n  playful interface\n- can run things like GUI plots, networks requests or even Ansible playbooks\n- doesn't require even one line of configuration by default\n  (but can be customized up to the tiniest things)\n- can run code from a part of a file which isn't complete / contains errors\n- can automatically fetch (in some languages) the `imports`\n  necessary for your code snippet\n- can run [live](https://michaelb.github.io/sniprun/sources/README.html#live-mode)\n  (at every keystroke)\n- lends itself to easy [mappings](https://michaelb.github.io/sniprun/sources/README.html#mappings-recommandations)\n  and Vim motions\n- has an API (for running code, and displaying results)\n- has many result display modes that can be enabled at the same time,\n  and for different output status if wanted\n- supports literate programming in Markdown, Orgmode and Neorg\n\n## Known limitations\n\nDue to its nature, Sniprun may have trouble with programs that :\n\n- Mess with standard output / stderr\n- Need to read from stdin\n- Access files; sniprun does not run in a virtual environment, it accesses\n  files just like your own code do, but since it does not run the whole program\n  , something might go wrong. **Relative paths may cause issues**, as the\n  current working directory for sniprun will be somewhere in ~/.cache/sniprun,\n  and relative imports may miss.\n- No support for Windows\n- NixOS, MacOS users have to compile sniprun locally. Sniprun has not been\n  tested on other Unixes (besides Linux itself, of course)\n\n## Changelog\n\nIt's been quite a journey already! For history fans, see the [full changelog](CHANGELOG.md).\n\n## Contributing\n\nSniprun has been made contributor-friendly (see\n[CONTRIBUTING.md](CONTRIBUTING.md)), so it's relatively easy to create / fix\ninterpreters for any language. But any (constructive) issue, discussion, or\ndoc Pull Request is a welcome form of contribution !\n","funding_links":["https://paypal.me/michaelb4sniprun?locale.x=fr_FR"],"categories":["Code Runner","Rust","rust"],"sub_categories":["Quickfix"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelb%2Fsniprun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelb%2Fsniprun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelb%2Fsniprun/lists"}