diff options
author | aktersnurra <grydholm@kth.se> | 2022-04-23 21:22:44 +0200 |
---|---|---|
committer | aktersnurra <grydholm@kth.se> | 2022-04-23 21:22:44 +0200 |
commit | 4ca15d0aa017119670ae454d69911e1ee0e55131 (patch) | |
tree | 7fd19c02017e74cbd3678706013ba9e25beb184e /fnl/config/ncomment.fnl | |
parent | 4932d32cae9a2a63226b67e6678d459b773f1f8b (diff) |
style: format
Diffstat (limited to 'fnl/config/ncomment.fnl')
-rw-r--r-- | fnl/config/ncomment.fnl | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fnl/config/ncomment.fnl b/fnl/config/ncomment.fnl index 3d0b1b6..2da59c6 100644 --- a/fnl/config/ncomment.fnl +++ b/fnl/config/ncomment.fnl @@ -1,23 +1,23 @@ ;; Language aware commenting. (module config.ncomment {autoload {util util}}) -(defn- get-type [ctx U] (or (and (= ctx.ctype U.ctype.line) :__default) - :__multiline)) +(defn- get-type [ctx U] + (or (and (= ctx.ctype U.ctype.line) :__default) :__multiline)) -(defn- get-location [ctx U] (if (= ctx.ctype U.ctype.block) - ((require :ts_context_commentstring.utils) .get_cursor_location) - (or (= ctx.motion U.motion.v) - (= ctx.motion U.cmotion.V)) - ((require :ts_context_commentstring.utils) .get_visual_start_location) - nil)) +(defn- get-location [ctx U] + (if (= ctx.ctype U.ctype.block) + ((require :ts_context_commentstring.utils).get_cursor_location) + (or (= ctx.cmotion U.motion.v) (= ctx.cmotion U.cmotion.V)) + ((require :ts_context_commentstring.utils).get_visual_start_location) + nil)) (defn- pre-hook [ctx] - (let [U (require :Comment.utils)] - ((require :ts_context_commentstring.internal).calculate_commentstring - {:key (get-type ctx U) - :location (get-location ctx - U)}))) + (let [U (require :Comment.utils)] + ((require :ts_context_commentstring.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))})) + (ncomment.setup + {:pre_hook (fn [ctx] + (pre-hook ctx))})) |