-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjustments to grammar for syntax highlighting (up to grammar v0.23.1) #26
base: main
Are you sure you want to change the base?
Conversation
1. Fix grammar after the Julia tree-sitter grammar has been changed in tree-sitter/tree-sitter-julia#135 2. Adjust syntax highlight of interpolations: use syntax information of interpolated code to highlight parts of it. 3. Highlight keyword argument names as symbols.
Fixes #25. |
I know that we don't have tests yet, but any chance you could add a commit with one or two julia files (just pick from popular packages and try to pick files that exercise quite a few syntax features), and then run them through This will at least give us a smoke test for the font-lock features. And something we can manually inspect to make sure the font-locking looks generally sane. I'd like to get this merged so we can unbork julia-ts-mode for people installing it for the first time, but I haven't had time to sit down and learn how the treesit stuff works to give this a detailed review. If we had the |
I'll try. I'm not sure when I can get around to do it, though, so please be patient. |
I tried the most recent version of |
Odd, I'm using it on a daily basis and haven't run into any issues recently. Have you tried upgrading the tree sitter language grammar? (E.g., type Update: It turns out that my grammar was lagging behind. I was still using 0.23.0. When I upgraded to the newest version, I also started getting the mentioned structure errors. I'll look into it. Update 2: There have been a bunch of breaking changes, again. I'll get around fixing it, but until then, install grammar version v0.23.0 |
@atkirtland, I adjusted the lisp code to fix the grammar version to 0.23.0, which it is compatible with. Please delete your grammar library by hand ( |
@dhanak Thanks! I'll try to look at this soon. |
@dhanak When I run
this didn't happen last week. |
Change-Id: I1d08a913bd3445dcaa228a99976230176e10e0df
Hi Aaron! My guess is that it doesn't like the autoload on that variable.
I'll remove it. Could you try it again, please?
…On Wed, Dec 18, 2024 at 10:50 PM Aaron Kirtland ***@***.***> wrote:
@dhanak <https://github.com/dhanak> When I try to use your fork, I get
the error
> Building julia-ts-mode...
x There was an unexpected runtime error
Message: Symbol's value as variable is void
Details: (treesit-language-source-alist)
Backtrace:
(member '(julia "https://github.com/tree-sitter/tree-sitter-...
(if (member '(julia "https://github.com/tree-sitter/tree-sit...
(load-with-code-conversion "/home/atkirtland/.config/emacs/....
(load "/home/atkirtland/.config/emacs/.local/straight/build-...
(progn (load autoloads-file nil 'nomessage))
(if (file-exists-p autoloads-file) (progn (load autoloads-fi...
(let ((autoloads-file (straight--autoloads-file package))) (...
(straight--load-package-autoloads "julia-ts-mode")
(if straight-cache-autoloads (progn (if (straight--checkhash...
(let* ((--cl-rest-- recipe) (package (car (cdr (plist-member...
(straight--activate-package-autoloads (:host github :repo "d...
(if no-build nil (let ((tail (straight--get-dependencies pac...
—
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAANOGA3OC7TG44Q6YUVVZL2GHU2VAVCNFSM6AAAAABORYAB7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJSGMZTAMRSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi dhanak, I think it's working for me now! Thanks! |
Change-Id: I97687a2c37ada49808747d91575783e5c8549765
I finally got around to upgrading the font-lock queries to grammar version 0.23.1. Note that after an upgrade, you need to run I also added a new source file to the faceup tests, directly from the tree-sitter-julia test corpus. This proved very useful when I patched up the queries. |
Change-Id: I9c55a11dd9589a3789c4b0e37f290fd0b40861d4
Obsoletes #22. |
Fix grammar after the Julia tree-sitter grammar has been changed in Breaking: Refactor signatures and other stuff tree-sitter/tree-sitter-julia#135
Adjust syntax highlight of interpolations: use syntax information of interpolated code to highlight parts of it.
Highlight keyword argument names as symbols.