Skip to content

Configuration

Λlisue edited this page Aug 2, 2025 · 13 revisions

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.

Mappings

See Mappings page for entire mapping list and way to configure.

Highlight

Highlight GroupDescription
FallNormalHighlight for normal text in the picker window.
FallBorderHighlight for the border text in the picker window.
FallInputHeaderHighlight for the header text in the input component. Defaults to FallBorder.
FallInputCounterHighlight for the counter text in the input component. Defaults to FallBorder.
FallInputCursorHighlight for the cursor in the input component. Defaults to Cursor.
FallListMatchHighlight for matched text in the list component. Defaults to Match.
FallListSelectedHighlight for the selected item in the list component. Defaults to CurSearch.
FallHelpHeaderHighlight for the header text in the help component. Defaults to Conceal.
FallHelpMappingLhsHighlight for the left-hand side of mappings in the help component. Defaults to Special.
FallHelpMappingRhsHighlight for the right-hand side of mappings in the help component. Defaults to Title.
FallHelpMappingOperatorHighlight for operators in the help component. Defaults to Operator.

For example:

Vim
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()
Lua (by ChatGPT)
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

Sign NameDescription
FallListSelectedSignIndicator sign for the selected item in the list component. Defaults to '»'.

For example:

Vim
function!s:my_fall_style() abortsigndefine FallListSelectedSign text=*endfunctionaugroupfall_plugin_styleautocmd!autocmdColorScheme*calls:my_fall_style()
augroupENDcalls:my_fall_style()
Lua (by ChatGPT)
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()

User autocmd

Event NameDescription
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.
FallCustomLoadedTriggered when the user customization file is loaded.
FallCustomRecachedTriggered 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

Vim
function!s:my_fall_preview() abort" Disable number/relativenumber on the preview componentsetlocalnonumbernorelativenumberendfunctionaugroupmy_fall_previewautocmd!autocmdUserFallPreviewRendered:*calls:my_fall_preview()
augroupEND
Lua (by ChatGPT)
localfunctionmy_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

FileTypeDescription
fall-inputFileType for the input component.
fall-listFileType for the list component.
fall-helpFileType 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()
augroupEND
Lua (by ChatGPT)
localfunctionmy_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.

Clone this wiki locally