Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pass fully qualified symbol to clojure-ts-get-indent-function#72

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@rrudakov
Copy link
Contributor

When I started testing it with CIDER I realized that we have to pass fully qualified symbol name tocider--get-symbol-indent, otherwise it won't resolve it and won't return indentation metadata.


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):

  • The commits are consistent with ourcontribution guidelines.
  • You've added tests (if possible) to cover your change(s). Bugfix, indentation, and font-lock tests are extremely important!
  • You've runM-x checkdoc and fixed any warnings in the code you've written.
  • You've updated the changelog (if adding/changing user-visible functionality).
  • You've updated the readme (if adding/changing user-visible functionality).

Thanks!

@rrudakovrrudakovforce-pushed thefix/fully-qualified-symbol-indent branch from0ae25b4 tobaca35bCompareApril 5, 2025 08:52
@bbatsov
Copy link
Member

Ah, yeah - I had forgotten about this, but it's kind of important, otherwise it's not possible to tell apart indentation metadata for the same symbols in different namespaces.

Probably inclojure-ts-mode it makes sense to assume that if something is passed unqualified we should use the current namespace. On the other hand - I don't think we'll be able to deal with things like ns aliases, at least not without parsing everything in thens form.

@rrudakovrrudakovforce-pushed thefix/fully-qualified-symbol-indent branch frombaca35b to3761b2dCompareApril 5, 2025 14:21
@rrudakov
Copy link
ContributorAuthor

rrudakov commentedApr 5, 2025
edited
Loading

Probably inclojure-ts-mode it makes sense to assume that if something is passed unqualified we should use the current namespace. On the other hand - I don't think we'll be able to deal with things like ns aliases, at least not without parsing everything in thens form.

Hmm, that's a good point, if macro is defined in the same namespace then this function will be called without ns in current implementation, but macro can also be required using:refer and using current ns will be not valid solution.

@rrudakov
Copy link
ContributorAuthor

@bbatsov I'd probably suggest to merge this as is. I'll try to figure out how to deal with edge cases separately.

@rrudakov
Copy link
ContributorAuthor

I've just tested it with CIDER, if a macro is imported using:refer it's actually being successfully resolved bycider-resolve--get-in, it also works fine if macro is imported with:use keyword, so it looks like that the fix from this PR is sufficient to make it work with CIDER.

@bbatsovbbatsov merged commitc213950 intoclojure-emacs:mainApr 5, 2025
2 of 3 checks passed
@bbatsov
Copy link
Member

Deal!

@rrudakovrrudakov deleted the fix/fully-qualified-symbol-indent branchApril 5, 2025 16:09
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@bbatsovbbatsovbbatsov approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@rrudakov@bbatsov

[8]ページ先頭

©2009-2025 Movatter.jp