diff --git a/rc/base/golang.kak b/rc/base/go.kak similarity index 61% rename from rc/base/golang.kak rename to rc/base/go.kak index 5ffe02dc..bbb83092 100644 --- a/rc/base/golang.kak +++ b/rc/base/go.kak @@ -6,25 +6,25 @@ hook global BufCreate .*\.go %{ set buffer mimetype "" - set buffer filetype golang + set buffer filetype go } # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code golang \ +addhl -group / regions -default code go \ back_string '`' '`' '' \ double_string '"' (? } @@ -71,12 +71,12 @@ def -hidden _golang-indent-on-new-line %~ = ~ -def -hidden _golang-indent-on-opening-curly-brace %[ +def -hidden _go-indent-on-opening-curly-brace %[ # align indent with opening paren when { is entered on a new line after the closing paren try %[ exec -draft -itersel h)M \`\(.*\)\h*\n\h*\{\' s \`|.\' 1 ] ] -def -hidden _golang-indent-on-closing-curly-brace %[ +def -hidden _go-indent-on-closing-curly-brace %[ # align to opening curly brace when alone on a line try %[ exec -itersel -draft ^\h+\}$hms\`|.\'1 ] ] @@ -84,21 +84,21 @@ def -hidden _golang-indent-on-closing-curly-brace %[ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group golang-highlight global WinSetOption filetype=golang %{ addhl ref golang } +hook -group go-highlight global WinSetOption filetype=go %{ addhl ref go } -hook global WinSetOption filetype=golang %{ +hook global WinSetOption filetype=go %{ # cleanup trailing whitespaces when exiting insert mode - hook window InsertEnd .* -group golang-hooks %{ try %{ exec -draft s^\h+$d } } - hook window InsertChar \n -group golang-indent _golang-indent-on-new-line - hook window InsertChar \{ -group golang-indent _golang-indent-on-opening-curly-brace - hook window InsertChar \} -group golang-indent _golang-indent-on-closing-curly-brace + hook window InsertEnd .* -group go-hooks %{ try %{ exec -draft s^\h+$d } } + 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 set window formatcmd "gofmt" } -hook -group golang-highlight global WinSetOption filetype=(?!golang).* %{ rmhl golang } +hook -group go-highlight global WinSetOption filetype=(?!go).* %{ rmhl go } -hook global WinSetOption filetype=(?!golang).* %{ - rmhooks window golang-hooks - rmhooks window golang-indent +hook global WinSetOption filetype=(?!go).* %{ + rmhooks window go-hooks + rmhooks window go-indent } diff --git a/rc/base/markdown.kak b/rc/base/markdown.kak index d5e1a9b0..bdc1ba06 100644 --- a/rc/base/markdown.kak +++ b/rc/base/markdown.kak @@ -28,7 +28,7 @@ addhl -group / regions -default content markdown \ dockerfile ```dockerfile ``` '' \ fish ```fish ``` '' \ gas ```gas ``` '' \ - golang ```golang ``` '' \ + go ```go ``` '' \ haml ```haml ``` '' \ haskell ```haskell ``` '' \ html ```html ``` '' \ @@ -76,7 +76,7 @@ addhl -group /markdown/dlang ref dlang addhl -group /markdown/dockerfile ref dockerfile addhl -group /markdown/fish ref fish addhl -group /markdown/gas ref gas -addhl -group /markdown/golang ref golang +addhl -group /markdown/go ref go addhl -group /markdown/haml ref haml addhl -group /markdown/haskell ref haskell addhl -group /markdown/html ref html