Update remaining files to new provide/require format
This commit is contained in:
parent
c2b32ebaa7
commit
6512eafa60
|
@ -8,10 +8,26 @@ hook global BufCreate .*[.](cabal) %{
|
|||
set-option buffer filetype cabal
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=cabal %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=cabal %[
|
||||
require-module cabal
|
||||
|
||||
hook window ModeChange insert:.* -group cabal-trim-indent cabal-trim-indent
|
||||
hook window InsertChar \n -group cabal-indent cabal-indent-on-new-line
|
||||
hook window InsertChar \{ -group cabal-indent cabal-indent-on-opening-curly-brace
|
||||
hook window InsertChar \} -group cabal-indent cabal-indent-on-closing-curly-brace
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window cabal-.+ }
|
||||
]
|
||||
|
||||
hook -group cabal-highlight global WinSetOption filetype=cabal %{
|
||||
add-highlighter window/cabal ref cabal
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cabal }
|
||||
}
|
||||
|
||||
|
||||
provide-module cabal %[
|
||||
|
||||
# Highlighters
|
||||
|
@ -61,22 +77,4 @@ define-command -hidden cabal-indent-on-closing-curly-brace %[
|
|||
]
|
||||
]
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group cabal-highlight global WinSetOption filetype=cabal %{
|
||||
add-highlighter window/cabal ref cabal
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cabal }
|
||||
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=cabal %[
|
||||
hook window ModeChange insert:.* -group cabal-trim-indent cabal-trim-indent
|
||||
hook window InsertChar \n -group cabal-indent cabal-indent-on-new-line
|
||||
hook window InsertChar \{ -group cabal-indent cabal-indent-on-opening-curly-brace
|
||||
hook window InsertChar \} -group cabal-indent cabal-indent-on-closing-curly-brace
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window cabal-.+ }
|
||||
]
|
||||
|
||||
]
|
||||
|
|
|
@ -6,10 +6,15 @@ hook global BufCreate .*/CMakeCache.txt %{
|
|||
set-option buffer filetype ini
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=cmake %{
|
||||
hook global WinSetOption filetype=cmake %{
|
||||
require-module cmake
|
||||
}
|
||||
|
||||
hook -group cmake-highlight global WinSetOption filetype=cmake %{
|
||||
add-highlighter window/cmake ref cmake
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cmake }
|
||||
}
|
||||
|
||||
provide-module cmake %{
|
||||
|
||||
add-highlighter shared/cmake regions
|
||||
|
@ -27,9 +32,4 @@ add-highlighter shared/cmake/argument/quoted/ fill string
|
|||
add-highlighter shared/cmake/argument/quoted/ regex '\$\{\w+\}' 0:variable
|
||||
add-highlighter shared/cmake/argument/quoted/ regex '\w+\h*(?=\()' 0:function
|
||||
|
||||
hook -group cmake-highlight global WinSetOption filetype=cmake %{
|
||||
add-highlighter window/cmake ref cmake
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cmake }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,10 +8,24 @@ hook global BufCreate .*[.](coffee) %{
|
|||
set-option buffer filetype coffee
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=coffee %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=coffee %{
|
||||
require-module coffee
|
||||
|
||||
hook window ModeChange insert:.* -group coffee-trim-indent coffee-trim-indent
|
||||
hook window InsertChar \n -group coffee-indent coffee-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window coffee-.+ }
|
||||
}
|
||||
|
||||
hook -group coffee-highlight global WinSetOption filetype=coffee %{
|
||||
add-highlighter window/coffee ref coffee
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/coffee }
|
||||
}
|
||||
|
||||
|
||||
provide-module coffee %[
|
||||
|
||||
# Highlighters
|
||||
|
@ -69,19 +83,4 @@ define-command -hidden coffee-indent-on-new-line %{
|
|||
}
|
||||
}
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group coffee-highlight global WinSetOption filetype=coffee %{
|
||||
add-highlighter window/coffee ref coffee
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/coffee }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=coffee %{
|
||||
hook window ModeChange insert:.* -group coffee-trim-indent coffee-trim-indent
|
||||
hook window InsertChar \n -group coffee-indent coffee-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window coffee-.+ }
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
@ -8,10 +8,24 @@ hook global BufCreate .*[.](feature|story) %{
|
|||
set-option buffer filetype cucumber
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=cucumber %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=cucumber %{
|
||||
require-module cucumber
|
||||
|
||||
hook window ModeChange insert:.* -group cucumber-trim-indent cucumber-trim-indent
|
||||
hook window InsertChar \n -group cucumber-indent cucumber-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window cucumber-.+ }
|
||||
}
|
||||
|
||||
hook -group cucumber-highlight global WinSetOption filetype=cucumber %{
|
||||
add-highlighter window/cucumber ref cucumber
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cucumber }
|
||||
}
|
||||
|
||||
|
||||
provide-module cucumber %{
|
||||
|
||||
# Highlighters
|
||||
|
@ -79,19 +93,4 @@ define-command -hidden cucumber-indent-on-new-line %{
|
|||
}
|
||||
}
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group cucumber-highlight global WinSetOption filetype=cucumber %{
|
||||
add-highlighter window/cucumber ref cucumber
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cucumber }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=cucumber %{
|
||||
hook window ModeChange insert:.* -group cucumber-trim-indent cucumber-trim-indent
|
||||
hook window InsertChar \n -group cucumber-indent cucumber-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window cucumber-.+ }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,8 +8,21 @@ hook global BufCreate .*[.](elm) %{
|
|||
set-option buffer filetype elm
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=elm %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=elm %{
|
||||
require-module elm
|
||||
|
||||
hook window ModeChange insert:.* -group elm-trim-indent elm-trim-indent
|
||||
hook window InsertChar \n -group elm-indent elm-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window elm-.+ }
|
||||
}
|
||||
|
||||
hook -group elm-highlight global WinSetOption filetype=elm %{
|
||||
add-highlighter window/elm ref elm
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/elm }
|
||||
}
|
||||
|
||||
provide-module elm %[
|
||||
|
@ -57,19 +70,4 @@ define-command -hidden elm-indent-on-new-line %{
|
|||
}
|
||||
}
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group elm-highlight global WinSetOption filetype=elm %{
|
||||
add-highlighter window/elm ref elm
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/elm }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=elm %{
|
||||
hook window ModeChange insert:.* -group elm-trim-indent elm-trim-indent
|
||||
hook window InsertChar \n -group elm-indent elm-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window elm-.+ }
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
@ -25,16 +25,23 @@ hook global BufCreate .*/etc/paludis(-.*)?/repository_defaults\.conf
|
|||
hook global BufCreate .*/etc/paludis(-.*)?/specpath\.conf %{ set-option buffer filetype paludis-key-value-conf }
|
||||
hook global BufCreate .*/etc/paludis(-.*)?/suggestions(\.conf.d/.*.conf|\.conf) %{ set-option buffer filetype paludis-specs-conf }
|
||||
|
||||
hook -once global BufSetOption filetype=exheres-0-(licence-groups|metadata) %{
|
||||
hook global WinSetOption filetype=exheres-0-(metadata|options-descriptions|licence-groups) %{
|
||||
require-module exheres
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=paludis-(key-value|options|mirrors|specs)-conf %{
|
||||
require-module paludis
|
||||
hook -group exheres-0-metadata-highlight global WinSetOption filetype=exheres-0-metadata %{
|
||||
add-highlighter window/exheres-0-metadata ref exheres-0-metadata
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/exheres-0-metadata }
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=glep42 %{
|
||||
require-module glep42
|
||||
hook -group exheres-0-options-descriptions-highlight global WinSetOption filetype=exheres-0-options-descriptions %{
|
||||
add-highlighter window/exheres-0-options-descriptions ref exheres-0-options-descriptions
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/exheres-0-options-descriptions }
|
||||
}
|
||||
|
||||
hook -group exheres-0-licence-groups-highlight global WinSetOption filetype=exheres-0-licence-groups %{
|
||||
add-highlighter window/exheres-0-licence-groups ref exheres-0-licence-groups
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/exheres-0-licence-groups }
|
||||
}
|
||||
|
||||
provide-module exheres %{
|
||||
|
@ -47,11 +54,6 @@ add-highlighter shared/exheres-0-metadata/ regex ^(?:[\s\t]+)?[\S]+[\s\t]+=[\s\t
|
|||
add-highlighter shared/exheres-0-metadata/ regex ^(?:[\s\t]+)?(\S+)\s\[\[$ 0:type
|
||||
add-highlighter shared/exheres-0-metadata/ regex ^(?:[\s\t]+)?\]\]$ 0:type
|
||||
|
||||
hook -group exheres-0-metadata-highlight global WinSetOption filetype=exheres-0-metadata %{
|
||||
add-highlighter window/exheres-0-metadata ref exheres-0-metadata
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/exheres-0-metadata }
|
||||
}
|
||||
|
||||
## exheres-0 options descriptions
|
||||
add-highlighter shared/exheres-0-options-descriptions group
|
||||
add-highlighter shared/exheres-0-options-descriptions/ regex ^#.*?$ 0:comment
|
||||
|
@ -59,23 +61,36 @@ add-highlighter shared/exheres-0-options-descriptions/ regex ^(?:[\s\t]+)?[\S]+[
|
|||
add-highlighter shared/exheres-0-options-descriptions/ regex ^(?:[\s\t]+)?(\S+)\s\[\[$ 0:type
|
||||
add-highlighter shared/exheres-0-options-descriptions/ regex ^(?:[\s\t]+)?\]\]$ 0:type
|
||||
|
||||
hook -group exheres-0-options-descriptions-highlight global WinSetOption filetype=exheres-0-options-descriptions %{
|
||||
add-highlighter window/exheres-0-options-descriptions ref exheres-0-options-descriptions
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/exheres-0-options-descriptions }
|
||||
}
|
||||
|
||||
## metadata/licence_groups.conf
|
||||
add-highlighter shared/exheres-0-licence-groups group
|
||||
add-highlighter shared/exheres-0-licence-groups/ regex [\s\t]+(\S+(?:[\s\t]+))*$ 0:attribute
|
||||
add-highlighter shared/exheres-0-licence-groups/ regex ^(\S+) 0:type
|
||||
add-highlighter shared/exheres-0-licence-groups/ regex ^#.*?$ 0:comment
|
||||
|
||||
hook -group exheres-0-licence-groups-highlight global WinSetOption filetype=exheres-0-licence-groups %{
|
||||
add-highlighter window/exheres-0-licence-groups ref exheres-0-licence-groups
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/exheres-0-licence-groups }
|
||||
}
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=paludis-(key-value|options|mirrors|specs)-conf %{
|
||||
require-module paludis
|
||||
}
|
||||
|
||||
hook -group paludis-options-conf-highlight global WinSetOption filetype=paludis-options-conf %{
|
||||
add-highlighter window/paludis-options-conf ref paludis-options-conf
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-options-conf }
|
||||
}
|
||||
|
||||
hook -group paludis-key-value-conf-highlight global WinSetOption filetype=paludis-key-value-conf %{
|
||||
add-highlighter window/paludis-key-value-conf ref paludis-key-value-conf
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-key-value-conf }
|
||||
}
|
||||
|
||||
hook -group paludis-mirrors-conf-highlight global WinSetOption filetype=paludis-mirrors-conf %{
|
||||
add-highlighter window/paludis-mirrors-conf ref paludis-mirrors-conf
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-mirrors-conf }
|
||||
}
|
||||
|
||||
hook -group paludis-specs-conf-highlight global WinSetOption filetype=paludis-specs-conf %{
|
||||
add-highlighter window/paludis-specs-conf ref paludis-specs-conf
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-specs-conf }
|
||||
}
|
||||
provide-module paludis %{
|
||||
## Paludis configurations
|
||||
### options.conf
|
||||
|
@ -88,41 +103,30 @@ add-highlighter shared/paludis-options-conf/ regex [\s\t](-\S+)(.*?) 1:red
|
|||
add-highlighter shared/paludis-options-conf/ regex ^(\S+/\S+) 0:type
|
||||
add-highlighter shared/paludis-options-conf/ regex ^#.*?$ 0:comment
|
||||
|
||||
hook -group paludis-options-conf-highlight global WinSetOption filetype=paludis-options-conf %{
|
||||
add-highlighter window/paludis-options-conf ref paludis-options-conf
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-options-conf }
|
||||
}
|
||||
|
||||
## general.conf, repository.template
|
||||
add-highlighter shared/paludis-key-value-conf group
|
||||
add-highlighter shared/paludis-key-value-conf/ regex ^[\s\t]?(\S+)[\s\t+]=[\s\t+](.*?)$ 1:attribute 2:value
|
||||
add-highlighter shared/paludis-key-value-conf/ regex ^#.*?$ 0:comment
|
||||
|
||||
hook -group paludis-key-value-conf-highlight global WinSetOption filetype=paludis-key-value-conf %{
|
||||
add-highlighter window/paludis-key-value-conf ref paludis-key-value-conf
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-key-value-conf }
|
||||
}
|
||||
|
||||
## mirrors.conf
|
||||
add-highlighter shared/paludis-mirrors-conf group
|
||||
add-highlighter shared/paludis-mirrors-conf/ regex ^[\s\t+]?(\S+)[\s\t+](.*?)$ 1:type 2:value
|
||||
add-highlighter shared/paludis-mirrors-conf/ regex ^#.*?$ 0:comment
|
||||
|
||||
hook -group paludis-mirrors-conf-highlight global WinSetOption filetype=paludis-mirrors-conf %{
|
||||
add-highlighter window/paludis-mirrors-conf ref paludis-mirrors-conf
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-mirrors-conf }
|
||||
}
|
||||
|
||||
## package_(unmask|mask).conf, platforms.conf
|
||||
add-highlighter shared/paludis-specs-conf group
|
||||
add-highlighter shared/paludis-specs-conf/ regex [\s\t]+(\S+(?:[\s\t]+))*$ 0:attribute
|
||||
add-highlighter shared/paludis-specs-conf/ regex ^(\S+/\S+) 0:type
|
||||
add-highlighter shared/paludis-specs-conf/ regex ^#.*?$ 0:comment
|
||||
|
||||
hook -group paludis-specs-conf-highlight global WinSetOption filetype=paludis-specs-conf %{
|
||||
add-highlighter window/paludis-specs-conf ref paludis-specs-conf
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-specs-conf }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=glep42 %{
|
||||
require-module glep42
|
||||
}
|
||||
|
||||
hook -group glep42-highlight global WinSetOption filetype=glep42 %{
|
||||
add-highlighter window/glep42 ref glep42
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/glep42 }
|
||||
}
|
||||
|
||||
provide-module glep42 %{
|
||||
|
@ -131,9 +135,4 @@ add-highlighter shared/glep42 group
|
|||
add-highlighter shared/glep42/ regex ^(Title|Author|Translator|Content-Type|Posted|Revision|News-Item-Format|Display-If-Installed|Display-If-Keyword|Display-If-Profile):([^\n]*(?:\n\h+[^\n]+)*)$ 1:keyword 2:attribute
|
||||
add-highlighter shared/glep42/ regex <[^@>]+@.*?> 0:string
|
||||
add-highlighter shared/glep42/ regex ^>.*?$ 0:comment
|
||||
|
||||
hook -group glep42-highlight global WinSetOption filetype=glep42 %{
|
||||
add-highlighter window/glep42 ref glep42
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/glep42 }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,10 +4,19 @@ hook global BufCreate .*\.(s|S|asm)$ %{
|
|||
set-option buffer filetype gas
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=gas %{
|
||||
hook global WinSetOption filetype=gas %{
|
||||
require-module gas
|
||||
|
||||
hook window InsertChar \n -group gas-indent gas-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window gas-.+ }
|
||||
}
|
||||
|
||||
hook -group gas-highlight global WinSetOption filetype=gas %{
|
||||
add-highlighter window/gas ref gas
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/gas }
|
||||
}
|
||||
|
||||
|
||||
provide-module gas %{
|
||||
|
||||
add-highlighter shared/gas regions
|
||||
|
@ -86,14 +95,4 @@ define-command -hidden gas-indent-on-new-line %~
|
|||
>
|
||||
~
|
||||
|
||||
hook -group gas-highlight global WinSetOption filetype=gas %{
|
||||
add-highlighter window/gas ref gas
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/gas }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=gas %{
|
||||
hook window InsertChar \n -group gas-indent gas-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window gas-.+ }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,10 +8,24 @@ hook global BufCreate .*[.](haml) %{
|
|||
set-option buffer filetype haml
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=haml %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=haml %{
|
||||
require-module haml
|
||||
|
||||
hook window ModeChange insert:.* -group haml-trim-indent haml-trim-indent
|
||||
hook window InsertChar \n -group haml-indent haml-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window haml-.+ }
|
||||
}
|
||||
|
||||
hook -group haml-highlight global WinSetOption filetype=haml %{
|
||||
add-highlighter window/haml ref haml
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/haml }
|
||||
}
|
||||
|
||||
|
||||
provide-module haml %[
|
||||
require-module ruby
|
||||
require-module coffee
|
||||
|
@ -55,19 +69,4 @@ define-command -hidden haml-indent-on-new-line %{
|
|||
}
|
||||
}
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group haml-highlight global WinSetOption filetype=haml %{
|
||||
add-highlighter window/haml ref haml
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/haml }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=haml %{
|
||||
hook window ModeChange insert:.* -group haml-trim-indent haml-trim-indent
|
||||
hook window InsertChar \n -group haml-indent haml-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window haml-.+ }
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
@ -8,10 +8,25 @@ hook global BufCreate .*[.](hbs) %{
|
|||
set-option buffer filetype hbs
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=hbs %{
|
||||
hook global WinSetOption filetype=hbs %{
|
||||
require-module hbs
|
||||
|
||||
hook window ModeChange insert:.* -group hbs-trim-indent hbs-trim-indent
|
||||
hook window InsertChar \n -group hbs-indent hbs-indent-on-new-line
|
||||
hook window InsertChar .* -group hbs-indent hbs-indent-on-char
|
||||
hook window InsertChar '>' -group hbs-indent html-indent-on-greater-than
|
||||
hook window InsertChar \n -group hbs-indent html-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window hbs-.+ }
|
||||
}
|
||||
|
||||
hook -group hbs-highlight global WinSetOption filetype=hbs %{
|
||||
maybe-add-hbs-to-html
|
||||
add-highlighter window/hbs-file ref hbs-file
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/hbs-file }
|
||||
}
|
||||
|
||||
|
||||
provide-module hbs %[
|
||||
|
||||
# Highlighters
|
||||
|
@ -86,20 +101,4 @@ define-command -hidden maybe-add-hbs-to-html %{ evaluate-commands %sh{
|
|||
fi
|
||||
} }
|
||||
|
||||
hook -group hbs-highlight global WinSetOption filetype=hbs %{
|
||||
maybe-add-hbs-to-html
|
||||
add-highlighter window/hbs-file ref hbs-file
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/hbs-file }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=hbs %{
|
||||
hook window ModeChange insert:.* -group hbs-trim-indent hbs-trim-indent
|
||||
hook window InsertChar \n -group hbs-indent hbs-indent-on-new-line
|
||||
hook window InsertChar .* -group hbs-indent hbs-indent-on-char
|
||||
hook window InsertChar '>' -group hbs-indent html-indent-on-greater-than
|
||||
hook window InsertChar \n -group hbs-indent html-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window hbs-.+ }
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
@ -2,11 +2,27 @@ hook global BufCreate .*(sway|i3)/config %{
|
|||
set buffer filetype i3
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=i3 %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=i3 %[
|
||||
require-module i3
|
||||
|
||||
# cleanup trailing whitespaces when exiting insert mode
|
||||
hook window ModeChange insert:.* -group i3-trim-indent %{ try %{ execute-keys -draft <a-x>s^\h+$<ret>d } }
|
||||
hook window InsertChar \n -group i3-indent i3-indent-on-new-line
|
||||
hook window InsertChar \} -group i3-indent i3-indent-on-closing-curly-brace
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window i3-.+ }
|
||||
]
|
||||
|
||||
hook -group i3-highlight global WinSetOption filetype=i3 %{
|
||||
add-highlighter window/i3 ref i3
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/i3 }
|
||||
}
|
||||
|
||||
provide-module i3 %{
|
||||
|
||||
provide-module i3 %[
|
||||
|
||||
add-highlighter shared/i3 regions
|
||||
add-highlighter shared/i3/code default-region group
|
||||
|
@ -69,21 +85,4 @@ define-command -hidden i3-indent-on-closing-curly-brace %[
|
|||
try %[ execute-keys -itersel -draft <a-h><a-k>^\h+\}$<ret>hms\A|.\z<ret>1<a-&> ]
|
||||
]
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group i3-highlight global WinSetOption filetype=i3 %{
|
||||
add-highlighter window/i3 ref i3
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/i3 }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=i3 %[
|
||||
# cleanup trailing whitespaces when exiting insert mode
|
||||
hook window ModeChange insert:.* -group i3-trim-indent %{ try %{ execute-keys -draft <a-x>s^\h+$<ret>d } }
|
||||
hook window InsertChar \n -group i3-indent i3-indent-on-new-line
|
||||
hook window InsertChar \} -group i3-indent i3-indent-on-closing-curly-brace
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window i3-.+ }
|
||||
]
|
||||
|
||||
}
|
||||
|
|
|
@ -2,10 +2,16 @@ hook global BufCreate .+\.(repo|ini|cfg|properties) %{
|
|||
set-option buffer filetype ini
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=ini %{
|
||||
hook global WinSetOption filetype=ini %{
|
||||
require-module ini
|
||||
}
|
||||
|
||||
hook -group ini-highlight global WinSetOption filetype=ini %{
|
||||
add-highlighter window/ini ref ini
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/ini }
|
||||
}
|
||||
|
||||
|
||||
provide-module ini %{
|
||||
|
||||
add-highlighter shared/ini regions
|
||||
|
@ -15,9 +21,4 @@ add-highlighter shared/ini/comment region '(^|\h)\K[#;]' $ fill comment
|
|||
add-highlighter shared/ini/code/ regex "^\h*\[[^\]]*\]" 0:title
|
||||
add-highlighter shared/ini/code/ regex "^\h*([^\[][^=\n]*)=([^\n]*)" 1:variable 2:value
|
||||
|
||||
hook -group ini-highlight global WinSetOption filetype=ini %{
|
||||
add-highlighter window/ini ref ini
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/ini }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,10 +2,27 @@ hook global BufCreate .*\.java %{
|
|||
set-option buffer filetype java
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=java %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=java %{
|
||||
require-module java
|
||||
|
||||
# cleanup trailing whitespaces when exiting insert mode
|
||||
hook window ModeChange insert:.* -group java-trim-indent %{ try %{ execute-keys -draft <a-x>s^\h+$<ret>d } }
|
||||
hook window InsertChar \n -group java-indent java-indent-on-new-line
|
||||
hook window InsertChar \{ -group java-indent java-indent-on-opening-curly-brace
|
||||
hook window InsertChar \} -group java-indent java-indent-on-closing-curly-brace
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window java-.+ }
|
||||
}
|
||||
|
||||
hook -group java-highlight global WinSetOption filetype=java %{
|
||||
add-highlighter window/java ref java
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/java }
|
||||
}
|
||||
|
||||
|
||||
provide-module java %🦀
|
||||
|
||||
add-highlighter shared/java regions
|
||||
|
@ -52,22 +69,4 @@ define-command -hidden java-indent-on-closing-curly-brace %[
|
|||
try %[ execute-keys -itersel -draft <a-h><a-k>^\h+\}$<ret>hms\A|.\z<ret>1<a-&> ]
|
||||
]
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group java-highlight global WinSetOption filetype=java %{
|
||||
add-highlighter window/java ref java
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/java }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=java %{
|
||||
# cleanup trailing whitespaces when exiting insert mode
|
||||
hook window ModeChange insert:.* -group java-trim-indent %{ try %{ execute-keys -draft <a-x>s^\h+$<ret>d } }
|
||||
hook window InsertChar \n -group java-indent java-indent-on-new-line
|
||||
hook window InsertChar \{ -group java-indent java-indent-on-opening-curly-brace
|
||||
hook window InsertChar \} -group java-indent java-indent-on-closing-curly-brace
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window java-.+ }
|
||||
}
|
||||
|
||||
🦀
|
||||
|
|
|
@ -8,10 +8,19 @@ hook global BufCreate .*\.(jl) %{
|
|||
set-option buffer filetype julia
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=julia %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=julia %{
|
||||
require-module julia
|
||||
}
|
||||
|
||||
hook -group julia-highlight global WinSetOption filetype=julia %{
|
||||
add-highlighter window/julia ref julia
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/julia }
|
||||
}
|
||||
|
||||
|
||||
provide-module julia %{
|
||||
|
||||
# Highlighters
|
||||
|
@ -27,12 +36,4 @@ add-highlighter shared/julia/code/ regex %{\b(true|false|C_NULL|Inf|NaN|Inf32|Na
|
|||
add-highlighter shared/julia/code/ regex \b(if|else|elseif|while|for|begin|end|quote|try|catch|return|local|abstract|function|macro|ccall|finally|typealias|break|continue|type|global|module|using|import|export|const|let|bitstype|do|in|baremodule|importall|immutable)\b 0:keyword
|
||||
add-highlighter shared/julia/code/ regex \b(Number|Real|BigInt|Integer|UInt|UInt8|UInt16|UInt32|UInt64|UInt128|Int|Int8|Int16|Int32|Int64|Int128|BigFloat|FloatingPoint|Float16|Float32|Float64|Complex128|Complex64|Bool|Cuchar|Cshort|Cushort|Cint|Cuint|Clonglong|Culonglong|Cintmax_t|Cuintmax_t|Cfloat|Cdouble|Cptrdiff_t|Cssize_t|Csize_t|Cchar|Clong|Culong|Cwchar_t|Char|ASCIIString|UTF8String|ByteString|SubString|AbstractString|Array|DArray|AbstractArray|AbstractVector|AbstractMatrix|AbstractSparseMatrix|SubArray|StridedArray|StridedVector|StridedMatrix|VecOrMat|StridedVecOrMat|DenseArray|SparseMatrixCSC|BitArray|Range|OrdinalRange|StepRange|UnitRange|FloatRange|Tuple|NTuple|Vararg|DataType|Symbol|Function|Vector|Matrix|Union|Type|Any|Complex|String|Ptr|Void|Exception|Task|Signed|Unsigned|Associative|Dict|IO|IOStream|Rational|Regex|RegexMatch|Set|IntSet|Expr|WeakRef|ObjectIdDict|AbstractRNG|MersenneTwister)\b 0:type
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group julia-highlight global WinSetOption filetype=julia %{
|
||||
add-highlighter window/julia ref julia
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/julia }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,10 +5,19 @@ hook global BufCreate .*/?[jJ]ustfile %{
|
|||
set-option buffer filetype justfile
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=justfile %{
|
||||
hook global WinSetOption filetype=justfile %{
|
||||
require-module justfile
|
||||
|
||||
hook window InsertChar \n -group justfile-indent just-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window justfile-.+ }
|
||||
}
|
||||
|
||||
hook -group justfile-highlight global WinSetOption filetype=justfile %{
|
||||
add-highlighter window/justfile ref justfile
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/justfile }
|
||||
}
|
||||
|
||||
|
||||
provide-module justfile %{
|
||||
|
||||
# Indentation
|
||||
|
@ -43,14 +52,4 @@ add-highlighter shared/justfile/content/ regex '^(@)?([\w-]+)(?:\s(.+))?\s?(:)(.
|
|||
add-highlighter shared/justfile/content/ regex '([=+])' 1:operator
|
||||
add-highlighter shared/justfile/content/ regex '^([\w-]+)\s=' 1:value
|
||||
|
||||
hook -group justfile-highlight global WinSetOption filetype=justfile %{
|
||||
add-highlighter window/justfile ref justfile
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/justfile }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=justfile %{
|
||||
hook window InsertChar \n -group justfile-indent just-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window justfile-.+ }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,10 +2,16 @@ hook global BufCreate .*\.ks %{
|
|||
set-option buffer filetype kickstart
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=kickstart %{
|
||||
hook global WinSetOption filetype=kickstart %{
|
||||
require-module kickstart
|
||||
}
|
||||
|
||||
hook -group kickstart-highlight global WinSetOption filetype=kickstart %{
|
||||
add-highlighter window/kickstart ref kickstart
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/kickstart }
|
||||
}
|
||||
|
||||
|
||||
provide-module kickstart %{
|
||||
|
||||
add-highlighter shared/kickstart regions
|
||||
|
@ -29,10 +35,4 @@ add-highlighter shared/kickstart/shell/ regex '\A\h*\K%(pre-install|pre|post)\b'
|
|||
add-highlighter shared/kickstart/shell/ regex '^\h*%end\b' 0:type
|
||||
add-highlighter shared/kickstart/shell/ ref sh
|
||||
|
||||
|
||||
hook -group kickstart-highlight global WinSetOption filetype=kickstart %{
|
||||
add-highlighter window/kickstart ref kickstart
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/kickstart }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,10 +8,22 @@ hook global BufCreate .*[.](markdown|md|mkd) %{
|
|||
set-option buffer filetype markdown
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=markdown %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=markdown %{
|
||||
require-module markdown
|
||||
|
||||
hook window InsertChar \n -group markdown-indent markdown-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
|
||||
}
|
||||
|
||||
hook -group markdown-highlight global WinSetOption filetype=markdown %{
|
||||
add-highlighter window/markdown ref markdown
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/markdown }
|
||||
}
|
||||
|
||||
|
||||
provide-module markdown %{
|
||||
|
||||
# Highlighters
|
||||
|
@ -77,17 +89,4 @@ define-command -hidden markdown-indent-on-new-line %{
|
|||
}
|
||||
}
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group markdown-highlight global WinSetOption filetype=markdown %{
|
||||
add-highlighter window/markdown ref markdown
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/markdown }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=markdown %{
|
||||
hook window InsertChar \n -group markdown-indent markdown-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,10 +8,15 @@ hook global BufCreate .*hg-editor-\w+\.txt$ %{
|
|||
set-option buffer filetype hg-commit
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=hg-commit %{
|
||||
hook global WinSetOption filetype=hg-commit %{
|
||||
require-module hg-commit
|
||||
}
|
||||
|
||||
hook -group hg-commit-highlight global WinSetOption filetype=hg-commit %{
|
||||
add-highlighter window/hg-commit ref hg-commit
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/hg-commit-highlight }
|
||||
}
|
||||
|
||||
provide-module hg-commit %{
|
||||
|
||||
# Faces
|
||||
|
@ -22,10 +27,7 @@ set-face global MercurialCommitComment cyan
|
|||
# Highlighters
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group hg-commit-highlight global WinSetOption filetype=hg-commit %{
|
||||
add-highlighter window/ group hg-commit-highlight
|
||||
add-highlighter window/hg-commit-highlight regex '^HG:[^\n]*' 0:comment
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/hg-commit-highlight }
|
||||
}
|
||||
add-highlighter shared/hg-commit group
|
||||
add-highlighter shared/hg-commit/ regex '^HG:[^\n]*' 0:comment
|
||||
|
||||
}
|
||||
|
|
|
@ -8,10 +8,30 @@ hook global BufCreate .*[.](moon) %{
|
|||
set-option buffer filetype moon
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=moon %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=moon %{
|
||||
require-module moon
|
||||
|
||||
hook window ModeChange insert:.* -group moon-trim-indent moon-trim-indent
|
||||
hook window InsertChar .* -group moon-indent moon-indent-on-char
|
||||
hook window InsertChar \n -group moon-indent moon-indent-on-new-line
|
||||
|
||||
alias window alt moon-alternative-file
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{
|
||||
remove-hooks window moon-.+
|
||||
unalias window alt moon-alternative-file
|
||||
}
|
||||
}
|
||||
|
||||
hook -group moon-highlight global WinSetOption filetype=moon %{
|
||||
add-highlighter window/moon ref moon
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/moon }
|
||||
}
|
||||
|
||||
|
||||
provide-module moon %[
|
||||
|
||||
# Highlighters
|
||||
|
@ -91,25 +111,4 @@ define-command -hidden moon-indent-on-new-line %{
|
|||
}
|
||||
}
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group moon-highlight global WinSetOption filetype=moon %{
|
||||
add-highlighter window/moon ref moon
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/moon }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=moon %{
|
||||
hook window ModeChange insert:.* -group moon-trim-indent moon-trim-indent
|
||||
hook window InsertChar .* -group moon-indent moon-indent-on-char
|
||||
hook window InsertChar \n -group moon-indent moon-indent-on-new-line
|
||||
|
||||
alias window alt moon-alternative-file
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{
|
||||
remove-hooks window moon-.+
|
||||
unalias window alt moon-alternative-file
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
@ -5,10 +5,18 @@ hook global BufCreate .*[.](rst) %{
|
|||
set-option buffer filetype restructuredtext
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=restructuredtext %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=restructuredtext %{
|
||||
require-module restructuredtext
|
||||
}
|
||||
|
||||
hook -group restructuredtext-highlight global WinSetOption filetype=restructuredtext %{
|
||||
add-highlighter window/restructuredtext ref restructuredtext
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/restructuredtext }
|
||||
}
|
||||
|
||||
provide-module restructuredtext %{
|
||||
|
||||
# Highlighters
|
||||
|
@ -71,12 +79,4 @@ add-highlighter shared/restructuredtext/content/ regex [^*](\*\*([^\s*]|([^\s*][
|
|||
add-highlighter shared/restructuredtext/content/ regex [^*](\*([^\s*]|([^\s*][^*]*[^\s*]))\*)[^*] 1:italic
|
||||
add-highlighter shared/restructuredtext/content/ regex [^`](``([^\s`]|([^\s`][^`]*[^\s`]))``)[^`] 1:mono
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group restructuredtext-highlight global WinSetOption filetype=restructuredtext %{
|
||||
add-highlighter window/restructuredtext ref restructuredtext
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/restructuredtext }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,10 +8,22 @@ hook global BufCreate .*\.taskpaper %{
|
|||
set-option buffer filetype taskpaper
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=taskpaper %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=taskpaper %{
|
||||
require-module taskpaper
|
||||
|
||||
hook window InsertChar \n -group taskpaper-indent taskpaper-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window taskpaper-.+ }
|
||||
}
|
||||
|
||||
hook -group taskpaper-highlight global WinSetOption filetype=taskpaper %{
|
||||
add-highlighter window/taskpaper ref taskpaper
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/taskpaper }
|
||||
}
|
||||
|
||||
|
||||
provide-module taskpaper %{
|
||||
|
||||
# Highlighters
|
||||
|
@ -39,17 +51,4 @@ define-command -hidden taskpaper-indent-on-new-line %{
|
|||
}
|
||||
}
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group taskpaper-highlight global WinSetOption filetype=taskpaper %{
|
||||
add-highlighter window/taskpaper ref taskpaper
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/taskpaper }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=taskpaper %{
|
||||
hook window InsertChar \n -group taskpaper-indent taskpaper-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window taskpaper-.+ }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,10 +8,24 @@ hook global BufCreate .*\.(toml) %{
|
|||
set-option buffer filetype toml
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=toml %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=toml %{
|
||||
require-module toml
|
||||
|
||||
hook window ModeChange insert:.* -group toml-trim-indent toml-trim-indent
|
||||
hook window InsertChar \n -group toml-indent toml-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window toml-.+ }
|
||||
}
|
||||
|
||||
hook -group toml-highlight global WinSetOption filetype=toml %{
|
||||
add-highlighter window/toml ref toml
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/toml }
|
||||
}
|
||||
|
||||
|
||||
provide-module toml %{
|
||||
|
||||
# Highlighters
|
||||
|
@ -53,19 +67,4 @@ define-command -hidden toml-indent-on-new-line %{
|
|||
}
|
||||
}
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group toml-highlight global WinSetOption filetype=toml %{
|
||||
add-highlighter window/toml ref toml
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/toml }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=toml %{
|
||||
hook window ModeChange insert:.* -group toml-trim-indent toml-trim-indent
|
||||
hook window InsertChar \n -group toml-indent toml-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window toml-.+ }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,10 +8,23 @@ hook global BufCreate .*[.](ya?ml) %{
|
|||
set-option buffer filetype yaml
|
||||
}
|
||||
|
||||
hook -once global BufSetOption filetype=yaml %{
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook global WinSetOption filetype=yaml %{
|
||||
require-module yaml
|
||||
|
||||
hook window ModeChange insert:.* -group yaml-trim-indent yaml-trim-indent
|
||||
hook window InsertChar \n -group yaml-indent yaml-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window yaml-.+ }
|
||||
}
|
||||
|
||||
hook -group yaml-highlight global WinSetOption filetype=yaml %{
|
||||
add-highlighter window/yaml ref yaml
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/yaml }
|
||||
}
|
||||
|
||||
|
||||
provide-module yaml %{
|
||||
|
||||
# Highlighters
|
||||
|
@ -49,18 +62,4 @@ define-command -hidden yaml-indent-on-new-line %{
|
|||
}
|
||||
}
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group yaml-highlight global WinSetOption filetype=yaml %{
|
||||
add-highlighter window/yaml ref yaml
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/yaml }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=yaml %{
|
||||
hook window ModeChange insert:.* -group yaml-trim-indent yaml-trim-indent
|
||||
hook window InsertChar \n -group yaml-indent yaml-indent-on-new-line
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window yaml-.+ }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user