summaryrefslogtreecommitdiff
path: root/fnl/config/ncomment.fnl
diff options
context:
space:
mode:
authoraktersnurra <grydholm@kth.se>2022-04-30 18:42:38 +0200
committeraktersnurra <grydholm@kth.se>2022-04-30 18:42:38 +0200
commita07cea1de3f964da245874fb2f18969df6ef4ce6 (patch)
tree34649b5fceda79956dd8c3669c42dff92dc91131 /fnl/config/ncomment.fnl
parent383ee874e7e9ebf6126dd18abad14611de99e4c9 (diff)
fix: renmae ncomment
Diffstat (limited to 'fnl/config/ncomment.fnl')
-rw-r--r--fnl/config/ncomment.fnl28
1 files changed, 0 insertions, 28 deletions
diff --git a/fnl/config/ncomment.fnl b/fnl/config/ncomment.fnl
deleted file mode 100644
index e6a77d1..0000000
--- a/fnl/config/ncomment.fnl
+++ /dev/null
@@ -1,28 +0,0 @@
-;; Language aware commenting.
-(module config.ncomment
- {autoload {util util}})
-
-(defn- get-type [ctx U]
- (if (= ctx.ctype U.ctype.line)
- :__default
- :__multiline))
-
-(defn- get-location [ctx U]
- (let [utils (require :ts_context_commentstring.utils)]
- (if (= ctx.ctype U.ctype.block)
- (utils.get_cursor_location)
- (or (= ctx.cmotion U.cmotion.v) (= ctx.cmotion U.cmotion.V))
- (utils.get_visual_start_location)
- nil)))
-
-(defn- pre-hook [ctx]
- (let [U (require :Comment.utils)
- internal (require :ts_context_commentstring.internal)]
- (internal.calculate_commentstring
- {:key (get-type ctx U)
- :location (get-location ctx U)})))
-
-(let [ncomment (util.load-plugin :Comment)]
- (ncomment.setup
- {:pre_hook (fn [ctx]
- (pre-hook ctx))}))