Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3
Configuration
In Fall, configurations that leverage Vim’s built-in functionality are categorized as “Configuration.” This includes settings such as key mappings, highlights, and buffer option modifications.
See Mappings page for entire mapping list and way to configure.
| Highlight Group | Description |
|---|---|
FallNormal | Highlight for normal text in the picker window. |
FallBorder | Highlight for the border text in the picker window. |
FallInputHeader | Highlight for the header text in the input component. Defaults to FallBorder. |
FallInputCounter | Highlight for the counter text in the input component. Defaults to FallBorder. |
FallInputCursor | Highlight for the cursor in the input component. Defaults to Cursor. |
FallListMatch | Highlight for matched text in the list component. Defaults to Match. |
FallListSelected | Highlight for the selected item in the list component. Defaults to CurSearch. |
FallHelpHeader | Highlight for the header text in the help component. Defaults to Conceal. |
FallHelpMappingLhs | Highlight for the left-hand side of mappings in the help component. Defaults to Special. |
FallHelpMappingRhs | Highlight for the right-hand side of mappings in the help component. Defaults to Title. |
FallHelpMappingOperator | Highlight for operators in the help component. Defaults to Operator. |
For example:
function!s:my_fall_style() aborthighlight FallNormal ctermfg=Blue ctermbg=Black guifg=#0000FF guibg=#000000highlight FallBorder ctermfg=Green guifg=#00FF00
highlight FallInputHeader cterm=bold ctermfg=Yellow guifg=#FFFF00 gui=boldhighlight FallInputCounter ctermfg=Gray guifg=#808080highlight FallInputCursor ctermfg=Red guifg=#FF0000 gui=underlinehighlight FallListMatch ctermbg=Yellow guibg=#FFA500
highlight FallListSelected cterm=reversegui=reversehighlight FallHelpHeader cterm=italic ctermfg=Cyan guifg=#00FFFF gui=italichighlight FallHelpMappingLhs ctermfg=Magenta guifg=#FF00FF
highlight FallHelpMappingRhs cterm=bold ctermfg=Green guifg=#00FF00 gui=boldhighlight FallHelpMappingOperator ctermfg=DarkGray guifg=#A9A9A9
endfunctionaugroupfall_plugin_styleautocmd!autocmdColorScheme*calls:my_fall_style()
augroupENDcalls:my_fall_style()localfunctionmy_fall_style()
vim.api.nvim_set_hl(0, "FallNormal", { ctermfg="Blue", ctermbg="Black", fg="#0000FF", bg="#000000" })
vim.api.nvim_set_hl(0, "FallBorder", { ctermfg="Green", fg="#00FF00" })
vim.api.nvim_set_hl(0, "FallInputHeader", { cterm= { "bold" }, ctermfg="Yellow", fg="#FFFF00", bold=true })
vim.api.nvim_set_hl(0, "FallInputCounter", { ctermfg="Gray", fg="#808080" })
vim.api.nvim_set_hl(0, "FallInputCursor", { ctermfg="Red", fg="#FF0000", underline=true })
vim.api.nvim_set_hl(0, "FallListMatch", { ctermbg="Yellow", bg="#FFA500" })
vim.api.nvim_set_hl(0, "FallListSelected", { cterm= { "reverse" }, reverse=true })
vim.api.nvim_set_hl(0, "FallHelpHeader", { cterm= { "italic" }, ctermfg="Cyan", fg="#00FFFF", italic=true })
vim.api.nvim_set_hl(0, "FallHelpMappingLhs", { ctermfg="Magenta", fg="#FF00FF" })
vim.api.nvim_set_hl(0, "FallHelpMappingRhs", { cterm= { "bold" }, ctermfg="Green", fg="#00FF00", bold=true })
vim.api.nvim_set_hl(0, "FallHelpMappingOperator", { ctermfg="DarkGray", fg="#A9A9A9" })
endvim.api.nvim_create_augroup("FallPluginStyle", { clear=true })
vim.api.nvim_create_autocmd("ColorScheme", {
group="FallPluginStyle",
callback=my_fall_style,
})
my_fall_style()| Sign Name | Description |
|---|---|
FallListSelectedSign | Indicator sign for the selected item in the list component. Defaults to '»'. |
For example:
function!s:my_fall_style() abortsigndefine FallListSelectedSign text=*endfunctionaugroupfall_plugin_styleautocmd!autocmdColorScheme*calls:my_fall_style()
augroupENDcalls:my_fall_style()localfunctionmy_fall_style()
vim.fn.sign_define("FallListSelected", { text="*" })
endvim.api.nvim_create_augroup("FallPluginStyle", { clear=true })
vim.api.nvim_create_autocmd("ColorScheme", {
group="FallPluginStyle",
callback=my_fall_style,
})
my_fall_style()| Event Name | Description |
|---|---|
FallPickerEnter:{name} | Triggered when a picker is opened. {name} represents the name of the picker. |
FallPickerLeave:{name} | Triggered when a picker is closed. {name} represents the name of the picker. |
FallCustomLoaded | Triggered when the user customization file is loaded. |
FallCustomRecached | Triggered after the user customization file has been re-cached. |
FallPreviewRendered:{filename} | Triggered when the preview is rendered. {filename} represents the name of the previewed file. |
FallPickerEnter:{name} is used to configure Mappings. User may want to use FallPreviewRenderered:{filename} autocmd to apply buffer or window options like
function!s:my_fall_preview() abort" Disable number/relativenumber on the preview componentsetlocalnonumbernorelativenumberendfunctionaugroupmy_fall_previewautocmd!autocmdUserFallPreviewRendered:*calls:my_fall_preview()
augroupENDlocalfunctionmy_fall_preview()
-- Disable line numbers and relative line numbers in the preview componentvim.opt_local.number=falsevim.opt_local.relativenumber=falseendvim.api.nvim_create_augroup("MyFallPreview", { clear=true })
vim.api.nvim_create_autocmd("User", {
group="MyFallPreview",
pattern="FallPreviewRendered:*",
callback=my_fall_preview,
})| FileType | Description |
|---|---|
fall-input | FileType for the input component. |
fall-list | FileType for the list component. |
fall-help | FileType for the help component. |
All components, except the preview, have unique FileTypes listed above. This allows users to use FileType autocmd to apply specific configurations, such as:
#####Vim
function!s:my_fall_config() abort" Enable the 'list' option for Fall's componentssetlocallistendfunctionaugroupmy_fall_configautocmd!autocmdFileTypefall-inputcalls:my_fall_config()
autocmdFileTypefall-listcalls:my_fall_config()
autocmdFileTypefall-helpcalls:my_fall_config()
augroupENDlocalfunctionmy_fall_config()
-- Enable the 'list' option for Fall's componentsvim.opt_local.list=trueendvim.api.nvim_create_augroup("my_fall_config", { clear=true })
vim.api.nvim_create_autocmd("FileType", {
group="my_fall_config",
pattern= { "fall-input", "fall-list", "fall-help" },
callback=my_fall_config,
})Use FallPreviewRendered:{filename} autocmd instead to configure the preview component.