mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-24 07:53:41 +03:00
Modularize r file support
This commit is contained in:
parent
2209b5d415
commit
8691ee8d4a
@ -8,6 +8,8 @@ hook global BufCreate (.*/)?(\.Rprofile|.*\.[rR]) %{
|
||||
set-option buffer filetype r
|
||||
}
|
||||
|
||||
provide-module r %§
|
||||
|
||||
# Highlighters & Completion
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
@ -124,15 +126,19 @@ define-command -hidden r-insert-on-newline %[ evaluate-commands -itersel -draft
|
||||
]
|
||||
] ]
|
||||
|
||||
§
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
hook -group r-highlight global WinSetOption filetype=r %{
|
||||
require-module r
|
||||
add-highlighter window/r ref r
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/r }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=r %~
|
||||
require-module r
|
||||
hook window ModeChange pop:insert:.* r-trim-indent
|
||||
hook window InsertChar \n r-insert-on-newline
|
||||
hook window InsertChar \n r-indent-on-newline
|
||||
|
Loading…
Reference in New Issue
Block a user