clojure-emacs / clojure-ts-mode

The next generation Clojure major mode for Emacs, powered by TreeSitter
GNU General Public License v3.0
129 stars 11 forks source link

Fix semantic indentation of quoted functions #49

Open rschmukler opened 1 month ago

rschmukler commented 1 month ago

Fixes an error where quoted functions would not align correctly with semantic indentation. Adds an example to the test sample.


Before submitting a PR mark the checkboxes for the items you've done (if you think a checkbox does not apply, then leave it unchecked):

Thanks!

rschmukler commented 1 month ago

@bbatsov Upon thinking about this further, I think that the proper name should actually be var-node-p or variable-node-p. The problem is that there is already a variable-node-p which returns whether a node is a def or defonce. I think we should do the following:

  1. Rename the existing variable-node-p to variable-definition-node-p
  2. Rename quoted-var-node-p to var-node-p

I think calling it anything else will be a bit confusing since it is technically a variable... ie:

(type #'filter)
;; => clojure.lang.Variable

I have updated the PR with these changes, but I am also happy to change it to whatever you want. Let me know!

rschmukler commented 1 month ago

@bbatsov just pinging you on this. No rush, just a reminder :)