diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-05-28 22:00:30 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-05-28 22:00:30 +0200 |
commit | fb69766f5701c3a579c619730bfa7cff3ce74623 (patch) | |
tree | 56d5a9e81ad51f4251fdb56cac8797c993c63373 /fnl/plugins | |
parent | 3f539d94dfb004f56b0382971500408e49c4245b (diff) |
Replace comment with ts-comments
Diffstat (limited to 'fnl/plugins')
-rw-r--r-- | fnl/plugins/comment.fnl | 35 | ||||
-rw-r--r-- | fnl/plugins/ts-comments.fnl | 3 |
2 files changed, 3 insertions, 35 deletions
diff --git a/fnl/plugins/comment.fnl b/fnl/plugins/comment.fnl deleted file mode 100644 index 66abb33..0000000 --- a/fnl/plugins/comment.fnl +++ /dev/null @@ -1,35 +0,0 @@ -;; Language aware commenting. - -(local opts {:toggler {;; Line-comment toggle keymap - :line :mcc - ;; Block-comment toggle keymap - :block :mbc} - ;; LHS of operator-pending mappings in NORMAL and VISUAL mode - :opleader {;; Line-comment keymap - :line :mc - ;; Block-comment keymap - :block :mb} - ;; LHS of extra mappings - :extra {;; Add comment on the line above - :above :mcO - ;; Add comment on the line below - :below :mco - ;; Add comment at the end of line - :eol :mcA}}) - -(local user-cmds [[:CommentNormal - (lambda [] - (let [comment-api (require :Comment.api)] - (comment-api.toggle.linewise.current))) - {:nargs 0}] - [:CommentVisual - (lambda [] - (let [comment-api (require :Comment.api)] - (comment-api.toggle.linewise (vim.fn.visualmode)))) - {:nargs 0}]]) - -(fn init [] - (let [cmds (require :util.cmds)] - (cmds.create-user-cmds user-cmds))) - -{1 :numToStr/Comment.nvim :event :BufReadPost : inti : opts} diff --git a/fnl/plugins/ts-comments.fnl b/fnl/plugins/ts-comments.fnl new file mode 100644 index 0000000..d8ce85a --- /dev/null +++ b/fnl/plugins/ts-comments.fnl @@ -0,0 +1,3 @@ +;; Enhance comments with treesitter. + +{1 :folke/ts-comments.nvim :opts {} :event [:BufReadPost :BufNewFile]} |