{"id":13761284,"url":"https://github.com/sogaiu/a-tsclj-nvim-lua-plugin","last_synced_at":"2025-05-10T12:31:27.546Z","repository":{"id":118761320,"uuid":"252969420","full_name":"sogaiu/a-tsclj-nvim-lua-plugin","owner":"sogaiu","description":null,"archived":true,"fork":false,"pushed_at":"2020-04-07T07:35:48.000Z","size":177,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T18:34:27.139Z","etag":null,"topics":["clojure","lua","neovim","tree-sitter"],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sogaiu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-04-04T10:37:42.000Z","updated_at":"2024-06-06T02:17:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ce1edc5-6cdc-4882-ad51-842dad57597a","html_url":"https://github.com/sogaiu/a-tsclj-nvim-lua-plugin","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/sogaiu%2Fa-tsclj-nvim-lua-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fa-tsclj-nvim-lua-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fa-tsclj-nvim-lua-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fa-tsclj-nvim-lua-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sogaiu","download_url":"https://codeload.github.com/sogaiu/a-tsclj-nvim-lua-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253415469,"owners_count":21904862,"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":["clojure","lua","neovim","tree-sitter"],"created_at":"2024-08-03T13:01:47.207Z","updated_at":"2025-05-10T12:31:26.928Z","avatar_url":"https://github.com/sogaiu.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# a-tsclj-nvim-lua-plugin\n\nA demo of using tree-sitter-clojure to highlight code in neovim (\u003e= 0.5)\n\n## Prerequisites\n\n* neovim (\u003e= 0.5)\n* tree-sitter-clojure\n\n## Prepare\n\n* Install neovim (\u003e= 0.5) or rather the master branch of neovim as 0.5\n  is not released yet (tested with 30a6e374).\n\n* Follow the instructions through \"Initial Setup\" step of\n  [tree-sitter-clojure](https://github.com/sogaiu/tree-sitter-clojure).\n  Note, you likely won't need emsdk.\n\n* From the tree-sitter-clojure directory that was cloned, parse\n  clojure.core (assuming clojure source lives under ~/src):\n\n  ```\n  npx tree-sitter parse ~/src/clojure/src/clj/clojure/core.clj\n  ```\n\n  This should have prepared a `~/.tree-sitter` directory and copied a\n  `clojure.so` (or .dynlib or .dll) file to live under\n  `~/.tree-sitter/bin`.\n\n  The vim runtimepath is used to locate the .so|.dynlib|.dll file, so\n  to arrange for that to succeed, one could symlink\n  `~/.tree-sitter/bin` to a place such as `~/.config/nvim/parser`:\n\n  ```\n  cd ~/.config/nvim\n  ln -s ~/.tree-sitter/bin parser # assuming nothing named parser exists\n  ```\n\n  Here `~/.config/nvim` is assumed to be on the vim runtimepath,\n  substitute something else if this particular choice is undesirable.\n\n* Clone this repository somewhere appropriate:\n\n  ```\n  git clone https://github.com/sogaiu/a-tsclj-nvim-lua-plugin\n  ```\n\n* Start neovim with the cloned directory on the vim runtime path:\n\n  ```\n  nvim --cmd \"set rtp+=./a-tsclj-nvim-lua-plugin\"\n  ```\n\n* Turn off syntax highlighting:\n\n  ```\n  :syntax off\n  ```\n\n* Open clojure.core:\n\n  ```\n  :edit ~/src/clojure/src/clj/clojure/core.clj\n  ```\n\n  The file should look pretty plain, i.e. no syntax highlighting.\n\n## Demo\n\n* Use tree-sitter-clojure to highlight the buffer by entering\n  `\u003cM-C-H\u003e` (see `plugin/a-tsclj-nvim-lua-plugin.vim` if another key\n  sequence needs to be used).\n\n  Alternatively, one can:\n\n  ```\n  :lua trsiclj:highlight_clojure()\u003cCR\u003e\n  ```\n\n  The text `tree-sitter-clojure detected` should appear at the bottom\n  of the screen if all went well, and the buffer should now have more\n  color in it.\n\n  [screenshot](a-tsclj-nvim-lua-plugin.png)\n\n## Hacking\n\n* Tweaking of highlighting can be done by editing the value of\n  `default_query` in `lua/trsiclj/init.lua`.\n\n## Thanks\n\n* bfredl - neovim and tree-sitter work\n* guns - vim-clojure-static\n* jacobsimpson - nvim-example-lua-plugin\n* kolja - repl-alliance\n* kotarak - vimclojure\n* morhetz - gruvbox\n* SevereOverfl0w - tree-sitter and vim info\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fa-tsclj-nvim-lua-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsogaiu%2Fa-tsclj-nvim-lua-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fa-tsclj-nvim-lua-plugin/lists"}