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

Navigating to deftype doesn't work from constructor #2721

Closed
dpsutton opened this issue Oct 3, 2019 · 1 comment
Closed

Navigating to deftype doesn't work from constructor #2721

dpsutton opened this issue Oct 3, 2019 · 1 comment
Labels
good first issue A simple tasks suitable for first-time contributors

Comments

@dpsutton
Copy link
Contributor

dpsutton commented Oct 3, 2019

From clojurescript, navigating to source on (MapEntry. 1 2 nil) doesn't work. However, if you add a space to separate the . it does

Seems like it would be simple to check for a trailing period and then reissue the navigation command. From documentation about the reader

Symbols begin with a non-numeric character and can contain alphanumeric characters and *, +, !, -, _, ', ?, <, > and = (other characters may be allowed eventually).

It seems safe to assume that periods are not valid constituents of a symbol so we can safely check and navigate to the underlying deftype or defrecord by trimming it.

@dpsutton dpsutton added the good first issue A simple tasks suitable for first-time contributors label Oct 3, 2019
@bbatsov
Copy link
Member

bbatsov commented Oct 3, 2019

Yeah, that should be a simple fix. Probably there's also a way to reject dots by tweaking the syntax table in clojure-mode.

@bbatsov bbatsov closed this as completed in fd1f62e Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A simple tasks suitable for first-time contributors
Projects
None yet
Development

No branches or pull requests

2 participants