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
|
set-option buffer filetype r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
provide-module r %§
|
||||||
|
|
||||||
# Highlighters & Completion
|
# Highlighters & Completion
|
||||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
|
@ -124,15 +126,19 @@ define-command -hidden r-insert-on-newline %[ evaluate-commands -itersel -draft
|
||||||
]
|
]
|
||||||
] ]
|
] ]
|
||||||
|
|
||||||
|
§
|
||||||
|
|
||||||
# Initialization
|
# Initialization
|
||||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
hook -group r-highlight global WinSetOption filetype=r %{
|
hook -group r-highlight global WinSetOption filetype=r %{
|
||||||
|
require-module r
|
||||||
add-highlighter window/r ref r
|
add-highlighter window/r ref r
|
||||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/r }
|
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/r }
|
||||||
}
|
}
|
||||||
|
|
||||||
hook global WinSetOption filetype=r %~
|
hook global WinSetOption filetype=r %~
|
||||||
|
require-module r
|
||||||
hook window ModeChange pop:insert:.* r-trim-indent
|
hook window ModeChange pop:insert:.* r-trim-indent
|
||||||
hook window InsertChar \n r-insert-on-newline
|
hook window InsertChar \n r-insert-on-newline
|
||||||
hook window InsertChar \n r-indent-on-newline
|
hook window InsertChar \n r-indent-on-newline
|
||||||
|
|
Loading…
Reference in New Issue
Block a user