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

Support custom user snippets during completion #403

Closed
ericdallo opened this issue Apr 9, 2021 · 0 comments
Closed

Support custom user snippets during completion #403

ericdallo opened this issue Apr 9, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@ericdallo
Copy link
Member

As discussed here we could add a new feature on clojure-lsp:

Support for snippets and custom user snippets used during completion.

  1. User could register via initializationOptions OR .lsp/config.edn a additional-snippets key/value:
{:additional-snippets [{:name "Wrap in let sexpr"
                        :snippet "(let [$1] $0$current-form)"}
                       {:name "Create private function"
                        :snippet "(defn ${1|^:private,-|} ${2:foo} [$3]\n  $0)"}]}
  1. clojure-lsp should parse the know variables like $current-form and replace by the current selected form finding it via row and column provided on completionContext when completing.
@ericdallo ericdallo added the enhancement New feature or request label Apr 9, 2021
@ericdallo ericdallo added this to Low priority in clojure-lsp via automation Apr 9, 2021
@ericdallo ericdallo self-assigned this Apr 12, 2021
@ericdallo ericdallo moved this from Low priority to In progress in clojure-lsp Apr 12, 2021
@ericdallo ericdallo moved this from In progress to Next release in clojure-lsp Apr 12, 2021
@ericdallo ericdallo moved this from Next release to Done in clojure-lsp Apr 13, 2021
clojure-lsp automation moved this from Done to Next release Apr 13, 2021
@ericdallo ericdallo moved this from Next release to Done in clojure-lsp Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant