emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/clojure-ts-mode ed7b301e1e 04/71: Add install instructions


From: ELPA Syncer
Subject: [nongnu] elpa/clojure-ts-mode ed7b301e1e 04/71: Add install instructions
Date: Fri, 25 Aug 2023 03:59:23 -0400 (EDT)

branch: elpa/clojure-ts-mode
commit ed7b301e1efb2cc792c989188b0db8a4e9c9c0c1
Author: dannyfreeman <danny@dfreeman.email>
Commit: dannyfreeman <danny@dfreeman.email>

    Add install instructions
---
 README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 1db5e5b4c0..8c182ab2e5 100644
--- a/README.md
+++ b/README.md
@@ -10,8 +10,62 @@ highlighting),indentation, and navigation support for the
 
 # Installation
 
+## Emacs 29
+
+This package requires Emacs 29 built with tree-sitter support from the 
[emacs-29 branch](https://git.savannah.gnu.org/cgit/emacs.git/log/?h=emacs-29).
+As of right now, users must install Emacs from source with tree-sitter 
installed on their system.
+More information on this can be found in the Emacs repository:
+[Emacs tree-sitter 
starter-guide](https://git.savannah.gnu.org/cgit/emacs.git/tree/admin/notes/tree-sitter/starter-guide?h=emacs-29)
+[Emacs install 
instricutions](https://git.savannah.gnu.org/cgit/emacs.git/tree/INSTALL.REPO).
+
+## Install libtree-sitter-clojure shared library
+
+The tree-sitter clojure shared library must be available to Emacs.
+clojure-ts-mode will not automatically install this (yet).
+For now, users must do it themselves manually, which requires that a c 
compiler be installed.
+
+To start, clone 
[tree-sitter-clojure](https://github.com/dannyfreeman/tree-sitter-clojure).
+
+The run the following code (depending on your OS) from the tree-sitter-clojure 
repository on your machine.
+
+### Linux
+```bash
+mkdir -f dist
+cc -c -I./src src/parser.c -o "parser.o"
+cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.so
+```
+
+### OS X
+```bash
+mkdir -f dist
+cc -c -I./src src/parser.c -o "parser.o"
+cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.dylib
+```
+
+### Windows
+I don't know how to do this on Windows. Patches welcome!
+
+### Finally, in emacs
+Then tell Emacs where to find the shared library by adding something like this 
to your init file
+
+```emacs-lisp
+(setq treesit-extra-load-path '( "~/path/to/tree-sitter-clojure/dist"))
 ```
-TODO
+
+OR you can move the `libtree-sitter-clojure.so`/`libtree-sitter-clojure.dylib` 
to a directory named `tree-sitter`
+under your `user-emacs-directory`.
+
+## Install clojure-ts-mode
+
+This package is not yet avaialble through package.el.
+You can install it by cloning the repository and adding it to your load path.
+
+```bash
+git clone https://github.com/clojure-emacs/clojure-ts-mode.git
+```
+
+```emacs-lisp
+(add-to-list 'load-path "~/path/to/clojure-ts-mode/")
 ```
 
 ## License



reply via email to

[Prev in Thread] Current Thread [Next in Thread]