diff --git a/rc/filetype/go.kak b/rc/filetype/go.kak index c32346a9..416e38ff 100644 --- a/rc/filetype/go.kak +++ b/rc/filetype/go.kak @@ -21,8 +21,8 @@ hook global WinSetOption filetype=go %{ hook window InsertChar \n -group go-indent go-indent-on-new-line hook window InsertChar \{ -group go-indent go-indent-on-opening-curly-brace hook window InsertChar \} -group go-indent go-indent-on-closing-curly-brace - hook window InsertChar \n -group go-insert go-insert-on-new-line - hook window InsertChar \n -group go-insert-closing-delimiter go-insert-closing-delimiter-on-new-line + hook window InsertChar \n -group go-comment-insert go-insert-comment-on-new-line + hook window InsertChar \n -group go-closing-delimiter-insert go-insert-closing-delimiter-on-new-line alias window alt go-alternative-file @@ -131,7 +131,7 @@ define-command -hidden go-indent-on-closing-curly-brace %[ try %[ execute-keys -itersel -draft ^\h+\}$hms\A|.\z1 ] ] -define-command -hidden go-insert-on-new-line %[ +define-command -hidden go-insert-comment-on-new-line %[ evaluate-commands -no-hooks -draft -itersel %[ # copy // comments prefix and following white spaces try %{ execute-keys -draft k s ^\h*\K/{2,}\h* yP } diff --git a/test/indent/go/insert-comment/rc b/test/indent/go/insert-comment/rc index 6e3ca7fd..3bfd2b64 100644 --- a/test/indent/go/insert-comment/rc +++ b/test/indent/go/insert-comment/rc @@ -1,4 +1,4 @@ source "%val{runtime}/colors/default.kak" source "%val{runtime}/rc/filetype/go.kak" set buffer filetype go -set-option global disabled_hooks go-insert-closing-delimiter +set-option global disabled_hooks go-closing-delimiter-insert