Is there a from-zero set of instructions to get Emacs going with julia-ts-mode?
non-Jedi
I am afraid I’ve gotten very rusty on Emacs. :frowning:
https://global.discourse-cdn.com/julialang/optimized/3X/5/2/52e282d46eadd4022c458057bb740061d8efad72_2_32x32.png
Julia Programming Language
Could you clarify where you’re getting stuck? To me, the julia-ts-mode README is fairly clear. I can’t test this because I don’t have an emacs installation with internet access at the moment, but it should be as simple as:

Install MELPA by adding this snippet to your config file:

(require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities` ;; and `package-pinned-packages`. Most users will not need or want to do this. ;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t) (package-initialize)

Install julia-ts-mode by adding the snippet from the README (I believe this should just work in emacs 29 since use-package is now included in emacs):

(use-package julia-ts-mode :ensure t :mode "\\.jl$")

Install and configure treesit-auto package using the example configuration from its README by adding:

(use-package treesit-auto :custom (treesit-auto-install 'prompt) :config (treesit-auto-add-to-auto-mode-alist 'all) (global-treesit-auto-mode))

Navigate to a julia file with extension .jl using C-x C-f. Respond “yes” to the prompt about installing treesitter grammar, and you should be editing using julia-ts-mode.

Thank you, that is helpful. I’m still getting an error though:

It would be helpful to see a complete init.el file that has the moving parts in the right order.

I think you were probably just missing a :ensure t for treesit-auto. Sorry about that. I don’t personally use use-package, so I missed that detail. I just tested the following in init.el with a fresh --init-directory, and it worked as expected:

;;; init.el --- My emacs config -*- lexical-bindings:t -*- (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize) (use-package julia-ts-mode :ensure t :mode "\\.jl$") (use-package treesit-auto :ensure t :custom (treesit-auto-install 'prompt) :config (treesit-auto-add-to-auto-mode-alist 'all) (global-treesit-auto-mode))

I should note that if you had followed the directions in the treesit-auto README instead of my bastardization of them above, everything should have worked properly. All issues are with my reading comprehension rather than with upstream documentation.

Looks like treesit-auto tries to build the tree-sitter grammar from source which doesn’t work on Windows without quite a bit of effort to setup a proper build toolchain. The path forward is probably to manually install the already-built grammar dll. I’d need to lookup how to do so, but you can probably use the binary from the jll:

https://github.com/JuliaBinaryWrappers/tree_sitter_julia_jll.jl/releases/download/tree_sitter_julia-v0.19.0%2B0/tree_sitter_julia.v0.19.0.x86_64-w64-mingw32.tar.gz