{"id":22071654,"url":"https://github.com/xymostech/babylon-mode","last_synced_at":"2025-03-23T19:17:43.921Z","repository":{"id":139301655,"uuid":"85897123","full_name":"xymostech/babylon-mode","owner":"xymostech","description":"An emacs mode for highlighting JavaScript using the babylon parser","archived":false,"fork":false,"pushed_at":"2022-09-15T22:31:02.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T02:24:06.151Z","etag":null,"topics":["babylon","emacs"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","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/xymostech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-03-23T02:19:04.000Z","updated_at":"2023-01-31T18:25:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a2cb588-49ba-431b-88f9-fc513612a2c7","html_url":"https://github.com/xymostech/babylon-mode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xymostech%2Fbabylon-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xymostech%2Fbabylon-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xymostech%2Fbabylon-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xymostech%2Fbabylon-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xymostech","download_url":"https://codeload.github.com/xymostech/babylon-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245153892,"owners_count":20569408,"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":["babylon","emacs"],"created_at":"2024-11-30T20:33:24.093Z","updated_at":"2025-03-23T19:17:43.892Z","avatar_url":"https://github.com/xymostech.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Babylon mode _(babylon-mode)_\n\n\u003e An emacs mode for highlighting JavaScript using the babylon parser\n\nInstead of trying to re-implement a JS parser in elisp like js2-mode, or trying\nto parse JS and JSX using regexes like web-mode, we try to offload a bunch of\nthe actual parsing work onto some code that we know actually works:\n[babylon](https://github.com/babel/babylon). Babylon is the parser that babel\nuses, so we can be very confident that it will successfully parse any\nJavaScript we throw at it! All we need to do is traverse the tree, highlight\nthings that we want, and we're good to go.\n\nCurrently, this comes at the significant downside that it is painfully slow and\nvery error-prone. But I'm working on it, and hopefully it will get to the point\nthat it will be useful for other people.\n\n## Install\n\nClone this repo somewhere\n```shell\n% git clone https://github.com/xymostech/babylon-mode.git\n```\n\nAdd the path to `load-path` in your .emacs.el:\n```elisp\n(add-to-list 'load-path \"/path/to/babylon-mode\")\n```\n\nThen, add an autoload for loading babylon-mode, and optionally add babylon-mode\nto `auto-mode-alist`:\n\n```elisp\n(autoload 'babylon-mode \"babylon-mode\" nil t)\n\n(add-to-list 'auto-mode-alist '(\"\\\\.jsx$\" . babylon-mode))\n(add-to-list 'auto-mode-alist '(\"\\\\.js$\" . babylon-mode))\n```\n\n## Usage\n\nVisit a .js or .jsx file, or manually run `babylon-mode`:\n```\nbabylon-mode\n```\n\n## Maintainer\n\n- xymostech\n\n## Contribute\n\nThis is the first large amount of elisp that I've written (aside from my\n.emacs.el), so I apologize for any elisp faux pas I have committed. If you find\nthis useful and have any ideas for improvement, I'd love to hear! Issues\npointing out how broken things currently are are probably not useful, because\nthe whole thing is pretty broken.\n\nIn other words:\n - Ask questions in github issues\n - PRs are welcome, especially to improve the elisp, but huge code refactorings\n   are not useful. I'm trying to learn elisp and continue working on this, so\n   huge changes would put a damper on it.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxymostech%2Fbabylon-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxymostech%2Fbabylon-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxymostech%2Fbabylon-mode/lists"}