lektra
Configuration

Introduction

By default, lektra looks for: ~/.config/lektra/config.toml

If the file doesn't exist, lektra falls back to defaults.

You can look at this complete config file for reference: config.toml.

UI

Window

KeyTypeDescriptionDefault
fullscreenboolStart fullscreen.false
menubarboolShow menubar.false
startup_tabboolShow startup tab.false
window_titlestringTemplate string. {} is replaced by base file name."{} - lektra"

Statusbar

KeyTypeDescriptionDefault
visibleboolShow statusbar.true
paddingarrayPadding [top, right, bottom, left].[5, 5, 5, 5]
show_session_nameboolShow current session name.true
show_file_nameboolShow current file name.true
show_modeboolShow current interaction mode.true
show_page_numberboolShow current page number.true
show_progressboolShow reading progress.true

Command Palette

KeyTypeDescriptionDefault
show_shortcutsboolDisplay keyboard shortcuts.false
heightintPalette height in pixels.400
widthintPalette width in pixels.600

LLM Widget

KeyTypeDescriptionDefault
visibleboolShow LLM widget by default.false
panel_widthintWidget panel width in pixels.400

Layout

KeyTypeDescriptionDefault
modestring"single", "top_to_bottom", "left_to_right""top_to_bottom"
initial_fitstring"none", "width", "height", "window""width"
auto_resizeboolFit document to window on resize.false
spacingintSpacing between pages.0

Zoom

KeyTypeDescriptionDefault
levelfloatDefault zoom factor.1.0
factorfloatFactor for zoom in/out.1.25

Selection

KeyTypeDescriptionDefault
drag_thresholdintDrag threshold in pixels.100

Scrollbars

KeyTypeDescriptionDefault
horizontalboolShow horizontal scrollbar.true
verticalboolShow vertical scrollbar.true
auto_hideboolAuto-hide scrollbars.true
search_hitsboolShow search hits on scrollbar.true
sizeintScrollbar thickness in pixels.12
hide_timeoutintTime in ms to hide when auto_hide is true.1000

Markers

KeyTypeDescriptionDefault
jump_markerboolShow jump marker.true
KeyTypeDescriptionDefault
boundaryboolShow link boundary box.false
detect_urlsboolDetect and create links for URLs in text.true
url_regexstringRegex for URL detection.(see below)
KeyTypeDescriptionDefault
sizefloatRelative scale for link hint labels.0.25

Tabs

KeyTypeDescriptionDefault
visibleboolShow tab bar.true
auto_hideboolHide tab bar when only one tab.true
closableboolAllow closing tabs.true
movableboolAllow reordering tabs.true
elide_modestring"none", "start", "middle", "end""middle"
locationstring"top", "bottom", "left", "right""top"

Outline

KeyTypeDescriptionDefault
visibleboolShow outline by default.false
panel_positionstring"left", "right""left"
typestring"overlay", "dialog", "side_panel""overlay"
panel_widthintPanel width in pixels.300
KeyTypeDescriptionDefault
visibleboolShow highlight search by default.false
panel_positionstring"left", "right""right"
typestring"overlay", "dialog", "side_panel""overlay"
panel_widthintPanel width in pixels.300

Colors

All colors are RGBA hex strings.

KeyDescriptionDefault
accentAccent UI color.#3daee9FF
backgroundBackground color.#00000000
search_matchSearch match highlight.#55500033
search_indexCurrent search hit highlight.#55FF0055
link_hint_bgLink hint background.#000000FF
link_hint_fgLink hint foreground.#ea3ee9FF
selectionSelection overlay.#33000055
highlightHighlight color.#55FF0055
jump_markerJump marker indicator.#FF0000FF
annot_rectRectangle annotation color.#55FF5588
annot_popupPopup annotation background.#FFFFFFAA

Rendering

KeyTypeDescriptionDefault
dpifloatBase render DPI.72.0
dprfloat or mapDevice pixel ratio (global or per-output).1.0
cache_pagesintHow many pages to keep in cache.4
antialiasing_bitsint4=good, 8=high.8
icc_color_profileboolEnable ICC color management.true
DPR
Use a map if you run mixed DPI monitors. Use a single float if you don't care.

Behavior

KeyTypeDescriptionDefault
initial_modestringStartup mode."text_select_mode"
always_open_in_new_windowboolOpen files in a new window.false
remember_last_visitedboolRestore last visited file.true
page_historyintHistory depth.100
confirm_on_quitboolAsk before quitting.false
invert_modeboolInvert colors.false
auto_reloadboolAuto reload file when it changes.true
recent_filesboolTrack recent files.true
num_recent_filesintMax recent files count.25
undo_limitintUndo history size.25
synctex_editor_commandstringEditor command using %f and %l."zeditor %f:+%l"

LLM (Optional)

Works only if lektra is compiled with LLM support.

KeyTypeDescriptionDefault
providerstringLLM backend."ollama"
modelstringProvider model name."llama3.2:3b"
max_tokensintResponse length limit.512

Theming

Kvantum is a powerful SVG-based theme engine for Qt. It supports dark themes, custom widgets, and integrates well with Qt6. It is available in the standard repository for your distribution. Once installed, select a theme in kvantummanager and set:

export QT_STYLE_OVERRIDE=kvantum