Fix golang.kak highlighting hooks

This commit is contained in:
Maxime Coste 2016-10-01 13:44:18 +01:00
parent e65aa4a6de
commit 6e17ecfb6e

View File

@ -84,9 +84,9 @@ def -hidden _golang-indent-on-closing-curly-brace %[
# Initialization # Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
hook global WinSetOption filetype=golang %{ hook -group golang-highlight global WinSetOption filetype=golang %{ addhl ref golang }
addhl ref golang
hook global WinSetOption filetype=golang %{
# cleanup trailing whitespaces when exiting insert mode # cleanup trailing whitespaces when exiting insert mode
hook window InsertEnd .* -group golang-hooks %{ try %{ exec -draft <a-x>s^\h+$<ret>d } } hook window InsertEnd .* -group golang-hooks %{ try %{ exec -draft <a-x>s^\h+$<ret>d } }
hook window InsertChar \n -group golang-indent _golang-indent-on-new-line hook window InsertChar \n -group golang-indent _golang-indent-on-new-line
@ -96,7 +96,7 @@ hook global WinSetOption filetype=golang %{
set window formatcmd "gofmt" set window formatcmd "gofmt"
} }
hool -group golang-highlight global WinSetOption filetype=(?!golang).* %{ rmhl golang } hook -group golang-highlight global WinSetOption filetype=(?!golang).* %{ rmhl golang }
hook global WinSetOption filetype=(?!golang).* %{ hook global WinSetOption filetype=(?!golang).* %{
rmhooks window golang-hooks rmhooks window golang-hooks