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

Snippet in custom command doesn't work with function metadata #1463

Closed
sashton opened this issue Jan 10, 2022 · 2 comments
Closed

Snippet in custom command doesn't work with function metadata #1463

sashton opened this issue Jan 10, 2022 · 2 comments
Labels
bug Something isn't working developer ergonomics

Comments

@sashton
Copy link
Contributor

sashton commented Jan 10, 2022

$top-level-defined-symbol does not return the function symbol when there is metadata declared on the function.

Sample custom command definition:

    {
      "name": "print function name",
      "key": "printFunc",
      "snippet": "(println '$top-level-defined-symbol)"
    },

Failing Scenario (when metadata is present)

(defn ^{:foo "bar"} baz
  []
  true)

Ouput for custom command when cursor is in baz function body:

(println ')
; Syntax error reading source at (REPL:1293:12).
; Unmatched delimiter: )

Functional Scenario (when no metadata is present)

(defn baz
  []
  true)

Ouput for custom command when cursor is in baz function body:

(println 'baz)
baz
nil

Calva version: v2.0.233

@sashton
Copy link
Contributor Author

sashton commented Jan 12, 2022

I'm working on a PR for this.

@PEZ
Copy link
Collaborator

PEZ commented Sep 5, 2022

I think this was fixed by #1466

@PEZ PEZ closed this as completed Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working developer ergonomics
Projects
None yet
Development

No branches or pull requests

3 participants