Mercurial > dotfiles
comparison .chezmoitemplates/init.lua @ 497:852acbe7ae8e
Use Comment.nvim for more control when commenting
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sat, 04 Dec 2021 11:50:49 +0100 |
parents | 8524c1a304a6 |
children | 568791ef3a16 |
comparison
equal
deleted
inserted
replaced
496:8524c1a304a6 | 497:852acbe7ae8e |
---|---|
75 } | 75 } |
76 use { 'tpope/vim-git', ft = { 'gitcommit', 'gitrebase' } } | 76 use { 'tpope/vim-git', ft = { 'gitcommit', 'gitrebase' } } |
77 | 77 |
78 -- Comments | 78 -- Comments |
79 use { | 79 use { |
80 'b3nj5m1n/kommentary', | 80 'numToStr/Comment.nvim', |
81 config = function() | 81 config = function() |
82 local config = require 'kommentary.config' | 82 local ft = require 'Comment.ft' |
83 config.configure_language('default', { prefer_single_line_comments = true }) | 83 ft.systemverilog = { '//%s', '/*%s*/' } |
84 config.configure_language( | 84 ft.verilog = { '//%s', '/*%s*/' } |
85 { 'systemverilog', 'verilog' }, | 85 |
86 { single_line_comment_string = '//', multi_line_comment_strings = { '/*', '*/' } } | 86 require('Comment').setup { |
87 ) | 87 padding = true, |
88 sticky = true, | |
89 ignore = '^(%s*)$', | |
90 } | |
88 end, | 91 end, |
89 keys = { | 92 keys = { |
90 { 'n', 'gcc' }, | 93 { 'n', 'gc' }, |
94 { 'n', 'gb' }, | |
91 { 'v', 'gc' }, | 95 { 'v', 'gc' }, |
96 { 'v', 'gb' }, | |
92 }, | 97 }, |
93 } | 98 } |
94 | 99 |
95 -- Undoing | 100 -- Undoing |
96 use { 'sjl/gundo.vim', cmd = { 'GundoToggle' } } | 101 use { 'sjl/gundo.vim', cmd = { 'GundoToggle' } } |