Skip to content

Commit

Permalink
feat: Add deinitialize-interceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz committed Feb 28, 2024
1 parent 824ead3 commit 60be0a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/config.edn
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{:http-server {:port #empty-port []}

:interceptor {:includes [elin.interceptor.autocmd/ns-create-interceptor
:interceptor {:includes [elin.interceptor.autocmd/deinitialize-interceptor
elin.interceptor.autocmd/ns-create-interceptor
elin.interceptor.autocmd/skeleton-interceptor
elin.interceptor.autocmd/clj-kondo-analyzing-interceptor
elin.interceptor.connect/connected-interceptor
Expand Down
8 changes: 8 additions & 0 deletions src/elin/interceptor/autocmd.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
(def ^:priavte ns-created-var-name
"b:elin_ns_created")

(def deinitialize-interceptor
{:name ::deinitialize-interceptor
:kind e.c.interceptor/autocmd
:enter (-> (fn [{:component/keys [nrepl]}]
(e.p.nrepl/remove-all! nrepl))
(ix/when #(= "VimLeave" (:autocmd-type %)))
(ix/discard))})

(def ns-create-interceptor
{:name ::ns-create-interceptor
:kind e.c.interceptor/autocmd
Expand Down

0 comments on commit 60be0a3

Please sign in to comment.