Skip to content
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

Incorrect indentation / fontification after metadata forms #61

Open
yuhan0 opened this issue Mar 6, 2025 · 2 comments
Open

Incorrect indentation / fontification after metadata forms #61

yuhan0 opened this issue Mar 6, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@yuhan0
Copy link
Contributor

yuhan0 commented Mar 6, 2025

Expected:

Metadata forms ^:foo / ^{:foo 123} should not affect indentation of the following forms

[a b [c ^:foo
      d
      e]]

Actual:

;; with clojure-ts-indent-style = 'semantic
[a b [c ^:foo
        d
      e]]

;; with clojure-ts-indent-style = 'fixed
[a b [c ^:foo
d
      e]]

Some font-locking of the following form also appears to be affected:

Image


Typing a closing delimiter with Paredit (paredit-close-curly) can also cause the point to jump to the wrong position:

;;   ↓with point here, type "}"
[a ^{ } (b) c]
;;     |   |     
;;     |   actual
;;     expected
@bbatsov bbatsov added the bug Something isn't working label Mar 6, 2025
@bbatsov
Copy link
Member

bbatsov commented Mar 6, 2025

Likely the metadata is not considered in the existing TS queries. I'll take a look when I can.

@yuhan0
Copy link
Contributor Author

yuhan0 commented Mar 6, 2025

(The Paredit navigation issue is probably related to #62, and not directly to this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants