{"id":13760312,"url":"https://github.com/venantius/glow","last_synced_at":"2025-04-06T20:13:41.551Z","repository":{"id":35484127,"uuid":"39753251","full_name":"venantius/glow","owner":"venantius","description":"Syntax highlighting for Clojure source code.","archived":false,"fork":false,"pushed_at":"2021-04-02T00:10:50.000Z","size":745,"stargazers_count":101,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-06T19:38:44.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/venantius.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-27T03:30:37.000Z","updated_at":"2023-06-15T11:45:16.000Z","dependencies_parsed_at":"2022-09-02T21:43:43.992Z","dependency_job_id":null,"html_url":"https://github.com/venantius/glow","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venantius%2Fglow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venantius%2Fglow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venantius%2Fglow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venantius%2Fglow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venantius","download_url":"https://codeload.github.com/venantius/glow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543595,"owners_count":20955865,"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":[],"created_at":"2024-08-03T13:01:07.591Z","updated_at":"2025-04-06T20:13:41.525Z","avatar_url":"https://github.com/venantius.png","language":"Clojure","funding_links":[],"categories":["Clojure"],"sub_categories":[],"readme":"# Glow\n\n[![Build Status](https://travis-ci.org/venantius/glow.svg?branch=master)](https://travis-ci.org/venantius/glow)\n\nA Clojure library for generating syntax-highlighted strings of Clojure source\ncode. Glow is capable of generating both ANSI-escaped strings for terminal\napplications, and HTML/CSS targets for server-side generation syntax-highlighted\ntemplates.\n\n## Installation\n\nTo use Glow in your project, just add the following to the `:dependencies` key of your `project.clj`:\n\n```clojure\n[venantius/glow \"0.1.6\"]\n```\n\n## Usage\n\nUsage is fairly straightforward.\n\nLet's say you've got a Clojure file with the following contents:\n\n```clojure\n(ns sample)\n\n(defn func\n [^Throwable x \u0026 y]\n (conj {} [:a (+ 1.1 x)]))\n\n(def variable\n  @(future\n     (if-let [x 5]\n       true\n       \"false\")))\n```\n\n### ANSI-escaped Syntax Highlighting\n\nTo generate an ANSI-escaped string of source code, all we have to do is slurp\nthat file and pass the string to `glow.core/highlight`:\n\n![](./doc/glow.png)\n\nNice.\n\n### Server-side HTML/CSS Syntax Highlighting\n\nThe two relevant functions you'll want are `glow.core/highlight-html`, and\n`glow.core/generate-css`. Glow's styling here is compatible with Pygment\nstylesheets.\n\nThe API is very similar to terminal highlighting, but you'll need to generate\nboth the CSS and the HTML separately and link them appropriately within your site.\n\nFor an example, see `glow.html-test/generate-demo-page`, which generates the\nfollowing:\n\n![](./doc/glow_3.png)\n\n## Configuration\n\nDon't like the default colorschemes? No problem!\n\nPass a map with whatever highlighting options you want as an optional\nsecondary argument:\n\n![](./doc/glow_2.png)\n\nTake a look at the colorschemes in `glow.colorschemes` to see how this should be structured.\n\n## Contributing\n\nIn general, bug reports, fixes, and code cleanup are always appreciated. I'd\nalso love PRs for additional colorschemes, particularly for HTML output.\n\nFeature requests are liable to be subject to a bit more discussion.\n\nWhen filing issues, please include the following:\n\n * The operating system\n * The JDK version\n * The Leiningen version\n * The Clojure version\n * Any plugins and dependencies in your `project.clj` and your `~/.lein/profiles.clj`\n\n## Special Thanks\n\nI owe a big debt of gratitude to the authors, contributors and maintainers of [vim-clojure-static](https://github.com/guns/vim-clojure-static) for their lists of keywords. I also owe thanks to Alex Engelberg and Kyle Kingsbury ([@aphyr](https://github.com/aphyr)) - the former helped me work on an EBNF grammar for Clojure, and the latter for writing [clj-antlr](https://github.com/aphyr/clj-antlr). Lastly, thanks to Reid Mckenzie, who authored the Clojure antlr v4 grammar upon which Glow's grammar is based.\n\n## License\n\nCopyright © 2019 W. David Jarvis\n\nDistributed under the Eclipse Public License 1.0, the same as Clojure. Parts of the ANTLR code are covered by the BSD license, and the original grammar used for the parser is MIT-licensed. Sorry for giving you three licenses in one go.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenantius%2Fglow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenantius%2Fglow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenantius%2Fglow/lists"}