diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..d7e7f74 --- /dev/null +++ b/.bashrc @@ -0,0 +1,114 @@ +# some more ls aliases +export TERM=xterm-256color +export PATH="$HOME/gitui:$PATH" +export PATH="${GOBIN:-${GOPATH:-${HOME}/go}/bin}:${PATH}" +alias lsf="ls -p | grep -v /" + +# Shortcuts for build/test +alias mss="meson setup builddir-debug --native-file=native.ini --buildtype=debug" +alias mss-release="meson setup builddir-release --native-file=native.ini --buildtype=release" + +alias msr="meson setup builddir-debug --native-file=native.ini --buildtype=debug --reconfigure" +alias msr-release="meson setup builddir-release --native-file=native.ini --buildtype=release --reconfigure" + +alias msc="meson compile -C builddir-debug" +alias msc-release="meson compile -C builddir-release" + +alias mst="meson test -C builddir-debug" +alias mst-release="meson test -C builddir-release" + +alias msb="meson test -C builddir-release --benchmark" +mstf() { + mst -v $1 --test-arg=\"--gtest_filter=\"*$2*\"\" +} + +# Ninja +alias nic="ninja -C builddir-debug" +alias nic-release="ninja -C builddir-release" +alias ninja_test_env="env MALLOC_PERTURB_=8 UBSAN_OPTIONS='halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1' MSAN_OPTIONS='halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1' ASAN_OPTIONS='halt_on_error=1:abort_on_error=1:print_summary=1' MESON_TEST_ITERATION=1 " +nit() { + nic $1 && ninja_test_env $(pwd)/builddir-debug/$1 +} +nitf() { + nic $1 && ninja_test_env $(pwd)/builddir-debug/$1 --gtest_filter=$2 +} + +nicc() { + filepath=$1 + filename="${filepath##*/}" + nic $1 && cp ./builddir-debug/$1 ~/.local/bin/ && $filename --version +} + + +# For fast build +export CCACHE_DIR=$HOME/.engine_ccache +export CCACHE_UMASK=007 +export CCACHE_LOGFILE=$HOME/.engine_ccache/.log +export CCACHE_NLEVELS=4 +export KDB_USE_CCACHE=1 + +# For tests +export MESON_BUILD=true +export MESON_BUILD_DIR="builddir-debug" +export PATH="$HOME/engine/tornado/bin:$PATH" +export TORNADO_VKGO_PATH="$HOME/Git/vkgo" +export TORNADO_MAKE_DISABLED=1 + +# For debugging +export PATH="$HOME/Git/FlameGraph/:$PATH" +alias perf-rec="perf record -g -e cpu-cycles -p" +alias perf-rep="perf report" +alias perf-dat="perf script | stackcollapse-perf.pl >" + +flamegraph() { + PERF_NAME="pdat" + if [ "$#" -ne 0 ]; then + PERF_NAME=$1 + fi + if [ -f perf.data ]; then + mkdir -p img + perf-dat $PERF_NAME + flamegraph.pl $PERF_NAME > img/$PERF_NAME.svg + fi +} + +flamegraph-diff() { + if [ -f $1 ] && [ -f $2 ]; then + difffolded.pl $1 $2 | flamegraph.pl > img/perf-diff-$1-$2.svg + fi +} + +binlog-dump() { + barsic dump --prefix=$1 --no-start-echo -- binlog-dumper --module $2 +} + + +set-scope() { + SCOPE="default-scope" + if [ "$#" -ne 0 ]; then + SCOPE=$1 + fi + systemd-run --user --scope --unit=$SCOPE bash +} + +check-scope() { + SCOPE="default-scope" + if [ "$#" -ne 0 ]; then + SCOPE=$1 + fi + systemctl --user status $SCOPE.scope +} + +shtop() { + local SCOPE="default-scope.scope" + + if [ "$#" -ne 0 ]; then + SCOPE="$1" + fi + + local CG + CG=$(systemctl --user show "$SCOPE" -p ControlGroup --value) || return 1 + + htop -p "$(paste -sd, "/sys/fs/cgroup${CG}/cgroup.procs")" +} + diff --git a/kitty/extra.conf b/kitty/extra.conf new file mode 100644 index 0000000..611fda8 --- /dev/null +++ b/kitty/extra.conf @@ -0,0 +1,2993 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +#: Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. + +# font_family monospace +# bold_font auto +# italic_font auto +# bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. The easiest way to select fonts is to run the `kitten +#: choose-fonts` command which will present a nice UI for you to +#: select the fonts you want with previews and support for selecting +#: variable fonts and font features. If you want to learn to select +#: fonts manually, read the font specification syntax +#: . + +# font_size 11.0 + +#: Font size (in pts). + +# force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the string been LTR. For example, assuming the Hebrew word ירושלים, +#: selecting the character that on the screen appears to be ם actually +#: writes into the selection buffer the character י. kitty's default +#: behavior is useful in conjunction with a filter to reverse the word +#: order, however, if you wish to manipulate RTL glyphs, it can be +#: very challenging to work with, so this option is provided to turn +#: it off. Furthermore, this option can be used with the command line +#: program GNU FriBidi +#: to get BIDI support, because it will force kitty to always treat +#: the text as LTR, which FriBidi expects for terminals. + +# symbol_map + +#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols + +#: Map the specified Unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each Unicode code +#: point is specified in the form `U+`. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. This option can be specified multiple times. +#: The syntax is:: + +#: symbol_map codepoints Font Family Name + +# narrow_symbols + +#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 + +#: Usually, for Private Use Unicode characters and some symbol/dingbat +#: characters, if the character is followed by one or more spaces, +#: kitty will use those extra cells to render the character larger, if +#: the character in the font has a wide aspect ratio. Using this +#: option you can force kitty to restrict the specified code points to +#: render in the specified number of cells (defaulting to one cell). +#: This option can be specified multiple times. The syntax is:: + +#: narrow_symbols codepoints [optionally the number of cells] + +# disable_ligatures never + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +#: Note that this refers to programming ligatures, typically +#: implemented using the calt OpenType feature. For disabling general +#: ligatures, use the font_features option. + +# font_features + +#: E.g. font_features none + +#: Choose exactly which OpenType features to enable or disable. Note +#: that for the main fonts, features can be specified when selecting +#: the font using the choose-fonts kitten. This setting is useful for +#: fallback fonts. + +#: Some fonts might have features worthwhile in a terminal. For +#: example, Fira Code includes a discretionary feature, zero, which in +#: that font changes the appearance of the zero (0), to make it more +#: easily distinguishable from Ø. Fira Code also includes other +#: discretionary features known as Stylistic Sets which have the tags +#: ss01 through ss20. + +#: For the exact syntax to use for individual features, see the +#: HarfBuzz documentation . + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: On Linux, font features are first read from the FontConfig database +#: and then this option is applied, so they can be configured in a +#: single, central place. + +#: To get the PostScript name for a font, use the `fc-scan file.ttf` +#: command on Linux or the `Font Book tool on macOS +#: `__. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero in the bold font:: + +#: font_features FiraCode-Bold +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +# modify_font + +#: Modify font characteristics such as the position or thickness of +#: the underline and strikethrough. The modifications can have the +#: suffix px for pixels or % for percentage of original value. No +#: suffix means use pts. For example:: + +#: modify_font underline_position -2 +#: modify_font underline_thickness 150% +#: modify_font strikethrough_position 2px + +#: Additionally, you can modify the size of the cell in which each +#: font glyph is rendered and the baseline at which the glyph is +#: placed in the cell. For example:: + +#: modify_font cell_width 80% +#: modify_font cell_height -2px +#: modify_font baseline 3 + +#: Note that modifying the baseline will automatically adjust the +#: underline and strikethrough positions by the same amount. +#: Increasing the baseline raises glyphs inside the cell and +#: decreasing it lowers them. Decreasing the cell size might cause +#: rendering artifacts, so use with care. + +# box_drawing_scale 0.001, 1, 1.5, 2 + +#: The sizes of the lines used for the box drawing Unicode characters. +#: These values are in pts. They will be scaled by the monitor DPI to +#: arrive at a pixel value. There must be four values corresponding to +#: thin, normal, thick, and very thick lines. + +# undercurl_style thin-sparse + +#: The style with which undercurls are rendered. This option takes the +#: form (thin|thick)-(sparse|dense). Thin and thick control the +#: thickness of the undercurl. Sparse and dense control how often the +#: curl oscillates. With sparse the curl will peak once per character, +#: with dense twice. Changing this option dynamically via reloading +#: the config or remote control is undefined. + +# underline_exclusion 1 + +#: By default kitty renders gaps in underlines when they overlap with +#: descenders (the parts of letters below the baseline, such as for y, +#: q, p etc.). This option controls the thickness of the gaps. It can +#: be either a unitless number in which case it is a fraction of the +#: underline thickness as specified in the font or it can have a +#: suffix of px for pixels or pt for points. Set to zero to disable +#: the gaps. Changing this option dynamically via reloading the config +#: or remote control is undefined. + +# text_composition_strategy platform + +#: Control how kitty composites text glyphs onto the background color. +#: The default value of platform tries for text rendering as close to +#: "native" for the platform kitty is running on as possible. + +#: A value of legacy uses the old (pre kitty 0.28) strategy for how +#: glyphs are composited. This will make dark text on light +#: backgrounds look thicker and light text on dark backgrounds +#: thinner. It might also make some text appear like the strokes are +#: uneven. + +#: You can fine tune the actual contrast curve used for glyph +#: composition by specifying up to two space-separated numbers for +#: this setting. + +#: The first number is the gamma adjustment, which controls the +#: thickness of dark text on light backgrounds. Increasing the value +#: will make text appear thicker. The default value for this is 1.0 on +#: Linux and 1.7 on macOS. Valid values are 0.01 and above. The result +#: is scaled based on the luminance difference between the background +#: and the foreground. Dark text on light backgrounds receives the +#: full impact of the curve while light text on dark backgrounds is +#: affected very little. + +#: The second number is an additional multiplicative contrast. It is +#: percentage ranging from 0 to 100. The default value is 0 on Linux +#: and 30 on macOS. + +#: If you wish to achieve similar looking thickness in light and dark +#: themes, a good way to experiment is start by setting the value to +#: 1.0 0 and use a dark theme. Then adjust the second parameter until +#: it looks good. Then switch to a light theme and adjust the first +#: parameter until the perceived thickness matches the dark theme. + +# text_fg_override_threshold 0 + +#: A setting to prevent low contrast between foreground and background +#: colors. Useful when working with applications that use colors that +#: do not contrast well with your preferred color scheme. The default +#: value is 0, which means no color overriding is performed. There are +#: two modes of operation: + +#: A value with the suffix ratio represents the minimum accepted +#: contrast ratio between the foreground and background color. +#: Possible values range from 0.0 ratio to 21.0 ratio. For example, to +#: meet WCAG level AA +#: +#: a value of 4.5 ratio can be provided. The algorithm is implemented +#: using HSLuv which enables it to change the +#: perceived lightness of a color just as much as needed without +#: really changing its hue and saturation. + +#: A value with the suffix % represents the minimum accepted +#: difference in luminance between the foreground and background +#: color, below which kitty will override the foreground color. It is +#: percentage ranging from 0 % to 100 %. If the difference in +#: luminance of the foreground and background is below this threshold, +#: the foreground color will be set to white if the background is dark +#: or black if the background is light. + +#: WARNING: Some programs use characters (such as block characters) +#: for graphics display and may expect to be able to set the +#: foreground and background to the same color (or similar colors). If +#: you see unexpected stripes, dots, lines, incorrect color, no color +#: where you expect color, or any kind of graphic display problem try +#: setting text_fg_override_threshold to 0 to see if this is the cause +#: of the problem or consider using the ratio mode of operation +#: described above instead of the % mode of operation. + +#: }}} + +#: Text cursor customization {{{ + +# cursor #cccccc + +#: Default text cursor color. If set to the special value none the +#: cursor will be rendered with a "reverse video" effect. Its color +#: will be the color of the text in the cell it is over and the text +#: will be rendered with the background color of the cell. Note that +#: if the program running in the terminal sets a cursor color, this +#: takes precedence. Also, the cursor colors are modified if the cell +#: background and foreground colors have very low contrast. Note that +#: some themes set this value, so if you want to override it, place +#: your value after the lines where the theme file is included. + +# cursor_text_color #111111 + +#: The color of text under the cursor. If you want it rendered with +#: the background color of the cell underneath instead, use the +#: special keyword: `background`. Note that if cursor is set to none +#: then this option is ignored. Note that some themes set this value, +#: so if you want to override it, place your value after the lines +#: where the theme file is included. + +# cursor_shape block + +#: The cursor shape can be one of block, beam, underline. Note that +#: when reloading the config this will be changed only if the cursor +#: shape has not been set by the program running in the terminal. This +#: sets the default cursor shape, applications running in the terminal +#: can override it. In particular, shell integration +#: in kitty sets +#: the cursor shape to beam at shell prompts. You can avoid this by +#: setting shell_integration to no-cursor. + +# cursor_shape_unfocused hollow + +#: Defines the text cursor shape when the OS window is not focused. +#: The unfocused cursor shape can be one of block, beam, underline, +#: hollow and unchanged (leave the cursor shape as it is). + +# cursor_beam_thickness 1.5 + +#: The thickness of the beam cursor (in pts). + +# cursor_underline_thickness 2.0 + +#: The thickness of the underline cursor (in pts). + +# cursor_blink_interval -1 + +#: The interval to blink the cursor (in seconds). Set to zero to +#: disable blinking. Negative values mean use system default. Note +#: that the minimum interval will be limited to repaint_delay. You can +#: also animate the cursor blink by specifying an easing function. For +#: example, setting this to option to 0.5 ease-in-out will cause the +#: cursor blink to be animated over a second, in the first half of the +#: second it will go from opaque to transparent and then back again +#: over the next half. You can specify different easing functions for +#: the two halves, for example: -1 linear ease-out. kitty supports all +#: the CSS easing functions . Note that turning on animations +#: uses extra power as it means the screen is redrawn multiple times +#: per blink interval. See also, cursor_stop_blinking_after. This +#: setting also controls blinking text, which blinks in exact rhythm +#: with the cursor. + +# cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. This +#: setting also controls blinking text, which blinks in exact rhythm +#: with the cursor. + +# cursor_trail 0 + +#: Set this to a value larger than zero to enable a "cursor trail" +#: animation. This is an animation that shows a "trail" following the +#: movement of the text cursor. It makes it easy to follow large +#: cursor jumps and makes for a cool visual effect of the cursor +#: zooming around the screen. The actual value of this option controls +#: when the animation is triggered. It is a number of milliseconds. +#: The trail animation only follows cursors that have stayed in their +#: position for longer than the specified number of milliseconds. This +#: prevents trails from appearing for cursors that rapidly change +#: their positions during UI updates in complex applications. See +#: cursor_trail_decay to control the animation speed and +#: cursor_trail_start_threshold to control when a cursor trail is +#: started. + +# cursor_trail_decay 0.1 0.4 + +#: Controls the decay times for the cursor trail effect when the +#: cursor_trail is enabled. This option accepts two positive float +#: values specifying the fastest and slowest decay times in seconds. +#: The first value corresponds to the fastest decay time (minimum), +#: and the second value corresponds to the slowest decay time +#: (maximum). The second value must be equal to or greater than the +#: first value. Smaller values result in a faster decay of the cursor +#: trail. Adjust these values to control how quickly the cursor trail +#: fades away. + +# cursor_trail_start_threshold 2 + +#: Set the distance threshold for starting the cursor trail. This +#: option accepts a positive integer value that represents the minimum +#: number of cells the cursor must move before the trail is started. +#: When the cursor moves less than this threshold, the trail is +#: skipped, reducing unnecessary cursor trail animation. + +# cursor_trail_color none + +#: Set the color of the cursor trail when cursor_trail is enabled. If +#: set to 'none' (the default), the cursor trail will use the cursor's +#: background color. Otherwise, specify a color value (e.g., #ff0000 +#: for red, or a named color like 'red'). This allows you to customize +#: the appearance of the cursor trail independently of the cursor +#: color. + +#: }}} + +#: Scrollback {{{ + +# scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down performance of the terminal and +#: also use large amounts of RAM. Instead, consider using +#: scrollback_pager_history_size. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollbar scrolled + +#: Control when the scrollbar is displayed. + +#: scrolled +#: means when the scrolling backwards has started. +#: hovered +#: means when the mouse is hovering on the right edge of the window. +#: scrolled-and-hovered +#: means when the mouse is over the scrollbar region *and* scrolling backwards has started. +#: always +#: means whenever any scrollback is present +#: never +#: means disable the scrollbar. + +# scrollbar_interactive yes + +#: If disabled, the scrollbar will not be controllable via th emouse +#: and all mouse events will pass through the scrollbar. + +# scrollbar_jump_on_click yes + +#: When enabled clicking in the scrollbar track will cause the scroll +#: position to jump to the clicked location, otherwise the scroll +#: position will only move towards the position by a single screenful, +#: which is how traditional scrollbars behave. + +# scrollbar_width 0.5 + +#: The width of the scroll bar in units of cell width. + +# scrollbar_hover_width 1 + +#: The width of the scroll bar when the mouse is hovering over it, in +#: units of cell width. + +# scrollbar_handle_opacity 0.5 + +#: The opacity of the scrollbar handle, 0 being fully transparent and +#: 1 being full opaque. + +# scrollbar_radius 0.3 + +#: The radius (curvature) of the scrollbar handle in units of cell +#: width. Should be less than scrollbar_width. + +# scrollbar_gap 0.1 + +#: The gap between the scrollbar and the window edge in units of cell +#: width. + +# scrollbar_min_handle_height 1 + +#: The minimum height of the scrollbar handle in units of cell height. +#: Prevents the handle from becoming too small when there is a lot of +#: scrollback. + +# scrollbar_hitbox_expansion 0.25 + +#: The extra area around the handle to allow easier grabbing of the +#: scollbar in units of cell width. + +# scrollbar_track_opacity 0 + +#: The opacity of the scrollbar track, 0 being fully transparent and 1 +#: being full opaque. + +# scrollbar_track_hover_opacity 0.1 + +#: The opacity of the scrollbar track when the mouse is over the +#: scrollbar, 0 being fully transparent and 1 being full opaque. + +# scrollbar_handle_color foreground + +#: The color of the scrollbar handle. A value of foreground means to +#: use the current foreground text color, a value of +#: selection_background means to use the current selection background +#: color. Also, you can use an arbitrary color, such as #12af59 or +#: red. + +# scrollbar_track_color foreground + +#: The color of the scrollbar track. A value of foreground means to +#: use the current foreground text color, a value of +#: selection_background means to use the current selection background +#: color. Also, you can use an arbitrary color, such as #12af59 or +#: red. + +# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. Similarly CURSOR_LINE and +#: CURSOR_COLUMN will be replaced by the current cursor position or +#: set to 0 if there is no cursor, for example, when showing the last +#: command output. + +#: If you would rather use neovim to view the scrollback, use +#: something like this:: + +#: scrollback_pager nvim --cmd 'set eventignore=FileType' +'nnoremap q ZQ' +'call nvim_open_term(0, {})' +'set nomodified nolist' +'$' - + +#: The above works for neovim 0.12 and newer. There is also a +#: dedicated plugin kitty-scrollback.nvim +#: you can use +#: with more features that works with older neovim as well. + +# scrollback_pager_history_size 0 + +#: Separate scrollback history size (in MB), used only for browsing +#: the scrollback buffer with pager. This separate buffer is not +#: available for interactive scrolling but will be piped to the pager +#: program when viewing scrollback buffer in a separate window. The +#: current implementation stores the data in UTF-8, so approximately +#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, +#: unformatted text. A value of zero or less disables this feature. +#: The maximum allowed size is 4GB. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_fill_enlarged_window no + +#: Fill new space with lines from the scrollback buffer after +#: enlarging a window. + +# wheel_scroll_multiplier 5.0 + +#: Multiplier for the number of lines scrolled by the mouse wheel. +#: Note that this is only used for low precision scrolling devices, +#: not for high precision scrolling devices on platforms such as macOS +#: and Wayland. Use negative numbers to change scroll direction. See +#: also wheel_scroll_min_lines. + +# wheel_scroll_min_lines 1 + +#: The minimum number of lines scrolled by the mouse wheel. The scroll +#: multiplier wheel_scroll_multiplier only takes effect after it +#: reaches this number. Note that this is only used for low precision +#: scrolling devices like wheel mice that scroll by very small amounts +#: when using the wheel. With a negative number, the minimum number of +#: lines will always be added. + +# touch_scroll_multiplier 1.0 + +#: Multiplier for the number of lines scrolled by a touchpad. Note +#: that this is only used for high precision scrolling devices on +#: platforms such as macOS and Wayland. Use negative numbers to change +#: scroll direction. + +#: }}} + +#: Mouse {{{ + +# mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. + +#: By default, once the cursor is hidden, it is immediately unhidden +#: on any further mouse events. + +#: Two formats are supported: +#: - +#: - + +#: To change the unhide behavior, the optional parameters , , and may be set. + +#: +#: Waits for the specified number of seconds after mouse events before unhiding the +#: mouse cursor. Set to zero to unhide mouse cursor immediately on mouse activity. +#: This is useful to prevent the mouse cursor from unhiding on accidental swipes on +#: the trackpad. + +#: +#: Sets the threshold of mouse activity required to unhide the mouse cursor, when +#: the option is non-zero. When is zero, this has no +#: effect. + +#: For example, if is 40 and is 2.5, when kitty +#: detects a mouse event, it records the number of mouse events in the next 2.5 +#: seconds, and checks if that exceeds 40 * 2.5 = 100. If it does, then the mouse +#: cursor is unhidden, otherwise nothing happens. + +#: +#: Controls what mouse events may unhide the mouse cursor. If enabled, both scroll +#: and movement events may unhide the cursor. If disabled, only mouse movements can +#: unhide the cursor. + +#: Examples of valid values: +#: - 0.0 +#: - 1.0 +#: - -1.0 +#: - 0.1 3.0 40 yes + +# url_color #0087bd +# url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, straight, double, curly, dotted, dashed. + +# open_url_with default + +#: The program to open clicked URLs. The special value default will +#: first look for any URL handlers defined via the open_actions +#: facility and if non +#: are found, it will use the Operating System's default URL handler +#: (open on macOS and xdg-open on Linux). + +# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +# detect_urls yes + +#: Detect URLs under the mouse. Detected URLs are highlighted with an +#: underline and the mouse cursor becomes a hand over them. Even if +#: this option is disabled, URLs are still clickable. See also the +#: underline_hyperlinks option to control how hyperlinks (as opposed +#: to plain text URLs) are displayed. + +# url_excluded_characters + +#: Additional characters to be disallowed from URLs, when detecting +#: URLs under the mouse cursor. By default, all characters that are +#: legal in URLs are allowed. Additionally, newlines are allowed (but +#: stripped). This is to accommodate programs such as mutt that add +#: hard line breaks even for continued lines. \n can be added to this +#: option to disable this behavior. Special characters can be +#: specified using backslash escapes, to specify a backslash use a +#: double backslash. + +# show_hyperlink_targets no + +#: When the mouse hovers over a terminal hyperlink, show the actual +#: URL that will be activated when the hyperlink is clicked. + +# underline_hyperlinks hover + +#: Control how hyperlinks are underlined. They can either be +#: underlined on mouse hover, always (i.e. permanently underlined) or +#: never which means that kitty will not apply any underline styling +#: to hyperlinks. Note that the value of always only applies to real +#: (OSC 8) hyperlinks not text that is detected to be a URL on mouse +#: hover. Uses the url_style and url_color settings for the underline +#: style. Note that reloading the config and changing this value +#: to/from always will only affect text subsequently received by +#: kitty. + +# copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, selecting text with the mouse will cause the text to be +#: copied to clipboard. Useful on platforms such as macOS that do not +#: have the concept of primary selection. You can instead specify a +#: name such as a1 to copy to a private kitty buffer. Map a shortcut +#: with the paste_from_buffer action to paste from this private +#: buffer. For example:: + +#: copy_on_select a1 +#: map shift+cmd+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +# clear_selection_on_clipboard_loss no + +#: When the contents of the clipboard no longer reflect the current +#: selection, clear it. This is primarily useful on platforms such as +#: Linux where selecting text automatically copies it to a special +#: "primary selection" clipboard or if you have copy_on_select set to +#: clipboard. + +#: Note that on macOS the system does not provide notifications when +#: the clipboard owner is changed, so there, copying to clipboard in a +#: non-kitty application will not clear selections even if +#: copy_on_select is enabled. + +# paste_actions quote-urls-at-prompt,confirm + +#: A comma separated list of actions to take when pasting text into +#: the terminal. The supported paste actions are: + +#: quote-urls-at-prompt: +#: If the text being pasted is a URL and the cursor is at a shell prompt, +#: automatically quote the URL (needs shell_integration). +#: replace-dangerous-control-codes +#: Replace dangerous control codes from pasted text, without confirmation. +#: replace-newline +#: Replace the newline character from pasted text, without confirmation. +#: confirm: +#: Confirm the paste if the text to be pasted contains any terminal control codes +#: as this can be dangerous, leading to code execution if the shell/program running +#: in the terminal does not properly handle these. +#: confirm-if-large +#: Confirm the paste if it is very large (larger than 16KB) as pasting +#: large amounts of text into shells can be very slow. +#: filter: +#: Run the filter_paste() function from the file paste-actions.py in +#: the kitty config directory on the pasted text. The text returned by the +#: function will be actually pasted. +#: no-op: +#: Has no effect. + +# strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. A value of always will always do it. + +# select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the Unicode database will be matched. + +# select_by_word_characters_forward + +#: Characters considered part of a word when extending the selection +#: forward on double clicking. In addition to these characters any +#: character that is marked as an alphanumeric character in the +#: Unicode database will be matched. + +#: If empty (default) select_by_word_characters will be used for both +#: directions. + +# click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +# focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around. On macOS, this will also cause the OS Window under +#: the mouse to be focused automatically when the mouse enters it. + +# pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. + +# default_pointer_shape beam + +#: The default shape of the mouse pointer. + +# pointer_shape_when_dragging beam crosshair + +#: The default shape of the mouse pointer when dragging across text. +#: The optional second value sets the shape when dragging in +#: rectangular selection mode. + +#: Mouse actions {{{ + +#: Mouse buttons can be mapped to perform arbitrary actions. The +#: syntax is: + +#: .. code-block:: none + +#: mouse_map button-name event-type modes action + +#: Where button-name is one of left, middle, right, b1 ... b8 with +#: added keyboard modifiers. For example: ctrl+shift+left refers to +#: holding the Ctrl+Shift keys while clicking with the left mouse +#: button. The value b1 ... b8 can be used to refer to up to eight +#: buttons on a mouse. + +#: event-type is one of press, release, doublepress, triplepress, +#: click, doubleclick. modes indicates whether the action is performed +#: when the mouse is grabbed by the program running in the terminal, +#: or not. The values are grabbed or ungrabbed or a comma separated +#: combination of them. grabbed refers to when the program running in +#: the terminal has requested mouse events. Note that the click and +#: double click events have a delay of click_interval to disambiguate +#: from double and triple presses. + +#: You can run kitty with the kitty --debug-input command line option +#: to see mouse events. See the builtin actions below to get a sense +#: of what is possible. + +#: If you want to unmap a button, map it to nothing. For example, to +#: disable opening of URLs with a plain click:: + +#: mouse_map left click ungrabbed + +#: See all the mappable actions including mouse actions here +#: . + +#: .. note:: +#: Once a selection is started, releasing the button that started it will +#: automatically end it and no release event will be dispatched. + +# clear_all_mouse_actions no + +#: Remove all mouse action definitions up to this point. Useful, for +#: instance, to remove the default mouse actions. + +#: Click the link under the mouse or move the cursor + +# mouse_map left click ungrabbed mouse_handle_click selection link prompt + +#:: First check for a selection and if one exists do nothing. Then +#:: check for a link under the mouse cursor and if one exists, click +#:: it. Finally check if the click happened at the current shell +#:: prompt and if so, move the cursor to the click location. Note +#:: that this requires shell integration +#:: to work. + +#: Click the link under the mouse or move the cursor even when grabbed + +# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt + +#:: Same as above, except that the action is performed even when the +#:: mouse is grabbed by the program running in the terminal. + +#: Click the link under the mouse cursor + +# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link + +#:: Variant with Ctrl+Shift is present because the simple click based +#:: version has an unavoidable delay of click_interval, to +#:: disambiguate clicks from double clicks. + +#: Discard press event for link click + +# mouse_map ctrl+shift+left press grabbed discard_event + +#:: Prevent this press event from being sent to the program that has +#:: grabbed the mouse, as the corresponding release event is used to +#:: open a URL. + +#: Paste from the primary selection + +# mouse_map middle release ungrabbed paste_from_selection + +#: Start selecting text + +# mouse_map left press ungrabbed mouse_selection normal + +#: Start selecting text in a rectangle + +# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle + +#: Select a word + +# mouse_map left doublepress ungrabbed mouse_selection word + +#: Select a line + +# mouse_map left triplepress ungrabbed mouse_selection line + +#: Select line from point + +# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line. If you +#:: would like to select the word at the point and then extend to the +#:: rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection + +# mouse_map right press ungrabbed mouse_selection extend + +#:: If you want only the end of the selection to be moved instead of +#:: the nearest boundary, use move-end instead of extend. + +#: Paste from the primary selection even when grabbed + +# mouse_map shift+middle release ungrabbed,grabbed paste_selection +# mouse_map shift+middle press grabbed discard_event + +#: Start selecting text even when grabbed + +# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal + +#: Start selecting text in a rectangle even when grabbed + +# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle + +#: Select a word even when grabbed + +# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word + +#: Select a line even when grabbed + +# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line + +#: Select line from point even when grabbed + +# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line even when +#:: grabbed. If you would like to select the word at the point and +#:: then extend to the rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection even when grabbed + +# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend + +#: Show clicked command output in pager + +# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output + +#:: Requires shell integration +#:: to work. + +#: }}} + +#: }}} + +#: Performance tuning {{{ + +# repaint_delay 10 + +#: Delay between screen updates (in milliseconds). Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS, you have to +#: either set sync_to_monitor to no or use a monitor with a high +#: refresh rate. Also, to minimize latency when there is pending input +#: to be processed, this option is ignored. + +# input_delay 3 + +#: Delay before input from the program running in the terminal is +#: processed (in milliseconds). Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. +#: This setting is ignored when the input buffer is almost full. + +# sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents screen tearing +#: when scrolling. +#: However, it limits the rendering speed to the refresh rate of your +#: monitor. With a very high speed mouse/high keyboard repeat rate, +#: you may notice some slight input latency. If so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +# enable_audio_bell yes + +#: The audio bell. Useful to disable it in environments that require +#: silence. + +# visual_bell_duration 0.0 + +#: The visual bell duration (in seconds). Flash the screen when a bell +#: occurs for the specified number of seconds. Set to zero to disable. +#: The flash is animated, fading in and out over the specified +#: duration. The easing function used for the fading can be +#: controlled. For example, 2.0 linear will casuse the flash to fade +#: in and out linearly. The default if unspecified is to use ease-in- +#: out which fades slowly at the start, middle and end. You can +#: specify different easing functions for the fade-in and fade-out +#: parts, like this: 2.0 ease-in linear. kitty supports all the CSS +#: easing functions . + +# visual_bell_color none + +#: The color used by visual bell. Set to none will fall back to +#: selection background color. If you feel that the visual bell is too +#: bright, you can set it to a darker color. + +# window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on Linux. + +# bell_on_tab "🔔 " + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has a bell. If you want to use leading +#: or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +#: For backwards compatibility, values of yes, y and true are +#: converted to the default bell symbol and no, n, false and none are +#: converted to the empty string. + +# command_on_bell none + +#: Program to run when a bell occurs. The environment variable +#: KITTY_CHILD_CMDLINE can be used to get the program running in the +#: window in which the bell occurred. + +# bell_path none + +#: Path to a sound file to play as the bell sound. If set to none, the +#: system default bell sound is used. Must be in a format supported by +#: the operating systems sound API, such as WAV or OGA on Linux +#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound). Relative +#: paths are resolved with respect to the kitty config directory. + +# linux_bell_theme __custom + +#: The XDG Sound Theme kitty will use to play the bell sound. On +#: Wayland, when the compositor supports it, it is asked to play the +#: system default bell sound, and this setting has no effect. Note +#: that Hyprland claims to support this protocol, but does not +#: actually play a sound +#: . This setting +#: defaults to the custom theme name specified in the XDG Sound theme +#: specification , falling back to the default +#: freedesktop theme if it does not exist. To change your sound theme +#: desktop wide, create +#: :file:~/.local/share/sounds/__custom/index.theme` with the +#: contents: + +#: [Sound Theme] + +#: Inherits=name-of-the-sound-theme-you-want-to-use + +#: Replace name-of-the-sound-theme-you-want-to-use with the actual +#: theme name. Now all compliant applications should use sounds from +#: this theme. + +#: }}} + +#: Window layout {{{ + +# remember_window_size yes +# initial_window_width 640 +# initial_window_height 400 + +#: If enabled, the OS Window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the OS Window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +# remember_window_position no + +#: If enabled, the OS Window position will be remembered so that new +#: instances of kitty will have the same position as the previous +#: instance. If disabled, the OS Window will be placed by the window +#: manager. Note that remembering of position only works if the +#: underlying desktop environment/window manager supports it. It never +#: works on Wayland. See also kitty --position to specify the position +#: when launching kitty. + +# enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the layouts . + +# window_resize_step_cells 2 +# window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing kitty windows in a layout with the shortcut +#: start_resizing_window. The cells value is used for horizontal +#: resizing, and the lines value is used for vertical resizing. + +# window_border_width 0.5pt + +#: The width of window borders. Can be either in pixels (px) or pts +#: (pt). Values in pts will be rounded to the nearest number of pixels +#: based on screen resolution. If not specified, the unit is assumed +#: to be pts. Note that borders are displayed only when more than one +#: window is visible. They are meant to separate multiple windows. + +# draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: borders that separate the window from a neighbor are drawn. Note +#: that setting a non-zero window_margin_width overrides this and +#: causes all borders to be drawn. + +# draw_window_borders_for_single_window no + +#: Draw borders around a window even when there is only a single +#: window visible. When enabled and there is only a single window, +#: full borders are drawn around it (as if draw_minimal_borders is +#: false). The border will show in the active color when the window is +#: focused and the OS window has focus, and in the inactive color when +#: the OS window loses focus. This provides a clear visual indicator +#: of whether the kitty window is focused. When there are multiple +#: windows visible, this option has no effect and normal border +#: drawing rules apply. + +# window_margin_width 0 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +# single_window_margin_width -1 + +#: The window margin to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_margin_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# window_padding_width 0 + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +# single_window_padding_width -1 + +#: The window padding to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_padding_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be +#: only at the bottom and right edges. The value can be one of: top- +#: left, top, top-right, left, center, right, bottom-left, bottom, +#: bottom-right. + +# active_border_color #00ff00 + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +# inactive_border_color #cccccc + +#: The color for the border of inactive windows. + +# bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred. + +# inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +# hide_window_decorations no + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only and titlebar-and-corners can be used +#: to only hide the titlebar and the rounded corners. Whether this +#: works and exactly what effect it has depends on the window +#: manager/operating system. Note that the effects of changing this +#: option when reloading config are undefined. When using titlebar- +#: only, it is useful to also set window_margin_width and +#: placement_strategy to prevent the rounded corners from clipping +#: text. Or use titlebar-and-corners. + +# window_logo_path none + +#: Path to a logo image. Must be in PNG/JPEG/WEBP/GIF/TIFF/BMP format. +#: Relative paths are interpreted relative to the kitty config +#: directory. The logo is displayed in a corner of every kitty window. +#: The position is controlled by window_logo_position. Individual +#: windows can be configured to have different logos either using the +#: launch action or the remote control +#: facility. + +# window_logo_position bottom-right + +#: Where to position the window logo in the window. The value can be +#: one of: top-left, top, top-right, left, center, right, bottom-left, +#: bottom, bottom-right. + +# window_logo_alpha 0.5 + +#: The amount the logo should be faded into the background. With zero +#: being fully faded and one being fully opaque. + +# window_logo_scale 0 + +#: The percentage (0-100] of the window size to which the logo should +#: scale. Using a single number means the logo is scaled to that +#: percentage of the shortest window dimension, while preserving +#: aspect ratio of the logo image. + +#: Using two numbers means the width and height of the logo are scaled +#: to the respective percentage of the window's width and height. + +#: Using zero as the percentage disables scaling in that dimension. A +#: single zero (the default) disables all scaling of the window logo. + +# resize_debounce_time 0.1 0.5 + +#: The time to wait (in seconds) before asking the program running in +#: kitty to resize and redraw the screen during a live resize of the +#: OS window, when no new resize events have been received, i.e. when +#: resizing is either paused or finished. On platforms such as macOS, +#: where the operating system sends events corresponding to the start +#: and end of a live resize, the second number is used for redraw- +#: after-pause since kitty can distinguish between a pause and end of +#: resizing. On such systems the first number is ignored and redraw is +#: immediate after end of resize. On other systems only the first +#: number is used so that kitty is "ready" quickly after the end of +#: resizing, while not also continuously redrawing, to save energy. + +# resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with initial_window_width +#: and initial_window_height in number of cells, this option can be +#: used to keep the margins as small as possible when resizing the OS +#: window. Note that this does not currently work on Wayland. + +# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ + +#: The list of characters for visual window selection. For example, +#: for selecting a window to focus on with focus_visible_window. The +#: value should be a series of unique numbers or alphabets, case +#: insensitive, from the set 0-9A-Z\-=[];',./\\`. Specify your +#: preference as a string of characters. + +# confirm_os_window_close -1 + +#: Ask for confirmation when closing an OS window or a tab with at +#: least this number of kitty windows in it by window manager (e.g. +#: clicking the window close button or pressing the operating system +#: shortcut to close windows) or by the close_tab action. A value of +#: zero disables confirmation. This confirmation also applies to +#: requests to quit the entire application (all OS windows, via the +#: quit action). Negative values are converted to positive ones, +#: however, with shell_integration enabled, using negative values +#: means windows sitting at a shell prompt are not counted, only +#: windows where some command is currently running. You can also have +#: backgrounded jobs prevent closing, by adding count-background to +#: the setting, for example: -1 count-background. Note that if you +#: want confirmation when closing individual windows, you can map the +#: close_window_with_confirmation action. + +#: }}} + +#: Tab bar {{{ + +# tab_bar_edge bottom + +#: The edge to show the tab bar on, top or bottom. + +# tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts). + +# tab_bar_margin_height 0.0 0.0 + +#: The margin above and below the tab bar (in pts). The first number +#: is the margin between the edge of the OS Window and the tab bar. +#: The second number is the margin between the tab bar and the +#: contents of the current tab. + +# tab_bar_style fade + +#: The tab bar style, can be one of: + +#: fade +#: Each tab's edges fade into the background color. (See also tab_fade) +#: slant +#: Tabs look like the tabs in a physical file. +#: separator +#: Tabs are separated by a configurable separator. (See also +#: tab_separator) +#: powerline +#: Tabs are shown as a continuous line with "fancy" separators. +#: (See also tab_powerline_style) +#: custom +#: A user-supplied Python function called draw_tab is loaded from the file +#: tab_bar.py in the kitty config directory. For examples of how to +#: write such a function, see the functions named draw_tab_with_* in +#: kitty's source code: kitty/tab_bar.py. See also +#: this discussion +#: for examples from kitty users. +#: hidden +#: The tab bar is hidden. If you use this, you might want to create +#: a mapping for the select_tab action which presents you with a list of +#: tabs and allows for easy switching to a tab. + +# tab_bar_filter + +#: A search expression . Only tabs that match this expression will +#: be shown in the tab bar. The currently active tab is always shown, +#: regardless of whether it matches or not. When using this option, +#: the tab bar may be displayed with less tabs than specified in +#: tab_bar_min_tabs, as evaluating the filter is expensive and is done +#: only at display time. This is most useful when using sessions +#: . An expression of +#: session:~ or session:^$ will show only tabs that belong to the +#: current session or no session. The various tab navigation actions +#: such as goto_tab, next_tab, previous_tab, etc. are automatically +#: restricted to work only on matching tabs. + +# tab_bar_align left + +#: The horizontal alignment of the tab bar, can be one of: left, +#: center, right. + +# tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown. + +# tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of right will switch to the tab to the right of +#: the closed tab. A value of last will switch to the right-most tab. + +# tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +# tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +# tab_powerline_style angled + +#: The powerline separator style between tabs in the tab bar when +#: using powerline as the tab_bar_style, can be one of: angled, +#: slanted, round. + +# tab_activity_symbol none + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has some activity. If you want to use +#: leading or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +# tab_title_max_length 0 + +#: The maximum number of cells that can be used to render the text in +#: a tab. A value of zero means that no limit is applied. + +# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{tab.last_focused_progress_percent}{title}" + +#: A template to render the tab title. The default just renders the +#: title with optional symbols for bell and activity. If you wish to +#: include the tab-index as well, use something like: {index}:{title}. +#: Useful if you have shortcuts mapped for goto_tab N. If you prefer +#: to see the index as a superscript, use {sup.index}. All data +#: available is: + +#: title +#: The current tab title. +#: index +#: The tab index usable with goto_tab N goto_tab shortcuts. +#: layout_name +#: The current layout name. +#: session_name +#: The name of the kitty session file from which this tab was created, if any. +#: active_session_name +#: The name of the kitty session file from which the active window in this tab was created, if any. +#: num_windows +#: The number of windows in the tab. +#: num_window_groups +#: The number of window groups (a window group is a window and all of its overlay windows) in the tab. +#: tab.active_wd +#: The working directory of the currently active window in the tab +#: (expensive, requires syscall). Use tab.active_oldest_wd to get +#: the directory of the oldest foreground process rather than the newest. +#: tab.active_exe +#: The name of the executable running in the foreground of the currently +#: active window in the tab (expensive, requires syscall). Use +#: tab.active_oldest_exe for the oldest foreground process. +#: max_title_length +#: The maximum title length available. +#: keyboard_mode +#: The name of the current keyboard mode or the empty string if no keyboard mode is active. +#: tab.last_focused_progress_percent +#: If a command running in a window reports the progress for a task, show this progress as a percentage +#: from the most recently focused window in the tab. Empty string if no progress is reported. +#: tab.progress_percent +#: If a command running in a window reports the progress for a task, show this progress as a percentage +#: from all windows in the tab, averaged. Empty string is no progress is reported. +#: custom +#: This will call a function named draw_title(data) from the file tab_bar.py placed in +#: the kitty config directory. The function will be passed a dictionary of data, the same data that +#: can be used in this template. It can then perform arbitrarily complex processing and return a string. +#: For example: tab_title_template "{custom}" will use the output of the function as the tab title. +#: Any print statements in the draw_title() will print to the STDOUT of the kitty process, useful +#: for debugging. + + +#: Note that formatting is done by Python's string formatting +#: machinery, so you can use, for instance, {layout_name[:2].upper()} +#: to show only the first two letters of the layout name, upper-cased. +#: If you want to style the text, you can use styling directives, for +#: example: +#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. +#: Similarly, for bold and italic: +#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. +#: The 256 eight terminal colors can be used as `fmt.fg.color0` +#: through `fmt.fg.color255`. Note that for backward compatibility, if +#: {bell_symbol} or {activity_symbol} are not present in the template, +#: they are prepended to it. + +# active_tab_title_template none + +#: Template to use for active tabs. If not specified falls back to +#: tab_title_template. + +# active_tab_foreground #000 +# active_tab_background #eee +# active_tab_font_style bold-italic +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# inactive_tab_font_style normal + +#: Tab bar colors and styles. + +# tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +# tab_bar_margin_color none + +#: Color for the tab bar margin area. Defaults to using the terminal +#: background color for margins above and below the tab bar. For side +#: margins the default color is chosen to match the background color +#: of the neighboring tab. + +#: }}} + +#: Color scheme {{{ + +# foreground #dddddd +# background #000000 + +#: The foreground and background colors. + +# background_opacity 1.0 + +#: The opacity of the terminal background color. A number between zero +#: and one, where one is opaque and zero is fully transparent. This +#: will only work if supported by the OS (for instance, when using a +#: compositor under X11). Note that it only sets the background +#: color's opacity in cells that have the same background color as the +#: default terminal background, so that things like the status bar in +#: vim, powerline prompts, etc. still look good. But it means that if +#: you use a color theme with a background color in your editor, it +#: will not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. See also transparent_background_colors. Be +#: aware that using a value less than 1.0 is a (possibly significant) +#: performance hit. When using a low value for this setting, it is +#: desirable that you set the background color to a color the matches +#: the general color of the desktop background, for best text +#: rendering. Note also, that this setting does not apply to the +#: background_image, if any. The background image can itself have +#: transparency via its alpha channel if desired, and that will be +#: respected. + +#: If you want to dynamically change transparency of windows, set +#: dynamic_background_opacity to yes (this is off by default as it has +#: a performance cost). Changing this option when reloading the config +#: will only work if dynamic_background_opacity was enabled in the +#: original config. + +# background_blur 0 + +#: Set to a positive value to enable background blur (blurring of the +#: visuals behind a transparent window) on platforms that support it. +#: Only takes effect when background_opacity is less than one. On +#: macOS, this will also control the blur radius (amount of blurring). +#: Setting it to too high a value will cause severe performance issues +#: and/or rendering artifacts. Usually, values up to 64 work well. +#: Note that this might cause performance issues, depending on how the +#: platform implements it, so use with care. Currently supported on +#: macOS and KDE. + +# transparent_background_colors + +#: A space separated list of upto 7 colors, with opacity. When the +#: background color of a cell matches one of these colors, it is +#: rendered semi-transparent using the specified opacity. + +#: Useful in more complex UIs like editors where you could want more +#: than a single background color to be rendered as transparent, for +#: instance, for a cursor highlight line background or a highlighted +#: block. Terminal applications can set this color using The kitty +#: color control escape code. + +#: The syntax for specifying colors is: color@opacity, where the +#: @opacity part is optional. When unspecified, the value of +#: background_opacity is used. For example:: + +#: transparent_background_colors red@0.5 #00ff00@0.3 + +#: Note that you must also set background_opacity to something less +#: than 1 for this setting to work properly. + +# dynamic_background_opacity no + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +#: Changing this option by reloading the config is not supported. + +# background_image none + +#: Path to a background image. Must be in PNG/JPEG/WEBP/TIFF/GIF/BMP +#: format. Note that when using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# background_image_layout tiled + +#: Whether to tile, scale or clamp the background image. The value can +#: be one of tiled, mirror-tiled, scaled, clamped, centered or +#: cscaled. The scaled and cscaled values scale the image to the +#: window size, with cscaled preserving the image aspect ratio. Note +#: that when using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# background_image_linear no + +#: When background image is scaled, whether linear interpolation +#: should be used. Note that when using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# background_tint 0.0 + +#: How much to tint the background image by the background color. This +#: option makes it easier to read the text. Tinting is done using the +#: current background color for each window. This option applies only +#: if background_image is set. Note that when using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# background_tint_gaps 1.0 + +#: How much to tint the background image at the window gaps by the +#: background color, after applying background_tint. Since this is +#: multiplicative with background_tint, it can be used to lighten the +#: tint over the window gaps for a *separated* look. Note that when +#: using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# dim_opacity 0.4 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +# selection_foreground #000000 +# selection_background #fffacd + +#: The foreground and background colors for text selected with the +#: mouse. Setting both of these to none will cause a "reverse video" +#: effect for selections, where the selection will be the cell text +#: color and the text will become the cell background color. Setting +#: only selection_foreground to none will cause the foreground color +#: to be used unchanged. Note that these colors can be overridden by +#: the program running in the terminal. + +#: The color table {{{ + +#: The 256 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version, for the first 16 colors. You can set the +#: remaining 240 colors as color16 to color255. + +# color0 #000000 +# color8 #767676 + +#: black + +# color1 #cc0403 +# color9 #f2201f + +#: red + +# color2 #19cb00 +# color10 #23fd00 + +#: green + +# color3 #cecb00 +# color11 #fffd00 + +#: yellow + +# color4 #0d73cc +# color12 #1a8fff + +#: blue + +# color5 #cb1ed1 +# color13 #fd28ff + +#: magenta + +# color6 #0dcdcd +# color14 #14ffff + +#: cyan + +# color7 #dddddd +# color15 #ffffff + +#: white + +# mark1_foreground black + +#: Color for marks of type 1 + +# mark1_background #98d3cb + +#: Color for marks of type 1 (light steel blue) + +# mark2_foreground black + +#: Color for marks of type 2 + +# mark2_background #f2dcd3 + +#: Color for marks of type 1 (beige) + +# mark3_foreground black + +#: Color for marks of type 3 + +# mark3_background #f274bc + +#: Color for marks of type 3 (violet) + +#: }}} + +#: }}} + +#: Advanced {{{ + +# shell . + +#: The shell program to execute. The default value of . means to use +#: the value of of the SHELL environment variable or if unset, +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login and --interactive to ensure that the shell starts in +#: interactive mode and reads its startup rc files. Environment +#: variables are expanded in this setting. + +# editor . + +#: The terminal based text editor (such as vim or nano) to use when +#: editing the kitty config file or similar tasks. + +#: The default value of . means to use the environment variables +#: VISUAL and EDITOR in that order. If these variables aren't set, +#: kitty will run your shell ($SHELL -l -i -c env) to see if your +#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, +#: kitty will cycle through various known editors (vim, emacs, etc.) +#: and take the first one that exists on your system. + +# close_on_child_death no + +#: Close the window when the child process (usually the shell) exits. +#: With the default value no, the terminal will remain open when the +#: child exits as long as there are still other processes outputting +#: to the terminal (for example disowned or backgrounded processes). +#: When enabled with yes, the window will close as soon as the child +#: process exits. Note that setting it to yes means that any +#: background processes still using the terminal can fail silently +#: because their stdout/stderr/stdin no longer work. + +# remote_control_password + +#: Allow other programs to control kitty using passwords. This option +#: can be specified multiple times to add multiple passwords. If no +#: passwords are present kitty will ask the user for permission if a +#: program tries to use remote control with a password. A password can +#: also *optionally* be associated with a set of allowed remote +#: control actions. For example:: + +#: remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab + +#: Only the specified actions will be allowed when using this +#: password. Glob patterns can be used too, for example:: + +#: remote_control_password "my passphrase" set-tab-* resize-* + +#: To get a list of available actions, run:: + +#: kitten @ --help + +#: A set of actions to be allowed when no password is sent can be +#: specified by using an empty password. For example:: + +#: remote_control_password "" *-colors + +#: Finally, the path to a python module can be specified that provides +#: a function is_cmd_allowed that is used to check every remote +#: control command. For example:: + +#: remote_control_password "my passphrase" my_rc_command_checker.py + +#: Relative paths are resolved from the kitty configuration directory. +#: See rc_custom_auth for details. + +# allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on, other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over SSH +#: connections. The default setting of no prevents any form of remote +#: control. The meaning of the various values are: + +#: password +#: Remote control requests received over both the TTY device and the socket +#: are confirmed based on passwords, see remote_control_password. + +#: socket-only +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are denied. +#: See listen_on. + +#: socket +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are confirmed based on +#: password. + +#: no +#: Remote control is completely disabled. + +#: yes +#: Remote control requests are always accepted. + +# listen_on none + +#: Listen to the specified socket for remote control connections. Note +#: that this will apply to all kitty instances. It can be overridden +#: by the kitty --listen-on command line option. For UNIX sockets, +#: such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). +#: Environment variables are expanded and relative paths are resolved +#: with respect to the temporary directory. If {kitty_pid} is present, +#: then it is replaced by the PID of the kitty process, otherwise the +#: PID of the kitty process is appended to the value, with a hyphen. +#: For TCP sockets such as tcp:localhost:0 a random port is always +#: used even if a non-zero port number is specified. See the help for +#: kitty --listen-on for more details. Note that this will be ignored +#: unless allow_remote_control is set to either: yes, socket or +#: socket-only. Changing this option by reloading the config is not +#: supported. + +# env + +#: Specify the environment variables to be set in all child processes. +#: Using the name with an equal sign (e.g. env VAR=) will set it to +#: the empty string. Specifying only the name (e.g. env VAR) will +#: remove the variable from the child process' environment. Note that +#: environment variables are expanded recursively, for example:: + +#: env VAR1=a +#: env VAR2=${HOME}/${VAR1}/b + +#: The value of VAR2 will be /a/b. + +#: Use the special value read_from_shell to have kitty read the +#: specified variables from your login shell shell configuration. +#: Useful if your shell startup files setup a bunch of environment +#: variables that you want available to kitty and in kitty session +#: files. Each variable name is treated as a glob pattern to match. +#: For example: env read_from_shell=PATH LANG LC_* XDG_* EDITOR +#: VISUAL. Note that these variables are only read after the +#: configuration is fully processed, thus they are not available for +#: recursive expansion and they will override any variables set by +#: other env directives. + +# filter_notification + +#: Specify rules to filter out notifications sent by applications +#: running in kitty. Can be specified multiple times to create +#: multiple filter rules. A rule specification is of the form +#: field:regexp. A filter rule can match on any of the fields: title, +#: body, app, type. The special value of all filters out all +#: notifications. Rules can be combined using Boolean operators. Some +#: examples:: + +#: filter_notification title:hello or body:"abc.*def" +#: # filter out notification from vim except for ones about updates, (?i) +#: # makes matching case insensitive. +#: filter_notification app:"[ng]?vim" and not body:"(?i)update" +#: # filter out all notifications +#: filter_notification all + +#: The field app is the name of the application sending the +#: notification and type is the type of the notification. Not all +#: applications will send these fields, so you can also match on the +#: title and body of the notification text. More sophisticated +#: programmatic filtering and custom actions on notifications can be +#: done by creating a notifications.py file in the kitty config +#: directory (~/.config/kitty). An annotated sample is available +#: . + +# watcher + +#: Path to python file which will be loaded for watchers +#: . Can be +#: specified more than once to load multiple watchers. The watchers +#: will be added to every kitty window. Relative paths are resolved +#: relative to the kitty config directory. Note that reloading the +#: config will only affect windows created after the reload. + +# exe_search_path + +#: Control where kitty finds the programs to run. The default search +#: order is: First search the system wide PATH, then ~/.local/bin and +#: ~/bin. If still not found, the PATH defined in the login shell +#: after sourcing all its startup files is tried. Finally, if present, +#: the PATH specified by the env option is tried. + +#: This option allows you to prepend, append, or remove paths from +#: this search order. It can be specified multiple times for multiple +#: paths. A simple path will be prepended to the search order. A path +#: that starts with the + sign will be append to the search order, +#: after ~/bin above. A path that starts with the - sign will be +#: removed from the entire search order. For example:: + +#: exe_search_path /some/prepended/path +#: exe_search_path +/some/appended/path +#: exe_search_path -/some/excluded/path + +# update_check_interval 24 + +#: The interval to periodically check if an update to kitty is +#: available (in hours). If an update is found, a system notification +#: is displayed informing you of the available update. The default is +#: to check every 24 hours, set to zero to disable. Update checking is +#: only done by the official binary builds. Distro packages or source +#: builds do not do update checking. Changing this option by reloading +#: the config is not supported. + +# startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session =none command line option +#: for individual instances. See sessions +#: in the kitty +#: documentation for details. Note that relative paths are interpreted +#: with respect to the kitty config directory. Environment variables +#: in the path are expanded. Changing this option by reloading the +#: config is not supported. Note that if kitty is invoked with command +#: line arguments specifying a command to run, this option is ignored. + +# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: possible actions are: write-clipboard, read-clipboard, write- +#: primary, read-primary, read-clipboard-ask, read-primary-ask. The +#: default is to allow writing to the clipboard and primary selection +#: and to ask for permission when a program tries to read from the +#: clipboard. Note that disabling the read confirmation is a security +#: risk as it means that any program, even the ones running on a +#: remote server via SSH can read your clipboard. See also +#: clipboard_max_size. + +# clipboard_max_size 512 + +#: The maximum size (in MB) of data from programs running in kitty +#: that will be stored for writing to the system clipboard. A value of +#: zero means no size limit is applied. See also clipboard_control. + +# file_transfer_confirmation_bypass + +#: The password that can be supplied to the file transfer kitten +#: to skip the +#: transfer confirmation prompt. This should only be used when +#: initiating transfers from trusted computers, over trusted networks +#: or encrypted transports, as it allows any programs running on the +#: remote machine to read/write to the local filesystem, without +#: permission. + +# allow_hyperlinks yes + +#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 +#: escape sequences are ignored. Otherwise they become clickable +#: links, that you can click with the mouse or by using the hints +#: kitten . The +#: special value of ask means that kitty will ask before opening the +#: link when clicked. + +# shell_integration enabled + +#: Enable shell integration on supported shells. This enables features +#: such as jumping to previous prompts, browsing the output of the +#: previous command in a pager, etc. on supported shells. Set to +#: disabled to turn off shell integration, completely. It is also +#: possible to disable individual features, set to a space separated +#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- +#: prompt-mark, no-complete, no-sudo. See Shell integration +#: for details. + +# allow_cloning ask + +#: Control whether programs running in the terminal can request new +#: windows to be created. The canonical example is clone-in-kitty +#: . +#: By default, kitty will ask for permission for each clone request. +#: Allowing cloning unconditionally gives programs running in the +#: terminal (including over SSH) permission to execute arbitrary code, +#: as the user who is running the terminal, on the computer that the +#: terminal is running on. + +# clone_source_strategies venv,conda,env_var,path + +#: Control what shell code is sourced when running clone-in-kitty in +#: the newly cloned window. The supported strategies are: + +#: venv +#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the +#: Python stdlib venv module and allows cloning venvs automatically. +#: conda +#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual +#: environments created by conda. +#: env_var +#: Execute the contents of the environment variable +#: KITTY_CLONE_SOURCE_CODE with eval. +#: path +#: Source the file pointed to by the environment variable +#: KITTY_CLONE_SOURCE_PATH. + +#: This option must be a comma separated list of the above values. +#: Only the first valid match, in the order specified, is sourced. + +# notify_on_cmd_finish never + +#: Show a desktop notification when a long-running command finishes +#: (needs shell_integration). The possible values are: + +#: never +#: Never send a notification. + +#: unfocused +#: Only send a notification when the window does not have keyboard focus. + +#: invisible +#: Only send a notification when the window both is unfocused and not visible +#: to the user, for example, because it is in an inactive tab or its OS window +#: is not currently visible (on platforms that support OS window visibility querying +#: this considers an OS Window visible iff it is active). + +#: always +#: Always send a notification, regardless of window state. + +#: There are two optional arguments: + +#: First, the minimum duration for what is considered a long running +#: command. The default is 5 seconds. Specify a second argument to set +#: the duration. For example: invisible 15. Do not set the value too +#: small, otherwise a command that launches a new OS Window and exits +#: will spam a notification. + +#: Second, the action to perform. The default is notify. The possible +#: values are: + +#: notify +#: Send a desktop notification. The subsequent arguments are optional and specify when +#: the notification is automatically cleared. The set of possible events when the notification is +#: cleared are: focus and next. focus means that when the notification +#: policy is unfocused or invisible the notification is automatically cleared +#: when the window regains focus. The value of next means that the previous notification +#: is cleared when the next notification is shown. The default when no arguments are specified +#: is: focus next. + +#: bell +#: Ring the terminal bell. + +#: notify-bell +#: Send a desktop notification and ring the terminal bell. +#: The arguments are the same as for `notify`. + +#: command +#: Run a custom command. All subsequent arguments are the cmdline to run. + +#: Some more examples:: + +#: # Send a notification when a command takes more than 5 seconds in an unfocused window +#: notify_on_cmd_finish unfocused +#: # Send a notification when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 +#: # Ring a bell when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 bell +#: # Run 'notify-send' when a command takes more than 10 seconds in a invisible window +#: # Here %c is replaced by the current command line and %s by the job exit code +#: notify_on_cmd_finish invisible 10.0 command notify-send "job finished with status: %s" %c +#: # Do not clear previous notification when next command finishes or window regains focus +#: notify_on_cmd_finish invisible 5.0 notify + +# term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on "Stack Overflow" +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. Changing this option by reloading the config will only affect +#: newly created windows. + +# terminfo_type path + +#: The value of the TERMINFO environment variable to set. This +#: variable is used by programs running in the terminal to search for +#: terminfo databases. The default value of path causes kitty to set +#: it to a filesystem location containing the kitty terminfo database. +#: A value of direct means put the entire database into the env var +#: directly. This can be useful when connecting to containers, for +#: example. But, note that not all software supports this. A value of +#: none means do not touch the variable. + +# forward_stdio no + +#: Forward STDOUT and STDERR of the kitty process to child processes. +#: This is useful for debugging as it allows child processes to print +#: to kitty's STDOUT directly. For example, echo hello world +#: >&$KITTY_STDIO_FORWARDED in a shell will print to the parent +#: kitty's STDOUT. Sets the KITTY_STDIO_FORWARDED=fdnum environment +#: variable so child processes know about the forwarding. Note that on +#: macOS this prevents the shell from being run via the login utility +#: so getlogin() will not work in programs run in this session. + +# menu_map + +#: Specify entries for various menus in kitty. Currently only the +#: global menubar on macOS is supported. For example:: + +#: menu_map global "Actions::Launch something special" launch --hold --type=os-window sh -c "echo hello world" + +#: This will create a menu entry named "Launch something special" in +#: an "Actions" menu in the macOS global menubar. Sub-menus can be +#: created by adding more levels separated by the :: characters. + +#: }}} + +#: OS specific tweaks {{{ + +# wayland_titlebar_color system + +#: The color of the kitty window's titlebar on Wayland systems with +#: client side window decorations such as GNOME. A value of system +#: means to use the default system colors, a value of background means +#: to use the background color of the currently active kitty window +#: and finally you can use an arbitrary color, such as #12af59 or red. + +# macos_titlebar_color system + +#: The color of the kitty window's titlebar on macOS. A value of +#: system means to use the default system color, light or dark can +#: also be used to set it explicitly. A value of background means to +#: use the background color of the currently active window and finally +#: you can use an arbitrary color, such as #12af59 or red. + +# macos_option_as_alt no + +#: Use the Option key as an Alt key on macOS. With this set to no, +#: kitty will use the macOS native Option+Key to enter Unicode +#: character behavior. This will break any Alt+Key keyboard shortcuts +#: in your terminal programs, but you can use the macOS Unicode input +#: technique. You can use the values: left, right or both to use only +#: the left, right or both Option keys as Alt, instead. Note that +#: kitty itself always treats Option the same as Alt. This means you +#: cannot use this option to configure different kitty shortcuts for +#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using +#: Option/Alt+Key will take priority, so that any such key presses +#: will not be passed to terminal programs running inside kitty. +#: Changing this option by reloading the config is not supported. + +# macos_hide_from_tasks no + +#: Hide the kitty window from running tasks on macOS (⌘+Tab and the +#: Dock). Changing this option by reloading the config is not +#: supported. + +# macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed on macOS. +#: By default, kitty will stay running, even with no open windows, as +#: is the expected behavior on macOS. + +# macos_window_resizable yes + +#: Disable this if you want kitty top-level OS windows to not be +#: resizable on macOS. + +# macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes on macOS. For example, a +#: value of 0.75 will result in rendering that looks similar to sub- +#: pixel antialiasing at common font sizes. Note that in modern kitty, +#: this option is obsolete (although still supported). Consider using +#: text_composition_strategy instead. + +# macos_traditional_fullscreen no + +#: Use the macOS traditional full-screen transition, that is faster, +#: but less pretty. + +# macos_show_window_title_in all + +#: Control where the window title is displayed on macOS. A value of +#: window will show the title of the currently active window at the +#: top of the macOS window. A value of menubar will show the title of +#: the currently active window in the macOS global menu bar, making +#: use of otherwise wasted space. A value of all will show the title +#: in both places, and none hides the title. See +#: macos_menubar_title_max_length for how to control the length of the +#: title in the menu bar. + +# macos_menubar_title_max_length 0 + +#: The maximum number of characters from the window title to show in +#: the macOS global menu bar. Values less than one means that there is +#: no maximum limit. + +# macos_custom_beam_cursor no + +#: Use a custom mouse cursor for macOS that is easier to see on both +#: light and dark backgrounds. Nowadays, the default macOS cursor +#: already comes with a white border. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. Changing this option +#: by reloading the config is not supported. + +# macos_colorspace srgb + +#: The colorspace in which to interpret terminal colors. The default +#: of srgb will cause colors to match those seen in web browsers. The +#: value of default will use whatever the native colorspace of the +#: display is. The value of displayp3 will use Apple's special +#: snowflake display P3 color space, which will result in over +#: saturated (brighter) colors with some color shift. Reloading +#: configuration will change this value only for newly created OS +#: windows. + +# linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. Changing this option by +#: reloading the config is not supported. + +# wayland_enable_ime yes + +#: Enable Input Method Extension on Wayland. This is typically used +#: for inputting text in East Asian languages. However, its +#: implementation in Wayland is often buggy and introduces latency +#: into the input loop, so disable this if you know you dont need it. +#: Changing this option by reloading the config is not supported, it +#: will not have any effect. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: Keys are identified simply by their lowercase Unicode characters. +#: For example: a for the A key, [ for the left square bracket key, +#: etc. For functional keys, such as Enter or Escape, the names are +#: present at Functional key definitions +#: . +#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt +#: (opt, option, ⌥), super (cmd, command, ⌘). + +#: Simple shortcut mapping is done with the map directive. For full +#: details on advanced mapping including modal and per application +#: maps, see mapping . Some +#: quick examples to illustrate common tasks:: + +#: # unmap a keyboard shortcut, passing it to the program running in kitty +#: map kitty_mod+space +#: # completely ignore a keyboard event +#: map ctrl+alt+f1 discard_event +#: # combine multiple actions +#: map kitty_mod+e combine : new_window : next_layout +#: # multi-key shortcuts +#: map ctrl+x>ctrl+y>z action + +#: The full list of actions that can be mapped to key presses is +#: available here . + +# kitty_mod ctrl+shift + +#: Special modifier key alias for default shortcuts. You can change +#: the value of this option to alter all default shortcuts that use +#: kitty_mod. + +# clear_all_shortcuts no + +#: Remove all shortcut definitions up to this point. Useful, for +#: instance, to remove the default shortcuts. + +# action_alias + +#: E.g. action_alias launch_tab launch --type=tab --cwd=current + +#: Define action aliases to avoid repeating the same options in +#: multiple mappings. Aliases can be defined for any action and will +#: be expanded recursively. For example, the above alias allows you to +#: create mappings to launch a new tab in the current working +#: directory without duplication:: + +#: map f1 launch_tab vim +#: map f2 launch_tab emacs + +#: Similarly, to alias kitten invocation:: + +#: action_alias hints kitten hints --hints-offset=0 + +# kitten_alias + +#: E.g. kitten_alias hints hints --hints-offset=0 + +#: Like action_alias above, but specifically for kittens. Generally, +#: prefer to use action_alias. This option is a legacy version, +#: present for backwards compatibility. It causes all invocations of +#: the aliased kitten to be substituted. So the example above will +#: cause all invocations of the hints kitten to have the --hints- +#: offset=0 option applied. + +#: Clipboard {{{ + +#: Copy to clipboard + +# map kitty_mod+c copy_to_clipboard + +#:: There is also a copy_or_interrupt action that can be optionally +#:: mapped to Ctrl+C. It will copy only if there is a selection and +#:: send an interrupt otherwise. Similarly, +#:: copy_and_clear_or_interrupt will copy and clear the selection or +#:: send an interrupt if there is no selection. The copy_or_noop +#:: action will copy if there is a selection and pass the key through +#:: to the application running in the terminal if there is no +#:: selection. + +#: Copy to clipboard or pass through + +# map cmd+c copy_or_noop + +#: Paste from clipboard + +# map kitty_mod+v paste_from_clipboard +# map cmd+v paste_from_clipboard + +#: Paste from selection + +# map kitty_mod+s paste_from_selection +# map shift+insert paste_from_selection + +#: Pass selection to program + +# map kitty_mod+o pass_selection_to_program + +#:: You can also pass the contents of the current selection to any +#:: program with pass_selection_to_program. By default, the system's +#:: open program is used, but you can specify your own, the selection +#:: will be passed as a command line argument to the program. For +#:: example:: + +#:: map kitty_mod+o pass_selection_to_program firefox + +#:: You can pass the current selection to a terminal program running +#:: in a new kitty window, by using the @selection placeholder:: + +#:: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +#: Scroll line up + +# map kitty_mod+up scroll_line_up +# map kitty_mod+k scroll_line_up +# map opt+cmd+page_up scroll_line_up +# map cmd+up scroll_line_up + +#: Scroll line down + +# map kitty_mod+down scroll_line_down +# map kitty_mod+j scroll_line_down +# map opt+cmd+page_down scroll_line_down +# map cmd+down scroll_line_down + +#: Scroll page up + +# map kitty_mod+page_up scroll_page_up +# map cmd+page_up scroll_page_up + +#: Scroll page down + +# map kitty_mod+page_down scroll_page_down +# map cmd+page_down scroll_page_down + +#: Scroll to top + +# map kitty_mod+home scroll_home +# map cmd+home scroll_home + +#: Scroll to bottom + +# map kitty_mod+end scroll_end +# map cmd+end scroll_end + +#: Scroll to previous shell prompt + +# map kitty_mod+z scroll_to_prompt -1 + +#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last +#:: jumped to or the last clicked position. Requires shell +#:: integration +#:: to work. + +#: Scroll to next shell prompt + +# map kitty_mod+x scroll_to_prompt 1 + +#: Browse scrollback buffer in pager + +# map kitty_mod+h show_scrollback + +#:: You can pipe the contents of the current screen and history +#:: buffer as STDIN to an arbitrary program using launch --stdin- +#:: source. For example, the following opens the scrollback buffer in +#:: less in an overlay window:: + +#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#:: For more details on piping screen and buffer contents to external +#:: programs, see launch . + +#: Browse output of the last shell command in pager + +# map kitty_mod+g show_last_command_output + +#:: You can also define additional shortcuts to get the command +#:: output. For example, to get the first command output on screen:: + +#:: map f1 show_first_command_output_on_screen + +#:: To get the command output that was last accessed by a keyboard +#:: action or mouse action:: + +#:: map f1 show_last_visited_command_output + +#:: You can pipe the output of the last command run in the shell +#:: using the launch action. For example, the following opens the +#:: output in less in an overlay window:: + +#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R + +#:: To get the output of the first command on the screen, use +#:: @first_cmd_output_on_screen. To get the output of the last jumped +#:: to command, use @last_visited_cmd_output. + +#:: Requires shell integration +#:: to work. + +#: Search the scrollback within a pager + +# map kitty_mod+/ search_scrollback +# map cmd+f search_scrollback + +#:: Search for currently selected text in the scrollback using the +#:: configured scrollback_pager. Assumes that pressing the / key +#:: triggers search mode in the pager. If you want to create a manual +#:: mapping with a special pager for this, you can use something +#:: like: + +#:: map f1 combine : launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay mypager : send_key / + +#:: For more sophisticated control, such as using the current +#:: selection, use remote_control_script. + +#: }}} + +#: Window management {{{ + +#: New window + +# map kitty_mod+enter new_window +# map cmd+enter new_window + +#:: You can open a new kitty window running an arbitrary program, for +#:: example:: + +#:: map kitty_mod+y launch mutt + +#:: You can open a new window with the current working directory set +#:: to the working directory of the current window using:: + +#:: map ctrl+alt+enter launch --cwd=current + +#:: You can open a new window that is allowed to control kitty via +#:: the kitty remote control facility with launch --allow-remote- +#:: control. Any programs running in that window will be allowed to +#:: control kitty. For example:: + +#:: map ctrl+enter launch --allow-remote-control some_program + +#:: You can open a new window next to the currently active window or +#:: as the first window, with:: + +#:: map ctrl+n launch --location=neighbor +#:: map ctrl+f launch --location=first + +#:: For more details, see launch +#:: . + +#: New OS window + +# map kitty_mod+n new_os_window +# map cmd+n new_os_window + +#:: Works like new_window above, except that it opens a top-level OS +#:: window. In particular you can use new_os_window_with_cwd to open +#:: a window with the current working directory. + +#: Close window + +# map kitty_mod+w close_window +# map shift+cmd+d close_window + +#: Next window + +# map kitty_mod+] next_window + +#: Previous window + +# map kitty_mod+[ previous_window + +#: Move window forward + +# map kitty_mod+f move_window_forward + +#: Move window backward + +# map kitty_mod+b move_window_backward + +#: Move window to top + +# map kitty_mod+` move_window_to_top + +#: Start resizing window + +# map kitty_mod+r start_resizing_window +# map cmd+r start_resizing_window + +#: First window + +# map kitty_mod+1 first_window +# map cmd+1 first_window + +#: Second window + +# map kitty_mod+2 second_window +# map cmd+2 second_window + +#: Third window + +# map kitty_mod+3 third_window +# map cmd+3 third_window + +#: Fourth window + +# map kitty_mod+4 fourth_window +# map cmd+4 fourth_window + +#: Fifth window + +# map kitty_mod+5 fifth_window +# map cmd+5 fifth_window + +#: Sixth window + +# map kitty_mod+6 sixth_window +# map cmd+6 sixth_window + +#: Seventh window + +# map kitty_mod+7 seventh_window +# map cmd+7 seventh_window + +#: Eighth window + +# map kitty_mod+8 eighth_window +# map cmd+8 eighth_window + +#: Ninth window + +# map kitty_mod+9 ninth_window +# map cmd+9 ninth_window + +#: Tenth window + +# map kitty_mod+0 tenth_window + +#: Visually select and focus window + +# map kitty_mod+f7 focus_visible_window + +#:: Display overlay numbers and alphabets on the window, and switch +#:: the focus to the window when you press the key. When there are +#:: only two windows, the focus will be switched directly without +#:: displaying the overlay. You can change the overlay characters and +#:: their order with option visual_window_select_characters. + +#: Visually swap window with another + +# map kitty_mod+f8 swap_with_window + +#:: Works like focus_visible_window above, but swaps the window. + +#: }}} + +#: Tab management {{{ + +#: Next tab + +# map kitty_mod+right next_tab +# map shift+cmd+] next_tab +# map ctrl+tab next_tab + +#: Previous tab + +# map kitty_mod+left previous_tab +# map shift+cmd+[ previous_tab +# map ctrl+shift+tab previous_tab + +#: New tab + +# map kitty_mod+t new_tab +# map cmd+t new_tab + +#: Close tab + +# map kitty_mod+q close_tab +# map cmd+w close_tab + +#: Close OS window + +# map shift+cmd+w close_os_window + +#: Move tab forward + +# map kitty_mod+. move_tab_forward + +#: Move tab backward + +# map kitty_mod+, move_tab_backward + +#: Set tab title + +# map kitty_mod+alt+t set_tab_title +# map shift+cmd+i set_tab_title + + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, -2 being the tab active before the previously active tab and +#: so on. Any number larger than the number of tabs goes to the last +#: tab and any number less than the number of previously used tabs in +#: the history goes to the oldest previously used tab in the history:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and new_tab_with_cwd. +#: Finally, if you want the new tab to open next to the current tab +#: rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] +#: }}} + +#: Layout management {{{ + +#: Next layout + +# map kitty_mod+l next_layout + + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout + +#: There is also a toggle_layout action that switches to the named +#: layout or back to the previous layout if in the named layout. +#: Useful to temporarily "zoom" the active window by switching to the +#: stack layout:: + +#: map ctrl+alt+z toggle_layout stack +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +#: Increase font size + +# map kitty_mod+equal change_font_size all +2.0 +# map kitty_mod+plus change_font_size all +2.0 +# map kitty_mod+kp_add change_font_size all +2.0 +# map cmd+plus change_font_size all +2.0 +# map cmd+equal change_font_size all +2.0 +# map shift+cmd+equal change_font_size all +2.0 + +#: Decrease font size + +# map kitty_mod+minus change_font_size all -2.0 +# map kitty_mod+kp_subtract change_font_size all -2.0 +# map cmd+minus change_font_size all -2.0 +# map shift+cmd+minus change_font_size all -2.0 + +#: Reset font size + +# map kitty_mod+backspace change_font_size all 0 +# map cmd+0 change_font_size all 0 + + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 + +#: To setup shortcuts to multiply/divide the font size:: + +#: map kitty_mod+f6 change_font_size all *2.0 +#: map kitty_mod+f6 change_font_size all /2.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +#: Open URL + +# map kitty_mod+e open_url_with_hints + +#:: Open a currently visible URL using the keyboard. The program used +#:: to open the URL is specified in open_url_with. + +#: Insert selected path + +# map kitty_mod+p>f kitten hints --type path --program - + +#:: Select a path/filename and insert it into the terminal. Useful, +#:: for instance to run git commands on a filename output from a +#:: previous git command. + +#: Open selected path + +# map kitty_mod+p>shift+f kitten hints --type path + +#:: Select a path/filename and open it with the default open program. + +#: Insert chosen file + +# map kitty_mod+p>c kitten choose-files + +#:: Select a file using the choose-files +#:: kitten +#:: and insert it into the terminal. + +#: Insert chosen directory + +# map kitty_mod+p>d kitten choose-files --mode=dir + +#:: Select a directory using the choose-files +#:: kitten +#:: and insert it into the terminal. + +#: Insert selected line + +# map kitty_mod+p>l kitten hints --type line --program - + +#:: Select a line of text and insert it into the terminal. Useful for +#:: the output of things like: `ls -1`. + +#: Insert selected word + +# map kitty_mod+p>w kitten hints --type word --program - + +#:: Select words and insert into terminal. + +#: Insert selected hash + +# map kitty_mod+p>h kitten hints --type hash --program - + +#:: Select something that looks like a hash and insert it into the +#:: terminal. Useful with git, which uses SHA1 hashes to identify +#:: commits. + +#: Open the selected file at the selected line + +# map kitty_mod+p>n kitten hints --type linenum + +#:: Select something that looks like filename:linenum and open it in +#:: your default editor at the specified line number. + +#: Open the selected hyperlink + +# map kitty_mod+p>y kitten hints --type hyperlink + +#:: Select a hyperlink (i.e. a URL that has been marked as such by +#:: the terminal program, for example, by `ls --hyperlink=auto`). + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see hints kitten +#: . +#: }}} + +#: Miscellaneous {{{ + +#: Show documentation + +# map kitty_mod+f1 show_kitty_doc overview + +#: Toggle fullscreen + +# map kitty_mod+f11 toggle_fullscreen +# map ctrl+cmd+f toggle_fullscreen + +#: Toggle maximized + +# map kitty_mod+f10 toggle_maximized + +#: Toggle macOS secure keyboard entry + +# map opt+cmd+s toggle_macos_secure_keyboard_entry + +#: macOS Cycle through OS Windows + +# map cmd+` macos_cycle_through_os_windows + +#: macOS Cycle through OS Windows backwards + +# map cmd+shift+` macos_cycle_through_os_windows_backwards + +#: Unicode input + +# map kitty_mod+u kitten unicode_input +# map ctrl+cmd+space kitten unicode_input + +#: Edit config file + +# map kitty_mod+f2 edit_config_file +# map cmd+, edit_config_file + +#: Open the kitty command shell + +# map kitty_mod+escape kitty_shell window + +#:: Open the kitty shell in a new window / tab / overlay / os_window +#:: to control kitty using commands. + +#: Increase background opacity + +# map kitty_mod+a>m set_background_opacity +0.1 + +#: Decrease background opacity + +# map kitty_mod+a>l set_background_opacity -0.1 + +#: Make background fully opaque + +# map kitty_mod+a>1 set_background_opacity 1 + +#: Reset background opacity + +# map kitty_mod+a>d set_background_opacity default + +#: Reset the terminal + +# map kitty_mod+delete clear_terminal reset active +# map opt+cmd+r clear_terminal reset active + +#:: You can create shortcuts to clear/reset the terminal. For +#:: example:: + +#:: # Reset the terminal +#:: map f1 clear_terminal reset active +#:: # Clear the terminal screen by erasing all contents +#:: map f1 clear_terminal clear active +#:: # Clear the terminal scrollback by erasing it +#:: map f1 clear_terminal scrollback active +#:: # Scroll the contents of the screen into the scrollback +#:: map f1 clear_terminal scroll active +#:: # Clear everything on screen up to the line with the cursor or the start of the current prompt (needs shell integration) +#:: map f1 clear_terminal to_cursor active +#:: # Same as above except cleared lines are moved into scrollback +#:: map f1 clear_terminal to_cursor_scroll active +#:: # Erase the last command and its output (needs shell integration to work) +#:: map f1 clear_terminal last_command active + +#:: If you want to operate on all kitty windows instead of just the +#:: current one, use all instead of active. + +#:: Some useful functions that can be defined in the shell rc files +#:: to perform various kinds of clearing of the current window: + +#:: .. code-block:: sh + +#:: clear-only-screen() { +#:: printf "\e[H\e[2J" +#:: } + +#:: clear-screen-and-scrollback() { +#:: printf "\e[H\e[3J" +#:: } + +#:: clear-screen-saving-contents-in-scrollback() { +#:: printf "\e[H\e[22J" +#:: } + +#:: For instance, using these escape codes, it is possible to remap +#:: Ctrl+L to both scroll the current screen contents into the +#:: scrollback buffer and clear the screen, instead of just clearing +#:: the screen. For ZSH, in ~/.zshrc, add: + +#:: .. code-block:: zsh + +#:: ctrl_l() { +#:: builtin print -rn -- $'\r\e[0J\e[H\e[22J' >"$TTY" +#:: builtin zle .reset-prompt +#:: builtin zle -R +#:: } +#:: zle -N ctrl_l +#:: bindkey '^l' ctrl_l + +#:: Alternatively, you can just add map ctrl+l clear_terminal +#:: to_cursor_scroll active to kitty.conf which works with no changes +#:: to the shell rc files, but only clears up to the prompt, it does +#:: not clear any text at the prompt itself. + +#: Clear to start + +# map cmd+k clear_terminal to_cursor active + +#: Clear scrollback + +# map option+cmd+k clear_terminal scrollback active + +#: Clear the last command + +# map cmd+l clear_terminal last_command active + +#: Clear screen + +# map cmd+ctrl+l clear_terminal to_cursor_scroll active + +#: Reload kitty.conf + +# map kitty_mod+f5 load_config_file +# map ctrl+cmd+, load_config_file + +#:: Reload kitty.conf, applying any changes since the last time it +#:: was loaded. Note that a handful of options cannot be dynamically +#:: changed and require a full restart of kitty. Particularly, when +#:: changing shortcuts for actions located on the macOS global menu +#:: bar, a full restart is needed. You can also map a keybinding to +#:: load a different config file, for example:: + +#:: map f5 load_config /path/to/alternative/kitty.conf + +#:: Note that all options from the original kitty.conf are discarded, +#:: in other words the new configuration *replace* the old ones. + +#: Debug kitty configuration + +# map kitty_mod+f6 debug_config +# map opt+cmd+, debug_config + +#:: Show details about exactly what configuration kitty is running +#:: with and its host environment. Useful for debugging issues. + +#: Send arbitrary text on key presses + +#:: E.g. map ctrl+shift+alt+h send_text all Hello World + +#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#:: client program when pressing specified shortcut keys. For +#:: example:: + +#:: map ctrl+alt+a send_text all Special text + +#:: This will send "Special text" when you press the Ctrl+Alt+A key +#:: combination. The text to be sent decodes ANSI C escapes +#:: so you can use escapes like \e to send control +#:: codes or \u21fb to send Unicode characters (or you can just input +#:: the Unicode characters directly as UTF-8 text). You can use +#:: `kitten show-key` to get the key escape codes you want to +#:: emulate. + +#:: The first argument to send_text is the keyboard modes in which to +#:: activate the shortcut. The possible values are normal, +#:: application, kitty or a comma separated combination of them. The +#:: modes normal and application refer to the DECCKM cursor key mode +#:: for terminals, and kitty refers to the kitty extended keyboard +#:: protocol. The special value all means all of them. + +#:: Some more examples:: + +#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) +#:: map ctrl+alt+a send_text normal Word\e[H +#:: map ctrl+alt+a send_text application Word\eOH +#:: # Run a command at a shell prompt (like typing the command and pressing Enter) +#:: map ctrl+alt+a send_text normal,application some command with arguments\r + +#: Open kitty Website + +# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ + +#: Hide macOS kitty application + +# map cmd+h hide_macos_app + +#: Hide macOS other applications + +# map opt+cmd+h hide_macos_other_apps + +#: Minimize macOS window + +# map cmd+m minimize_macos_window + +#: Quit kitty + +# map cmd+q quit + +#: }}} + +#: }}} + diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 617cdfb..289771c 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1,90 +1,26 @@ -vim:ft=kitty +# BEGIN_KITTY_FONTS +font_family family="ProFontWindows Nerd Font" +bold_font auto +italic_font auto +bold_italic_font auto +font_size 16.0 +# END_KITTY_FONTS -font_family JetBrainsMono Nerd Font -bold_font JetBrainsMono Nerd Font Bold -italic_font JetBrainsMono Nerd Font Italic -bold_italic_font JetBrainsMono Nerd Font Bold Italic -font_size 12.0 +# BEGIN_CONFIGS +enable_audio_bell no +visual_bell_duration 0.0 +shell_integration enabled +cursor_shape block -foreground #C9D0D3 -background #383838 -selection_background #4c4c4c -selection_foreground #C9D0D3 -url_color #73cef4 -cursor #C9D0D3 +confirm_os_window_close 0 +copy_on_select clipboard -# Цвета для обычного текста -color0 #242424 -color8 #484848 - -# Цвета для яркого текста -color1 #f43753 -color9 #f70067 - -color2 #98be65 -color10 #a9ff68 - -color3 #ffc24b -color11 #f7bb3b - -color4 #73cef4 -color12 #51afef - -color5 #cba6f7 -color13 #b33076 - -color6 #00f1f5 -color14 #6FAFBD - -color7 #eeeeee -color15 #b8b8b8 - -# Дополнительные цвета (можно использовать в скриптах или плагинах) -# Зеленые оттенки -color16 #c9d05c -color17 #6A8759 -color18 #afd700 -color19 #89d957 -color20 #4dd158 -color21 #AFBF7E - -# Красные/розовые оттенки -color22 #7a1b29 -color23 #881515 -color24 #c955ae -color25 #ad475f - -# Оранжевые/коричневые оттенки -color26 #d3b987 -color27 #dc9656 -color28 #CC7832 -color29 #b8733e -color30 #C07C41 -color31 #ff9e64 - -# Синие/голубые оттенки -color32 #b3deef -color33 #596f77 -color34 #6897BB -color35 #4682b4 - -# Серые оттенки -color36 #808080 -color37 #73797e -color38 #4B4E4F -color39 #3C3F40 -color40 #2B2B2B -color41 #404040 -color42 #6d8086 -color43 #abb2bf -color44 #d1d4cf - -# Фиолетовые оттенки -color45 #9876AA -color46 #392a52 - -# Темные оттенки -color47 #151838 -color48 #bf4537 -color49 #c95942 +tab_bar_style powerline +tab_powerline_style slanted +# END_CONFIGS +# BEGIN_INCLUDES +# include themes/dracula.conf +# include themes/Spacedust.conf +include themes/Xcodedark.conf +# END_INCLUDES diff --git a/kitty/kitty.conf.bak b/kitty/kitty.conf.bak new file mode 100644 index 0000000..611fda8 --- /dev/null +++ b/kitty/kitty.conf.bak @@ -0,0 +1,2993 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +#: Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. + +# font_family monospace +# bold_font auto +# italic_font auto +# bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. The easiest way to select fonts is to run the `kitten +#: choose-fonts` command which will present a nice UI for you to +#: select the fonts you want with previews and support for selecting +#: variable fonts and font features. If you want to learn to select +#: fonts manually, read the font specification syntax +#: . + +# font_size 11.0 + +#: Font size (in pts). + +# force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the string been LTR. For example, assuming the Hebrew word ירושלים, +#: selecting the character that on the screen appears to be ם actually +#: writes into the selection buffer the character י. kitty's default +#: behavior is useful in conjunction with a filter to reverse the word +#: order, however, if you wish to manipulate RTL glyphs, it can be +#: very challenging to work with, so this option is provided to turn +#: it off. Furthermore, this option can be used with the command line +#: program GNU FriBidi +#: to get BIDI support, because it will force kitty to always treat +#: the text as LTR, which FriBidi expects for terminals. + +# symbol_map + +#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols + +#: Map the specified Unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each Unicode code +#: point is specified in the form `U+`. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. This option can be specified multiple times. +#: The syntax is:: + +#: symbol_map codepoints Font Family Name + +# narrow_symbols + +#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 + +#: Usually, for Private Use Unicode characters and some symbol/dingbat +#: characters, if the character is followed by one or more spaces, +#: kitty will use those extra cells to render the character larger, if +#: the character in the font has a wide aspect ratio. Using this +#: option you can force kitty to restrict the specified code points to +#: render in the specified number of cells (defaulting to one cell). +#: This option can be specified multiple times. The syntax is:: + +#: narrow_symbols codepoints [optionally the number of cells] + +# disable_ligatures never + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +#: Note that this refers to programming ligatures, typically +#: implemented using the calt OpenType feature. For disabling general +#: ligatures, use the font_features option. + +# font_features + +#: E.g. font_features none + +#: Choose exactly which OpenType features to enable or disable. Note +#: that for the main fonts, features can be specified when selecting +#: the font using the choose-fonts kitten. This setting is useful for +#: fallback fonts. + +#: Some fonts might have features worthwhile in a terminal. For +#: example, Fira Code includes a discretionary feature, zero, which in +#: that font changes the appearance of the zero (0), to make it more +#: easily distinguishable from Ø. Fira Code also includes other +#: discretionary features known as Stylistic Sets which have the tags +#: ss01 through ss20. + +#: For the exact syntax to use for individual features, see the +#: HarfBuzz documentation . + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: On Linux, font features are first read from the FontConfig database +#: and then this option is applied, so they can be configured in a +#: single, central place. + +#: To get the PostScript name for a font, use the `fc-scan file.ttf` +#: command on Linux or the `Font Book tool on macOS +#: `__. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero in the bold font:: + +#: font_features FiraCode-Bold +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +# modify_font + +#: Modify font characteristics such as the position or thickness of +#: the underline and strikethrough. The modifications can have the +#: suffix px for pixels or % for percentage of original value. No +#: suffix means use pts. For example:: + +#: modify_font underline_position -2 +#: modify_font underline_thickness 150% +#: modify_font strikethrough_position 2px + +#: Additionally, you can modify the size of the cell in which each +#: font glyph is rendered and the baseline at which the glyph is +#: placed in the cell. For example:: + +#: modify_font cell_width 80% +#: modify_font cell_height -2px +#: modify_font baseline 3 + +#: Note that modifying the baseline will automatically adjust the +#: underline and strikethrough positions by the same amount. +#: Increasing the baseline raises glyphs inside the cell and +#: decreasing it lowers them. Decreasing the cell size might cause +#: rendering artifacts, so use with care. + +# box_drawing_scale 0.001, 1, 1.5, 2 + +#: The sizes of the lines used for the box drawing Unicode characters. +#: These values are in pts. They will be scaled by the monitor DPI to +#: arrive at a pixel value. There must be four values corresponding to +#: thin, normal, thick, and very thick lines. + +# undercurl_style thin-sparse + +#: The style with which undercurls are rendered. This option takes the +#: form (thin|thick)-(sparse|dense). Thin and thick control the +#: thickness of the undercurl. Sparse and dense control how often the +#: curl oscillates. With sparse the curl will peak once per character, +#: with dense twice. Changing this option dynamically via reloading +#: the config or remote control is undefined. + +# underline_exclusion 1 + +#: By default kitty renders gaps in underlines when they overlap with +#: descenders (the parts of letters below the baseline, such as for y, +#: q, p etc.). This option controls the thickness of the gaps. It can +#: be either a unitless number in which case it is a fraction of the +#: underline thickness as specified in the font or it can have a +#: suffix of px for pixels or pt for points. Set to zero to disable +#: the gaps. Changing this option dynamically via reloading the config +#: or remote control is undefined. + +# text_composition_strategy platform + +#: Control how kitty composites text glyphs onto the background color. +#: The default value of platform tries for text rendering as close to +#: "native" for the platform kitty is running on as possible. + +#: A value of legacy uses the old (pre kitty 0.28) strategy for how +#: glyphs are composited. This will make dark text on light +#: backgrounds look thicker and light text on dark backgrounds +#: thinner. It might also make some text appear like the strokes are +#: uneven. + +#: You can fine tune the actual contrast curve used for glyph +#: composition by specifying up to two space-separated numbers for +#: this setting. + +#: The first number is the gamma adjustment, which controls the +#: thickness of dark text on light backgrounds. Increasing the value +#: will make text appear thicker. The default value for this is 1.0 on +#: Linux and 1.7 on macOS. Valid values are 0.01 and above. The result +#: is scaled based on the luminance difference between the background +#: and the foreground. Dark text on light backgrounds receives the +#: full impact of the curve while light text on dark backgrounds is +#: affected very little. + +#: The second number is an additional multiplicative contrast. It is +#: percentage ranging from 0 to 100. The default value is 0 on Linux +#: and 30 on macOS. + +#: If you wish to achieve similar looking thickness in light and dark +#: themes, a good way to experiment is start by setting the value to +#: 1.0 0 and use a dark theme. Then adjust the second parameter until +#: it looks good. Then switch to a light theme and adjust the first +#: parameter until the perceived thickness matches the dark theme. + +# text_fg_override_threshold 0 + +#: A setting to prevent low contrast between foreground and background +#: colors. Useful when working with applications that use colors that +#: do not contrast well with your preferred color scheme. The default +#: value is 0, which means no color overriding is performed. There are +#: two modes of operation: + +#: A value with the suffix ratio represents the minimum accepted +#: contrast ratio between the foreground and background color. +#: Possible values range from 0.0 ratio to 21.0 ratio. For example, to +#: meet WCAG level AA +#: +#: a value of 4.5 ratio can be provided. The algorithm is implemented +#: using HSLuv which enables it to change the +#: perceived lightness of a color just as much as needed without +#: really changing its hue and saturation. + +#: A value with the suffix % represents the minimum accepted +#: difference in luminance between the foreground and background +#: color, below which kitty will override the foreground color. It is +#: percentage ranging from 0 % to 100 %. If the difference in +#: luminance of the foreground and background is below this threshold, +#: the foreground color will be set to white if the background is dark +#: or black if the background is light. + +#: WARNING: Some programs use characters (such as block characters) +#: for graphics display and may expect to be able to set the +#: foreground and background to the same color (or similar colors). If +#: you see unexpected stripes, dots, lines, incorrect color, no color +#: where you expect color, or any kind of graphic display problem try +#: setting text_fg_override_threshold to 0 to see if this is the cause +#: of the problem or consider using the ratio mode of operation +#: described above instead of the % mode of operation. + +#: }}} + +#: Text cursor customization {{{ + +# cursor #cccccc + +#: Default text cursor color. If set to the special value none the +#: cursor will be rendered with a "reverse video" effect. Its color +#: will be the color of the text in the cell it is over and the text +#: will be rendered with the background color of the cell. Note that +#: if the program running in the terminal sets a cursor color, this +#: takes precedence. Also, the cursor colors are modified if the cell +#: background and foreground colors have very low contrast. Note that +#: some themes set this value, so if you want to override it, place +#: your value after the lines where the theme file is included. + +# cursor_text_color #111111 + +#: The color of text under the cursor. If you want it rendered with +#: the background color of the cell underneath instead, use the +#: special keyword: `background`. Note that if cursor is set to none +#: then this option is ignored. Note that some themes set this value, +#: so if you want to override it, place your value after the lines +#: where the theme file is included. + +# cursor_shape block + +#: The cursor shape can be one of block, beam, underline. Note that +#: when reloading the config this will be changed only if the cursor +#: shape has not been set by the program running in the terminal. This +#: sets the default cursor shape, applications running in the terminal +#: can override it. In particular, shell integration +#: in kitty sets +#: the cursor shape to beam at shell prompts. You can avoid this by +#: setting shell_integration to no-cursor. + +# cursor_shape_unfocused hollow + +#: Defines the text cursor shape when the OS window is not focused. +#: The unfocused cursor shape can be one of block, beam, underline, +#: hollow and unchanged (leave the cursor shape as it is). + +# cursor_beam_thickness 1.5 + +#: The thickness of the beam cursor (in pts). + +# cursor_underline_thickness 2.0 + +#: The thickness of the underline cursor (in pts). + +# cursor_blink_interval -1 + +#: The interval to blink the cursor (in seconds). Set to zero to +#: disable blinking. Negative values mean use system default. Note +#: that the minimum interval will be limited to repaint_delay. You can +#: also animate the cursor blink by specifying an easing function. For +#: example, setting this to option to 0.5 ease-in-out will cause the +#: cursor blink to be animated over a second, in the first half of the +#: second it will go from opaque to transparent and then back again +#: over the next half. You can specify different easing functions for +#: the two halves, for example: -1 linear ease-out. kitty supports all +#: the CSS easing functions . Note that turning on animations +#: uses extra power as it means the screen is redrawn multiple times +#: per blink interval. See also, cursor_stop_blinking_after. This +#: setting also controls blinking text, which blinks in exact rhythm +#: with the cursor. + +# cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. This +#: setting also controls blinking text, which blinks in exact rhythm +#: with the cursor. + +# cursor_trail 0 + +#: Set this to a value larger than zero to enable a "cursor trail" +#: animation. This is an animation that shows a "trail" following the +#: movement of the text cursor. It makes it easy to follow large +#: cursor jumps and makes for a cool visual effect of the cursor +#: zooming around the screen. The actual value of this option controls +#: when the animation is triggered. It is a number of milliseconds. +#: The trail animation only follows cursors that have stayed in their +#: position for longer than the specified number of milliseconds. This +#: prevents trails from appearing for cursors that rapidly change +#: their positions during UI updates in complex applications. See +#: cursor_trail_decay to control the animation speed and +#: cursor_trail_start_threshold to control when a cursor trail is +#: started. + +# cursor_trail_decay 0.1 0.4 + +#: Controls the decay times for the cursor trail effect when the +#: cursor_trail is enabled. This option accepts two positive float +#: values specifying the fastest and slowest decay times in seconds. +#: The first value corresponds to the fastest decay time (minimum), +#: and the second value corresponds to the slowest decay time +#: (maximum). The second value must be equal to or greater than the +#: first value. Smaller values result in a faster decay of the cursor +#: trail. Adjust these values to control how quickly the cursor trail +#: fades away. + +# cursor_trail_start_threshold 2 + +#: Set the distance threshold for starting the cursor trail. This +#: option accepts a positive integer value that represents the minimum +#: number of cells the cursor must move before the trail is started. +#: When the cursor moves less than this threshold, the trail is +#: skipped, reducing unnecessary cursor trail animation. + +# cursor_trail_color none + +#: Set the color of the cursor trail when cursor_trail is enabled. If +#: set to 'none' (the default), the cursor trail will use the cursor's +#: background color. Otherwise, specify a color value (e.g., #ff0000 +#: for red, or a named color like 'red'). This allows you to customize +#: the appearance of the cursor trail independently of the cursor +#: color. + +#: }}} + +#: Scrollback {{{ + +# scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down performance of the terminal and +#: also use large amounts of RAM. Instead, consider using +#: scrollback_pager_history_size. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollbar scrolled + +#: Control when the scrollbar is displayed. + +#: scrolled +#: means when the scrolling backwards has started. +#: hovered +#: means when the mouse is hovering on the right edge of the window. +#: scrolled-and-hovered +#: means when the mouse is over the scrollbar region *and* scrolling backwards has started. +#: always +#: means whenever any scrollback is present +#: never +#: means disable the scrollbar. + +# scrollbar_interactive yes + +#: If disabled, the scrollbar will not be controllable via th emouse +#: and all mouse events will pass through the scrollbar. + +# scrollbar_jump_on_click yes + +#: When enabled clicking in the scrollbar track will cause the scroll +#: position to jump to the clicked location, otherwise the scroll +#: position will only move towards the position by a single screenful, +#: which is how traditional scrollbars behave. + +# scrollbar_width 0.5 + +#: The width of the scroll bar in units of cell width. + +# scrollbar_hover_width 1 + +#: The width of the scroll bar when the mouse is hovering over it, in +#: units of cell width. + +# scrollbar_handle_opacity 0.5 + +#: The opacity of the scrollbar handle, 0 being fully transparent and +#: 1 being full opaque. + +# scrollbar_radius 0.3 + +#: The radius (curvature) of the scrollbar handle in units of cell +#: width. Should be less than scrollbar_width. + +# scrollbar_gap 0.1 + +#: The gap between the scrollbar and the window edge in units of cell +#: width. + +# scrollbar_min_handle_height 1 + +#: The minimum height of the scrollbar handle in units of cell height. +#: Prevents the handle from becoming too small when there is a lot of +#: scrollback. + +# scrollbar_hitbox_expansion 0.25 + +#: The extra area around the handle to allow easier grabbing of the +#: scollbar in units of cell width. + +# scrollbar_track_opacity 0 + +#: The opacity of the scrollbar track, 0 being fully transparent and 1 +#: being full opaque. + +# scrollbar_track_hover_opacity 0.1 + +#: The opacity of the scrollbar track when the mouse is over the +#: scrollbar, 0 being fully transparent and 1 being full opaque. + +# scrollbar_handle_color foreground + +#: The color of the scrollbar handle. A value of foreground means to +#: use the current foreground text color, a value of +#: selection_background means to use the current selection background +#: color. Also, you can use an arbitrary color, such as #12af59 or +#: red. + +# scrollbar_track_color foreground + +#: The color of the scrollbar track. A value of foreground means to +#: use the current foreground text color, a value of +#: selection_background means to use the current selection background +#: color. Also, you can use an arbitrary color, such as #12af59 or +#: red. + +# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. Similarly CURSOR_LINE and +#: CURSOR_COLUMN will be replaced by the current cursor position or +#: set to 0 if there is no cursor, for example, when showing the last +#: command output. + +#: If you would rather use neovim to view the scrollback, use +#: something like this:: + +#: scrollback_pager nvim --cmd 'set eventignore=FileType' +'nnoremap q ZQ' +'call nvim_open_term(0, {})' +'set nomodified nolist' +'$' - + +#: The above works for neovim 0.12 and newer. There is also a +#: dedicated plugin kitty-scrollback.nvim +#: you can use +#: with more features that works with older neovim as well. + +# scrollback_pager_history_size 0 + +#: Separate scrollback history size (in MB), used only for browsing +#: the scrollback buffer with pager. This separate buffer is not +#: available for interactive scrolling but will be piped to the pager +#: program when viewing scrollback buffer in a separate window. The +#: current implementation stores the data in UTF-8, so approximately +#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, +#: unformatted text. A value of zero or less disables this feature. +#: The maximum allowed size is 4GB. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_fill_enlarged_window no + +#: Fill new space with lines from the scrollback buffer after +#: enlarging a window. + +# wheel_scroll_multiplier 5.0 + +#: Multiplier for the number of lines scrolled by the mouse wheel. +#: Note that this is only used for low precision scrolling devices, +#: not for high precision scrolling devices on platforms such as macOS +#: and Wayland. Use negative numbers to change scroll direction. See +#: also wheel_scroll_min_lines. + +# wheel_scroll_min_lines 1 + +#: The minimum number of lines scrolled by the mouse wheel. The scroll +#: multiplier wheel_scroll_multiplier only takes effect after it +#: reaches this number. Note that this is only used for low precision +#: scrolling devices like wheel mice that scroll by very small amounts +#: when using the wheel. With a negative number, the minimum number of +#: lines will always be added. + +# touch_scroll_multiplier 1.0 + +#: Multiplier for the number of lines scrolled by a touchpad. Note +#: that this is only used for high precision scrolling devices on +#: platforms such as macOS and Wayland. Use negative numbers to change +#: scroll direction. + +#: }}} + +#: Mouse {{{ + +# mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. + +#: By default, once the cursor is hidden, it is immediately unhidden +#: on any further mouse events. + +#: Two formats are supported: +#: - +#: - + +#: To change the unhide behavior, the optional parameters , , and may be set. + +#: +#: Waits for the specified number of seconds after mouse events before unhiding the +#: mouse cursor. Set to zero to unhide mouse cursor immediately on mouse activity. +#: This is useful to prevent the mouse cursor from unhiding on accidental swipes on +#: the trackpad. + +#: +#: Sets the threshold of mouse activity required to unhide the mouse cursor, when +#: the option is non-zero. When is zero, this has no +#: effect. + +#: For example, if is 40 and is 2.5, when kitty +#: detects a mouse event, it records the number of mouse events in the next 2.5 +#: seconds, and checks if that exceeds 40 * 2.5 = 100. If it does, then the mouse +#: cursor is unhidden, otherwise nothing happens. + +#: +#: Controls what mouse events may unhide the mouse cursor. If enabled, both scroll +#: and movement events may unhide the cursor. If disabled, only mouse movements can +#: unhide the cursor. + +#: Examples of valid values: +#: - 0.0 +#: - 1.0 +#: - -1.0 +#: - 0.1 3.0 40 yes + +# url_color #0087bd +# url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, straight, double, curly, dotted, dashed. + +# open_url_with default + +#: The program to open clicked URLs. The special value default will +#: first look for any URL handlers defined via the open_actions +#: facility and if non +#: are found, it will use the Operating System's default URL handler +#: (open on macOS and xdg-open on Linux). + +# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +# detect_urls yes + +#: Detect URLs under the mouse. Detected URLs are highlighted with an +#: underline and the mouse cursor becomes a hand over them. Even if +#: this option is disabled, URLs are still clickable. See also the +#: underline_hyperlinks option to control how hyperlinks (as opposed +#: to plain text URLs) are displayed. + +# url_excluded_characters + +#: Additional characters to be disallowed from URLs, when detecting +#: URLs under the mouse cursor. By default, all characters that are +#: legal in URLs are allowed. Additionally, newlines are allowed (but +#: stripped). This is to accommodate programs such as mutt that add +#: hard line breaks even for continued lines. \n can be added to this +#: option to disable this behavior. Special characters can be +#: specified using backslash escapes, to specify a backslash use a +#: double backslash. + +# show_hyperlink_targets no + +#: When the mouse hovers over a terminal hyperlink, show the actual +#: URL that will be activated when the hyperlink is clicked. + +# underline_hyperlinks hover + +#: Control how hyperlinks are underlined. They can either be +#: underlined on mouse hover, always (i.e. permanently underlined) or +#: never which means that kitty will not apply any underline styling +#: to hyperlinks. Note that the value of always only applies to real +#: (OSC 8) hyperlinks not text that is detected to be a URL on mouse +#: hover. Uses the url_style and url_color settings for the underline +#: style. Note that reloading the config and changing this value +#: to/from always will only affect text subsequently received by +#: kitty. + +# copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, selecting text with the mouse will cause the text to be +#: copied to clipboard. Useful on platforms such as macOS that do not +#: have the concept of primary selection. You can instead specify a +#: name such as a1 to copy to a private kitty buffer. Map a shortcut +#: with the paste_from_buffer action to paste from this private +#: buffer. For example:: + +#: copy_on_select a1 +#: map shift+cmd+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +# clear_selection_on_clipboard_loss no + +#: When the contents of the clipboard no longer reflect the current +#: selection, clear it. This is primarily useful on platforms such as +#: Linux where selecting text automatically copies it to a special +#: "primary selection" clipboard or if you have copy_on_select set to +#: clipboard. + +#: Note that on macOS the system does not provide notifications when +#: the clipboard owner is changed, so there, copying to clipboard in a +#: non-kitty application will not clear selections even if +#: copy_on_select is enabled. + +# paste_actions quote-urls-at-prompt,confirm + +#: A comma separated list of actions to take when pasting text into +#: the terminal. The supported paste actions are: + +#: quote-urls-at-prompt: +#: If the text being pasted is a URL and the cursor is at a shell prompt, +#: automatically quote the URL (needs shell_integration). +#: replace-dangerous-control-codes +#: Replace dangerous control codes from pasted text, without confirmation. +#: replace-newline +#: Replace the newline character from pasted text, without confirmation. +#: confirm: +#: Confirm the paste if the text to be pasted contains any terminal control codes +#: as this can be dangerous, leading to code execution if the shell/program running +#: in the terminal does not properly handle these. +#: confirm-if-large +#: Confirm the paste if it is very large (larger than 16KB) as pasting +#: large amounts of text into shells can be very slow. +#: filter: +#: Run the filter_paste() function from the file paste-actions.py in +#: the kitty config directory on the pasted text. The text returned by the +#: function will be actually pasted. +#: no-op: +#: Has no effect. + +# strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. A value of always will always do it. + +# select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the Unicode database will be matched. + +# select_by_word_characters_forward + +#: Characters considered part of a word when extending the selection +#: forward on double clicking. In addition to these characters any +#: character that is marked as an alphanumeric character in the +#: Unicode database will be matched. + +#: If empty (default) select_by_word_characters will be used for both +#: directions. + +# click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +# focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around. On macOS, this will also cause the OS Window under +#: the mouse to be focused automatically when the mouse enters it. + +# pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. + +# default_pointer_shape beam + +#: The default shape of the mouse pointer. + +# pointer_shape_when_dragging beam crosshair + +#: The default shape of the mouse pointer when dragging across text. +#: The optional second value sets the shape when dragging in +#: rectangular selection mode. + +#: Mouse actions {{{ + +#: Mouse buttons can be mapped to perform arbitrary actions. The +#: syntax is: + +#: .. code-block:: none + +#: mouse_map button-name event-type modes action + +#: Where button-name is one of left, middle, right, b1 ... b8 with +#: added keyboard modifiers. For example: ctrl+shift+left refers to +#: holding the Ctrl+Shift keys while clicking with the left mouse +#: button. The value b1 ... b8 can be used to refer to up to eight +#: buttons on a mouse. + +#: event-type is one of press, release, doublepress, triplepress, +#: click, doubleclick. modes indicates whether the action is performed +#: when the mouse is grabbed by the program running in the terminal, +#: or not. The values are grabbed or ungrabbed or a comma separated +#: combination of them. grabbed refers to when the program running in +#: the terminal has requested mouse events. Note that the click and +#: double click events have a delay of click_interval to disambiguate +#: from double and triple presses. + +#: You can run kitty with the kitty --debug-input command line option +#: to see mouse events. See the builtin actions below to get a sense +#: of what is possible. + +#: If you want to unmap a button, map it to nothing. For example, to +#: disable opening of URLs with a plain click:: + +#: mouse_map left click ungrabbed + +#: See all the mappable actions including mouse actions here +#: . + +#: .. note:: +#: Once a selection is started, releasing the button that started it will +#: automatically end it and no release event will be dispatched. + +# clear_all_mouse_actions no + +#: Remove all mouse action definitions up to this point. Useful, for +#: instance, to remove the default mouse actions. + +#: Click the link under the mouse or move the cursor + +# mouse_map left click ungrabbed mouse_handle_click selection link prompt + +#:: First check for a selection and if one exists do nothing. Then +#:: check for a link under the mouse cursor and if one exists, click +#:: it. Finally check if the click happened at the current shell +#:: prompt and if so, move the cursor to the click location. Note +#:: that this requires shell integration +#:: to work. + +#: Click the link under the mouse or move the cursor even when grabbed + +# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt + +#:: Same as above, except that the action is performed even when the +#:: mouse is grabbed by the program running in the terminal. + +#: Click the link under the mouse cursor + +# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link + +#:: Variant with Ctrl+Shift is present because the simple click based +#:: version has an unavoidable delay of click_interval, to +#:: disambiguate clicks from double clicks. + +#: Discard press event for link click + +# mouse_map ctrl+shift+left press grabbed discard_event + +#:: Prevent this press event from being sent to the program that has +#:: grabbed the mouse, as the corresponding release event is used to +#:: open a URL. + +#: Paste from the primary selection + +# mouse_map middle release ungrabbed paste_from_selection + +#: Start selecting text + +# mouse_map left press ungrabbed mouse_selection normal + +#: Start selecting text in a rectangle + +# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle + +#: Select a word + +# mouse_map left doublepress ungrabbed mouse_selection word + +#: Select a line + +# mouse_map left triplepress ungrabbed mouse_selection line + +#: Select line from point + +# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line. If you +#:: would like to select the word at the point and then extend to the +#:: rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection + +# mouse_map right press ungrabbed mouse_selection extend + +#:: If you want only the end of the selection to be moved instead of +#:: the nearest boundary, use move-end instead of extend. + +#: Paste from the primary selection even when grabbed + +# mouse_map shift+middle release ungrabbed,grabbed paste_selection +# mouse_map shift+middle press grabbed discard_event + +#: Start selecting text even when grabbed + +# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal + +#: Start selecting text in a rectangle even when grabbed + +# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle + +#: Select a word even when grabbed + +# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word + +#: Select a line even when grabbed + +# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line + +#: Select line from point even when grabbed + +# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line even when +#:: grabbed. If you would like to select the word at the point and +#:: then extend to the rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection even when grabbed + +# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend + +#: Show clicked command output in pager + +# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output + +#:: Requires shell integration +#:: to work. + +#: }}} + +#: }}} + +#: Performance tuning {{{ + +# repaint_delay 10 + +#: Delay between screen updates (in milliseconds). Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS, you have to +#: either set sync_to_monitor to no or use a monitor with a high +#: refresh rate. Also, to minimize latency when there is pending input +#: to be processed, this option is ignored. + +# input_delay 3 + +#: Delay before input from the program running in the terminal is +#: processed (in milliseconds). Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. +#: This setting is ignored when the input buffer is almost full. + +# sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents screen tearing +#: when scrolling. +#: However, it limits the rendering speed to the refresh rate of your +#: monitor. With a very high speed mouse/high keyboard repeat rate, +#: you may notice some slight input latency. If so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +# enable_audio_bell yes + +#: The audio bell. Useful to disable it in environments that require +#: silence. + +# visual_bell_duration 0.0 + +#: The visual bell duration (in seconds). Flash the screen when a bell +#: occurs for the specified number of seconds. Set to zero to disable. +#: The flash is animated, fading in and out over the specified +#: duration. The easing function used for the fading can be +#: controlled. For example, 2.0 linear will casuse the flash to fade +#: in and out linearly. The default if unspecified is to use ease-in- +#: out which fades slowly at the start, middle and end. You can +#: specify different easing functions for the fade-in and fade-out +#: parts, like this: 2.0 ease-in linear. kitty supports all the CSS +#: easing functions . + +# visual_bell_color none + +#: The color used by visual bell. Set to none will fall back to +#: selection background color. If you feel that the visual bell is too +#: bright, you can set it to a darker color. + +# window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on Linux. + +# bell_on_tab "🔔 " + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has a bell. If you want to use leading +#: or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +#: For backwards compatibility, values of yes, y and true are +#: converted to the default bell symbol and no, n, false and none are +#: converted to the empty string. + +# command_on_bell none + +#: Program to run when a bell occurs. The environment variable +#: KITTY_CHILD_CMDLINE can be used to get the program running in the +#: window in which the bell occurred. + +# bell_path none + +#: Path to a sound file to play as the bell sound. If set to none, the +#: system default bell sound is used. Must be in a format supported by +#: the operating systems sound API, such as WAV or OGA on Linux +#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound). Relative +#: paths are resolved with respect to the kitty config directory. + +# linux_bell_theme __custom + +#: The XDG Sound Theme kitty will use to play the bell sound. On +#: Wayland, when the compositor supports it, it is asked to play the +#: system default bell sound, and this setting has no effect. Note +#: that Hyprland claims to support this protocol, but does not +#: actually play a sound +#: . This setting +#: defaults to the custom theme name specified in the XDG Sound theme +#: specification , falling back to the default +#: freedesktop theme if it does not exist. To change your sound theme +#: desktop wide, create +#: :file:~/.local/share/sounds/__custom/index.theme` with the +#: contents: + +#: [Sound Theme] + +#: Inherits=name-of-the-sound-theme-you-want-to-use + +#: Replace name-of-the-sound-theme-you-want-to-use with the actual +#: theme name. Now all compliant applications should use sounds from +#: this theme. + +#: }}} + +#: Window layout {{{ + +# remember_window_size yes +# initial_window_width 640 +# initial_window_height 400 + +#: If enabled, the OS Window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the OS Window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +# remember_window_position no + +#: If enabled, the OS Window position will be remembered so that new +#: instances of kitty will have the same position as the previous +#: instance. If disabled, the OS Window will be placed by the window +#: manager. Note that remembering of position only works if the +#: underlying desktop environment/window manager supports it. It never +#: works on Wayland. See also kitty --position to specify the position +#: when launching kitty. + +# enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the layouts . + +# window_resize_step_cells 2 +# window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing kitty windows in a layout with the shortcut +#: start_resizing_window. The cells value is used for horizontal +#: resizing, and the lines value is used for vertical resizing. + +# window_border_width 0.5pt + +#: The width of window borders. Can be either in pixels (px) or pts +#: (pt). Values in pts will be rounded to the nearest number of pixels +#: based on screen resolution. If not specified, the unit is assumed +#: to be pts. Note that borders are displayed only when more than one +#: window is visible. They are meant to separate multiple windows. + +# draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: borders that separate the window from a neighbor are drawn. Note +#: that setting a non-zero window_margin_width overrides this and +#: causes all borders to be drawn. + +# draw_window_borders_for_single_window no + +#: Draw borders around a window even when there is only a single +#: window visible. When enabled and there is only a single window, +#: full borders are drawn around it (as if draw_minimal_borders is +#: false). The border will show in the active color when the window is +#: focused and the OS window has focus, and in the inactive color when +#: the OS window loses focus. This provides a clear visual indicator +#: of whether the kitty window is focused. When there are multiple +#: windows visible, this option has no effect and normal border +#: drawing rules apply. + +# window_margin_width 0 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +# single_window_margin_width -1 + +#: The window margin to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_margin_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# window_padding_width 0 + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +# single_window_padding_width -1 + +#: The window padding to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_padding_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be +#: only at the bottom and right edges. The value can be one of: top- +#: left, top, top-right, left, center, right, bottom-left, bottom, +#: bottom-right. + +# active_border_color #00ff00 + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +# inactive_border_color #cccccc + +#: The color for the border of inactive windows. + +# bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred. + +# inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +# hide_window_decorations no + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only and titlebar-and-corners can be used +#: to only hide the titlebar and the rounded corners. Whether this +#: works and exactly what effect it has depends on the window +#: manager/operating system. Note that the effects of changing this +#: option when reloading config are undefined. When using titlebar- +#: only, it is useful to also set window_margin_width and +#: placement_strategy to prevent the rounded corners from clipping +#: text. Or use titlebar-and-corners. + +# window_logo_path none + +#: Path to a logo image. Must be in PNG/JPEG/WEBP/GIF/TIFF/BMP format. +#: Relative paths are interpreted relative to the kitty config +#: directory. The logo is displayed in a corner of every kitty window. +#: The position is controlled by window_logo_position. Individual +#: windows can be configured to have different logos either using the +#: launch action or the remote control +#: facility. + +# window_logo_position bottom-right + +#: Where to position the window logo in the window. The value can be +#: one of: top-left, top, top-right, left, center, right, bottom-left, +#: bottom, bottom-right. + +# window_logo_alpha 0.5 + +#: The amount the logo should be faded into the background. With zero +#: being fully faded and one being fully opaque. + +# window_logo_scale 0 + +#: The percentage (0-100] of the window size to which the logo should +#: scale. Using a single number means the logo is scaled to that +#: percentage of the shortest window dimension, while preserving +#: aspect ratio of the logo image. + +#: Using two numbers means the width and height of the logo are scaled +#: to the respective percentage of the window's width and height. + +#: Using zero as the percentage disables scaling in that dimension. A +#: single zero (the default) disables all scaling of the window logo. + +# resize_debounce_time 0.1 0.5 + +#: The time to wait (in seconds) before asking the program running in +#: kitty to resize and redraw the screen during a live resize of the +#: OS window, when no new resize events have been received, i.e. when +#: resizing is either paused or finished. On platforms such as macOS, +#: where the operating system sends events corresponding to the start +#: and end of a live resize, the second number is used for redraw- +#: after-pause since kitty can distinguish between a pause and end of +#: resizing. On such systems the first number is ignored and redraw is +#: immediate after end of resize. On other systems only the first +#: number is used so that kitty is "ready" quickly after the end of +#: resizing, while not also continuously redrawing, to save energy. + +# resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with initial_window_width +#: and initial_window_height in number of cells, this option can be +#: used to keep the margins as small as possible when resizing the OS +#: window. Note that this does not currently work on Wayland. + +# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ + +#: The list of characters for visual window selection. For example, +#: for selecting a window to focus on with focus_visible_window. The +#: value should be a series of unique numbers or alphabets, case +#: insensitive, from the set 0-9A-Z\-=[];',./\\`. Specify your +#: preference as a string of characters. + +# confirm_os_window_close -1 + +#: Ask for confirmation when closing an OS window or a tab with at +#: least this number of kitty windows in it by window manager (e.g. +#: clicking the window close button or pressing the operating system +#: shortcut to close windows) or by the close_tab action. A value of +#: zero disables confirmation. This confirmation also applies to +#: requests to quit the entire application (all OS windows, via the +#: quit action). Negative values are converted to positive ones, +#: however, with shell_integration enabled, using negative values +#: means windows sitting at a shell prompt are not counted, only +#: windows where some command is currently running. You can also have +#: backgrounded jobs prevent closing, by adding count-background to +#: the setting, for example: -1 count-background. Note that if you +#: want confirmation when closing individual windows, you can map the +#: close_window_with_confirmation action. + +#: }}} + +#: Tab bar {{{ + +# tab_bar_edge bottom + +#: The edge to show the tab bar on, top or bottom. + +# tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts). + +# tab_bar_margin_height 0.0 0.0 + +#: The margin above and below the tab bar (in pts). The first number +#: is the margin between the edge of the OS Window and the tab bar. +#: The second number is the margin between the tab bar and the +#: contents of the current tab. + +# tab_bar_style fade + +#: The tab bar style, can be one of: + +#: fade +#: Each tab's edges fade into the background color. (See also tab_fade) +#: slant +#: Tabs look like the tabs in a physical file. +#: separator +#: Tabs are separated by a configurable separator. (See also +#: tab_separator) +#: powerline +#: Tabs are shown as a continuous line with "fancy" separators. +#: (See also tab_powerline_style) +#: custom +#: A user-supplied Python function called draw_tab is loaded from the file +#: tab_bar.py in the kitty config directory. For examples of how to +#: write such a function, see the functions named draw_tab_with_* in +#: kitty's source code: kitty/tab_bar.py. See also +#: this discussion +#: for examples from kitty users. +#: hidden +#: The tab bar is hidden. If you use this, you might want to create +#: a mapping for the select_tab action which presents you with a list of +#: tabs and allows for easy switching to a tab. + +# tab_bar_filter + +#: A search expression . Only tabs that match this expression will +#: be shown in the tab bar. The currently active tab is always shown, +#: regardless of whether it matches or not. When using this option, +#: the tab bar may be displayed with less tabs than specified in +#: tab_bar_min_tabs, as evaluating the filter is expensive and is done +#: only at display time. This is most useful when using sessions +#: . An expression of +#: session:~ or session:^$ will show only tabs that belong to the +#: current session or no session. The various tab navigation actions +#: such as goto_tab, next_tab, previous_tab, etc. are automatically +#: restricted to work only on matching tabs. + +# tab_bar_align left + +#: The horizontal alignment of the tab bar, can be one of: left, +#: center, right. + +# tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown. + +# tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of right will switch to the tab to the right of +#: the closed tab. A value of last will switch to the right-most tab. + +# tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +# tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +# tab_powerline_style angled + +#: The powerline separator style between tabs in the tab bar when +#: using powerline as the tab_bar_style, can be one of: angled, +#: slanted, round. + +# tab_activity_symbol none + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has some activity. If you want to use +#: leading or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +# tab_title_max_length 0 + +#: The maximum number of cells that can be used to render the text in +#: a tab. A value of zero means that no limit is applied. + +# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{tab.last_focused_progress_percent}{title}" + +#: A template to render the tab title. The default just renders the +#: title with optional symbols for bell and activity. If you wish to +#: include the tab-index as well, use something like: {index}:{title}. +#: Useful if you have shortcuts mapped for goto_tab N. If you prefer +#: to see the index as a superscript, use {sup.index}. All data +#: available is: + +#: title +#: The current tab title. +#: index +#: The tab index usable with goto_tab N goto_tab shortcuts. +#: layout_name +#: The current layout name. +#: session_name +#: The name of the kitty session file from which this tab was created, if any. +#: active_session_name +#: The name of the kitty session file from which the active window in this tab was created, if any. +#: num_windows +#: The number of windows in the tab. +#: num_window_groups +#: The number of window groups (a window group is a window and all of its overlay windows) in the tab. +#: tab.active_wd +#: The working directory of the currently active window in the tab +#: (expensive, requires syscall). Use tab.active_oldest_wd to get +#: the directory of the oldest foreground process rather than the newest. +#: tab.active_exe +#: The name of the executable running in the foreground of the currently +#: active window in the tab (expensive, requires syscall). Use +#: tab.active_oldest_exe for the oldest foreground process. +#: max_title_length +#: The maximum title length available. +#: keyboard_mode +#: The name of the current keyboard mode or the empty string if no keyboard mode is active. +#: tab.last_focused_progress_percent +#: If a command running in a window reports the progress for a task, show this progress as a percentage +#: from the most recently focused window in the tab. Empty string if no progress is reported. +#: tab.progress_percent +#: If a command running in a window reports the progress for a task, show this progress as a percentage +#: from all windows in the tab, averaged. Empty string is no progress is reported. +#: custom +#: This will call a function named draw_title(data) from the file tab_bar.py placed in +#: the kitty config directory. The function will be passed a dictionary of data, the same data that +#: can be used in this template. It can then perform arbitrarily complex processing and return a string. +#: For example: tab_title_template "{custom}" will use the output of the function as the tab title. +#: Any print statements in the draw_title() will print to the STDOUT of the kitty process, useful +#: for debugging. + + +#: Note that formatting is done by Python's string formatting +#: machinery, so you can use, for instance, {layout_name[:2].upper()} +#: to show only the first two letters of the layout name, upper-cased. +#: If you want to style the text, you can use styling directives, for +#: example: +#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. +#: Similarly, for bold and italic: +#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. +#: The 256 eight terminal colors can be used as `fmt.fg.color0` +#: through `fmt.fg.color255`. Note that for backward compatibility, if +#: {bell_symbol} or {activity_symbol} are not present in the template, +#: they are prepended to it. + +# active_tab_title_template none + +#: Template to use for active tabs. If not specified falls back to +#: tab_title_template. + +# active_tab_foreground #000 +# active_tab_background #eee +# active_tab_font_style bold-italic +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# inactive_tab_font_style normal + +#: Tab bar colors and styles. + +# tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +# tab_bar_margin_color none + +#: Color for the tab bar margin area. Defaults to using the terminal +#: background color for margins above and below the tab bar. For side +#: margins the default color is chosen to match the background color +#: of the neighboring tab. + +#: }}} + +#: Color scheme {{{ + +# foreground #dddddd +# background #000000 + +#: The foreground and background colors. + +# background_opacity 1.0 + +#: The opacity of the terminal background color. A number between zero +#: and one, where one is opaque and zero is fully transparent. This +#: will only work if supported by the OS (for instance, when using a +#: compositor under X11). Note that it only sets the background +#: color's opacity in cells that have the same background color as the +#: default terminal background, so that things like the status bar in +#: vim, powerline prompts, etc. still look good. But it means that if +#: you use a color theme with a background color in your editor, it +#: will not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. See also transparent_background_colors. Be +#: aware that using a value less than 1.0 is a (possibly significant) +#: performance hit. When using a low value for this setting, it is +#: desirable that you set the background color to a color the matches +#: the general color of the desktop background, for best text +#: rendering. Note also, that this setting does not apply to the +#: background_image, if any. The background image can itself have +#: transparency via its alpha channel if desired, and that will be +#: respected. + +#: If you want to dynamically change transparency of windows, set +#: dynamic_background_opacity to yes (this is off by default as it has +#: a performance cost). Changing this option when reloading the config +#: will only work if dynamic_background_opacity was enabled in the +#: original config. + +# background_blur 0 + +#: Set to a positive value to enable background blur (blurring of the +#: visuals behind a transparent window) on platforms that support it. +#: Only takes effect when background_opacity is less than one. On +#: macOS, this will also control the blur radius (amount of blurring). +#: Setting it to too high a value will cause severe performance issues +#: and/or rendering artifacts. Usually, values up to 64 work well. +#: Note that this might cause performance issues, depending on how the +#: platform implements it, so use with care. Currently supported on +#: macOS and KDE. + +# transparent_background_colors + +#: A space separated list of upto 7 colors, with opacity. When the +#: background color of a cell matches one of these colors, it is +#: rendered semi-transparent using the specified opacity. + +#: Useful in more complex UIs like editors where you could want more +#: than a single background color to be rendered as transparent, for +#: instance, for a cursor highlight line background or a highlighted +#: block. Terminal applications can set this color using The kitty +#: color control escape code. + +#: The syntax for specifying colors is: color@opacity, where the +#: @opacity part is optional. When unspecified, the value of +#: background_opacity is used. For example:: + +#: transparent_background_colors red@0.5 #00ff00@0.3 + +#: Note that you must also set background_opacity to something less +#: than 1 for this setting to work properly. + +# dynamic_background_opacity no + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +#: Changing this option by reloading the config is not supported. + +# background_image none + +#: Path to a background image. Must be in PNG/JPEG/WEBP/TIFF/GIF/BMP +#: format. Note that when using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# background_image_layout tiled + +#: Whether to tile, scale or clamp the background image. The value can +#: be one of tiled, mirror-tiled, scaled, clamped, centered or +#: cscaled. The scaled and cscaled values scale the image to the +#: window size, with cscaled preserving the image aspect ratio. Note +#: that when using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# background_image_linear no + +#: When background image is scaled, whether linear interpolation +#: should be used. Note that when using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# background_tint 0.0 + +#: How much to tint the background image by the background color. This +#: option makes it easier to read the text. Tinting is done using the +#: current background color for each window. This option applies only +#: if background_image is set. Note that when using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# background_tint_gaps 1.0 + +#: How much to tint the background image at the window gaps by the +#: background color, after applying background_tint. Since this is +#: multiplicative with background_tint, it can be used to lighten the +#: tint over the window gaps for a *separated* look. Note that when +#: using auto_color_scheme +#: +#: this option is overridden by the color scheme file and must be set +#: inside it to take effect. + +# dim_opacity 0.4 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +# selection_foreground #000000 +# selection_background #fffacd + +#: The foreground and background colors for text selected with the +#: mouse. Setting both of these to none will cause a "reverse video" +#: effect for selections, where the selection will be the cell text +#: color and the text will become the cell background color. Setting +#: only selection_foreground to none will cause the foreground color +#: to be used unchanged. Note that these colors can be overridden by +#: the program running in the terminal. + +#: The color table {{{ + +#: The 256 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version, for the first 16 colors. You can set the +#: remaining 240 colors as color16 to color255. + +# color0 #000000 +# color8 #767676 + +#: black + +# color1 #cc0403 +# color9 #f2201f + +#: red + +# color2 #19cb00 +# color10 #23fd00 + +#: green + +# color3 #cecb00 +# color11 #fffd00 + +#: yellow + +# color4 #0d73cc +# color12 #1a8fff + +#: blue + +# color5 #cb1ed1 +# color13 #fd28ff + +#: magenta + +# color6 #0dcdcd +# color14 #14ffff + +#: cyan + +# color7 #dddddd +# color15 #ffffff + +#: white + +# mark1_foreground black + +#: Color for marks of type 1 + +# mark1_background #98d3cb + +#: Color for marks of type 1 (light steel blue) + +# mark2_foreground black + +#: Color for marks of type 2 + +# mark2_background #f2dcd3 + +#: Color for marks of type 1 (beige) + +# mark3_foreground black + +#: Color for marks of type 3 + +# mark3_background #f274bc + +#: Color for marks of type 3 (violet) + +#: }}} + +#: }}} + +#: Advanced {{{ + +# shell . + +#: The shell program to execute. The default value of . means to use +#: the value of of the SHELL environment variable or if unset, +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login and --interactive to ensure that the shell starts in +#: interactive mode and reads its startup rc files. Environment +#: variables are expanded in this setting. + +# editor . + +#: The terminal based text editor (such as vim or nano) to use when +#: editing the kitty config file or similar tasks. + +#: The default value of . means to use the environment variables +#: VISUAL and EDITOR in that order. If these variables aren't set, +#: kitty will run your shell ($SHELL -l -i -c env) to see if your +#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, +#: kitty will cycle through various known editors (vim, emacs, etc.) +#: and take the first one that exists on your system. + +# close_on_child_death no + +#: Close the window when the child process (usually the shell) exits. +#: With the default value no, the terminal will remain open when the +#: child exits as long as there are still other processes outputting +#: to the terminal (for example disowned or backgrounded processes). +#: When enabled with yes, the window will close as soon as the child +#: process exits. Note that setting it to yes means that any +#: background processes still using the terminal can fail silently +#: because their stdout/stderr/stdin no longer work. + +# remote_control_password + +#: Allow other programs to control kitty using passwords. This option +#: can be specified multiple times to add multiple passwords. If no +#: passwords are present kitty will ask the user for permission if a +#: program tries to use remote control with a password. A password can +#: also *optionally* be associated with a set of allowed remote +#: control actions. For example:: + +#: remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab + +#: Only the specified actions will be allowed when using this +#: password. Glob patterns can be used too, for example:: + +#: remote_control_password "my passphrase" set-tab-* resize-* + +#: To get a list of available actions, run:: + +#: kitten @ --help + +#: A set of actions to be allowed when no password is sent can be +#: specified by using an empty password. For example:: + +#: remote_control_password "" *-colors + +#: Finally, the path to a python module can be specified that provides +#: a function is_cmd_allowed that is used to check every remote +#: control command. For example:: + +#: remote_control_password "my passphrase" my_rc_command_checker.py + +#: Relative paths are resolved from the kitty configuration directory. +#: See rc_custom_auth for details. + +# allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on, other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over SSH +#: connections. The default setting of no prevents any form of remote +#: control. The meaning of the various values are: + +#: password +#: Remote control requests received over both the TTY device and the socket +#: are confirmed based on passwords, see remote_control_password. + +#: socket-only +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are denied. +#: See listen_on. + +#: socket +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are confirmed based on +#: password. + +#: no +#: Remote control is completely disabled. + +#: yes +#: Remote control requests are always accepted. + +# listen_on none + +#: Listen to the specified socket for remote control connections. Note +#: that this will apply to all kitty instances. It can be overridden +#: by the kitty --listen-on command line option. For UNIX sockets, +#: such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). +#: Environment variables are expanded and relative paths are resolved +#: with respect to the temporary directory. If {kitty_pid} is present, +#: then it is replaced by the PID of the kitty process, otherwise the +#: PID of the kitty process is appended to the value, with a hyphen. +#: For TCP sockets such as tcp:localhost:0 a random port is always +#: used even if a non-zero port number is specified. See the help for +#: kitty --listen-on for more details. Note that this will be ignored +#: unless allow_remote_control is set to either: yes, socket or +#: socket-only. Changing this option by reloading the config is not +#: supported. + +# env + +#: Specify the environment variables to be set in all child processes. +#: Using the name with an equal sign (e.g. env VAR=) will set it to +#: the empty string. Specifying only the name (e.g. env VAR) will +#: remove the variable from the child process' environment. Note that +#: environment variables are expanded recursively, for example:: + +#: env VAR1=a +#: env VAR2=${HOME}/${VAR1}/b + +#: The value of VAR2 will be /a/b. + +#: Use the special value read_from_shell to have kitty read the +#: specified variables from your login shell shell configuration. +#: Useful if your shell startup files setup a bunch of environment +#: variables that you want available to kitty and in kitty session +#: files. Each variable name is treated as a glob pattern to match. +#: For example: env read_from_shell=PATH LANG LC_* XDG_* EDITOR +#: VISUAL. Note that these variables are only read after the +#: configuration is fully processed, thus they are not available for +#: recursive expansion and they will override any variables set by +#: other env directives. + +# filter_notification + +#: Specify rules to filter out notifications sent by applications +#: running in kitty. Can be specified multiple times to create +#: multiple filter rules. A rule specification is of the form +#: field:regexp. A filter rule can match on any of the fields: title, +#: body, app, type. The special value of all filters out all +#: notifications. Rules can be combined using Boolean operators. Some +#: examples:: + +#: filter_notification title:hello or body:"abc.*def" +#: # filter out notification from vim except for ones about updates, (?i) +#: # makes matching case insensitive. +#: filter_notification app:"[ng]?vim" and not body:"(?i)update" +#: # filter out all notifications +#: filter_notification all + +#: The field app is the name of the application sending the +#: notification and type is the type of the notification. Not all +#: applications will send these fields, so you can also match on the +#: title and body of the notification text. More sophisticated +#: programmatic filtering and custom actions on notifications can be +#: done by creating a notifications.py file in the kitty config +#: directory (~/.config/kitty). An annotated sample is available +#: . + +# watcher + +#: Path to python file which will be loaded for watchers +#: . Can be +#: specified more than once to load multiple watchers. The watchers +#: will be added to every kitty window. Relative paths are resolved +#: relative to the kitty config directory. Note that reloading the +#: config will only affect windows created after the reload. + +# exe_search_path + +#: Control where kitty finds the programs to run. The default search +#: order is: First search the system wide PATH, then ~/.local/bin and +#: ~/bin. If still not found, the PATH defined in the login shell +#: after sourcing all its startup files is tried. Finally, if present, +#: the PATH specified by the env option is tried. + +#: This option allows you to prepend, append, or remove paths from +#: this search order. It can be specified multiple times for multiple +#: paths. A simple path will be prepended to the search order. A path +#: that starts with the + sign will be append to the search order, +#: after ~/bin above. A path that starts with the - sign will be +#: removed from the entire search order. For example:: + +#: exe_search_path /some/prepended/path +#: exe_search_path +/some/appended/path +#: exe_search_path -/some/excluded/path + +# update_check_interval 24 + +#: The interval to periodically check if an update to kitty is +#: available (in hours). If an update is found, a system notification +#: is displayed informing you of the available update. The default is +#: to check every 24 hours, set to zero to disable. Update checking is +#: only done by the official binary builds. Distro packages or source +#: builds do not do update checking. Changing this option by reloading +#: the config is not supported. + +# startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session =none command line option +#: for individual instances. See sessions +#: in the kitty +#: documentation for details. Note that relative paths are interpreted +#: with respect to the kitty config directory. Environment variables +#: in the path are expanded. Changing this option by reloading the +#: config is not supported. Note that if kitty is invoked with command +#: line arguments specifying a command to run, this option is ignored. + +# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: possible actions are: write-clipboard, read-clipboard, write- +#: primary, read-primary, read-clipboard-ask, read-primary-ask. The +#: default is to allow writing to the clipboard and primary selection +#: and to ask for permission when a program tries to read from the +#: clipboard. Note that disabling the read confirmation is a security +#: risk as it means that any program, even the ones running on a +#: remote server via SSH can read your clipboard. See also +#: clipboard_max_size. + +# clipboard_max_size 512 + +#: The maximum size (in MB) of data from programs running in kitty +#: that will be stored for writing to the system clipboard. A value of +#: zero means no size limit is applied. See also clipboard_control. + +# file_transfer_confirmation_bypass + +#: The password that can be supplied to the file transfer kitten +#: to skip the +#: transfer confirmation prompt. This should only be used when +#: initiating transfers from trusted computers, over trusted networks +#: or encrypted transports, as it allows any programs running on the +#: remote machine to read/write to the local filesystem, without +#: permission. + +# allow_hyperlinks yes + +#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 +#: escape sequences are ignored. Otherwise they become clickable +#: links, that you can click with the mouse or by using the hints +#: kitten . The +#: special value of ask means that kitty will ask before opening the +#: link when clicked. + +# shell_integration enabled + +#: Enable shell integration on supported shells. This enables features +#: such as jumping to previous prompts, browsing the output of the +#: previous command in a pager, etc. on supported shells. Set to +#: disabled to turn off shell integration, completely. It is also +#: possible to disable individual features, set to a space separated +#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- +#: prompt-mark, no-complete, no-sudo. See Shell integration +#: for details. + +# allow_cloning ask + +#: Control whether programs running in the terminal can request new +#: windows to be created. The canonical example is clone-in-kitty +#: . +#: By default, kitty will ask for permission for each clone request. +#: Allowing cloning unconditionally gives programs running in the +#: terminal (including over SSH) permission to execute arbitrary code, +#: as the user who is running the terminal, on the computer that the +#: terminal is running on. + +# clone_source_strategies venv,conda,env_var,path + +#: Control what shell code is sourced when running clone-in-kitty in +#: the newly cloned window. The supported strategies are: + +#: venv +#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the +#: Python stdlib venv module and allows cloning venvs automatically. +#: conda +#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual +#: environments created by conda. +#: env_var +#: Execute the contents of the environment variable +#: KITTY_CLONE_SOURCE_CODE with eval. +#: path +#: Source the file pointed to by the environment variable +#: KITTY_CLONE_SOURCE_PATH. + +#: This option must be a comma separated list of the above values. +#: Only the first valid match, in the order specified, is sourced. + +# notify_on_cmd_finish never + +#: Show a desktop notification when a long-running command finishes +#: (needs shell_integration). The possible values are: + +#: never +#: Never send a notification. + +#: unfocused +#: Only send a notification when the window does not have keyboard focus. + +#: invisible +#: Only send a notification when the window both is unfocused and not visible +#: to the user, for example, because it is in an inactive tab or its OS window +#: is not currently visible (on platforms that support OS window visibility querying +#: this considers an OS Window visible iff it is active). + +#: always +#: Always send a notification, regardless of window state. + +#: There are two optional arguments: + +#: First, the minimum duration for what is considered a long running +#: command. The default is 5 seconds. Specify a second argument to set +#: the duration. For example: invisible 15. Do not set the value too +#: small, otherwise a command that launches a new OS Window and exits +#: will spam a notification. + +#: Second, the action to perform. The default is notify. The possible +#: values are: + +#: notify +#: Send a desktop notification. The subsequent arguments are optional and specify when +#: the notification is automatically cleared. The set of possible events when the notification is +#: cleared are: focus and next. focus means that when the notification +#: policy is unfocused or invisible the notification is automatically cleared +#: when the window regains focus. The value of next means that the previous notification +#: is cleared when the next notification is shown. The default when no arguments are specified +#: is: focus next. + +#: bell +#: Ring the terminal bell. + +#: notify-bell +#: Send a desktop notification and ring the terminal bell. +#: The arguments are the same as for `notify`. + +#: command +#: Run a custom command. All subsequent arguments are the cmdline to run. + +#: Some more examples:: + +#: # Send a notification when a command takes more than 5 seconds in an unfocused window +#: notify_on_cmd_finish unfocused +#: # Send a notification when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 +#: # Ring a bell when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 bell +#: # Run 'notify-send' when a command takes more than 10 seconds in a invisible window +#: # Here %c is replaced by the current command line and %s by the job exit code +#: notify_on_cmd_finish invisible 10.0 command notify-send "job finished with status: %s" %c +#: # Do not clear previous notification when next command finishes or window regains focus +#: notify_on_cmd_finish invisible 5.0 notify + +# term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on "Stack Overflow" +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. Changing this option by reloading the config will only affect +#: newly created windows. + +# terminfo_type path + +#: The value of the TERMINFO environment variable to set. This +#: variable is used by programs running in the terminal to search for +#: terminfo databases. The default value of path causes kitty to set +#: it to a filesystem location containing the kitty terminfo database. +#: A value of direct means put the entire database into the env var +#: directly. This can be useful when connecting to containers, for +#: example. But, note that not all software supports this. A value of +#: none means do not touch the variable. + +# forward_stdio no + +#: Forward STDOUT and STDERR of the kitty process to child processes. +#: This is useful for debugging as it allows child processes to print +#: to kitty's STDOUT directly. For example, echo hello world +#: >&$KITTY_STDIO_FORWARDED in a shell will print to the parent +#: kitty's STDOUT. Sets the KITTY_STDIO_FORWARDED=fdnum environment +#: variable so child processes know about the forwarding. Note that on +#: macOS this prevents the shell from being run via the login utility +#: so getlogin() will not work in programs run in this session. + +# menu_map + +#: Specify entries for various menus in kitty. Currently only the +#: global menubar on macOS is supported. For example:: + +#: menu_map global "Actions::Launch something special" launch --hold --type=os-window sh -c "echo hello world" + +#: This will create a menu entry named "Launch something special" in +#: an "Actions" menu in the macOS global menubar. Sub-menus can be +#: created by adding more levels separated by the :: characters. + +#: }}} + +#: OS specific tweaks {{{ + +# wayland_titlebar_color system + +#: The color of the kitty window's titlebar on Wayland systems with +#: client side window decorations such as GNOME. A value of system +#: means to use the default system colors, a value of background means +#: to use the background color of the currently active kitty window +#: and finally you can use an arbitrary color, such as #12af59 or red. + +# macos_titlebar_color system + +#: The color of the kitty window's titlebar on macOS. A value of +#: system means to use the default system color, light or dark can +#: also be used to set it explicitly. A value of background means to +#: use the background color of the currently active window and finally +#: you can use an arbitrary color, such as #12af59 or red. + +# macos_option_as_alt no + +#: Use the Option key as an Alt key on macOS. With this set to no, +#: kitty will use the macOS native Option+Key to enter Unicode +#: character behavior. This will break any Alt+Key keyboard shortcuts +#: in your terminal programs, but you can use the macOS Unicode input +#: technique. You can use the values: left, right or both to use only +#: the left, right or both Option keys as Alt, instead. Note that +#: kitty itself always treats Option the same as Alt. This means you +#: cannot use this option to configure different kitty shortcuts for +#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using +#: Option/Alt+Key will take priority, so that any such key presses +#: will not be passed to terminal programs running inside kitty. +#: Changing this option by reloading the config is not supported. + +# macos_hide_from_tasks no + +#: Hide the kitty window from running tasks on macOS (⌘+Tab and the +#: Dock). Changing this option by reloading the config is not +#: supported. + +# macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed on macOS. +#: By default, kitty will stay running, even with no open windows, as +#: is the expected behavior on macOS. + +# macos_window_resizable yes + +#: Disable this if you want kitty top-level OS windows to not be +#: resizable on macOS. + +# macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes on macOS. For example, a +#: value of 0.75 will result in rendering that looks similar to sub- +#: pixel antialiasing at common font sizes. Note that in modern kitty, +#: this option is obsolete (although still supported). Consider using +#: text_composition_strategy instead. + +# macos_traditional_fullscreen no + +#: Use the macOS traditional full-screen transition, that is faster, +#: but less pretty. + +# macos_show_window_title_in all + +#: Control where the window title is displayed on macOS. A value of +#: window will show the title of the currently active window at the +#: top of the macOS window. A value of menubar will show the title of +#: the currently active window in the macOS global menu bar, making +#: use of otherwise wasted space. A value of all will show the title +#: in both places, and none hides the title. See +#: macos_menubar_title_max_length for how to control the length of the +#: title in the menu bar. + +# macos_menubar_title_max_length 0 + +#: The maximum number of characters from the window title to show in +#: the macOS global menu bar. Values less than one means that there is +#: no maximum limit. + +# macos_custom_beam_cursor no + +#: Use a custom mouse cursor for macOS that is easier to see on both +#: light and dark backgrounds. Nowadays, the default macOS cursor +#: already comes with a white border. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. Changing this option +#: by reloading the config is not supported. + +# macos_colorspace srgb + +#: The colorspace in which to interpret terminal colors. The default +#: of srgb will cause colors to match those seen in web browsers. The +#: value of default will use whatever the native colorspace of the +#: display is. The value of displayp3 will use Apple's special +#: snowflake display P3 color space, which will result in over +#: saturated (brighter) colors with some color shift. Reloading +#: configuration will change this value only for newly created OS +#: windows. + +# linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. Changing this option by +#: reloading the config is not supported. + +# wayland_enable_ime yes + +#: Enable Input Method Extension on Wayland. This is typically used +#: for inputting text in East Asian languages. However, its +#: implementation in Wayland is often buggy and introduces latency +#: into the input loop, so disable this if you know you dont need it. +#: Changing this option by reloading the config is not supported, it +#: will not have any effect. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: Keys are identified simply by their lowercase Unicode characters. +#: For example: a for the A key, [ for the left square bracket key, +#: etc. For functional keys, such as Enter or Escape, the names are +#: present at Functional key definitions +#: . +#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt +#: (opt, option, ⌥), super (cmd, command, ⌘). + +#: Simple shortcut mapping is done with the map directive. For full +#: details on advanced mapping including modal and per application +#: maps, see mapping . Some +#: quick examples to illustrate common tasks:: + +#: # unmap a keyboard shortcut, passing it to the program running in kitty +#: map kitty_mod+space +#: # completely ignore a keyboard event +#: map ctrl+alt+f1 discard_event +#: # combine multiple actions +#: map kitty_mod+e combine : new_window : next_layout +#: # multi-key shortcuts +#: map ctrl+x>ctrl+y>z action + +#: The full list of actions that can be mapped to key presses is +#: available here . + +# kitty_mod ctrl+shift + +#: Special modifier key alias for default shortcuts. You can change +#: the value of this option to alter all default shortcuts that use +#: kitty_mod. + +# clear_all_shortcuts no + +#: Remove all shortcut definitions up to this point. Useful, for +#: instance, to remove the default shortcuts. + +# action_alias + +#: E.g. action_alias launch_tab launch --type=tab --cwd=current + +#: Define action aliases to avoid repeating the same options in +#: multiple mappings. Aliases can be defined for any action and will +#: be expanded recursively. For example, the above alias allows you to +#: create mappings to launch a new tab in the current working +#: directory without duplication:: + +#: map f1 launch_tab vim +#: map f2 launch_tab emacs + +#: Similarly, to alias kitten invocation:: + +#: action_alias hints kitten hints --hints-offset=0 + +# kitten_alias + +#: E.g. kitten_alias hints hints --hints-offset=0 + +#: Like action_alias above, but specifically for kittens. Generally, +#: prefer to use action_alias. This option is a legacy version, +#: present for backwards compatibility. It causes all invocations of +#: the aliased kitten to be substituted. So the example above will +#: cause all invocations of the hints kitten to have the --hints- +#: offset=0 option applied. + +#: Clipboard {{{ + +#: Copy to clipboard + +# map kitty_mod+c copy_to_clipboard + +#:: There is also a copy_or_interrupt action that can be optionally +#:: mapped to Ctrl+C. It will copy only if there is a selection and +#:: send an interrupt otherwise. Similarly, +#:: copy_and_clear_or_interrupt will copy and clear the selection or +#:: send an interrupt if there is no selection. The copy_or_noop +#:: action will copy if there is a selection and pass the key through +#:: to the application running in the terminal if there is no +#:: selection. + +#: Copy to clipboard or pass through + +# map cmd+c copy_or_noop + +#: Paste from clipboard + +# map kitty_mod+v paste_from_clipboard +# map cmd+v paste_from_clipboard + +#: Paste from selection + +# map kitty_mod+s paste_from_selection +# map shift+insert paste_from_selection + +#: Pass selection to program + +# map kitty_mod+o pass_selection_to_program + +#:: You can also pass the contents of the current selection to any +#:: program with pass_selection_to_program. By default, the system's +#:: open program is used, but you can specify your own, the selection +#:: will be passed as a command line argument to the program. For +#:: example:: + +#:: map kitty_mod+o pass_selection_to_program firefox + +#:: You can pass the current selection to a terminal program running +#:: in a new kitty window, by using the @selection placeholder:: + +#:: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +#: Scroll line up + +# map kitty_mod+up scroll_line_up +# map kitty_mod+k scroll_line_up +# map opt+cmd+page_up scroll_line_up +# map cmd+up scroll_line_up + +#: Scroll line down + +# map kitty_mod+down scroll_line_down +# map kitty_mod+j scroll_line_down +# map opt+cmd+page_down scroll_line_down +# map cmd+down scroll_line_down + +#: Scroll page up + +# map kitty_mod+page_up scroll_page_up +# map cmd+page_up scroll_page_up + +#: Scroll page down + +# map kitty_mod+page_down scroll_page_down +# map cmd+page_down scroll_page_down + +#: Scroll to top + +# map kitty_mod+home scroll_home +# map cmd+home scroll_home + +#: Scroll to bottom + +# map kitty_mod+end scroll_end +# map cmd+end scroll_end + +#: Scroll to previous shell prompt + +# map kitty_mod+z scroll_to_prompt -1 + +#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last +#:: jumped to or the last clicked position. Requires shell +#:: integration +#:: to work. + +#: Scroll to next shell prompt + +# map kitty_mod+x scroll_to_prompt 1 + +#: Browse scrollback buffer in pager + +# map kitty_mod+h show_scrollback + +#:: You can pipe the contents of the current screen and history +#:: buffer as STDIN to an arbitrary program using launch --stdin- +#:: source. For example, the following opens the scrollback buffer in +#:: less in an overlay window:: + +#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#:: For more details on piping screen and buffer contents to external +#:: programs, see launch . + +#: Browse output of the last shell command in pager + +# map kitty_mod+g show_last_command_output + +#:: You can also define additional shortcuts to get the command +#:: output. For example, to get the first command output on screen:: + +#:: map f1 show_first_command_output_on_screen + +#:: To get the command output that was last accessed by a keyboard +#:: action or mouse action:: + +#:: map f1 show_last_visited_command_output + +#:: You can pipe the output of the last command run in the shell +#:: using the launch action. For example, the following opens the +#:: output in less in an overlay window:: + +#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R + +#:: To get the output of the first command on the screen, use +#:: @first_cmd_output_on_screen. To get the output of the last jumped +#:: to command, use @last_visited_cmd_output. + +#:: Requires shell integration +#:: to work. + +#: Search the scrollback within a pager + +# map kitty_mod+/ search_scrollback +# map cmd+f search_scrollback + +#:: Search for currently selected text in the scrollback using the +#:: configured scrollback_pager. Assumes that pressing the / key +#:: triggers search mode in the pager. If you want to create a manual +#:: mapping with a special pager for this, you can use something +#:: like: + +#:: map f1 combine : launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay mypager : send_key / + +#:: For more sophisticated control, such as using the current +#:: selection, use remote_control_script. + +#: }}} + +#: Window management {{{ + +#: New window + +# map kitty_mod+enter new_window +# map cmd+enter new_window + +#:: You can open a new kitty window running an arbitrary program, for +#:: example:: + +#:: map kitty_mod+y launch mutt + +#:: You can open a new window with the current working directory set +#:: to the working directory of the current window using:: + +#:: map ctrl+alt+enter launch --cwd=current + +#:: You can open a new window that is allowed to control kitty via +#:: the kitty remote control facility with launch --allow-remote- +#:: control. Any programs running in that window will be allowed to +#:: control kitty. For example:: + +#:: map ctrl+enter launch --allow-remote-control some_program + +#:: You can open a new window next to the currently active window or +#:: as the first window, with:: + +#:: map ctrl+n launch --location=neighbor +#:: map ctrl+f launch --location=first + +#:: For more details, see launch +#:: . + +#: New OS window + +# map kitty_mod+n new_os_window +# map cmd+n new_os_window + +#:: Works like new_window above, except that it opens a top-level OS +#:: window. In particular you can use new_os_window_with_cwd to open +#:: a window with the current working directory. + +#: Close window + +# map kitty_mod+w close_window +# map shift+cmd+d close_window + +#: Next window + +# map kitty_mod+] next_window + +#: Previous window + +# map kitty_mod+[ previous_window + +#: Move window forward + +# map kitty_mod+f move_window_forward + +#: Move window backward + +# map kitty_mod+b move_window_backward + +#: Move window to top + +# map kitty_mod+` move_window_to_top + +#: Start resizing window + +# map kitty_mod+r start_resizing_window +# map cmd+r start_resizing_window + +#: First window + +# map kitty_mod+1 first_window +# map cmd+1 first_window + +#: Second window + +# map kitty_mod+2 second_window +# map cmd+2 second_window + +#: Third window + +# map kitty_mod+3 third_window +# map cmd+3 third_window + +#: Fourth window + +# map kitty_mod+4 fourth_window +# map cmd+4 fourth_window + +#: Fifth window + +# map kitty_mod+5 fifth_window +# map cmd+5 fifth_window + +#: Sixth window + +# map kitty_mod+6 sixth_window +# map cmd+6 sixth_window + +#: Seventh window + +# map kitty_mod+7 seventh_window +# map cmd+7 seventh_window + +#: Eighth window + +# map kitty_mod+8 eighth_window +# map cmd+8 eighth_window + +#: Ninth window + +# map kitty_mod+9 ninth_window +# map cmd+9 ninth_window + +#: Tenth window + +# map kitty_mod+0 tenth_window + +#: Visually select and focus window + +# map kitty_mod+f7 focus_visible_window + +#:: Display overlay numbers and alphabets on the window, and switch +#:: the focus to the window when you press the key. When there are +#:: only two windows, the focus will be switched directly without +#:: displaying the overlay. You can change the overlay characters and +#:: their order with option visual_window_select_characters. + +#: Visually swap window with another + +# map kitty_mod+f8 swap_with_window + +#:: Works like focus_visible_window above, but swaps the window. + +#: }}} + +#: Tab management {{{ + +#: Next tab + +# map kitty_mod+right next_tab +# map shift+cmd+] next_tab +# map ctrl+tab next_tab + +#: Previous tab + +# map kitty_mod+left previous_tab +# map shift+cmd+[ previous_tab +# map ctrl+shift+tab previous_tab + +#: New tab + +# map kitty_mod+t new_tab +# map cmd+t new_tab + +#: Close tab + +# map kitty_mod+q close_tab +# map cmd+w close_tab + +#: Close OS window + +# map shift+cmd+w close_os_window + +#: Move tab forward + +# map kitty_mod+. move_tab_forward + +#: Move tab backward + +# map kitty_mod+, move_tab_backward + +#: Set tab title + +# map kitty_mod+alt+t set_tab_title +# map shift+cmd+i set_tab_title + + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, -2 being the tab active before the previously active tab and +#: so on. Any number larger than the number of tabs goes to the last +#: tab and any number less than the number of previously used tabs in +#: the history goes to the oldest previously used tab in the history:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and new_tab_with_cwd. +#: Finally, if you want the new tab to open next to the current tab +#: rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] +#: }}} + +#: Layout management {{{ + +#: Next layout + +# map kitty_mod+l next_layout + + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout + +#: There is also a toggle_layout action that switches to the named +#: layout or back to the previous layout if in the named layout. +#: Useful to temporarily "zoom" the active window by switching to the +#: stack layout:: + +#: map ctrl+alt+z toggle_layout stack +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +#: Increase font size + +# map kitty_mod+equal change_font_size all +2.0 +# map kitty_mod+plus change_font_size all +2.0 +# map kitty_mod+kp_add change_font_size all +2.0 +# map cmd+plus change_font_size all +2.0 +# map cmd+equal change_font_size all +2.0 +# map shift+cmd+equal change_font_size all +2.0 + +#: Decrease font size + +# map kitty_mod+minus change_font_size all -2.0 +# map kitty_mod+kp_subtract change_font_size all -2.0 +# map cmd+minus change_font_size all -2.0 +# map shift+cmd+minus change_font_size all -2.0 + +#: Reset font size + +# map kitty_mod+backspace change_font_size all 0 +# map cmd+0 change_font_size all 0 + + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 + +#: To setup shortcuts to multiply/divide the font size:: + +#: map kitty_mod+f6 change_font_size all *2.0 +#: map kitty_mod+f6 change_font_size all /2.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +#: Open URL + +# map kitty_mod+e open_url_with_hints + +#:: Open a currently visible URL using the keyboard. The program used +#:: to open the URL is specified in open_url_with. + +#: Insert selected path + +# map kitty_mod+p>f kitten hints --type path --program - + +#:: Select a path/filename and insert it into the terminal. Useful, +#:: for instance to run git commands on a filename output from a +#:: previous git command. + +#: Open selected path + +# map kitty_mod+p>shift+f kitten hints --type path + +#:: Select a path/filename and open it with the default open program. + +#: Insert chosen file + +# map kitty_mod+p>c kitten choose-files + +#:: Select a file using the choose-files +#:: kitten +#:: and insert it into the terminal. + +#: Insert chosen directory + +# map kitty_mod+p>d kitten choose-files --mode=dir + +#:: Select a directory using the choose-files +#:: kitten +#:: and insert it into the terminal. + +#: Insert selected line + +# map kitty_mod+p>l kitten hints --type line --program - + +#:: Select a line of text and insert it into the terminal. Useful for +#:: the output of things like: `ls -1`. + +#: Insert selected word + +# map kitty_mod+p>w kitten hints --type word --program - + +#:: Select words and insert into terminal. + +#: Insert selected hash + +# map kitty_mod+p>h kitten hints --type hash --program - + +#:: Select something that looks like a hash and insert it into the +#:: terminal. Useful with git, which uses SHA1 hashes to identify +#:: commits. + +#: Open the selected file at the selected line + +# map kitty_mod+p>n kitten hints --type linenum + +#:: Select something that looks like filename:linenum and open it in +#:: your default editor at the specified line number. + +#: Open the selected hyperlink + +# map kitty_mod+p>y kitten hints --type hyperlink + +#:: Select a hyperlink (i.e. a URL that has been marked as such by +#:: the terminal program, for example, by `ls --hyperlink=auto`). + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see hints kitten +#: . +#: }}} + +#: Miscellaneous {{{ + +#: Show documentation + +# map kitty_mod+f1 show_kitty_doc overview + +#: Toggle fullscreen + +# map kitty_mod+f11 toggle_fullscreen +# map ctrl+cmd+f toggle_fullscreen + +#: Toggle maximized + +# map kitty_mod+f10 toggle_maximized + +#: Toggle macOS secure keyboard entry + +# map opt+cmd+s toggle_macos_secure_keyboard_entry + +#: macOS Cycle through OS Windows + +# map cmd+` macos_cycle_through_os_windows + +#: macOS Cycle through OS Windows backwards + +# map cmd+shift+` macos_cycle_through_os_windows_backwards + +#: Unicode input + +# map kitty_mod+u kitten unicode_input +# map ctrl+cmd+space kitten unicode_input + +#: Edit config file + +# map kitty_mod+f2 edit_config_file +# map cmd+, edit_config_file + +#: Open the kitty command shell + +# map kitty_mod+escape kitty_shell window + +#:: Open the kitty shell in a new window / tab / overlay / os_window +#:: to control kitty using commands. + +#: Increase background opacity + +# map kitty_mod+a>m set_background_opacity +0.1 + +#: Decrease background opacity + +# map kitty_mod+a>l set_background_opacity -0.1 + +#: Make background fully opaque + +# map kitty_mod+a>1 set_background_opacity 1 + +#: Reset background opacity + +# map kitty_mod+a>d set_background_opacity default + +#: Reset the terminal + +# map kitty_mod+delete clear_terminal reset active +# map opt+cmd+r clear_terminal reset active + +#:: You can create shortcuts to clear/reset the terminal. For +#:: example:: + +#:: # Reset the terminal +#:: map f1 clear_terminal reset active +#:: # Clear the terminal screen by erasing all contents +#:: map f1 clear_terminal clear active +#:: # Clear the terminal scrollback by erasing it +#:: map f1 clear_terminal scrollback active +#:: # Scroll the contents of the screen into the scrollback +#:: map f1 clear_terminal scroll active +#:: # Clear everything on screen up to the line with the cursor or the start of the current prompt (needs shell integration) +#:: map f1 clear_terminal to_cursor active +#:: # Same as above except cleared lines are moved into scrollback +#:: map f1 clear_terminal to_cursor_scroll active +#:: # Erase the last command and its output (needs shell integration to work) +#:: map f1 clear_terminal last_command active + +#:: If you want to operate on all kitty windows instead of just the +#:: current one, use all instead of active. + +#:: Some useful functions that can be defined in the shell rc files +#:: to perform various kinds of clearing of the current window: + +#:: .. code-block:: sh + +#:: clear-only-screen() { +#:: printf "\e[H\e[2J" +#:: } + +#:: clear-screen-and-scrollback() { +#:: printf "\e[H\e[3J" +#:: } + +#:: clear-screen-saving-contents-in-scrollback() { +#:: printf "\e[H\e[22J" +#:: } + +#:: For instance, using these escape codes, it is possible to remap +#:: Ctrl+L to both scroll the current screen contents into the +#:: scrollback buffer and clear the screen, instead of just clearing +#:: the screen. For ZSH, in ~/.zshrc, add: + +#:: .. code-block:: zsh + +#:: ctrl_l() { +#:: builtin print -rn -- $'\r\e[0J\e[H\e[22J' >"$TTY" +#:: builtin zle .reset-prompt +#:: builtin zle -R +#:: } +#:: zle -N ctrl_l +#:: bindkey '^l' ctrl_l + +#:: Alternatively, you can just add map ctrl+l clear_terminal +#:: to_cursor_scroll active to kitty.conf which works with no changes +#:: to the shell rc files, but only clears up to the prompt, it does +#:: not clear any text at the prompt itself. + +#: Clear to start + +# map cmd+k clear_terminal to_cursor active + +#: Clear scrollback + +# map option+cmd+k clear_terminal scrollback active + +#: Clear the last command + +# map cmd+l clear_terminal last_command active + +#: Clear screen + +# map cmd+ctrl+l clear_terminal to_cursor_scroll active + +#: Reload kitty.conf + +# map kitty_mod+f5 load_config_file +# map ctrl+cmd+, load_config_file + +#:: Reload kitty.conf, applying any changes since the last time it +#:: was loaded. Note that a handful of options cannot be dynamically +#:: changed and require a full restart of kitty. Particularly, when +#:: changing shortcuts for actions located on the macOS global menu +#:: bar, a full restart is needed. You can also map a keybinding to +#:: load a different config file, for example:: + +#:: map f5 load_config /path/to/alternative/kitty.conf + +#:: Note that all options from the original kitty.conf are discarded, +#:: in other words the new configuration *replace* the old ones. + +#: Debug kitty configuration + +# map kitty_mod+f6 debug_config +# map opt+cmd+, debug_config + +#:: Show details about exactly what configuration kitty is running +#:: with and its host environment. Useful for debugging issues. + +#: Send arbitrary text on key presses + +#:: E.g. map ctrl+shift+alt+h send_text all Hello World + +#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#:: client program when pressing specified shortcut keys. For +#:: example:: + +#:: map ctrl+alt+a send_text all Special text + +#:: This will send "Special text" when you press the Ctrl+Alt+A key +#:: combination. The text to be sent decodes ANSI C escapes +#:: so you can use escapes like \e to send control +#:: codes or \u21fb to send Unicode characters (or you can just input +#:: the Unicode characters directly as UTF-8 text). You can use +#:: `kitten show-key` to get the key escape codes you want to +#:: emulate. + +#:: The first argument to send_text is the keyboard modes in which to +#:: activate the shortcut. The possible values are normal, +#:: application, kitty or a comma separated combination of them. The +#:: modes normal and application refer to the DECCKM cursor key mode +#:: for terminals, and kitty refers to the kitty extended keyboard +#:: protocol. The special value all means all of them. + +#:: Some more examples:: + +#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) +#:: map ctrl+alt+a send_text normal Word\e[H +#:: map ctrl+alt+a send_text application Word\eOH +#:: # Run a command at a shell prompt (like typing the command and pressing Enter) +#:: map ctrl+alt+a send_text normal,application some command with arguments\r + +#: Open kitty Website + +# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ + +#: Hide macOS kitty application + +# map cmd+h hide_macos_app + +#: Hide macOS other applications + +# map opt+cmd+h hide_macos_other_apps + +#: Minimize macOS window + +# map cmd+m minimize_macos_window + +#: Quit kitty + +# map cmd+q quit + +#: }}} + +#: }}} + diff --git a/kitty/themes/Spacedust.conf b/kitty/themes/Spacedust.conf new file mode 100644 index 0000000..f556ae7 --- /dev/null +++ b/kitty/themes/Spacedust.conf @@ -0,0 +1,29 @@ +background #0a1e24 +foreground #ecefc1 +cursor #708183 +selection_background #0a385c +color0 #6e5246 +color8 #674c31 +color1 #e35a00 +color9 #ff8a39 +color2 #5cab96 +color10 #adcab8 +color3 #e3cd7b +color11 #ffc777 +color4 #0e548b +color12 #67a0cd +color5 #e35a00 +color13 #ff8a39 +color6 #06afc7 +color14 #83a6b3 +color7 #f0f1ce +color15 #fefff0 +selection_foreground #0a1e24 + +# START_AUTOGENERATED_TAB_STYLE +# Feel free to update these colors manually and remove these comments. +active_tab_foreground #eeeeee +active_tab_background #0a385c +inactive_tab_foreground #ecefc1 +inactive_tab_background #08181d +# END_AUTOGENERATED_TAB_STYLE diff --git a/kitty/themes/Xcodedark.conf b/kitty/themes/Xcodedark.conf new file mode 100644 index 0000000..70a4301 --- /dev/null +++ b/kitty/themes/Xcodedark.conf @@ -0,0 +1,57 @@ +# xcodedark by arzg, https://github.com/arzg/vim-colors-xcode +# This work is licensed under the terms of the MIT license. +# For a copy, see https://opensource.org/licenses/MIT. + +background #292a30 +foreground #dfdfe0 + +cursor #53606e + +selection_foreground #53606e +selection_background #393b44 + +color0 #292a30 +color8 #53606e + +# red +color1 #ff8170 +# pink +color9 #ff7ab2 + +# teal +color2 #78c2b3 +# lighy teal +color10 #acf2e4 + +# yellow +color3 #ffa14f +# light yellow +color11 #d9c97c + +# blue +color4 #4eb0cc +# light blue +color12 #6bdfff + +# purple +color5 #b281eb +# light purple +color13 #dabaff + +# green +color6 #84b360 +# light green +color14 #b0e687 + +# light gray +color7 #a3b1bf +# dark gray +color15 #53606e + +# START_AUTOGENERATED_TAB_STYLE +# Feel free to update these colors manually and remove these comments. +active_tab_foreground #eeeeee +active_tab_background #393b44 +inactive_tab_foreground #dfdfe0 +inactive_tab_background #212226 +# END_AUTOGENERATED_TAB_STYLE diff --git a/kitty/themes/dracula.conf b/kitty/themes/dracula.conf new file mode 100644 index 0000000..fd14e7b --- /dev/null +++ b/kitty/themes/dracula.conf @@ -0,0 +1,81 @@ +foreground #C9D0D3 +background #383838 +selection_background #4c4c4c +selection_foreground #C9D0D3 +url_color #73cef4 +cursor #C9D0D3 + +# Цвета для обычного текста +color0 #242424 +color8 #484848 + +# Цвета для яркого текста +color1 #f43753 +color9 #f70067 + +color2 #98be65 +color10 #a9ff68 + +color3 #ffc24b +color11 #f7bb3b + +color4 #73cef4 +color12 #51afef + +color5 #cba6f7 +color13 #b33076 + +color6 #00f1f5 +color14 #6FAFBD + +color7 #eeeeee +color15 #b8b8b8 + +# Дополнительные цвета (можно использовать в скриптах или плагинах) +# Зеленые оттенки +color16 #c9d05c +color17 #6A8759 +color18 #afd700 +color19 #89d957 +color20 #4dd158 +color21 #AFBF7E + +# Красные/розовые оттенки +color22 #7a1b29 +color23 #881515 +color24 #c955ae +color25 #ad475f + +# Оранжевые/коричневые оттенки +color26 #d3b987 +color27 #dc9656 +color28 #CC7832 +color29 #b8733e +color30 #C07C41 +color31 #ff9e64 + +# Синие/голубые оттенки +color32 #b3deef +color33 #596f77 +color34 #6897BB +color35 #4682b4 + +# Серые оттенки +color36 #808080 +color37 #73797e +color38 #4B4E4F +color39 #3C3F40 +color40 #2B2B2B +color41 #404040 +color42 #6d8086 +color43 #abb2bf +color44 #d1d4cf + +# Фиолетовые оттенки +color45 #9876AA +color46 #392a52 + +# Темные оттенки +color47 #151838 +color48 #bf4537 +color49 #c95942 diff --git a/nvim/init.lua b/nvim/init.lua index dd1640b..6e633b9 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,11 +1,28 @@ -- Default my settings vim.g.mapleader = " " +vim.o.clipboard = "unnamedplus" +vim.opt.wrap = false vim.wo.number = true vim.wo.relativenumber = true -vim.opt.wrap = false -- Add basic configs require("configs.lazy") require("mappings") require("options") -require("custom.init") + +-- Telescope +require("telescope").load_extension("noice") + +-- Themes +require("themes.xcodedark").setup() + +-- ========== Clipboard ============= -- +vim.api.nvim_create_autocmd("TextYankPost", { + callback = function() + vim.hl.hl_op({ timeout = 1000 }) + local copy_to_unnamedplus = require("vim.ui.clipboard.osc52").copy("+") + copy_to_unnamedplus(vim.v.event.regcontents) + local copy_to_unnamed = require("vim.ui.clipboard.osc52").copy("*") + copy_to_unnamed(vim.v.event.regcontents) + end, +}) diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 2b7fb52..a1358f2 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,49 +1,45 @@ { - "LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" }, + "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "cmp-async-path": { "branch": "main", "commit": "f8af3f726e07f2e9d37672eaa9102581aefce149" }, + "cmp-async-path": { "branch": "main", "commit": "98185a91d49ff5dd249aebf2f7456e18063fa2a0" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, "cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, - "duckytype.nvim": { "branch": "main", "commit": "fa59fbd7cf8407337bfe07d01b361a3449f34743" }, + "conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" }, + "flash.nvim": { "branch": "main", "commit": "5f0f270fdc7c5b0c21d903ee85b9cb06f2ac636a" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" }, - "gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" }, + "gitsigns.nvim": { "branch": "main", "commit": "5be654f2232c10ddcad19c1607a67b6b4b78fc29" }, "gitui.nvim": { "branch": "main", "commit": "686d74e79899af760ed9f5f0ad2bd1bb1c135e26" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "log-highlight.nvim": { "branch": "main", "commit": "b2e00cfd41ca94338265a595f3f3f423d9f9322e" }, - "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, + "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, "marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "eaa34887d444cb002e1b165fac399ae4bbc771f7" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "40276c4df7e6bdce6801d6c035c6227f9115a855" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, - "mason.nvim": { "branch": "main", "commit": "e54f5bf5f12c560da31c17eee5b3e1bd369f3ff9" }, - "mini.nvim": { "branch": "main", "commit": "a995fe9cd4193fb492b5df69175a351a74b3d36b" }, - "mini.pairs": { "branch": "main", "commit": "30cf2f01c4aaa2033db67376b9924fa2442c05d6" }, - "neotest": { "branch": "master", "commit": "ad991822b7076b1d940b33a9d6d0d30416d5df81" }, - "neotest-gtest": { "branch": "main", "commit": "b66f1d33cbf3b37b9803e6bc7ef47ac60eba86b1" }, - "neotest-phpunit": { "branch": "main", "commit": "40e53c4294726a16f34f1a383a94c570553c6d46" }, + "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "ebd66767191714e008ce73b769518a763ff31bdc" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, - "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" }, - "nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" }, - "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, + "nui.nvim": { "branch": "main", "commit": "10fc361835c856ba4233ef5ea135b919bf3dce97" }, + "nvim-autopairs": { "branch": "master", "commit": "430522f95fe4fb7c511ec64f8c1a90cc6a66c05c" }, + "nvim-cmp": { "branch": "main", "commit": "2ffe79f1f021def8dd1fcd81deb16f1bb0d989f3" }, + "nvim-dap": { "branch": "master", "commit": "9e848e09a697ee95302a3ef2dd43fd6eb709e570" }, + "nvim-dap-ui": { "branch": "master", "commit": "cc9dd33aade7f20bae414d0cba163bc60d4d4b43" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, - "nvim-lspconfig": { "branch": "master", "commit": "75e49cfa588a89ca667d767c0afef3ceac205faa" }, - "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-file-operations": { "branch": "main", "commit": "d491d763be6686bbb8eae3b26e8e46e431852c29" }, + "nvim-lspconfig": { "branch": "master", "commit": "684cb45c2faa24ce463b4fe9aaf011bfe1e0fb26" }, + "nvim-nio": { "branch": "master", "commit": "edcc181a875301dd21840189aa2f2f9ad69fc172" }, "nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" }, - "nvim-tree.lua": { "branch": "master", "commit": "f9bfc0059eca24546b69a7006110463da4808f8f" }, - "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, + "nvim-treesitter": { "branch": "main", "commit": "8b98b4470eb326f1c7b50dae79f8c963568e5720" }, "nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" }, - "nvim-web-devicons": { "branch": "master", "commit": "2795c26c916bb3c57dde308b82be51971fa92747" }, - "persisted.nvim": { "branch": "main", "commit": "1a8e9dcf277d61105619498b2002c287c50424b8" }, + "nvim-web-devicons": { "branch": "master", "commit": "2ae6958df7ced50baac5035cec0c15799eedfbf7" }, + "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, + "persisted.nvim": { "branch": "main", "commit": "f4773357d60c71e99a9fc39ebe858b925105431c" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, "screenkey.nvim": { "branch": "main", "commit": "16390931d847b1d5d77098daccac4e55654ac9e2" }, - "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, - "telescope.nvim": { "branch": "master", "commit": "f04ab730b8f9c6bf3f54a206d0dcddfd70c52d59" }, - "vim-highlightedyank": { "branch": "master", "commit": "285a61425e79742997bbde76a91be6189bc988fb" }, + "snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" }, + "telescope.nvim": { "branch": "master", "commit": "40aedd8a68c78a656a10a8d62d80c54af59420fb" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/nvim/lua/configs/bufferline.lua b/nvim/lua/configs/bufferline.lua index f0a0c68..5eb2748 100644 --- a/nvim/lua/configs/bufferline.lua +++ b/nvim/lua/configs/bufferline.lua @@ -8,6 +8,37 @@ bufferline.setup { icon = '▎', style = 'icon', }, + groups = { + items = { + { + name = 'tornado', + matcher = function(buf) + return (buf.path or ""):lower():match("tornado") + end, + }, + { + name = 'gornado', + matcher = function(buf) + return (buf.path or ""):lower():match("gornado") + end, + }, + { + name = 'tests', + matcher = function(buf) + return (buf.name or ""):lower():match("*test*%.cpp$") + end, + }, + { + name = 'code', + matcher = function(buf) + return (buf.name or ""):lower():match("%.h$") + or (buf.name or ""):lower():match("%.c$") + or (buf.name or ""):lower():match("%.cpp$") + end, + }, + }, + hidden = false, + }, buffer_close_icon = '󰅖', modified_icon = '● ', close_icon = ' ', @@ -17,20 +48,6 @@ bufferline.setup { max_prefix_length = 15, truncate_names = true, tab_size = 18, - custom_filter = function(buf_number, buf_numbers) - if vim.bo[buf_number].filetype ~= "" then - return true - end - if vim.fn.bufname(buf_number) ~= "" then - return true - end - if vim.fn.getcwd() == "" and vim.bo[buf_number].filetype ~= "wiki" then - return true - end - if buf_numbers[1] ~= buf_number then - return true - end - end, offsets = { { filetype = "NvimTree", diff --git a/nvim/lua/configs/conform.lua b/nvim/lua/configs/conform.lua index 9167dfe..0394afc 100644 --- a/nvim/lua/configs/conform.lua +++ b/nvim/lua/configs/conform.lua @@ -2,13 +2,12 @@ require('conform').setup({ formatters_by_ft = { lua = { "stylua" }, cpp = { "clang-format" }, - go = { "gofmr" }, + go = { "gofmt" }, }, format_on_save = { - -- These options will be passed to conform.format() timeout_ms = 500, - lsp_fallback = true, + lsp_format = "fallback", }, notify_on_error = true, }) diff --git a/nvim/lua/configs/lazy.lua b/nvim/lua/configs/lazy.lua index f533341..337c884 100644 --- a/nvim/lua/configs/lazy.lua +++ b/nvim/lua/configs/lazy.lua @@ -1,5 +1,5 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then +if not vim.uv.fs_stat(lazypath) then local lazyrepo = "https://github.com/folke/lazy.nvim.git" local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) if vim.v.shell_error ~= 0 then diff --git a/nvim/lua/configs/lsp/e-lspconfig.lua b/nvim/lua/configs/lsp/e-lspconfig.lua deleted file mode 100644 index 48c2f29..0000000 --- a/nvim/lua/configs/lsp/e-lspconfig.lua +++ /dev/null @@ -1,55 +0,0 @@ -local M = {} -local map = vim.keymap.set - --- export on_attach & capabilities -M.on_attach = function(_, bufnr) - local function opts(desc) - return { buffer = bufnr, desc = "LSP " .. desc } - end - - map("n", "gD", vim.lsp.buf.declaration, opts "Go to declaration") - map("n", "gd", vim.lsp.buf.definition, opts "Go to definition") - map("n", "wa", vim.lsp.buf.add_workspace_folder, opts "Add workspace folder") - map("n", "wr", vim.lsp.buf.remove_workspace_folder, opts "Remove workspace folder") - - map("n", "wl", function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts "List workspace folders") - - map("n", "D", vim.lsp.buf.type_definition, opts "Go to type definition") -end - --- disable semanticTokens -M.on_init = function(client, _) - if vim.fn.has "nvim-0.11" ~= 1 then - if client.supports_method "textDocument/semanticTokens" then - client.server_capabilities.semanticTokensProvider = nil - end - else - if client:supports_method "textDocument/semanticTokens" then - client.server_capabilities.semanticTokensProvider = nil - end - end -end - -M.capabilities = vim.lsp.protocol.make_client_capabilities() - -M.capabilities.textDocument.completion.completionItem = { - documentationFormat = { "markdown", "plaintext" }, - snippetSupport = true, - preselectSupport = true, - insertReplaceSupport = true, - labelDetailsSupport = true, - deprecatedSupport = true, - commitCharactersSupport = true, - tagSupport = { valueSet = { 1 } }, - resolveSupport = { - properties = { - "documentation", - "detail", - "additionalTextEdits", - }, - }, -} - -return M diff --git a/nvim/lua/configs/lsp/lspconfig.lua b/nvim/lua/configs/lsp/lspconfig.lua index 1d983f8..61616a7 100644 --- a/nvim/lua/configs/lsp/lspconfig.lua +++ b/nvim/lua/configs/lsp/lspconfig.lua @@ -1,30 +1,42 @@ -local on_attach = require("configs.lsp.e-lspconfig").on_attach -local on_init = require("configs.lsp.e-lspconfig").on_init -local capabilities = require("configs.lsp.e-lspconfig").capabilities +vim.lsp.config('*', { + capabilities = require('cmp_nvim_lsp').default_capabilities(), + on_init = function(client) + if client:supports_method('textDocument/semanticTokens') then + client.server_capabilities.semanticTokensProvider = nil + end + end, +}) + +vim.api.nvim_create_autocmd('LspAttach', { + callback = function(args) + local map = vim.keymap.set + local function opts(desc) + return { buffer = args.buf, desc = "LSP " .. desc } + end + + map("n", "gD", vim.lsp.buf.declaration, opts "Go to declaration") + map("n", "gd", vim.lsp.buf.definition, opts "Go to definition") + map("n", "wa", vim.lsp.buf.add_workspace_folder, opts "Add workspace folder") + map("n", "wr", vim.lsp.buf.remove_workspace_folder, opts "Remove workspace folder") + map("n", "wl", function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, opts "List workspace folders") + map("n", "D", vim.lsp.buf.type_definition, opts "Go to type definition") + end, +}) -- C/C++ vim.lsp.config('clangd', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, cmd = { - "clangd-22", + "clangd", "--clang-tidy", }, filetypes = { "c", "cpp", "h", "hpp", "objc", "objcpp" }, root_markers = { '.git' }, }) -vim.lsp.enable('clangd') --- Go (gopls) lsp server +-- Go vim.lsp.config('gopls', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'gopls' }, - filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' }, - root_markers = { 'go.mod', '.git' }, - single_file_support = true, settings = { gopls = { completeUnimported = true, @@ -37,32 +49,18 @@ vim.lsp.config('gopls', { }, }, }) -vim.lsp.enable('gopls') --- PhP +-- PHP vim.lsp.config('phpactor', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'phpactor', 'language-server' }, - filetypes = { 'php' }, - root_markers = { 'composer.json', '.git' }, init_options = { ["language_server_phpstan.enabled"] = false, ["language_server_psalm.enabled"] = false, + ["language_server_mago.enabled"] = false, } }) -vim.lsp.enable('phpactor') -- Lua vim.lsp.config('lua_ls', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'lua-language-server' }, - filetypes = { 'lua' }, - root_markers = { '.luarc.json', '.luarc.jsonc', '.git' }, - single_file_support = true, settings = { Lua = { telemetry = { enable = false }, @@ -78,34 +76,7 @@ vim.lsp.config('lua_ls', { }, } }) -vim.lsp.enable('lua_ls') --- Bash -vim.lsp.config('bashls', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'bash-language-server', 'start' }, - filetypes = { 'sh', 'bash' }, - root_markers = { '.git' }, - single_file_support = true, -}) -vim.lsp.enable('bashls') - --- Meson -vim.lsp.config('meson_ls', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'mesonlsp' }, - filetypes = { 'meson' }, - root_markers = { 'meson.build', '.git' }, - single_file_support = true, - settings = {} -}) -vim.lsp.enable('meson_ls') - --- For all vim.diagnostic.config({ virtual_text = false, }) diff --git a/nvim/lua/configs/neotree.lua b/nvim/lua/configs/neotree.lua new file mode 100644 index 0000000..1ce9169 --- /dev/null +++ b/nvim/lua/configs/neotree.lua @@ -0,0 +1,78 @@ +return { + close_if_last_window = true, + popup_border_style = "rounded", + + enable_git_status = true, + enable_diagnostics = true, + + filesystem = { + hijack_netrw_behavior = "open_current", + + follow_current_file = { + enabled = true, + leave_dirs_open = false, + }, + + group_empty_dirs = true, + + filtered_items = { + visible = false, + hide_hidden = false, + hide_dotfiles = false, + hide_gitignored = false, + hide_by_name = { + "docs", + ".git", + ".cache", + "builddir-debug", + }, + }, + + bind_to_cwd = true, + cwd_target = { + sidebar = "global", + current = "window", + }, + + use_libuv_file_watcher = true, + + window = { + width = 30, + }, + }, + + default_component_configs = { + indent = { + with_markers = true, + }, + + modified = { + symbol = "", + }, + + icon = { + folder_closed = "", + folder_open = "", + folder_empty = "", + default = "󰈚", + }, + + git_status = { + symbols = { + added = "★", + modified = "✗", + deleted = "", + renamed = "➜", + untracked = "★", + ignored = "◌", + unstaged = "✗", + staged = "✓", + conflict = "", + }, + }, + + name = { + use_git_status_colors = true, + }, + }, +} diff --git a/nvim/lua/configs/nvimtree.lua b/nvim/lua/configs/nvimtree.lua deleted file mode 100644 index 49be810..0000000 --- a/nvim/lua/configs/nvimtree.lua +++ /dev/null @@ -1,105 +0,0 @@ --- return { --- filters = { dotfiles = false, git_ignored = false, }, --- disable_netrw = true, --- hijack_cursor = true, --- sync_root_with_cwd = true, --- update_focused_file = { --- enable = true, --- update_root = false, --- }, --- bookmarks = { --- persist = true, --- }, --- view = { --- width = 30, --- preserve_window_proportions = true, --- }, --- renderer = { --- root_folder_label = false, --- highlight_git = true, --- indent_markers = { enable = true }, --- icons = { --- glyphs = { --- default = "󰈚", --- folder = { --- default = "", --- empty = "", --- empty_open = "", --- open = "", --- symlink = "", --- }, --- git = { unmerged = "" }, --- }, --- }, --- }, --- } -return { - filters = { - dotfiles = false, - git_ignored = false, - }, - - disable_netrw = true, - hijack_cursor = true, - sync_root_with_cwd = true, - - update_focused_file = { - enable = true, - update_root = false, - }, - - bookmarks = { - persist = true, - }, - - git = { - enable = true, - ignore = false, - timeout = 5000, - }, - - - view = { - width = 30, - preserve_window_proportions = true, - }, - - renderer = { - root_folder_label = false, - highlight_git = "all", - - indent_markers = { - enable = true, - }, - - icons = { - show = { - git = true, - modified = false, - file = true, - folder = true, - folder_arrow = true, - }, - - glyphs = { - default = "󰈚", - folder = { - default = "", - empty = "", - empty_open = "", - open = "", - symlink = "", - }, - git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★", - deleted = "", - ignored = "◌", - }, - }, - }, - }, -} diff --git a/nvim/lua/configs/telescope.lua b/nvim/lua/configs/telescope.lua index ee5a959..78998dd 100644 --- a/nvim/lua/configs/telescope.lua +++ b/nvim/lua/configs/telescope.lua @@ -1,4 +1,4 @@ -require("telescope").setup(){ +require("telescope").setup { defaults = { prompt_prefix = "  ", selection_caret = " ", diff --git a/nvim/lua/custom/darcula.lua b/nvim/lua/custom/darcula.lua deleted file mode 100644 index 2f337f4..0000000 --- a/nvim/lua/custom/darcula.lua +++ /dev/null @@ -1,804 +0,0 @@ ----@class Config -local config = { - opt = { - integrations = { - telescope = false, - lualine = true, - lsp_semantics_token = true, - nvim_cmp = true, - dap_nvim = true, - }, - }, -} - ----@class MyModule -local M = {} - ----@type Config -M.config = config - -local color = { - green = "#98be65", - red = "#f43753", - grey = "#C9D0D3", - light_blue = "#b3deef", - background = "#383838", - pale_gold = "#d3b987", - dark = "#2B2B2B", - bright_sky = "#73cef4", - golden_yellow = "#ffc24b", - light_olive_green = "#c9d05c", - medium_gray = "#4c4c4c", - light_brown = "#dc9656", - silver_gray = "#b8b8b8", - bright_cyan = "#00f1f5", - light_slate_gray = "#abb2bf", - dark_grey = "#484848", - comment = "#808080", - light_lime_green = "#a9ff68", - peach_orange = "#ff9e64", - slate_gray = "#6d8086", - light_lavender = "#cba6f7", - very_light_gray = "#eeeeee", - dark_charcoal_gray = "#404040", - very_dark_gray = "#242424", - bright_pink = "#f70067", - burnt_orange = "#CC7832", - dark_maroon = "#7a1b29", - steel_blue = "#596f77", - bright_yellow_green = "#e3e346", - copper_brown = "#C07C41", - deep_fuchsia = "#b33076", - lavender = "#9876AA", - deep_light_blue = "#51afef", - pale_taupe = "#AD9E7D", - olive_green = "#6A8759", - _52 = "#c95942", - _54 = "#bf4537", - _64 = "#89d957", - _70 = "#4dd158", - _66 = "#6FAFBD", - _71 = "#4B4E4F", - _74 = "#3C3F40", - _38 = "#881515", - _39 = "#73797e", - _47 = "#f7bb3b", - _50 = "#d1d4cf", - _53 = "#c955ae", - _55 = "#b8733e", - _56 = "#afd700", - _57 = "#ad475f", - _58 = "#FFC66D", - _61 = "#AFBF7E", - _68 = "#6897BB", - _72 = "#4682b4", - _75 = "#392a52", - _82 = "#151838", -} - ----@param args Config? --- you can define your setup function here. Usually configurations can be merged, accepting outside params and --- you can also put some validation here for those. -M.setup = function(args) - M.config = vim.tbl_deep_extend("force", M.config, args or {}) - if vim.g.colors_name ~= nil then - vim.cmd("highlight clear") - end - - if args and type(args.override) == "function" then - c = args.override(color) - color = vim.tbl_deep_extend("force", color, c) - end - - -- neovim version should be higher than 0.8.3 - if vim.fn.has("nvim-0.8.3") == 0 then - vim.cmd( - "echohl WarningMsg | echo 'Your neovim version is lower than 0.8.3, some features may not work correctly!' | echohl None" - ) - end - - vim.g.colors_name = "darcula-dark" - vim.o.termguicolors = true - M.configure_highlights() -end - -M.configure_highlights = function() - -- colors - -- Highlight groups - local hi = vim.api.nvim_set_hl - - if M.config.opt.integrations.lsp_semantics_token then - -- lsp semantics token - hi(0, "@attribute", { link = "TSAttribute" }) - hi(0, "@boolean", { link = "TSBoolean" }) - hi(0, "@character", { link = "TSCharacter" }) - hi(0, "@character.special", { link = "SpecialChar" }) - hi(0, "@class", { link = "TSType" }) - hi(0, "@comment", { link = "TSComment" }) - hi(0, "@conditional", { link = "TSConditional" }) - hi(0, "@constant", { link = "TSConstant" }) - hi(0, "@constant.builtin", { link = "TSConstantBuiltin" }) - hi(0, "@constant.macro", { link = "TSConstant" }) - hi(0, "@constructor", { link = "TSConstructor" }) - hi(0, "@decorator", { link = "Identifier" }) - hi(0, "@enum", { link = "TSType" }) - hi(0, "@enumMember", { link = "Constant" }) - hi(0, "@error", { link = "TSError" }) - hi(0, "@event", { link = "Identifier" }) - hi(0, "@exception", { link = "TSException" }) - hi(0, "@field", { link = "TSField" }) - hi(0, "@float", { link = "TSFloat" }) - hi(0, "@function", { link = "TSFunction" }) - hi(0, "@function.builtin", { link = "TSFuncBuiltin" }) - hi(0, "@function.call", { link = "TSFunctionCall" }) - hi(0, "@function.macro", { link = "TSFuncMacro" }) - hi(0, "@include", { link = "TSInclude" }) - hi(0, "@interface", { link = "Structure" }) - hi(0, "@keyword", { link = "TSKeyword" }) - hi(0, "@keyword.function", { link = "TSKeywordFunction" }) - hi(0, "@keyword.operator", { link = "TSKeywordOperator" }) - hi(0, "@keyword.return", { link = "TSKeyword" }) - hi(0, "@label", { link = "TSLabel" }) - hi(0, "@method", { link = "TSMethod" }) - hi(0, "@method.call", { link = "TSMethodCall" }) - hi(0, "@modifier", { link = "Identifier" }) - hi(0, "@namespace", { link = "TSNamespace" }) - hi(0, "@none", { link = "TSNone" }) - hi(0, "@number", { link = "TSNumber" }) - hi(0, "@operator", { link = "TSOperator" }) - hi(0, "@parameter", { link = "TSParameter" }) - hi(0, "@property", { link = "TSVariable" }) - hi(0, "@punctuation.bracket", { link = "TSPunctBracket" }) - hi(0, "@punctuation.delimiter", { link = "TSPunctDelimiter" }) - hi(0, "@punctuation.special", { link = "TSPunctSpecial" }) - hi(0, "@regexp", { link = "TSStringRegex" }) - hi(0, "@repeat", { link = "TSRepeat" }) - hi(0, "@string", { link = "TSString" }) - hi(0, "@string.escape", { link = "TSStringEscape" }) - hi(0, "@string.regex", { link = "TSStringRegex" }) - hi(0, "@string.special", { link = "SpecialChar" }) - hi(0, "@struct", { link = "TSType" }) - hi(0, "@symbol", { link = "TSSymbol" }) - hi(0, "@tag", { link = "TSTag" }) - hi(0, "@tag.attribute", { link = "TSAttribute" }) - hi(0, "@tag.delimiter", { link = "TSTagDelimiter" }) - hi(0, "@text", { link = "TSText" }) - hi(0, "@text.danger", { link = "DiagnosticError" }) - hi(0, "@text.emphasis", { link = "TSEmphasis" }) - hi(0, "@text.environment", { link = "Macro" }) - hi(0, "@text.environment.name", { link = "Type" }) - hi(0, "@text.literal", { link = "TSLiteral" }) - hi(0, "@text.math", { link = "Number" }) - hi(0, "@text.note", { link = "Tag" }) - hi(0, "@text.reference", { link = "TSParameterReference" }) - hi(0, "@text.strike", { link = "TSStrike" }) - hi(0, "@text.strong", { link = "TSStrong" }) - hi(0, "@text.title", { link = "TSTitle" }) - hi(0, "@text.todo", { link = "Todo" }) - hi(0, "@text.underline", { link = "TSUnderline" }) - hi(0, "@text.uri", { link = "TSURI" }) - hi(0, "@text.warning", { link = "DiagnosticWarn" }) - hi(0, "@type", { link = "TSType" }) - hi(0, "@type.builtin", { link = "TSTypeBuiltin" }) - hi(0, "@type.definition", { link = "TSTypeDefinition" }) - hi(0, "@type.qualifier", { link = "TSType" }) - hi(0, "@typeParameter", { link = "Type" }) - hi(0, "@variable", { link = "TSVariable" }) - hi(0, "@variable.builtin", { link = "TSVariableBuiltin" }) - hi(0, "@lsp.type.namespace", { link = "TSNamespace" }) - hi(0, "@lsp.type.variable", { link = "TSVariable" }) - hi(0, "@lsp.type.parameter", { link = "TSVariable" }) - hi(0, "@lsp.typemod.variable.readonly", { link = "TSConstant" }) - hi(0, "@lsp.type.type", { link = "TSType" }) - hi(0, "@lsp.type.function", {}) - hi(0, "@lsp.type.method", {}) - hi(0, "@lsp.type.comment", {}) - hi(0, "@lsp.typemod.variable.defaultLibrary", { link = "TSKeyword" }) - hi(0, "@lsp.mod.defaultLibrary.go", { link = "TSKeyword" }) - hi(0, "@lsp.type.property", { link = "TSField" }) - hi(0, "@tag.attribute.tsx", { link = "TSParameter" }) - hi(0, "@tag.attribute.javascript", { link = "TSParameter" }) - end - - hi(0, "Bold", { bold = true }) - hi(0, "Boolean", { fg = color.light_brown }) - hi(0, "Character", { fg = color.red }) - - -- nvim-cmp - if M.config.opt.integrations.nvim_cmp then - hi(0, "Pmenu", { bg = color._74, ctermbg = 13, ctermfg = 0 }) - hi(0, "PmenuSel", { bg = color._71, ctermbg = 0, ctermfg = 242 }) - hi(0, "CmpDocumentation", { fg = color.grey }) - hi(0, "CmpDocumentationBorder", { fg = color.grey }) - hi(0, "CmpItemAbbr", { fg = color.grey }) - hi(0, "CmpItemAbbrDefault", { fg = color.grey }) - hi(0, "CmpItemAbbrDeprecated", { fg = color.medium_gray, strikethrough = true }) - hi(0, "CmpItemAbbrDeprecatedDefault", { fg = color.medium_gray }) - hi(0, "CmpItemAbbrMatch", { fg = color.light_blue }) - hi(0, "CmpItemAbbrMatchDefault", { fg = color.grey }) - hi(0, "CmpItemAbbrMatchFuzzy", { fg = color.light_blue }) - hi(0, "CmpItemAbbrMatchFuzzyDefault", { fg = color.grey }) - hi(0, "CmpItemKindClass", { fg = color.golden_yellow }) - hi(0, "CmpItemKindClassDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindColorDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindConstant", { fg = color.light_brown }) - hi(0, "CmpItemKindConstantDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindConstructor", { fg = color.light_blue }) - hi(0, "CmpItemKindConstructorDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindDefault", { fg = color.bright_sky }) - hi(0, "CmpItemKindEnum", { fg = color.golden_yellow }) - hi(0, "CmpItemKindEnumDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindEnumMember", { fg = color.golden_yellow }) - hi(0, "CmpItemKindEnumMemberDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindEvent", { fg = color.golden_yellow }) - hi(0, "CmpItemKindEventDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindField", { fg = color.red }) - hi(0, "CmpItemKindFieldDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindFileDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindFolderDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindFunction", { fg = color.light_blue }) - hi(0, "CmpItemKindFunctionDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindInterface", { fg = color.golden_yellow }) - hi(0, "CmpItemKindInterfaceDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindKeyword", { fg = color.pale_gold }) - hi(0, "CmpItemKindKeywordDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindMethod", { fg = color.light_blue }) - hi(0, "CmpItemKindMethodDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindModule", { fg = color.grey }) - hi(0, "CmpItemKindModuleDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindOperator", { fg = color.grey }) - hi(0, "CmpItemKindOperatorDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindProperty", { fg = color.red }) - hi(0, "CmpItemKindPropertyDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindReference", { fg = color.red }) - hi(0, "CmpItemKindReferenceDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindSnippet", { fg = color.silver_gray }) - hi(0, "CmpItemKindSnippetDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindStruct", { fg = color.golden_yellow }) - hi(0, "CmpItemKindStructDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindTextDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindTypeParameter", { fg = color.golden_yellow }) - hi(0, "CmpItemKindTypeParameterDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindUnit", { fg = color.golden_yellow }) - hi(0, "CmpItemKindUnitDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindValue", { fg = color.light_brown }) - hi(0, "CmpItemKindValueDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemKindVariable", { fg = color.red }) - hi(0, "CmpItemKindVariableDefault", { link = "CmpItemKind" }) - hi(0, "CmpItemMenu", { fg = color.silver_gray }) - hi(0, "CmpItemMenuDefault", { fg = color.grey }) - hi(0, "ColorColumn", { bg = color.background, ctermbg = 1 }) - hi(0, "Comment", { ctermfg = 14 }) - hi(0, "Conceal", { ctermbg = 242, ctermfg = 7, fg = color.light_blue }) - hi(0, "Conditional", { fg = color.pale_gold }) - end - -- conflict-marker.vim - - hi(0, "Constant", { ctermfg = 13, fg = color.light_brown }) - - -- copilot.vim - hi(0, "CopilotSuggestion", { ctermfg = 244, fg = color.comment }) - - -- cursor - hi(0, "Cursor", { bg = color.very_light_gray, fg = color.dark }) - hi(0, "CursorColumn", { bg = color.background, ctermbg = 242 }) - hi(0, "CursorLine", { bg = color.background }) - hi(0, "CursorLineNr", { bg = color.background, bold = true, ctermfg = 11, fg = color.silver_gray }) - - -- dap.nvim - if M.config.opt.integrations.dap_nvim then - hi(0, "DapUIBreakpointsCurrentLine", { bold = true, fg = color.light_lime_green }) - hi(0, "DapUIBreakpointsDisabledLine", { fg = color.dark_grey }) - hi(0, "DapUIBreakpointsInfo", { fg = color.light_lime_green }) - hi(0, "DapUIBreakpointsPath", { fg = color.bright_cyan }) - hi(0, "DapUIDecoration", { fg = color.bright_cyan }) - hi(0, "DapUIFloatBorder", { fg = color.bright_cyan }) - hi(0, "DapUILineNumber", { fg = color.bright_cyan }) - hi(0, "DapUIModifiedValue", { bold = true, fg = color.bright_cyan }) - hi(0, "DapUIPlayPause", { fg = color.light_lime_green }) - hi(0, "DapUIPlayPauseNC", { fg = color.light_lime_green }) - hi(0, "DapUIRestart", { fg = color.light_lime_green }) - hi(0, "DapUIRestartNC", { fg = color.light_lime_green }) - hi(0, "DapUIScope", { fg = color.bright_cyan }) - hi(0, "DapUISource", { fg = color.light_lavender }) - hi(0, "DapUIStepBack", { fg = color.bright_cyan }) - hi(0, "DapUIStepBackNC", { fg = color.bright_cyan }) - hi(0, "DapUIStepInto", { fg = color.bright_cyan }) - hi(0, "DapUIStepIntoNC", { fg = color.bright_cyan }) - hi(0, "DapUIStepOut", { fg = color.bright_cyan }) - hi(0, "DapUIStepOutNC", { fg = color.bright_cyan }) - hi(0, "DapUIStepOver", { fg = color.bright_cyan }) - hi(0, "DapUIStepOverNC", { fg = color.bright_cyan }) - hi(0, "DapUIStop", { fg = color.bright_pink }) - hi(0, "DapUIStopNC", { fg = color.bright_pink }) - hi(0, "DapUIStoppedThread", { fg = color.bright_cyan }) - hi(0, "DapUIThread", { fg = color.light_lime_green }) - hi(0, "DapUIType", { fg = color.light_lavender }) - hi(0, "DapUIUnavailable", { fg = color.dark_grey }) - hi(0, "DapUIUnavailableNC", { fg = color.dark_grey }) - hi(0, "DapUIWatchesEmpty", { fg = color.bright_pink }) - hi(0, "DapUIWatchesError", { fg = color.bright_pink }) - hi(0, "DapUIWatchesValue", { fg = color.light_lime_green }) - end - hi(0, "Debug", { fg = color.red }) - hi(0, "Define", { fg = color.pale_gold }) - hi(0, "DefinitionArrow", { fg = color._57 }) - hi(0, "DefinitionBorder", { fg = color.light_blue }) - hi(0, "DefinitionFile", { bg = color._82 }) - hi(0, "Definitions", { bold = true, fg = color.light_lavender }) - hi(0, "DefinitionsIcon", { fg = color.bright_yellow_green }) - hi(0, "Delimiter", { fg = color.light_brown }) - hi(0, "DiagnosticError", { ctermfg = 1, fg = color.red }) - hi(0, "DiagnosticHint", { ctermfg = 7, fg = color.bright_sky }) - hi(0, "DiagnosticInfo", { ctermfg = 4, fg = color.grey }) - hi(0, "DiagnosticLineCol", { fg = color._39 }) - hi(0, "DiagnosticMap", { fg = color.light_lavender }) - hi(0, "DiagnosticQuickFix", { bold = true, fg = color._70 }) - hi(0, "DiagnosticUnderlineError", { sp = color.red, undercurl = true }) - hi(0, "DiagnosticUnderlineHint", { sp = color.bright_sky, undercurl = true }) - hi(0, "DiagnosticUnderlineInformation", { sp = color.light_brown, undercurl = true }) - hi(0, "DiagnosticUnderlineWarn", { sp = color.pale_gold, undercurl = true }) - hi(0, "DiagnosticUnderlineWarning", { sp = color.pale_gold, undercurl = true }) - hi(0, "DiagnosticWarn", { ctermfg = 3, fg = color.pale_gold }) - -- hi(0, "DiffAdd", { ctermbg = 4, fg = color._05 }) - -- hi(0, "DiffAdded", { fg = color._05 }) - -- hi(0, "DiffChange", { ctermbg = 5, fg = color._07 }) - -- hi(0, "DiffDelete", { bold = true, ctermbg = 6, ctermfg = 12, fg = color.red }) - -- hi(0, "DiffFile", { fg = color.red }) - -- hi(0, "DiffLine", { fg = color.light_blue }) - -- hi(0, "DiffNewFile", { fg = color._05 }) - -- hi(0, "DiffRemoved", { fg = color.red }) - -- hi(0, "DiffText", { bold = true, ctermbg = 9, fg = color.light_blue }) - hi(0, "Directory", { ctermfg = 159, fg = color.light_blue }) - hi(0, "Error", { bg = color.red, ctermbg = 9, ctermfg = 15, fg = color.dark }) - hi(0, "ErrorMsg", { ctermbg = 1, ctermfg = 15, fg = color.red }) - hi(0, "Exception", { fg = color.red }) - hi(0, "EyelinerDimmed", { fg = color.medium_gray }) - hi(0, "EyelinerPrimary", { fg = color.light_brown }) - hi(0, "EyelinerSecondary", { fg = color.pale_gold }) - hi(0, "FinderParam", { bg = color._75, bold = true, fg = color.light_lavender }) - hi(0, "FinderSpinner", { bold = true, fg = color.deep_fuchsia }) - hi(0, "FinderSpinnerBorder", { fg = color.deep_light_blue }) - hi(0, "FinderSpinnerTitle", { bold = true, fg = color.deep_fuchsia }) - hi(0, "FinderVirtText", { fg = color._52 }) - hi(0, "Float", { fg = color.light_brown }) - hi(0, "FloatBorder", { fg = color.grey }) - hi(0, "FocusedSymbol", { bg = color.background, fg = color.light_olive_green }) - hi(0, "FoldColumn", { ctermbg = 242 }) - hi(0, "Folded", { bg = color.background, ctermbg = 242 }) - hi(0, "Function", { fg = color.light_blue }) - hi(0, "GitGutterAdd", { bg = color.dark, fg = color.light_olive_green }) - hi(0, "GitGutterChange", { bg = color.dark, fg = color.light_blue }) - hi(0, "GitGutterChangeDelete", { bg = color.dark, fg = color.pale_gold }) - hi(0, "GitGutterDelete", { bg = color.dark, fg = color.red }) - hi(0, "GitSignsStagedAdd", { bg = color.dark, fg = color.green }) - hi(0, "GitSignsStagedAddLn", { bg = color.dark, fg = color.green }) - hi(0, "GitSignsStagedAddNr", { bg = color.dark, fg = color.green }) - hi(0, "GitSignsStagedChange", { bg = color.dark, fg = color.steel_blue }) - hi(0, "GitSignsStagedChangeLn", { bg = color.dark, fg = color.very_dark_gray }) - hi(0, "GitSignsStagedChangeNr", { bg = color.dark, fg = color.steel_blue }) - hi(0, "GitSignsStagedChangedelete", { bg = color.dark, fg = color.steel_blue }) - hi(0, "GitSignsStagedChangedeleteLn", { bg = color.dark, fg = color.very_dark_gray }) - hi(0, "GitSignsStagedChangedeleteNr", { bg = color.dark, fg = color.steel_blue }) - hi(0, "GitSignsStagedDelete", { bg = color.dark, fg = color.dark_maroon }) - hi(0, "GitSignsStagedDeleteNr", { bg = color.dark, fg = color.dark_maroon }) - hi(0, "GitSignsStagedTopdelete", { bg = color.dark, fg = color.dark_maroon }) - hi(0, "GitSignsStagedTopdeleteNr", { bg = color.dark, fg = color.dark_maroon }) - hi(0, "HopNextKey", { bold = true, ctermfg = 198, fg = color.bright_pink }) - hi(0, "HopNextKey1", { bold = true, ctermfg = 45, fg = color.bright_cyan }) - hi(0, "HopNextKey2", { ctermfg = 33, fg = color.bright_cyan }) - hi(0, "HopPreview", { link = "IncSearch" }) - hi(0, "HopUnmatched", { ctermfg = 242, fg = color.slate_gray, sp = color.slate_gray }) - hi(0, "Identifier", { ctermfg = 14, fg = color.red }) - hi(0, "Ignore", { ctermfg = 0, fg = color.dark }) - -- hi(0, "IlluminatedWordRead", { sp = color._09, underline = true }) - -- hi(0, "IlluminatedWordText", { sp = color._09, underline = true }) - -- hi(0, "IlluminatedWordWrite", { sp = color._09, underline = true }) - hi(0, "Implements", { bold = true, fg = color.light_lavender }) - hi(0, "ImplementsIcon", { fg = color.bright_yellow_green }) - hi(0, "IncSearch", { bg = color.light_brown, fg = color.background }) - hi(0, "Include", { fg = color.copper_brown }) - hi(0, "IndentBlanklineChar", { fg = color.dark_grey, nocombine = true }) - hi(0, "IndentBlanklineContextChar", { fg = color.silver_gray, nocombine = true }) - hi(0, "IndentBlanklineContextStart", { sp = color.golden_yellow, underline = true }) - hi(0, "IndentBlanklineSpaceChar", { ctermfg = 12, fg = color.medium_gray, nocombine = true }) - hi(0, "IndentBlanklineSpaceCharBlankline", { ctermfg = 12, fg = color.medium_gray, nocombine = true }) - hi(0, "Keyword", { fg = color.pale_gold }) - hi(0, "LSOutlinePreviewBorder", { fg = color.green }) - hi(0, "Label", { fg = color.golden_yellow }) - hi(0, "LineNr", { ctermfg = 11, fg = color.silver_gray }) - hi(0, "LspDiagnosticsDefaultError", { link = "DiagnosticError" }) - hi(0, "LspDiagnosticsDefaultHint", { link = "DiagnosticHint" }) - hi(0, "LspDiagnosticsDefaultInformation", { link = "DiagnosticInfo" }) - hi(0, "LspDiagnosticsDefaultWarning", { link = "DiagnosticWarn" }) - hi(0, "LspDiagnosticsUnderlineError", { link = "DiagnosticUnderlineError" }) - hi(0, "LspDiagnosticsUnderlineHint", { link = "DiagnosticUnderlineHint" }) - hi(0, "LspDiagnosticsUnderlineInformation", { link = "DiagnosticUnderlineInformation" }) - hi(0, "LspDiagnosticsUnderlineWarning", { link = "DiagnosticUnderlineWarning" }) - hi(0, "LspReferenceRead", { sp = color.silver_gray, underline = true }) - hi(0, "LspReferenceText", { sp = color.silver_gray, underline = true }) - hi(0, "LspReferenceWrite", { sp = color.silver_gray, underline = true }) - hi(0, "LspSagaAutoPreview", { fg = color.deep_light_blue }) - hi(0, "LspSagaCodeActionBorder", { fg = color.light_lavender }) - hi(0, "LspSagaCodeActionContent", { bold = true, fg = color.green }) - hi(0, "LspSagaCodeActionTitle", { bold = true, fg = color.burnt_orange }) - hi(0, "LspSagaDiagnosticBorder", { fg = color.light_lavender }) - hi(0, "LspSagaDiagnosticHeader", { fg = color._56 }) - hi(0, "LspSagaFinderSelection", { bold = true, fg = color._64 }) - hi(0, "LspSagaHoverBorder", { fg = color._47 }) - hi(0, "LspSagaLspFinderBorder", { fg = color.deep_light_blue }) - hi(0, "LspSagaRenameBorder", { fg = color.bright_cyan }) - hi(0, "LspSagaSignatureHelpBorder", { fg = color.green }) - hi(0, "Macro", { fg = color.red }) - hi(0, "MatchParen", { fg = color.bright_cyan, bold = true }) - hi(0, "ModeMsg", { bold = true, fg = color.light_olive_green }) - hi(0, "MoreMsg", { bold = true, ctermfg = 121, fg = color.light_olive_green }) - hi(0, "NERDTreeFile", { fg = color.grey }) - hi(0, "NERDTreeCWD", { fg = color.grey }) - hi(0, "NERDTreeGitStatusIgnored", { ctermfg = 81, fg = color.medium_gray }) - hi(0, "NERDTreeGitStatusModified", { ctermfg = 224, fg = color.bright_sky }) - hi(0, "NERDTreeGitStatusRenamed", { ctermfg = 225, fg = color.light_blue }) - hi(0, "NERDTreeGitStatusUntracked", { ctermfg = 14, fg = color.medium_gray }) - hi(0, "NonText", { bold = true, ctermfg = 12, fg = color.medium_gray }) - hi(0, "Normal", { bg = color.dark, fg = color.grey }) - hi(0, "NormalFloat", { fg = color.grey }) - hi(0, "NormalNC", { fg = color.grey }) - hi(0, "NotifyDEBUGBody", { link = "Normal" }) - hi(0, "NotifyDEBUGBorder", { fg = color.bright_sky }) - hi(0, "NotifyDEBUGIcon", { fg = color.bright_sky }) - hi(0, "NotifyDEBUGTitle", { fg = color.bright_sky }) - hi(0, "NotifyERRORBody", { link = "Normal" }) - hi(0, "NotifyERRORBorder", { fg = color.red }) - hi(0, "NotifyERRORIcon", { fg = color.red }) - hi(0, "NotifyERRORTitle", { fg = color.red }) - hi(0, "NotifyINFOBody", { link = "Normal" }) - hi(0, "NotifyINFOBorder", { fg = color.grey }) - hi(0, "NotifyINFOIcon", { fg = color.grey }) - hi(0, "NotifyINFOTitle", { fg = color.grey }) - hi(0, "NotifyTRACEBody", { link = "Normal" }) - hi(0, "NotifyTRACEBorder", { fg = color.bright_sky }) - hi(0, "NotifyTRACEIcon", { fg = color.bright_sky }) - hi(0, "NotifyTRACETitle", { fg = color.bright_sky }) - hi(0, "NotifyWARNBody", { link = "Normal" }) - hi(0, "NotifyWARNBorder", { fg = color.pale_gold }) - hi(0, "NotifyWARNIcon", { fg = color.pale_gold }) - hi(0, "NotifyWARNTitle", { fg = color.pale_gold }) - hi(0, "Number", { fg = color.light_brown }) - hi(0, "NvimInternalError", { bg = color.red, ctermbg = 9, ctermfg = 9, fg = color.dark }) - hi(0, "Operator", { fg = color.grey }) - hi(0, "OutlineDetail", { fg = color._39 }) - hi(0, "OutlineFoldPrefix", { fg = color._54 }) - hi(0, "OutlineIndentEvn", { fg = color._53 }) - hi(0, "OutlineIndentOdd", { fg = color._55 }) - hi(0, "PreProc", { ctermfg = 81, fg = color.golden_yellow }) - hi(0, "Question", { bold = true, ctermfg = 121, fg = color.light_blue }) - hi(0, "QuickFixLine", { bg = color.background }) - hi(0, "References", { bold = true, fg = color.light_lavender }) - hi(0, "ReferencesIcon", { fg = color.bright_yellow_green }) - hi(0, "Repeat", { fg = color.golden_yellow }) - hi(0, "SagaShadow", { fg = color.dark }) - hi(0, "ScrollbarCursor", { ctermfg = 0, fg = color.grey }) - hi(0, "ScrollbarCursorHandle", { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.grey }) - hi(0, "ScrollbarError", { ctermfg = 0, fg = color.red }) - hi(0, "ScrollbarErrorHandle", { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.red }) - hi(0, "ScrollbarGitAdd", { ctermfg = 0, fg = color.green }) - hi(0, "ScrollbarGitAddHandle", { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.green }) - hi(0, "ScrollbarGitChange", { ctermfg = 0, fg = color.bright_yellow_green }) - hi( - 0, - "ScrollbarGitChangeHandle", - { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.bright_yellow_green } - ) - hi(0, "ScrollbarGitDelete", { ctermfg = 0, fg = color.red }) - hi(0, "ScrollbarGitDeleteHandle", { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.red }) - hi(0, "ScrollbarHandle", { bg = color.background, ctermbg = 15 }) - hi(0, "ScrollbarHint", { ctermfg = 0, fg = color.bright_sky }) - hi(0, "ScrollbarHintHandle", { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.bright_sky }) - hi(0, "ScrollbarInfo", { ctermfg = 0, fg = color.grey }) - hi(0, "ScrollbarInfoHandle", { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.grey }) - hi(0, "ScrollbarMisc", { ctermfg = 0, fg = color.grey }) - hi(0, "ScrollbarMiscHandle", { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.grey }) - hi(0, "ScrollbarSearch", { ctermfg = 0, fg = color.background }) - hi(0, "ScrollbarSearchHandle", { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.background }) - hi(0, "ScrollbarWarn", { ctermfg = 0, fg = color.pale_gold }) - hi(0, "ScrollbarWarnHandle", { bg = color.background, ctermbg = 15, ctermfg = 0, fg = color.pale_gold }) - hi(0, "Search", { bg = color.golden_yellow, ctermbg = 11, ctermfg = 0, fg = color.background }) - hi(0, "SignColumn", { ctermbg = 242, ctermfg = 14, fg = color.silver_gray }) - hi(0, "SniprunFloatingWinErr", { ctermfg = 1, fg = color._38 }) - hi(0, "SniprunFloatingWinOk", { ctermfg = 14, fg = color.bright_cyan }) - hi(0, "SniprunVirtualTextErr", { bg = color._38, ctermbg = 1, fg = color.dark }) - hi(0, "SniprunVirtualTextOk", { bg = color.bright_cyan, ctermbg = 14, fg = color.dark }) - hi(0, "Special", { ctermfg = 224, fg = color.bright_sky }) - hi(0, "SpecialChar", { fg = color.light_brown }) - hi(0, "SpecialKey", { ctermfg = 81, fg = color.medium_gray }) - hi(0, "SpellBad", { ctermbg = 9, sp = color.red, undercurl = true }) - hi(0, "SpellCap", { ctermbg = 12, sp = color.light_blue, undercurl = true }) - hi(0, "SpellLocal", { ctermbg = 14, sp = color.bright_sky, undercurl = true }) - hi(0, "SpellRare", { ctermbg = 13, sp = color.pale_gold, undercurl = true }) - hi(0, "Statement", { bold = true, ctermfg = 11, fg = color.red }) - hi(0, "StatusLine", { bg = color.dark_grey, fg = color.grey }) - hi(0, "StatusLineNC", { bg = color.background, fg = color.silver_gray }) - hi(0, "StorageClass", { fg = color.golden_yellow }) - hi(0, "String", { fg = color.light_olive_green }) - hi(0, "Structure", { fg = color.pale_gold }) - hi(0, "Substitute", { bg = color.golden_yellow, fg = color.background }) - hi(0, "SymbolsOutlineConnector", { fg = color.medium_gray }) - hi(0, "TSAnnotation", { fg = color.light_brown }) - hi(0, "TSAttribute", { fg = color.golden_yellow }) - hi(0, "TSBoolean", { fg = color.light_brown }) - hi(0, "TSCharacter", { fg = color.red }) - hi(0, "TSComment", { fg = color.comment, italic = true }) - hi(0, "GitSignsCurrentLineBlame", { fg = color.comment, italic = true }) - hi(0, "TSConditional", { fg = color.burnt_orange }) - hi(0, "TSConstBuiltin", { fg = color.light_brown, italic = true }) - hi(0, "TSMethodCall", { fg = color.pale_taupe }) - hi(0, "TSFunctionCall", { fg = color.pale_taupe }) - hi(0, "TSConstMacro", { fg = color.red }) - hi(0, "TSConstant", { fg = color.lavender }) - hi(0, "TSConstructor", { fg = color.light_blue }) - hi(0, "TSCurrentScope", { bold = true }) - hi(0, "TSDefinition", { sp = color.silver_gray, underline = true }) - hi(0, "TSDefinitionUsage", { sp = color.silver_gray, underline = true }) - hi(0, "TSEmphasis", { fg = color.light_brown, italic = true }) - hi(0, "TSError", { fg = color.red }) - hi(0, "TSException", { fg = color.red }) - hi(0, "TSField", { fg = color.grey }) - hi(0, "TSFloat", { fg = color.light_brown }) - hi(0, "TSFuncBuiltin", { fg = color.burnt_orange, italic = true }) - hi(0, "TSFuncMacro", { fg = color.red }) - hi(0, "TSFunction", { fg = color._58 }) - hi(0, "TSInclude", { fg = color.copper_brown }) - hi(0, "TSKeyword", { fg = color.burnt_orange }) - hi(0, "TSKeywordFunction", { fg = color.burnt_orange }) - hi(0, "TSKeywordOperator", { fg = color.pale_gold }) - hi(0, "TSLabel", { fg = color.lavender }) - hi(0, "TSLiteral", { fg = color.light_brown }) - hi(0, "TSMethod", { fg = color.pale_gold }) - hi(0, "TSNamespace", { fg = color._61 }) - hi(0, "TSNone", { fg = color.grey }) - hi(0, "TSNumber", { fg = color._68 }) - hi(0, "TSConstantBuiltin", { fg = color.copper_brown }) - hi(0, "TSOperator", { fg = color.grey }) - hi(0, "TSParameter", { fg = color.grey }) - hi(0, "TSParameterReference", { fg = color.grey }) - hi(0, "TSProperty", { fg = color.pale_gold }) - hi(0, "TSPunctBracket", { fg = color.grey }) - hi(0, "TSPunctDelimiter", { fg = color.light_brown }) - hi(0, "TSPunctSpecial", { fg = color.grey }) - hi(0, "TSRepeat", { fg = color.pale_gold }) - hi(0, "TSStrike", { fg = color.dark, strikethrough = true }) - hi(0, "TSString", { fg = color.olive_green }) - hi(0, "TSStringEscape", { fg = color.bright_sky }) - hi(0, "TSStringRegex", { fg = color.bright_sky }) - hi(0, "TSStrong", { bold = true }) - hi(0, "TSSymbol", { fg = color.light_olive_green }) - hi(0, "TSTag", { fg = color.golden_yellow }) - hi(0, "TSTagDelimiter", { fg = color.light_brown }) - hi(0, "TSText", { fg = color.grey }) - hi(0, "TSTitle", { fg = color.light_blue }) - hi(0, "TSType", { fg = color._66 }) - - hi(0, "TSTypeDefinition", { fg = color.grey }) - hi(0, "TSTypeBuiltin", { fg = color.burnt_orange, italic = true }) - hi(0, "TSURI", { fg = color.light_brown, underline = true }) - hi(0, "TSUnderline", { fg = color.dark, underline = true }) - hi(0, "TSVariable", { fg = color.grey }) - hi(0, "TSVariableBuiltin", { fg = color.burnt_orange, italic = true }) - hi(0, "TabLine", { bg = color.background, ctermbg = 242, ctermfg = 15, fg = color.medium_gray }) - hi(0, "TabLineFill", { bg = color.background, fg = color.medium_gray }) - hi(0, "TabLineSel", { bg = color.background, fg = color.light_olive_green }) - hi(0, "Tag", { fg = color.golden_yellow }) - hi(0, "TargetFileName", { fg = color._50 }) - -- telescope - if M.config.opt.integrations.telescope then - hi(0, "TelescopeBorder", { bg = color.very_dark_gray, fg = color.very_dark_gray }) - hi(0, "TelescopeNormal", { bg = color.very_dark_gray }) - hi(0, "TelescopePreviewLine", { bg = color.background }) - hi(0, "TelescopePreviewTitle", { bg = color.light_olive_green, fg = color.very_dark_gray }) - hi(0, "TelescopePromptBorder", { bg = color.dark_charcoal_gray, fg = color.dark_charcoal_gray }) - hi(0, "TelescopePromptNormal", { bg = color.dark_charcoal_gray, fg = color.grey }) - hi(0, "TelescopePromptPrefix", { bg = color.dark_charcoal_gray, fg = color.red }) - hi(0, "TelescopePromptTitle", { bg = color.red, fg = color.very_dark_gray }) - hi(0, "TelescopeResultsTitle", { bg = color.very_dark_gray, fg = color.very_dark_gray }) - hi(0, "TelescopeSelection", { bg = color.dark_charcoal_gray }) - end - - hi(0, "TermCursor", { bg = color.very_light_gray, fg = color.dark }) - hi(0, "TermCursorNC", { bg = color.very_light_gray, fg = color.dark }) - hi(0, "Title", { ctermfg = 225, fg = color.light_blue }) - hi(0, "Todo", { bg = color.background, ctermbg = 11, ctermfg = 0, fg = color.golden_yellow }) - hi(0, "TooLong", { fg = color.red }) - hi(0, "TreesitterContext", { bg = color.background, italic = true }) - hi(0, "Type", { ctermfg = 121, fg = color._66 }) - hi(0, "Typedef", { fg = color.golden_yellow }) - hi(0, "Underlined", { ctermfg = 81, fg = color.red, underline = true }) - hi(0, "User1", { bg = color.dark_grey, fg = color.red }) - hi(0, "User2", { bg = color.dark_grey, fg = color.pale_gold }) - hi(0, "User3", { bg = color.dark_grey, fg = color.grey }) - hi(0, "User4", { bg = color.dark_grey, fg = color.bright_sky }) - hi(0, "User5", { bg = color.dark_grey, fg = color.grey }) - hi(0, "User6", { bg = color.background, fg = color.grey }) - hi(0, "User7", { bg = color.dark_grey, fg = color.grey }) - hi(0, "User8", { bg = color.dark_grey, fg = color.dark }) - hi(0, "User9", { bg = color.dark_grey, fg = color.dark }) - hi(0, "VertSplit", { fg = color.grey }) - hi(0, "WinSeparator", { fg = color.grey }) - hi(0, "Visual", { bg = color.dark_grey, ctermbg = 242 }) - hi(0, "VisualNOS", { fg = color.red }) - hi(0, "WarningMsg", { ctermfg = 224, fg = color.red }) - hi(0, "WildMenu", { bg = color.golden_yellow, ctermbg = 11, ctermfg = 0, fg = color.red }) - hi(0, "WinBar", { fg = color.grey }) - hi(0, "WinBarNC", { fg = color.silver_gray }) - hi(0, "gitcommitBranch", { bold = true, fg = color.light_brown }) - hi(0, "gitcommitComment", { fg = color.medium_gray }) - hi(0, "gitcommitDiscarded", { fg = color.medium_gray }) - hi(0, "gitcommitDiscardedFile", { bold = true, fg = color.red }) - hi(0, "gitcommitDiscardedType", { fg = color.light_blue }) - hi(0, "gitcommitHeader", { fg = color.pale_gold }) - hi(0, "gitcommitOverflow", { fg = color.red }) - hi(0, "gitcommitSelected", { fg = color.medium_gray }) - hi(0, "gitcommitSelectedFile", { bold = true, fg = color.light_olive_green }) - hi(0, "gitcommitSelectedType", { fg = color.light_blue }) - hi(0, "gitcommitSummary", { fg = color.light_olive_green }) - hi(0, "gitcommitUnmergedFile", { bold = true, fg = color.red }) - hi(0, "gitcommitUnmergedType", { fg = color.light_blue }) - hi(0, "gitcommitUntracked", { fg = color.medium_gray }) - hi(0, "gitcommitUntrackedFile", { fg = color.golden_yellow }) - hi(0, "iCursor", { bg = color._72, fg = color.very_light_gray }) - hi(0, "lCursor", { bg = color.very_light_gray, fg = color.dark }) - - if M.config.opt.integrations.lualine then - hi(0, "lualine_a_command", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_a_inactive", { bg = color.light_slate_gray, bold = true, fg = color.dark }) - hi(0, "lualine_a_insert", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_a_normal", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_a_replace", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_a_visual", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_b_command", { bg = color.green, fg = color.dark }) - hi(0, "lualine_b_diagnostics_error_command", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_inactive", { bg = color.light_slate_gray, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_insert", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_normal", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_replace", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_terminal", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_visual", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_hint_command", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_inactive", { bg = color.light_slate_gray, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_insert", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_normal", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_replace", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_terminal", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_visual", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_info_command", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_inactive", { bg = color.light_slate_gray, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_insert", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_normal", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_replace", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_terminal", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_visual", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_warn_command", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_inactive", { bg = color.light_slate_gray, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_insert", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_normal", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_replace", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_terminal", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_visual", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diff_added_command", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_inactive", { bg = color.light_slate_gray, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_insert", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_normal", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_replace", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_terminal", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_visual", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_modified_command", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_inactive", { bg = color.light_slate_gray, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_insert", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_normal", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_replace", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_terminal", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_visual", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_removed_command", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_inactive", { bg = color.light_slate_gray, fg = color.red }) - hi(0, "lualine_b_diff_removed_insert", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_normal", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_replace", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_terminal", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_visual", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_inactive", { bg = color.light_slate_gray, fg = color.dark }) - hi(0, "lualine_b_insert", { bg = color.green, fg = color.dark }) - hi(0, "lualine_b_normal", { bg = color.green, fg = color.dark }) - hi(0, "lualine_b_replace", { bg = color.green, fg = color.dark }) - hi(0, "lualine_b_visual", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_command", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_inactive", { bg = color.light_slate_gray, fg = color.dark }) - hi(0, "lualine_c_insert", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_normal", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_replace", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_visual", { bg = color.green, fg = color.dark }) - hi(0, "lualine_x_2_command", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_inactive", { bg = color.light_slate_gray, fg = color.peach_orange }) - hi(0, "lualine_x_2_insert", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_normal", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_replace", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_terminal", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_visual", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_filetype_DevIconDefault_command", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_inactive", { bg = color.light_slate_gray, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_insert", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_normal", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_replace", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_terminal", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_visual", { bg = color.green, fg = color.slate_gray }) - end - - -- nvim-ts-rainbow - hi(0, "rainbowcol1", { fg = color.very_light_gray }) - hi(0, "rainbowcol2", { fg = color.light_brown }) - hi(0, "rainbowcol3", { fg = color.golden_yellow }) - hi(0, "rainbowcol4", { fg = color.very_light_gray }) - hi(0, "rainbowcol5", { fg = color.bright_sky }) - hi(0, "rainbowcol6", { fg = color.light_blue }) - hi(0, "rainbowcol7", { fg = color.pale_gold }) - - hi(0, "@lsp.type.keyword.go", { link = "TSKeyword" }) - hi(0, "@lsp.type.string.go", { link = "TSString" }) - hi(0, "Statement", { link = "TSKeyword" }) - hi(0, "Comment", { link = "TSComment" }) - hi(0, "Number", { link = "TSNumber" }) - hi(0, "String", { link = "TSString" }) - hi(0, "goImportString", { link = "TSString" }) - hi(0, "@lsp.type.function", { link = "TSMethodCall" }) - hi(0, "@lsp.typemod.function.definition", { link = "TSFunction" }) - hi(0, "@lsp.type.method", { link = "TSMethod" }) - hi(0, "goBlock", { link = "TSVariable" }) - hi(0, "Identifier", { link = "TSKeyword" }) - -- Terminal colors - local g = vim.g - - g.terminal_color_0 = color.dark - g.terminal_color_1 = color.red - g.terminal_color_2 = color.light_olive_green - g.terminal_color_3 = color.golden_yellow - g.terminal_color_4 = color.light_blue - g.terminal_color_5 = color.pale_gold - g.terminal_color_6 = color.bright_sky - g.terminal_color_7 = color.very_light_gray - g.terminal_color_8 = color.medium_gray - g.terminal_color_9 = color.red - g.terminal_color_10 = color.light_olive_green - g.terminal_color_11 = color.golden_yellow - g.terminal_color_12 = color.light_blue - g.terminal_color_13 = color.pale_gold - g.terminal_color_14 = color.bright_sky - g.terminal_color_15 = color.very_light_gray - - -- Snacks Dashboard - hi(0, "SnacksDashboardHeader", { fg = color.golden_yellow, bold = true }) - hi(0, "SnacksDashboardTitle", { fg = color.pale_gold, bold = true }) - hi(0, "SnacksDashboardIcon", { fg = color.light_blue }) - hi(0, "SnacksDashboardDesc", { fg = color.light_slate_gray }) - hi(0, "SnacksDashboardFile", { fg = color.pale_gold, bold = true }) - hi(0, "SnacksDashboardKey", { fg = color.burnt_orange }) - hi(0, "SnacksDashboardSpecial", { fg = color.light_slate_gray }) - hi(0, "SnacksDashboardDir", { fg = color.light_slate_gray }) - hi(0, "SnacksDashboardNormal", { fg = color.light_slate_gray }) - hi(0, "SnacksDashboardTerminal", { fg = color.light_slate_gray }) - hi(0, "SnacksDashboardFooter", { fg = color.light_slate_gray }) - - -- Neo-Tree - hi(0, "NeoTreeFileName", { fg = color.light_slate_gray }) - hi(0, "NeoTreeDotfile", { fg = color.comment }) - hi(0, "NeoTreeDirectoryName", { fg = color.pale_gold }) - hi(0, "NeoTreeDirectoryIcon", { fg = color.pale_gold }) - hi(0, "NeoTreeGitModified", { fg = color.burnt_orange }) - hi(0, "NeoTreeGitStaged", { fg = color.olive_green }) - hi(0, "NeoTreeGitUntracked", { fg = color.lavender }) - hi(0, "NeoTreeNormal", { fg = color.light_slate_gray, bg = color.very_dark_gray }) - hi(0, "NeoTreeNormalNC", { fg = color.light_slate_gray, bg = color.very_dark_gray }) - hi(0, "NeoTreeTabActive", { fg = color.light_slate_gray, bg = color.very_dark_gray, bold = true }) - hi(0, "NeoTreeTabInactive", { fg = color.dark_grey, bg = color.very_dark_gray }) - hi(0, "NeoTreeTabSeparatorActive", { fg = color.light_slate_gray, bg = color.very_dark_gray }) - hi(0, "NeoTreeTabSeparatorInactive", { fg = color.light_slate_gray, bg = color.dark_grey }) -end - -return M diff --git a/nvim/lua/custom/init.lua b/nvim/lua/custom/init.lua deleted file mode 100644 index e7e6903..0000000 --- a/nvim/lua/custom/init.lua +++ /dev/null @@ -1,33 +0,0 @@ --- ========== Telescope ============= -- -require("telescope").load_extension("noice") -require("telescope.themes").get_dropdown() - - --- ========== Theme ============= -- -require("custom.darcula").setup() - --- ========== Theme ============= -- -require("custom.timetracker").setup() - --- ========== Make ============= -- -require("custom.make") - --- ========== Formating ============= -- --- vim.api.nvim_create_autocmd("BufWritePre", { --- pattern = { "*.c", "*.cpp", "*.h", "*.hpp", "*.go" }, --- callback = function() --- vim.lsp.buf.format() --- end, --- }) - --- ========== Clipboard ============= -- -vim.o.clipboard = "unnamedplus" -vim.api.nvim_create_autocmd("TextYankPost", { - callback = function() - -- vim.highlight.on_yank() - local copy_to_unnamedplus = require("vim.ui.clipboard.osc52").copy("+") - copy_to_unnamedplus(vim.v.event.regcontents) - local copy_to_unnamed = require("vim.ui.clipboard.osc52").copy("*") - copy_to_unnamed(vim.v.event.regcontents) - end, -}) diff --git a/nvim/lua/custom/make.lua b/nvim/lua/custom/make.lua deleted file mode 100644 index a97b473..0000000 --- a/nvim/lua/custom/make.lua +++ /dev/null @@ -1,184 +0,0 @@ -_G.last_make_command = nil -_G.make_terminal_buf = nil -_G.build_targets = {} - -local config_file = vim.fn.stdpath('config') .. '/build_targets.json' - --- Загрузка таргетов из файла -local function load_targets() - local ok, data = pcall(vim.fn.readfile, config_file) - if ok and data[1] then - _G.build_targets = vim.fn.json_decode(data[1]) - else - _G.build_targets = {} - end -end - --- Сохранение таргетов в файл -local function save_targets() - local data = vim.fn.json_encode(_G.build_targets) - vim.fn.writefile({data}, config_file) -end - --- Загружаем таргеты при старте -load_targets() - -local function run_make_command(command) - if _G.make_terminal_buf and vim.api.nvim_buf_is_valid(_G.make_terminal_buf) then - vim.cmd('buffer ' .. _G.make_terminal_buf) - else - vim.cmd('terminal') - _G.make_terminal_buf = vim.api.nvim_get_current_buf() - end - vim.cmd('startinsert') - vim.defer_fn(function() - if vim.b.terminal_job_id then - vim.fn.chansend(vim.b.terminal_job_id, "clear\n") - vim.fn.chansend(vim.b.terminal_job_id, command .. "\n") - end - end, 300) -end - --- Основная команда сборки (оставьте вашу текущую) -vim.api.nvim_create_user_command('Build', function() - vim.ui.input({ - prompt = 'Флаги сборки: ', - default = '', - }, function(flags) - if flags == nil then return end - vim.ui.input({ - prompt = 'Имя проекта: ', - default = '', - }, function(project_name) - if project_name == nil then return end - local make_cmd = "meson compile" .. flags .. " " .. project_name - _G.last_make_command = make_cmd - run_make_command(make_cmd) - vim.notify("🔨 Сборка запущена: " .. make_cmd) - end) - end) -end, { - desc = "Сборка проекта в терминале" -}) - -vim.api.nvim_create_user_command('TargetNew', function() - vim.ui.input({ - prompt = 'Название таргета: ', - default = '', - }, function(target_name) - if target_name == nil or target_name == '' then return end - vim.ui.input({ - prompt = 'Команда сборки для "' .. target_name .. '": ', - default = '', - }, function(build_command) - if build_command == nil or build_command == '' then return end - _G.build_targets[target_name] = build_command - save_targets() - vim.notify("✅ Таргет '" .. target_name .. "' сохранен") - end) - end) -end, { - desc = "Создать новый таргет сборки" -}) - --- ПЕРЕПИСАННАЯ команда для выбора таргета с использованием vim.ui.select -vim.api.nvim_create_user_command('Target', function() - local target_count = 0 - for _ in pairs(_G.build_targets) do - target_count = target_count + 1 - end - if target_count == 0 then - vim.notify("❌ Нет сохраненных таргетов. Используйте :TargetNew", vim.log.levels.ERROR) - return - end - -- Подготавливаем список для vim.ui.select - local targets_list = {} - for name, cmd in pairs(_G.build_targets) do - table.insert(targets_list, { - name = name, - cmd = cmd, - -- Форматируем для красивого отображения - display = string.format("🔨 %s\n 📝 %s", name, cmd) - }) - end - -- Сортируем по имени - table.sort(targets_list, function(a, b) return a.name < b.name end) - vim.ui.select(targets_list, { - prompt = '📋 Выберите таргет сборки:', - format_item = function(item) - return item.display - end, - }, function(selected) - if not selected then - vim.notify("❌ Выбор отменен", vim.log.levels.WARN) - return - end - _G.last_make_command = selected.cmd - run_make_command(selected.cmd) - vim.notify("🔨 Запускаю: " .. selected.cmd) - end) -end, { - desc = "Выбрать таргет сборки" -}) - --- Команда для просмотра всех таргетов -vim.api.nvim_create_user_command('TargetList', function() - local target_count = 0 - for _ in pairs(_G.build_targets) do - target_count = target_count + 1 - end - if target_count == 0 then - print("📝 Список таргетов пуст") - return - end - print("📋 Сохраненные таргеты сборки:") - local targets_list = {} - for name, cmd in pairs(_G.build_targets) do - table.insert(targets_list, { name = name, cmd = cmd }) - end - table.sort(targets_list, function(a, b) return a.name < b.name end) - for i, target in ipairs(targets_list) do - print(string.format(" %d. %s → %s", i, target.name, target.cmd)) - end -end, { - desc = "Показать список всех таргетов" -}) - --- Команда для удаления таргета (уже использует vim.ui.select - оставляем как есть) -vim.api.nvim_create_user_command('TargetDelete', function() - local target_count = 0 - for _ in pairs(_G.build_targets) do - target_count = target_count + 1 - end - if target_count == 0 then - vim.notify("❌ Нет сохраненных таргетов", vim.log.levels.ERROR) - return - end - local targets_list = {} - for name, cmd in pairs(_G.build_targets) do - table.insert(targets_list, name) - end - table.sort(targets_list) - vim.ui.select(targets_list, { - prompt = 'Выберите таргет для удаления:', - }, function(selected) - if not selected then return end - _G.build_targets[selected] = nil - save_targets() - vim.notify("🗑️ Таргет '" .. selected .. "' удален") - end) -end, { - desc = "Удалить таргет сборки" -}) - --- Повтор последней сборки (оставьте вашу текущую) -vim.api.nvim_create_user_command('LastBuild', function() - if _G.last_make_command then - run_make_command(_G.last_make_command) - vim.notify("🔁 Повторяю: " .. _G.last_make_command) - else - vim.notify("❌ Нет истории сборок", vim.log.levels.ERROR) - end -end, { - desc = "Повторить последнюю сборку в терминале" -}) diff --git a/nvim/lua/custom/timetracker.lua b/nvim/lua/custom/timetracker.lua deleted file mode 100644 index 53638c1..0000000 --- a/nvim/lua/custom/timetracker.lua +++ /dev/null @@ -1,234 +0,0 @@ -local M = {} - -local uv = vim.loop -local data_dir = vim.fn.stdpath("data") .. "/time_tracker" -local stats_file = data_dir .. "/stats.json" -local heartbeat_file = data_dir .. "/heartbeat_" .. vim.fn.getpid() - -local timer = nil -local last_tick = os.time() - --------------------------------------------------- --- Utils --------------------------------------------------- - -local function ensure_dir() - vim.fn.mkdir(data_dir, "p") -end - -local function read_stats() - local f = io.open(stats_file, "r") - if not f then return {} end - local content = f:read("*a") - f:close() - return vim.json.decode(content) or {} -end - -local function write_stats(data) - local f = io.open(stats_file, "w") - if not f then return end - f:write(vim.json.encode(data)) - f:close() -end - -local function format_time(seconds) - local h = math.floor(seconds / 3600) - local m = math.floor((seconds % 3600) / 60) - return string.format("%dh %dm", h, m) -end - -local function current_filetype() - return vim.bo.filetype ~= "" and vim.bo.filetype or "unknown" -end - --------------------------------------------------- --- Time tracking --------------------------------------------------- - -local function update_heartbeat() - local f = io.open(heartbeat_file, "w") - if f then - f:write(os.time()) - f:close() - end -end - -local function add_time(seconds) - local stats = read_stats() - local date = os.date("%Y-%m-%d") - local ft = current_filetype() - - stats[date] = stats[date] or { total = 0, languages = {} } - stats[date].total = stats[date].total + seconds - stats[date].languages[ft] = - (stats[date].languages[ft] or 0) + seconds - - write_stats(stats) -end - -local function start_timer() - timer = uv.new_timer() - timer:start(0, 5000, vim.schedule_wrap(function() - local now = os.time() - local diff = now - last_tick - last_tick = now - - update_heartbeat() - add_time(diff) - end)) -end - -local function cleanup() - os.remove(heartbeat_file) -end - --------------------------------------------------- --- :TimeToday --------------------------------------------------- - -local function show_today() - local stats = read_stats() - local today = os.date("%Y-%m-%d") - local data = stats[today] - - if not data then - vim.notify("No activity today 🚀", vim.log.levels.INFO) - return - end - - local lines = {} - table.insert(lines, "📅 " .. today) - table.insert(lines, "") - table.insert(lines, "Total: " .. format_time(data.total)) - table.insert(lines, "") - table.insert(lines, "Languages:") - - for lang, time in pairs(data.languages) do - table.insert(lines, string.format(" %s: %s", lang, format_time(time))) - end - - vim.notify(table.concat(lines, "\n"), vim.log.levels.INFO, { - title = "Nvim Time Tracker", - }) -end - --------------------------------------------------- --- Heatmap --------------------------------------------------- - -local function setup_highlights() - vim.api.nvim_set_hl(0, "TimeHeat0", { fg = "#2d333b" }) - vim.api.nvim_set_hl(0, "TimeHeat1", { fg = "#0e4429" }) - vim.api.nvim_set_hl(0, "TimeHeat2", { fg = "#006d32" }) - vim.api.nvim_set_hl(0, "TimeHeat3", { fg = "#26a641" }) - vim.api.nvim_set_hl(0, "TimeHeat4", { fg = "#39d353" }) -end - -local function get_level(seconds) - if seconds == 0 then return 0 end - if seconds < 1800 then return 1 end - if seconds < 7200 then return 2 end - if seconds < 14400 then return 3 end - return 4 -end - -local function build_matrix() - local stats = read_stats() - local matrix = {} - - for w = 1, 53 do - matrix[w] = {} - for d = 1, 7 do - matrix[w][d] = 0 - end - end - - local today = os.time() - - for i = 0, 364 do - local ts = today - i * 86400 - local date = os.date("%Y-%m-%d", ts) - local weekday = tonumber(os.date("%w", ts)) - weekday = weekday == 0 and 7 or weekday - - local week = math.floor((364 - i) / 7) + 1 - if week <= 53 then - matrix[week][weekday] = - stats[date] and stats[date].total or 0 - end - end - - return matrix -end - -local function show_year() - setup_highlights() - local matrix = build_matrix() - - local buf = vim.api.nvim_create_buf(false, true) - - local lines = {} - table.insert(lines, " 📈 Nvim Activity — Last 365 Days") - table.insert(lines, "") - - for day = 1, 7 do - local line = "" - for week = 1, 53 do - line = line .. "██" - end - table.insert(lines, line) - end - - vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines) - - for day = 1, 7 do - for week = 1, 53 do - local seconds = matrix[week][day] - local level = get_level(seconds) - - vim.api.nvim_buf_add_highlight( - buf, - -1, - "TimeHeat" .. level, - day + 1, - (week - 1) * 2, - (week - 1) * 2 + 2 - ) - end - end - - local width = 53 * 2 + 4 - local height = 10 - - local win = vim.api.nvim_open_win(buf, true, { - relative = "editor", - width = width, - height = height, - row = math.floor((vim.o.lines - height) / 2), - col = math.floor((vim.o.columns - width) / 2), - style = "minimal", - border = "rounded", - }) - - vim.keymap.set("n", "q", function() - vim.api.nvim_win_close(win, true) - end, { buffer = buf }) -end - --------------------------------------------------- --- Setup --------------------------------------------------- - -function M.setup() - ensure_dir() - start_timer() - - vim.api.nvim_create_user_command("TimeToday", show_today, {}) - vim.api.nvim_create_user_command("TimeYear", show_year, {}) - - vim.api.nvim_create_autocmd("VimLeavePre", { - callback = cleanup, - }) -end - -return M diff --git a/nvim/lua/mappings.lua b/nvim/lua/mappings.lua index 23e897f..13a55bc 100644 --- a/nvim/lua/mappings.lua +++ b/nvim/lua/mappings.lua @@ -7,6 +7,11 @@ map("n", "t", "terminal", { desc = "Create new terminal" }) map("t", "jk", "") map("n", "h", "s | terminal | i"); + +-- ========== Undotree =========== -- +vim.cmd("packadd nvim.undotree") +map("n", "u", require("undotree").open) + -- ========== Debug =========== -- map('n', 'db', 'DapToggleBreakpoint', { desc = 'Toggle breakpoint' }) map('n', 'dr', 'DapContinue', { desc = 'Start/continue debug' }) @@ -21,9 +26,12 @@ map('n', 'lo', 'lua vim.diagnostic.open_float()', { noremap = true, silent = true, desc = 'Open diagnostic' }) map("n", "ll", 'lua vim.lsp.buf.code_action()', { noremap = true, silent = true, desc = 'Show complete by lsp' }) -map('n', '[l', 'DapContinue', { noremap = true, silent = true, desc = 'Go to prev diagnostic' }) -map('n', ']l', 'DapStepOver', { noremap = true, silent = true, desc = 'Go to next diagnostic' }) -map('n', 'lt', 'DapStepInto', { noremap = true, silent = true, desc = 'Open toggle' }) +map('n', '[l', function() vim.diagnostic.jump({ count = -1 }) end, + { noremap = true, silent = true, desc = 'Go to prev diagnostic' }) +map('n', ']l', function() vim.diagnostic.jump({ count = 1 }) end, + { noremap = true, silent = true, desc = 'Go to next diagnostic' }) +map('n', 'lt', vim.diagnostic.setloclist, + { noremap = true, silent = true, desc = 'Toggle diagnostics list' }) map("n", "ls", vim.diagnostic.setloclist, { desc = "LSP diagnostic loclist" }) map('n', 'lu', function() vim.diagnostic.enable(not vim.diagnostic.is_enabled()) end, { desc = "Toggle Diagnostics" }) @@ -52,9 +60,9 @@ map("i", "", "", { desc = "move up" }) map("n", "/", "gcc", { desc = "toggle comment", remap = true }) map("v", "/", "gc", { desc = "toggle comment", remap = true }) --- ========== Nvim-tree ============= -- -map("n", "", "NvimTreeToggle", { desc = "nvimtree toggle window" }) -map("n", "e", "NvimTreeFocus", { desc = "nvimtree focus window" }) +-- ========== Neotree ============= -- +map("n", "", "Neotree toggle", { desc = "nvimtree toggle window" }) +map("n", "e", "Neotree focus", { desc = "nvimtree focus window" }) -- ========== Telescope ============= -- map("n", "fw", "Telescope live_grep", { desc = "telescope live grep" }) @@ -76,8 +84,8 @@ map("n", "wK", "WhichKey ", { desc = "whichkey all keymaps" }) -- ========== Buffers ============= -- map("n", "x", function() local bufnr = vim.api.nvim_get_current_buf() - local buftype = vim.api.nvim_buf_get_option(bufnr, 'buftype') - local modified = vim.api.nvim_buf_get_option(bufnr, 'modified') + local buftype = vim.bo[bufnr].buftype + local modified = vim.bo[bufnr].modified if buftype == 'terminal' then vim.cmd('bp | sp | bn | bd!') @@ -90,9 +98,14 @@ map("n", "x", function() vim.cmd('bp | sp | bn | bd') end end, { desc = "Close buffer" }) -map("n", "e", "enew", { desc = "Create buffer" }) +map("n", "n", "enew", { desc = "Create buffer" }) map("n", "", "BufferLineCycleNext", { desc = "Go to next buffer" }) map("n", "", "BufferLineCyclePrev", { desc = "Go to prev buffer" }) +map("n", "bt", "BufferLineGroupToggle tests", { desc = "Toggle 'tests' group" }) +map("n", "bc", "BufferLineGroupToggle code", { desc = "Toggle 'code' group" }) +map("n", "bp", "BufferLineGroupToggle tornado", { desc = "Toggle 'tornado' group" }) +map("n", "bg", "BufferLineGroupToggle gornado", { desc = "Toggle 'gornado' group" }) + -- ========== Git ============= -- map("n", "gb", "Gitsigns blame", { desc = "Open blame for file" }) @@ -102,8 +115,8 @@ map("n", "gct", "GitConflictChooseTheirs", { desc = "Select the map("n", "gcb", "GitConflictChooseBoth", { desc = "Seletct both changes" }) map("n", "gcn", "GitConflictNextConflict", { desc = "Move to the next conflict" }) map("n", "gcp", "GitConflictPrevConflict", { desc = "Move to the previous conflict" }) -map("n", "ghn", "Gitsigns blame", { desc = "Show hunk in normal mode" }) -map("n", "ghi", "Gitsigns blame", { desc = "Show hunk inline" }) +map("n", "ghn", "Gitsigns preview_hunk", { desc = "Show hunk in normal mode" }) +map("n", "ghi", "Gitsigns preview_hunk_inline", { desc = "Show hunk inline" }) map("n", "gd", "Gitsigns diffthis", { desc = "Show diff of buffer" }) map("n", "gs", "Gitsigns stage_buffer", { desc = "Stage this buffer" }) map("n", "gu", "Gitui", { desc = "Stage this buffer" }) diff --git a/nvim/lua/plugins/common.lua b/nvim/lua/plugins/common.lua index d32a6ac..e2039e8 100644 --- a/nvim/lua/plugins/common.lua +++ b/nvim/lua/plugins/common.lua @@ -4,10 +4,6 @@ return { "nvim-tree/nvim-web-devicons", opts = {}, }, - { - 'nvim-mini/mini.nvim', - version = '*' - }, -- Screenkey { "NStefan002/screenkey.nvim", @@ -25,7 +21,7 @@ return { "lewis6991/gitsigns.nvim", event = { "BufReadPre", "BufNewFile" }, opts = function() - require("configs.gitsigns") + return require("configs.gitsigns") end, }, { @@ -33,26 +29,6 @@ return { version = "*", config = true }, - -- Nvim tree - { - "nvim-tree/nvim-tree.lua", - cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - opts = function() - return require "configs.nvimtree" - end, - }, - -- Pairs - { - "nvim-mini/mini.pairs", - event = { "BufReadPost", "BufNewFile" }, - opts = { - modes = { insert = true, command = true, terminal = false }, - skip_next = [=[[%w%%%'%[%"%.%`%$]]=], - skip_ts = { "string" }, - skip_unbalanced = true, - markdown = true, - }, - }, -- Formating { "stevearc/conform.nvim", @@ -61,11 +37,6 @@ return { require "configs.conform" end, }, - -- Yank highlight - { - "machakann/vim-highlightedyank", - event = "VeryLazy", - }, -- Sessions { "olimorris/persisted.nvim", @@ -78,4 +49,16 @@ return { autoload = false, }, }, + -- Navigation + { + "folke/flash.nvim", + event = "VeryLazy", + opts = {}, + keys = { + { "jj", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash jump" }, + { "jt", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash treesitter" }, + { "jr", mode = "o", function() require("flash").remote() end, desc = "Flash remote" }, + { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash search" }, + }, + }, } diff --git a/nvim/lua/plugins/development.lua b/nvim/lua/plugins/development.lua index e06cb65..c439d90 100644 --- a/nvim/lua/plugins/development.lua +++ b/nvim/lua/plugins/development.lua @@ -15,7 +15,17 @@ return { -- Mason lspconfig { "mason-org/mason-lspconfig.nvim", - opts = {}, + opts = { + ensure_installed = { + "clangd", + "gopls", + "phpactor", + "lua_ls", + "bashls", + "mesonlsp", + }, + automatic_enable = true, + }, dependencies = { "mason-org/mason.nvim", "neovim/nvim-lspconfig", @@ -100,6 +110,7 @@ return { "diff", "gitcommit", "gitignore", + "tla", }, callback = function(args) pcall(vim.treesitter.start, args.buf) @@ -133,24 +144,6 @@ return { require("configs.ufo") end }, - -- Tests - { - "nvim-neotest/neotest", - event = "VeryLazy", - dependencies = { - "nvim-lua/plenary.nvim", - "alfaix/neotest-gtest", - "olimorris/neotest-phpunit", - }, - config = function() - require("neotest").setup({ - adapters = { - require("neotest-phpunit"), - require("neotest-gtest").setup({}), - }, - }) - end, - }, -- These are for C/C++ Debbuger { "nvim-neotest/nvim-nio", @@ -172,7 +165,7 @@ return { "jay-babu/mason-nvim-dap.nvim", event = "VeryLazy", dependencies = { - "williamboman/mason.nvim", + "mason-org/mason.nvim", "mfussenegger/nvim-dap", }, opts = { diff --git a/nvim/lua/plugins/filetree.lua b/nvim/lua/plugins/filetree.lua new file mode 100644 index 0000000..b6d4fce --- /dev/null +++ b/nvim/lua/plugins/filetree.lua @@ -0,0 +1,41 @@ +return { + { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + opts = require("configs.neotree"), + dependencies = { + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + "nvim-tree/nvim-web-devicons", + }, + }, + { + "Crysthamus/nvim-file-operations", + -- branch = "compat" -- if you are on Neovim <= 0.10 + dependencies = { + "nvim-neo-tree/neo-tree.nvim", -- makes sure that this loads after Neo-tree. + }, + config = function() + require("nvim-file-operations").setup() + end, + }, + { + "s1n7ax/nvim-window-picker", + version = "2.*", + config = function() + require("window-picker").setup({ + filter_rules = { + include_current_win = false, + autoselect_one = true, + -- filter using buffer options + bo = { + -- if the file type is one of following, the window will be ignored + filetype = { "neo-tree", "neo-tree-popup", "notify" }, + -- if the buffer type is one of following, the window will be ignored + buftype = { "terminal", "quickfix" }, + }, + }, + }) + end, + }, +} diff --git a/nvim/lua/plugins/joke.lua b/nvim/lua/plugins/joke.lua deleted file mode 100644 index a7ce17b..0000000 --- a/nvim/lua/plugins/joke.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - 'kwakzalver/duckytype.nvim', - config = function() - require('duckytype').setup {} - end - }, -} diff --git a/nvim/lua/plugins/noice.lua b/nvim/lua/plugins/noice.lua index bf05981..01db362 100644 --- a/nvim/lua/plugins/noice.lua +++ b/nvim/lua/plugins/noice.lua @@ -1,14 +1,16 @@ return { "folke/noice.nvim", event = "VeryLazy", - opts ={ - -- add any options here - }, dependencies = { "MunifTanjim/nui.nvim", - "rcarriga/nvim-notify", + { + "rcarriga/nvim-notify", + opts = { + background_colour = "#000000", + }, + }, }, - config = { + opts = { lsp = { signature = { enabled = false, @@ -22,9 +24,9 @@ return { }, }, presets = { - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help + long_message_to_split = true, + inc_rename = false, + lsp_doc_border = false, }, } } diff --git a/nvim/lua/plugins/snacks.lua b/nvim/lua/plugins/snacks.lua index ea2a05b..80d4476 100644 --- a/nvim/lua/plugins/snacks.lua +++ b/nvim/lua/plugins/snacks.lua @@ -26,6 +26,7 @@ return { ---@type snacks.dashboard.Item[] keys = { { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" }, + { icon = " ", key = "o", desc = "Find In Old Files", action = ":Telescope oldfiles" }, { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" }, { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" }, @@ -91,8 +92,8 @@ return { explorer = { enabled = false }, indent = { enabled = true }, input = { enabled = true }, - picker = { enabled = true }, - notifier = { enabled = true }, + picker = { enabled = false }, + notifier = { enabled = false }, quickfile = { enabled = true }, scope = { enabled = true }, scroll = { enabled = true }, diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua index d696d4b..2ab06da 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/lua/plugins/telescope.lua @@ -2,7 +2,7 @@ return { "nvim-telescope/telescope.nvim", dependencies = { "nvim-treesitter/nvim-treesitter" }, cmd = "Telescope", - configs = function() - return require "configs.telescope" + config = function() + require "configs.telescope" end, } diff --git a/nvim/nvim/lua/configs/treesitter.lua b/nvim/lua/plugins/temp.lua similarity index 100% rename from nvim/nvim/lua/configs/treesitter.lua rename to nvim/lua/plugins/temp.lua diff --git a/nvim/nvim/lua/custom/darcula.lua b/nvim/lua/themes/darcula.lua similarity index 83% rename from nvim/nvim/lua/custom/darcula.lua rename to nvim/lua/themes/darcula.lua index 2f337f4..aafa5f0 100644 --- a/nvim/nvim/lua/custom/darcula.lua +++ b/nvim/lua/themes/darcula.lua @@ -647,90 +647,6 @@ M.configure_highlights = function() hi(0, "iCursor", { bg = color._72, fg = color.very_light_gray }) hi(0, "lCursor", { bg = color.very_light_gray, fg = color.dark }) - if M.config.opt.integrations.lualine then - hi(0, "lualine_a_command", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_a_inactive", { bg = color.light_slate_gray, bold = true, fg = color.dark }) - hi(0, "lualine_a_insert", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_a_normal", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_a_replace", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_a_visual", { bg = color.green, bold = true, fg = color.dark }) - hi(0, "lualine_b_command", { bg = color.green, fg = color.dark }) - hi(0, "lualine_b_diagnostics_error_command", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_inactive", { bg = color.light_slate_gray, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_insert", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_normal", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_replace", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_terminal", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_error_visual", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diagnostics_hint_command", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_inactive", { bg = color.light_slate_gray, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_insert", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_normal", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_replace", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_terminal", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_hint_visual", { bg = color.green, fg = color.bright_sky }) - hi(0, "lualine_b_diagnostics_info_command", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_inactive", { bg = color.light_slate_gray, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_insert", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_normal", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_replace", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_terminal", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_info_visual", { bg = color.green, fg = color.grey }) - hi(0, "lualine_b_diagnostics_warn_command", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_inactive", { bg = color.light_slate_gray, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_insert", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_normal", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_replace", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_terminal", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diagnostics_warn_visual", { bg = color.green, fg = color.pale_gold }) - hi(0, "lualine_b_diff_added_command", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_inactive", { bg = color.light_slate_gray, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_insert", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_normal", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_replace", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_terminal", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_added_visual", { bg = color.green, fg = color.light_olive_green }) - hi(0, "lualine_b_diff_modified_command", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_inactive", { bg = color.light_slate_gray, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_insert", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_normal", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_replace", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_terminal", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_modified_visual", { bg = color.green, fg = color.light_blue }) - hi(0, "lualine_b_diff_removed_command", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_inactive", { bg = color.light_slate_gray, fg = color.red }) - hi(0, "lualine_b_diff_removed_insert", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_normal", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_replace", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_terminal", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_diff_removed_visual", { bg = color.green, fg = color.red }) - hi(0, "lualine_b_inactive", { bg = color.light_slate_gray, fg = color.dark }) - hi(0, "lualine_b_insert", { bg = color.green, fg = color.dark }) - hi(0, "lualine_b_normal", { bg = color.green, fg = color.dark }) - hi(0, "lualine_b_replace", { bg = color.green, fg = color.dark }) - hi(0, "lualine_b_visual", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_command", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_inactive", { bg = color.light_slate_gray, fg = color.dark }) - hi(0, "lualine_c_insert", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_normal", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_replace", { bg = color.green, fg = color.dark }) - hi(0, "lualine_c_visual", { bg = color.green, fg = color.dark }) - hi(0, "lualine_x_2_command", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_inactive", { bg = color.light_slate_gray, fg = color.peach_orange }) - hi(0, "lualine_x_2_insert", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_normal", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_replace", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_terminal", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_2_visual", { bg = color.green, fg = color.peach_orange }) - hi(0, "lualine_x_filetype_DevIconDefault_command", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_inactive", { bg = color.light_slate_gray, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_insert", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_normal", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_replace", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_terminal", { bg = color.green, fg = color.slate_gray }) - hi(0, "lualine_x_filetype_DevIconDefault_visual", { bg = color.green, fg = color.slate_gray }) - end - -- nvim-ts-rainbow hi(0, "rainbowcol1", { fg = color.very_light_gray }) hi(0, "rainbowcol2", { fg = color.light_brown }) diff --git a/nvim/lua/themes/xcodedark.lua b/nvim/lua/themes/xcodedark.lua new file mode 100644 index 0000000..9df6a5e --- /dev/null +++ b/nvim/lua/themes/xcodedark.lua @@ -0,0 +1,582 @@ +---@class Config +local config = { + opt = { + integrations = { + telescope = false, + lualine = true, + lsp_semantics_token = true, + nvim_cmp = true, + dap_nvim = true, + }, + }, +} + +---@class MyModule +local M = {} + +---@type Config +M.config = config + +-- Xcode Dark palette: https://github.com/arzg/vim-colors-xcode +local color = { + -- Base + background = "#292a30", + dark = "#1e1f24", + selection = "#393b44", + inactive_bg = "#212226", + cursor_line = "#2d2f36", + medium_gray = "#3a3c44", + foreground = "#dfdfe0", + light_gray = "#a3b1bf", + comment = "#53606e", + dark_gray = "#53606e", + -- Syntax + pink = "#ff7ab2", -- keywords + red = "#ff8170", -- errors, exceptions + teal = "#78c2b3", -- types + light_teal = "#acf2e4", -- string escapes, special + yellow = "#ffa14f", -- macros, builtins, preprocessor + light_yellow = "#d9c97c", -- numbers + blue = "#4eb0cc", -- functions + light_blue = "#6bdfff", -- constructors, special functions + purple = "#b281eb", -- constants + light_purple = "#dabaff", -- type params, light constants + green = "#84b360", -- strings + light_green = "#b0e687", -- string interpolation +} + +---@param args Config? +M.setup = function(args) + M.config = vim.tbl_deep_extend("force", M.config, args or {}) + if vim.g.colors_name ~= nil then + vim.cmd("highlight clear") + end + + if args and type(args.override) == "function" then + local c = args.override(color) + color = vim.tbl_deep_extend("force", color, c) + end + + if vim.fn.has("nvim-0.13") == 0 then + vim.cmd("echohl WarningMsg | echo 'nvim >= 0.13 required' | echohl None") + end + + vim.g.colors_name = "xcodedark" + vim.o.termguicolors = true + M.configure_highlights() +end + +M.configure_highlights = function() + local hi = vim.api.nvim_set_hl + + -- ── LSP semantic tokens ─────────────────────────────────────────────────── + if M.config.opt.integrations.lsp_semantics_token then + hi(0, "@attribute", { link = "TSAttribute" }) + hi(0, "@boolean", { link = "TSBoolean" }) + hi(0, "@character", { link = "TSCharacter" }) + hi(0, "@character.special", { link = "SpecialChar" }) + hi(0, "@class", { link = "TSType" }) + hi(0, "@comment", { link = "TSComment" }) + hi(0, "@conditional", { link = "TSConditional" }) + hi(0, "@constant", { link = "TSConstant" }) + hi(0, "@constant.builtin", { link = "TSConstantBuiltin" }) + hi(0, "@constant.macro", { link = "TSConstant" }) + hi(0, "@constructor", { link = "TSConstructor" }) + hi(0, "@decorator", { link = "TSAttribute" }) + hi(0, "@enum", { link = "TSType" }) + hi(0, "@enumMember", { link = "TSConstant" }) + hi(0, "@error", { link = "TSError" }) + hi(0, "@event", { link = "Identifier" }) + hi(0, "@exception", { link = "TSException" }) + hi(0, "@field", { link = "TSField" }) + hi(0, "@float", { link = "TSFloat" }) + hi(0, "@function", { link = "TSFunction" }) + hi(0, "@function.builtin", { link = "TSFuncBuiltin" }) + hi(0, "@function.call", { link = "TSFunctionCall" }) + hi(0, "@function.macro", { link = "TSFuncMacro" }) + hi(0, "@include", { link = "TSInclude" }) + hi(0, "@interface", { link = "Structure" }) + hi(0, "@keyword", { link = "TSKeyword" }) + hi(0, "@keyword.function", { link = "TSKeywordFunction" }) + hi(0, "@keyword.operator", { link = "TSKeywordOperator" }) + hi(0, "@keyword.return", { link = "TSKeyword" }) + hi(0, "@label", { link = "TSLabel" }) + hi(0, "@method", { link = "TSMethod" }) + hi(0, "@method.call", { link = "TSMethodCall" }) + hi(0, "@modifier", { link = "TSKeyword" }) + hi(0, "@namespace", { link = "TSNamespace" }) + hi(0, "@none", { link = "TSNone" }) + hi(0, "@number", { link = "TSNumber" }) + hi(0, "@operator", { link = "TSOperator" }) + hi(0, "@parameter", { link = "TSParameter" }) + hi(0, "@property", { link = "TSField" }) + hi(0, "@punctuation.bracket", { link = "TSPunctBracket" }) + hi(0, "@punctuation.delimiter", { link = "TSPunctDelimiter" }) + hi(0, "@punctuation.special", { link = "TSPunctSpecial" }) + hi(0, "@regexp", { link = "TSStringRegex" }) + hi(0, "@repeat", { link = "TSRepeat" }) + hi(0, "@string", { link = "TSString" }) + hi(0, "@string.escape", { link = "TSStringEscape" }) + hi(0, "@string.regex", { link = "TSStringRegex" }) + hi(0, "@string.special", { link = "SpecialChar" }) + hi(0, "@struct", { link = "TSType" }) + hi(0, "@symbol", { link = "TSSymbol" }) + hi(0, "@tag", { link = "TSTag" }) + hi(0, "@tag.attribute", { link = "TSAttribute" }) + hi(0, "@tag.delimiter", { link = "TSTagDelimiter" }) + hi(0, "@text", { link = "TSText" }) + hi(0, "@text.danger", { link = "DiagnosticError" }) + hi(0, "@text.emphasis", { link = "TSEmphasis" }) + hi(0, "@text.environment", { link = "Macro" }) + hi(0, "@text.environment.name", { link = "Type" }) + hi(0, "@text.literal", { link = "TSLiteral" }) + hi(0, "@text.math", { link = "Number" }) + hi(0, "@text.note", { link = "Tag" }) + hi(0, "@text.reference", { link = "TSParameterReference" }) + hi(0, "@text.strike", { link = "TSStrike" }) + hi(0, "@text.strong", { link = "TSStrong" }) + hi(0, "@text.title", { link = "TSTitle" }) + hi(0, "@text.todo", { link = "Todo" }) + hi(0, "@text.underline", { link = "TSUnderline" }) + hi(0, "@text.uri", { link = "TSURI" }) + hi(0, "@text.warning", { link = "DiagnosticWarn" }) + hi(0, "@type", { link = "TSType" }) + hi(0, "@type.builtin", { link = "TSTypeBuiltin" }) + hi(0, "@type.definition", { link = "TSTypeDefinition" }) + hi(0, "@type.qualifier", { link = "TSType" }) + hi(0, "@typeParameter", { link = "Type" }) + hi(0, "@variable", { link = "TSVariable" }) + hi(0, "@variable.builtin", { link = "TSVariableBuiltin" }) + hi(0, "@lsp.type.namespace", { link = "TSNamespace" }) + hi(0, "@lsp.type.variable", { link = "TSVariable" }) + hi(0, "@lsp.type.parameter", { link = "TSVariable" }) + hi(0, "@lsp.typemod.variable.readonly", { link = "TSConstant" }) + hi(0, "@lsp.type.type", { link = "TSType" }) + hi(0, "@lsp.type.function", {}) + hi(0, "@lsp.type.method", {}) + hi(0, "@lsp.type.comment", {}) + hi(0, "@lsp.typemod.variable.defaultLibrary", { link = "TSKeyword" }) + hi(0, "@lsp.mod.defaultLibrary.go", { link = "TSKeyword" }) + hi(0, "@lsp.type.property", { link = "TSField" }) + hi(0, "@tag.attribute.tsx", { link = "TSParameter" }) + hi(0, "@tag.attribute.javascript", { link = "TSParameter" }) + end + + -- ── Base UI ─────────────────────────────────────────────────────────────── + hi(0, "Normal", { bg = color.background, fg = color.foreground }) + hi(0, "NormalFloat", { bg = color.dark, fg = color.foreground }) + hi(0, "NormalNC", { bg = color.background, fg = color.foreground }) + + hi(0, "Bold", { bold = true }) + hi(0, "Italic", { italic = true }) + + hi(0, "Cursor", { bg = color.light_gray, fg = color.background }) + hi(0, "TermCursor", { bg = color.light_gray, fg = color.background }) + hi(0, "TermCursorNC", { bg = color.dark_gray, fg = color.background }) + hi(0, "iCursor", { bg = color.blue, fg = color.background }) + hi(0, "lCursor", { bg = color.light_gray, fg = color.background }) + + hi(0, "CursorLine", { bg = color.cursor_line }) + hi(0, "CursorColumn", { bg = color.cursor_line }) + hi(0, "CursorLineNr", { bg = color.cursor_line, fg = color.light_gray, bold = true }) + hi(0, "LineNr", { fg = color.comment }) + hi(0, "SignColumn", { fg = color.comment }) + hi(0, "FoldColumn", { fg = color.comment }) + hi(0, "Folded", { bg = color.selection, fg = color.light_gray }) + + hi(0, "ColorColumn", { bg = color.cursor_line }) + hi(0, "VertSplit", { fg = color.medium_gray }) + hi(0, "WinSeparator", { fg = color.medium_gray }) + + hi(0, "StatusLine", { bg = color.selection, fg = color.foreground }) + hi(0, "StatusLineNC", { bg = color.medium_gray, fg = color.light_gray }) + + hi(0, "TabLine", { bg = color.inactive_bg, fg = color.comment }) + hi(0, "TabLineFill", { bg = color.inactive_bg }) + hi(0, "TabLineSel", { bg = color.selection, fg = color.foreground, bold = true }) + + hi(0, "WinBar", { fg = color.foreground }) + hi(0, "WinBarNC", { fg = color.light_gray }) + + hi(0, "Visual", { bg = color.selection }) + hi(0, "VisualNOS", { fg = color.red }) + + hi(0, "Search", { bg = color.light_yellow, fg = color.background }) + hi(0, "IncSearch", { bg = color.yellow, fg = color.background }) + hi(0, "Substitute", { bg = color.light_yellow, fg = color.background }) + + hi(0, "Pmenu", { bg = color.dark, fg = color.foreground }) + hi(0, "PmenuSel", { bg = color.selection, fg = color.foreground }) + hi(0, "PmenuSbar", { bg = color.medium_gray }) + hi(0, "PmenuThumb", { bg = color.light_gray }) + + hi(0, "FloatBorder", { fg = color.comment }) + hi(0, "MatchParen", { fg = color.light_blue, bold = true }) + + hi(0, "NonText", { fg = color.medium_gray }) + hi(0, "SpecialKey", { fg = color.comment }) + hi(0, "Whitespace", { fg = color.medium_gray }) + + hi(0, "Directory", { fg = color.blue }) + hi(0, "Title", { fg = color.blue, bold = true }) + + hi(0, "ErrorMsg", { fg = color.red }) + hi(0, "WarningMsg", { fg = color.yellow }) + hi(0, "ModeMsg", { fg = color.light_green, bold = true }) + hi(0, "MoreMsg", { fg = color.light_green, bold = true }) + hi(0, "Question", { fg = color.blue, bold = true }) + + hi(0, "QuickFixLine", { bg = color.cursor_line }) + hi(0, "WildMenu", { bg = color.yellow, fg = color.background }) + + hi(0, "IndentBlanklineChar", { fg = color.medium_gray, nocombine = true }) + hi(0, "IndentBlanklineContextChar", { fg = color.comment, nocombine = true }) + hi(0, "IndentBlanklineContextStart",{ sp = color.teal, underline = true }) + hi(0, "IndentBlanklineSpaceChar", { fg = color.medium_gray, nocombine = true }) + + hi(0, "TreesitterContext", { bg = color.cursor_line, italic = true }) + + -- ── Syntax ──────────────────────────────────────────────────────────────── + hi(0, "Comment", { fg = color.comment, italic = true }) + hi(0, "Constant", { fg = color.purple }) + hi(0, "String", { fg = color.green }) + hi(0, "Character", { fg = color.green }) + hi(0, "Number", { fg = color.light_yellow }) + hi(0, "Boolean", { fg = color.yellow }) + hi(0, "Float", { fg = color.light_yellow }) + hi(0, "Identifier", { fg = color.foreground }) + hi(0, "Function", { fg = color.blue }) + hi(0, "Statement", { fg = color.pink }) + hi(0, "Conditional",{ fg = color.pink }) + hi(0, "Repeat", { fg = color.pink }) + hi(0, "Label", { fg = color.light_yellow }) + hi(0, "Operator", { fg = color.light_gray }) + hi(0, "Keyword", { fg = color.pink }) + hi(0, "Exception", { fg = color.red }) + hi(0, "PreProc", { fg = color.yellow }) + hi(0, "Include", { fg = color.pink }) + hi(0, "Define", { fg = color.yellow }) + hi(0, "Macro", { fg = color.yellow }) + hi(0, "Type", { fg = color.teal }) + hi(0, "StorageClass",{ fg = color.pink }) + hi(0, "Structure", { fg = color.teal }) + hi(0, "Typedef", { fg = color.teal }) + hi(0, "Special", { fg = color.light_teal }) + hi(0, "SpecialChar",{ fg = color.light_teal }) + hi(0, "Delimiter", { fg = color.light_gray }) + hi(0, "Debug", { fg = color.red }) + hi(0, "Error", { bg = color.red, fg = color.background }) + hi(0, "Todo", { bg = color.selection, fg = color.light_yellow }) + hi(0, "Underlined", { fg = color.blue, underline = true }) + hi(0, "Ignore", { fg = color.dark }) + hi(0, "Tag", { fg = color.light_yellow }) + hi(0, "Bold", { bold = true }) + + -- ── Treesitter ──────────────────────────────────────────────────────────── + hi(0, "TSAnnotation", { fg = color.yellow }) + hi(0, "TSAttribute", { fg = color.yellow }) + hi(0, "TSBoolean", { fg = color.yellow }) + hi(0, "TSCharacter", { fg = color.green }) + hi(0, "TSComment", { fg = color.comment, italic = true }) + hi(0, "TSConditional", { fg = color.pink }) + hi(0, "TSConstant", { fg = color.purple }) + hi(0, "TSConstBuiltin", { fg = color.yellow, italic = true }) + hi(0, "TSConstantBuiltin",{ fg = color.yellow, italic = true }) + hi(0, "TSConstMacro", { fg = color.yellow }) + hi(0, "TSConstructor", { fg = color.light_blue }) + hi(0, "TSCurrentScope", { bold = true }) + hi(0, "TSDefinition", { sp = color.light_gray, underline = true }) + hi(0, "TSDefinitionUsage",{ sp = color.light_gray, underline = true }) + hi(0, "TSEmphasis", { fg = color.yellow, italic = true }) + hi(0, "TSError", { fg = color.red }) + hi(0, "TSException", { fg = color.red }) + hi(0, "TSField", { fg = color.foreground }) + hi(0, "TSFloat", { fg = color.light_yellow }) + hi(0, "TSFuncBuiltin", { fg = color.yellow, italic = true }) + hi(0, "TSFuncMacro", { fg = color.yellow }) + hi(0, "TSFunction", { fg = color.blue }) + hi(0, "TSFunctionCall", { fg = color.light_teal }) + hi(0, "TSMethodCall", { fg = color.light_teal }) + hi(0, "TSInclude", { fg = color.pink }) + hi(0, "TSKeyword", { fg = color.pink }) + hi(0, "TSKeywordFunction",{ fg = color.pink }) + hi(0, "TSKeywordOperator",{ fg = color.pink }) + hi(0, "TSLabel", { fg = color.light_yellow }) + hi(0, "TSLiteral", { fg = color.green }) + hi(0, "TSMethod", { fg = color.blue }) + hi(0, "TSNamespace", { fg = color.teal }) + hi(0, "TSNone", { fg = color.foreground }) + hi(0, "TSNumber", { fg = color.light_yellow }) + hi(0, "TSOperator", { fg = color.light_gray }) + hi(0, "TSParameter", { fg = color.foreground }) + hi(0, "TSParameterReference",{ fg = color.foreground }) + hi(0, "TSProperty", { fg = color.foreground }) + hi(0, "TSPunctBracket", { fg = color.light_gray }) + hi(0, "TSPunctDelimiter",{ fg = color.light_gray }) + hi(0, "TSPunctSpecial", { fg = color.light_teal }) + hi(0, "TSRepeat", { fg = color.pink }) + hi(0, "TSString", { fg = color.green }) + hi(0, "TSStringEscape", { fg = color.light_teal }) + hi(0, "TSStringRegex", { fg = color.light_teal }) + hi(0, "TSStrong", { bold = true }) + hi(0, "TSStrike", { fg = color.dark, strikethrough = true }) + hi(0, "TSSymbol", { fg = color.light_green }) + hi(0, "TSTag", { fg = color.light_yellow }) + hi(0, "TSTagDelimiter", { fg = color.light_gray }) + hi(0, "TSText", { fg = color.foreground }) + hi(0, "TSTitle", { fg = color.blue, bold = true }) + hi(0, "TSType", { fg = color.teal }) + hi(0, "TSTypeBuiltin", { fg = color.yellow, italic = true }) + hi(0, "TSTypeDefinition",{ fg = color.teal }) + hi(0, "TSURI", { fg = color.blue, underline = true }) + hi(0, "TSUnderline", { underline = true }) + hi(0, "TSVariable", { fg = color.foreground }) + hi(0, "TSVariableBuiltin",{ fg = color.yellow, italic = true }) + + -- ── Statement / Identifier overrides ───────────────────────────────────── + hi(0, "Statement", { link = "TSKeyword" }) + hi(0, "Comment", { link = "TSComment" }) + hi(0, "Number", { link = "TSNumber" }) + hi(0, "String", { link = "TSString" }) + hi(0, "Identifier", { link = "TSVariable" }) + + hi(0, "@lsp.type.keyword.go", { link = "TSKeyword" }) + hi(0, "@lsp.type.string.go", { link = "TSString" }) + hi(0, "@lsp.type.function", { link = "TSFunctionCall" }) + hi(0, "@lsp.typemod.function.definition", { link = "TSFunction" }) + hi(0, "@lsp.type.method", { link = "TSMethod" }) + hi(0, "goBlock", { link = "TSVariable" }) + hi(0, "goImportString", { link = "TSString" }) + + -- ── Diagnostics ─────────────────────────────────────────────────────────── + hi(0, "DiagnosticError", { fg = color.red }) + hi(0, "DiagnosticWarn", { fg = color.yellow }) + hi(0, "DiagnosticInfo", { fg = color.blue }) + hi(0, "DiagnosticHint", { fg = color.teal }) + hi(0, "DiagnosticUnderlineError", { sp = color.red, undercurl = true }) + hi(0, "DiagnosticUnderlineWarn", { sp = color.yellow, undercurl = true }) + hi(0, "DiagnosticUnderlineInformation",{ sp = color.blue, undercurl = true }) + hi(0, "DiagnosticUnderlineHint", { sp = color.teal, undercurl = true }) + hi(0, "DiagnosticUnderlineWarning", { sp = color.yellow, undercurl = true }) + hi(0, "LspDiagnosticsDefaultError", { link = "DiagnosticError" }) + hi(0, "LspDiagnosticsDefaultHint", { link = "DiagnosticHint" }) + hi(0, "LspDiagnosticsDefaultInformation", { link = "DiagnosticInfo" }) + hi(0, "LspDiagnosticsDefaultWarning", { link = "DiagnosticWarn" }) + hi(0, "LspDiagnosticsUnderlineError", { link = "DiagnosticUnderlineError" }) + hi(0, "LspDiagnosticsUnderlineHint", { link = "DiagnosticUnderlineHint" }) + hi(0, "LspDiagnosticsUnderlineInformation", { link = "DiagnosticUnderlineInformation" }) + hi(0, "LspDiagnosticsUnderlineWarning",{ link = "DiagnosticUnderlineWarning" }) + hi(0, "LspReferenceRead", { sp = color.light_gray, underline = true }) + hi(0, "LspReferenceText", { sp = color.light_gray, underline = true }) + hi(0, "LspReferenceWrite", { sp = color.light_gray, underline = true }) + + -- ── nvim-cmp ────────────────────────────────────────────────────────────── + if M.config.opt.integrations.nvim_cmp then + hi(0, "CmpDocumentation", { fg = color.foreground }) + hi(0, "CmpDocumentationBorder", { fg = color.comment }) + hi(0, "CmpItemAbbr", { fg = color.foreground }) + hi(0, "CmpItemAbbrDeprecated", { fg = color.comment, strikethrough = true }) + hi(0, "CmpItemAbbrMatch", { fg = color.blue }) + hi(0, "CmpItemAbbrMatchFuzzy", { fg = color.blue }) + hi(0, "CmpItemKindDefault", { fg = color.blue }) + hi(0, "CmpItemKindClass", { fg = color.teal }) + hi(0, "CmpItemKindConstant", { fg = color.purple }) + hi(0, "CmpItemKindConstructor", { fg = color.light_blue }) + hi(0, "CmpItemKindEnum", { fg = color.teal }) + hi(0, "CmpItemKindEnumMember", { fg = color.light_purple }) + hi(0, "CmpItemKindEvent", { fg = color.teal }) + hi(0, "CmpItemKindField", { fg = color.foreground }) + hi(0, "CmpItemKindFunction", { fg = color.blue }) + hi(0, "CmpItemKindInterface", { fg = color.teal }) + hi(0, "CmpItemKindKeyword", { fg = color.pink }) + hi(0, "CmpItemKindMethod", { fg = color.blue }) + hi(0, "CmpItemKindModule", { fg = color.foreground }) + hi(0, "CmpItemKindOperator", { fg = color.light_gray }) + hi(0, "CmpItemKindProperty", { fg = color.foreground }) + hi(0, "CmpItemKindReference", { fg = color.foreground }) + hi(0, "CmpItemKindSnippet", { fg = color.light_gray }) + hi(0, "CmpItemKindStruct", { fg = color.teal }) + hi(0, "CmpItemKindTypeParameter",{ fg = color.light_purple }) + hi(0, "CmpItemKindUnit", { fg = color.light_yellow }) + hi(0, "CmpItemKindValue", { fg = color.purple }) + hi(0, "CmpItemKindVariable", { fg = color.foreground }) + hi(0, "CmpItemMenu", { fg = color.comment }) + end + + -- ── DAP ─────────────────────────────────────────────────────────────────── + if M.config.opt.integrations.dap_nvim then + hi(0, "DapUIBreakpointsCurrentLine", { bold = true, fg = color.light_green }) + hi(0, "DapUIBreakpointsDisabledLine",{ fg = color.comment }) + hi(0, "DapUIBreakpointsInfo", { fg = color.light_green }) + hi(0, "DapUIBreakpointsPath", { fg = color.light_teal }) + hi(0, "DapUIDecoration", { fg = color.light_teal }) + hi(0, "DapUIFloatBorder", { fg = color.light_teal }) + hi(0, "DapUILineNumber", { fg = color.light_teal }) + hi(0, "DapUIModifiedValue", { bold = true, fg = color.light_teal }) + hi(0, "DapUIPlayPause", { fg = color.light_green }) + hi(0, "DapUIPlayPauseNC", { fg = color.light_green }) + hi(0, "DapUIRestart", { fg = color.light_green }) + hi(0, "DapUIRestartNC", { fg = color.light_green }) + hi(0, "DapUIScope", { fg = color.light_teal }) + hi(0, "DapUISource", { fg = color.light_purple }) + hi(0, "DapUIStepBack", { fg = color.blue }) + hi(0, "DapUIStepBackNC", { fg = color.blue }) + hi(0, "DapUIStepInto", { fg = color.blue }) + hi(0, "DapUIStepIntoNC", { fg = color.blue }) + hi(0, "DapUIStepOut", { fg = color.blue }) + hi(0, "DapUIStepOutNC", { fg = color.blue }) + hi(0, "DapUIStepOver", { fg = color.blue }) + hi(0, "DapUIStepOverNC", { fg = color.blue }) + hi(0, "DapUIStop", { fg = color.red }) + hi(0, "DapUIStopNC", { fg = color.red }) + hi(0, "DapUIStoppedThread", { fg = color.light_teal }) + hi(0, "DapUIThread", { fg = color.light_green }) + hi(0, "DapUIType", { fg = color.light_purple }) + hi(0, "DapUIUnavailable", { fg = color.comment }) + hi(0, "DapUIUnavailableNC", { fg = color.comment }) + hi(0, "DapUIWatchesEmpty", { fg = color.red }) + hi(0, "DapUIWatchesError", { fg = color.red }) + hi(0, "DapUIWatchesValue", { fg = color.light_green }) + end + + -- ── Git ─────────────────────────────────────────────────────────────────── + hi(0, "GitGutterAdd", { fg = color.green }) + hi(0, "GitGutterChange", { fg = color.blue }) + hi(0, "GitGutterChangeDelete", { fg = color.yellow }) + hi(0, "GitGutterDelete", { fg = color.red }) + + hi(0, "GitSignsCurrentLineBlame", { fg = color.comment, italic = true }) + hi(0, "GitSignsStagedAdd", { fg = color.light_green }) + hi(0, "GitSignsStagedChange", { fg = color.teal }) + hi(0, "GitSignsStagedDelete", { fg = color.red }) + + hi(0, "gitcommitBranch", { bold = true, fg = color.yellow }) + hi(0, "gitcommitComment", { fg = color.comment }) + hi(0, "gitcommitDiscarded", { fg = color.comment }) + hi(0, "gitcommitDiscardedFile", { bold = true, fg = color.red }) + hi(0, "gitcommitDiscardedType", { fg = color.blue }) + hi(0, "gitcommitHeader", { fg = color.pink }) + hi(0, "gitcommitOverflow", { fg = color.red }) + hi(0, "gitcommitSelected", { fg = color.comment }) + hi(0, "gitcommitSelectedFile", { bold = true, fg = color.light_green }) + hi(0, "gitcommitSelectedType", { fg = color.blue }) + hi(0, "gitcommitSummary", { fg = color.light_green }) + hi(0, "gitcommitUnmergedFile", { bold = true, fg = color.red }) + hi(0, "gitcommitUnmergedType", { fg = color.blue }) + hi(0, "gitcommitUntracked", { fg = color.comment }) + hi(0, "gitcommitUntrackedFile", { fg = color.light_yellow }) + + -- ── Notify ──────────────────────────────────────────────────────────────── + hi(0, "NotifyDEBUGBody", { link = "Normal" }) + hi(0, "NotifyDEBUGBorder", { fg = color.comment }) + hi(0, "NotifyDEBUGIcon", { fg = color.comment }) + hi(0, "NotifyDEBUGTitle", { fg = color.comment }) + hi(0, "NotifyERRORBody", { link = "Normal" }) + hi(0, "NotifyERRORBorder", { fg = color.red }) + hi(0, "NotifyERRORIcon", { fg = color.red }) + hi(0, "NotifyERRORTitle", { fg = color.red }) + hi(0, "NotifyINFOBody", { link = "Normal" }) + hi(0, "NotifyINFOBorder", { fg = color.light_gray }) + hi(0, "NotifyINFOIcon", { fg = color.light_gray }) + hi(0, "NotifyINFOTitle", { fg = color.light_gray }) + hi(0, "NotifyTRACEBody", { link = "Normal" }) + hi(0, "NotifyTRACEBorder", { fg = color.purple }) + hi(0, "NotifyTRACEIcon", { fg = color.purple }) + hi(0, "NotifyTRACETitle", { fg = color.purple }) + hi(0, "NotifyWARNBody", { link = "Normal" }) + hi(0, "NotifyWARNBorder", { fg = color.yellow }) + hi(0, "NotifyWARNIcon", { fg = color.yellow }) + hi(0, "NotifyWARNTitle", { fg = color.yellow }) + + -- ── Telescope ───────────────────────────────────────────────────────────── + if M.config.opt.integrations.telescope then + hi(0, "TelescopeBorder", { bg = color.dark, fg = color.dark }) + hi(0, "TelescopeNormal", { bg = color.dark }) + hi(0, "TelescopePreviewLine", { bg = color.cursor_line }) + hi(0, "TelescopePreviewTitle", { bg = color.light_green, fg = color.background }) + hi(0, "TelescopePromptBorder", { bg = color.medium_gray, fg = color.medium_gray }) + hi(0, "TelescopePromptNormal", { bg = color.medium_gray, fg = color.foreground }) + hi(0, "TelescopePromptPrefix", { bg = color.medium_gray, fg = color.red }) + hi(0, "TelescopePromptTitle", { bg = color.red, fg = color.background }) + hi(0, "TelescopeResultsTitle", { bg = color.dark, fg = color.dark }) + hi(0, "TelescopeSelection", { bg = color.medium_gray }) + end + + -- ── Snacks Dashboard ────────────────────────────────────────────────────── + hi(0, "SnacksDashboardHeader", { fg = color.light_yellow, bold = true }) + hi(0, "SnacksDashboardTitle", { fg = color.yellow, bold = true }) + hi(0, "SnacksDashboardIcon", { fg = color.blue }) + hi(0, "SnacksDashboardDesc", { fg = color.light_gray }) + hi(0, "SnacksDashboardFile", { fg = color.light_teal, bold = true }) + hi(0, "SnacksDashboardKey", { fg = color.pink }) + hi(0, "SnacksDashboardSpecial", { fg = color.light_gray }) + hi(0, "SnacksDashboardDir", { fg = color.light_gray }) + hi(0, "SnacksDashboardNormal", { fg = color.light_gray }) + hi(0, "SnacksDashboardTerminal", { fg = color.light_gray }) + hi(0, "SnacksDashboardFooter", { fg = color.comment }) + + -- ── Neo-Tree ────────────────────────────────────────────────────────────── + hi(0, "NeoTreeFileName", { fg = color.foreground }) + hi(0, "NeoTreeDotfile", { fg = color.comment }) + hi(0, "NeoTreeDirectoryName", { fg = color.yellow }) + hi(0, "NeoTreeDirectoryIcon", { fg = color.yellow }) + hi(0, "NeoTreeGitModified", { fg = color.yellow }) + hi(0, "NeoTreeGitStaged", { fg = color.green }) + hi(0, "NeoTreeGitUntracked", { fg = color.purple }) + hi(0, "NeoTreeNormal", { fg = color.foreground, bg = color.dark }) + hi(0, "NeoTreeNormalNC", { fg = color.foreground, bg = color.dark }) + hi(0, "NeoTreeTabActive", { fg = color.foreground, bg = color.dark, bold = true }) + hi(0, "NeoTreeTabInactive", { fg = color.comment, bg = color.dark }) + hi(0, "NeoTreeTabSeparatorActive", { fg = color.foreground, bg = color.dark }) + hi(0, "NeoTreeTabSeparatorInactive", { fg = color.comment, bg = color.dark }) + + -- ── Copilot ─────────────────────────────────────────────────────────────── + hi(0, "CopilotSuggestion", { fg = color.comment }) + + -- ── Spell ───────────────────────────────────────────────────────────────── + hi(0, "SpellBad", { sp = color.red, undercurl = true }) + hi(0, "SpellCap", { sp = color.blue, undercurl = true }) + hi(0, "SpellLocal", { sp = color.teal, undercurl = true }) + hi(0, "SpellRare", { sp = color.yellow, undercurl = true }) + + -- ── nvim-ts-rainbow ─────────────────────────────────────────────────────── + hi(0, "rainbowcol1", { fg = color.foreground }) + hi(0, "rainbowcol2", { fg = color.yellow }) + hi(0, "rainbowcol3", { fg = color.teal }) + hi(0, "rainbowcol4", { fg = color.light_purple }) + hi(0, "rainbowcol5", { fg = color.blue }) + hi(0, "rainbowcol6", { fg = color.pink }) + hi(0, "rainbowcol7", { fg = color.light_teal }) + + -- ── User / StatusLine accents ───────────────────────────────────────────── + hi(0, "User1", { bg = color.selection, fg = color.red }) + hi(0, "User2", { bg = color.selection, fg = color.yellow }) + hi(0, "User3", { bg = color.selection, fg = color.foreground }) + hi(0, "User4", { bg = color.selection, fg = color.blue }) + hi(0, "User5", { bg = color.selection, fg = color.light_gray }) + hi(0, "User6", { bg = color.dark, fg = color.light_gray }) + hi(0, "User7", { bg = color.selection, fg = color.light_gray }) + hi(0, "User8", { bg = color.selection, fg = color.background }) + hi(0, "User9", { bg = color.selection, fg = color.background }) + + -- ── Terminal colors ─────────────────────────────────────────────────────── + local g = vim.g + g.terminal_color_0 = color.background + g.terminal_color_1 = color.red + g.terminal_color_2 = color.green + g.terminal_color_3 = color.light_yellow + g.terminal_color_4 = color.blue + g.terminal_color_5 = color.purple + g.terminal_color_6 = color.teal + g.terminal_color_7 = color.light_gray + g.terminal_color_8 = color.dark_gray + g.terminal_color_9 = color.pink + g.terminal_color_10 = color.light_green + g.terminal_color_11 = color.yellow + g.terminal_color_12 = color.light_blue + g.terminal_color_13 = color.light_purple + g.terminal_color_14 = color.light_teal + g.terminal_color_15 = color.foreground +end + +return M diff --git a/nvim/lua/themes/xcodedefault.lua b/nvim/lua/themes/xcodedefault.lua new file mode 100644 index 0000000..20c5150 --- /dev/null +++ b/nvim/lua/themes/xcodedefault.lua @@ -0,0 +1,606 @@ +---@class Config +local config = { + opt = { + integrations = { + telescope = false, + lualine = true, + lsp_semantics_token = true, + nvim_cmp = true, + dap_nvim = true, + }, + }, +} + +---@class MyModule +local M = {} + +---@type Config +M.config = config + +-- Hybrid: xcodedark backgrounds + nvim-default color philosophy +-- default-dark: Keywords=Yellow bold, Constants=Magenta, Strings=Magenta, +-- Types=Green bold, Functions=Cyan, PreProc=Magenta +-- xcodedark supplies every hex value; bold/italic modifiers come from default. +local color = { + -- ── Backgrounds (xcodedark) ──────────────────────────────────────────── + background = "#292a30", + dark = "#1e1f24", + selection = "#393b44", + inactive_bg = "#212226", + cursor_line = "#2d2f36", + medium_gray = "#3a3c44", + + -- ── Foregrounds (xcodedark) ──────────────────────────────────────────── + foreground = "#dfdfe0", + light_gray = "#a3b1bf", + + -- ── Comment: brighter than pure xcode gray so it reads like default cyan + comment = "#6b8a9e", + + -- ── Syntax — mapped to default's color roles ─────────────────────────── + -- default: Statement/Keyword = Yellow bold → xcode yellow + yellow = "#ffa14f", + -- default: Constant/String/Number = Magenta → xcode purple / light-purple + purple = "#b281eb", + light_purple = "#dabaff", + -- default: Identifier/Function = Cyan → xcode teal / light-teal + teal = "#78c2b3", + light_teal = "#acf2e4", + -- default: Type = Green bold → xcode green / light-green + green = "#84b360", + light_green = "#b0e687", + -- default: PreProc = Magenta (bright) → xcode pink + pink = "#ff7ab2", + -- default: Special = DarkCyan → xcode light-blue + light_blue = "#6bdfff", + blue = "#4eb0cc", + -- default: Error = Red → xcode red + red = "#ff8170", + -- extras + light_yellow = "#d9c97c", +} + +---@param args Config? +M.setup = function(args) + M.config = vim.tbl_deep_extend("force", M.config, args or {}) + if vim.g.colors_name ~= nil then + vim.cmd("highlight clear") + end + + if args and type(args.override) == "function" then + local c = args.override(color) + color = vim.tbl_deep_extend("force", color, c) + end + + if vim.fn.has("nvim-0.8.3") == 0 then + vim.cmd("echohl WarningMsg | echo 'nvim >= 0.8.3 required' | echohl None") + end + + vim.g.colors_name = "xcodedefault" + vim.o.termguicolors = true + M.configure_highlights() +end + +M.configure_highlights = function() + local hi = vim.api.nvim_set_hl + + -- ── LSP semantic tokens ─────────────────────────────────────────────────── + if M.config.opt.integrations.lsp_semantics_token then + hi(0, "@attribute", { link = "TSAttribute" }) + hi(0, "@boolean", { link = "TSBoolean" }) + hi(0, "@character", { link = "TSCharacter" }) + hi(0, "@character.special", { link = "SpecialChar" }) + hi(0, "@class", { link = "TSType" }) + hi(0, "@comment", { link = "TSComment" }) + hi(0, "@conditional", { link = "TSConditional" }) + hi(0, "@constant", { link = "TSConstant" }) + hi(0, "@constant.builtin", { link = "TSConstantBuiltin" }) + hi(0, "@constant.macro", { link = "TSConstant" }) + hi(0, "@constructor", { link = "TSConstructor" }) + hi(0, "@decorator", { link = "TSAttribute" }) + hi(0, "@enum", { link = "TSType" }) + hi(0, "@enumMember", { link = "TSConstant" }) + hi(0, "@error", { link = "TSError" }) + hi(0, "@event", { link = "Identifier" }) + hi(0, "@exception", { link = "TSException" }) + hi(0, "@field", { link = "TSField" }) + hi(0, "@float", { link = "TSFloat" }) + hi(0, "@function", { link = "TSFunction" }) + hi(0, "@function.builtin", { link = "TSFuncBuiltin" }) + hi(0, "@function.call", { link = "TSFunctionCall" }) + hi(0, "@function.macro", { link = "TSFuncMacro" }) + hi(0, "@include", { link = "TSInclude" }) + hi(0, "@interface", { link = "Structure" }) + hi(0, "@keyword", { link = "TSKeyword" }) + hi(0, "@keyword.function", { link = "TSKeywordFunction" }) + hi(0, "@keyword.operator", { link = "TSKeywordOperator" }) + hi(0, "@keyword.return", { link = "TSKeyword" }) + hi(0, "@label", { link = "TSLabel" }) + hi(0, "@method", { link = "TSMethod" }) + hi(0, "@method.call", { link = "TSMethodCall" }) + hi(0, "@modifier", { link = "TSKeyword" }) + hi(0, "@namespace", { link = "TSNamespace" }) + hi(0, "@none", { link = "TSNone" }) + hi(0, "@number", { link = "TSNumber" }) + hi(0, "@operator", { link = "TSOperator" }) + hi(0, "@parameter", { link = "TSParameter" }) + hi(0, "@property", { link = "TSField" }) + hi(0, "@punctuation.bracket", { link = "TSPunctBracket" }) + hi(0, "@punctuation.delimiter", { link = "TSPunctDelimiter" }) + hi(0, "@punctuation.special", { link = "TSPunctSpecial" }) + hi(0, "@regexp", { link = "TSStringRegex" }) + hi(0, "@repeat", { link = "TSRepeat" }) + hi(0, "@string", { link = "TSString" }) + hi(0, "@string.escape", { link = "TSStringEscape" }) + hi(0, "@string.regex", { link = "TSStringRegex" }) + hi(0, "@string.special", { link = "SpecialChar" }) + hi(0, "@struct", { link = "TSType" }) + hi(0, "@symbol", { link = "TSSymbol" }) + hi(0, "@tag", { link = "TSTag" }) + hi(0, "@tag.attribute", { link = "TSAttribute" }) + hi(0, "@tag.delimiter", { link = "TSTagDelimiter" }) + hi(0, "@text", { link = "TSText" }) + hi(0, "@text.danger", { link = "DiagnosticError" }) + hi(0, "@text.emphasis", { link = "TSEmphasis" }) + hi(0, "@text.environment", { link = "Macro" }) + hi(0, "@text.environment.name", { link = "Type" }) + hi(0, "@text.literal", { link = "TSLiteral" }) + hi(0, "@text.math", { link = "Number" }) + hi(0, "@text.note", { link = "Tag" }) + hi(0, "@text.reference", { link = "TSParameterReference" }) + hi(0, "@text.strike", { link = "TSStrike" }) + hi(0, "@text.strong", { link = "TSStrong" }) + hi(0, "@text.title", { link = "TSTitle" }) + hi(0, "@text.todo", { link = "Todo" }) + hi(0, "@text.underline", { link = "TSUnderline" }) + hi(0, "@text.uri", { link = "TSURI" }) + hi(0, "@text.warning", { link = "DiagnosticWarn" }) + hi(0, "@type", { link = "TSType" }) + hi(0, "@type.builtin", { link = "TSTypeBuiltin" }) + hi(0, "@type.definition", { link = "TSTypeDefinition" }) + hi(0, "@type.qualifier", { link = "TSType" }) + hi(0, "@typeParameter", { link = "Type" }) + hi(0, "@variable", { link = "TSVariable" }) + hi(0, "@variable.builtin", { link = "TSVariableBuiltin" }) + hi(0, "@lsp.type.namespace", { link = "TSNamespace" }) + hi(0, "@lsp.type.variable", { link = "TSVariable" }) + hi(0, "@lsp.type.parameter", { link = "TSVariable" }) + hi(0, "@lsp.typemod.variable.readonly", { link = "TSConstant" }) + hi(0, "@lsp.type.type", { link = "TSType" }) + hi(0, "@lsp.type.function", {}) + hi(0, "@lsp.type.method", {}) + hi(0, "@lsp.type.comment", {}) + hi(0, "@lsp.typemod.variable.defaultLibrary", { link = "TSVariableBuiltin" }) + hi(0, "@lsp.mod.defaultLibrary.go", { link = "TSVariableBuiltin" }) + hi(0, "@lsp.type.property", { link = "TSField" }) + hi(0, "@tag.attribute.tsx", { link = "TSParameter" }) + hi(0, "@tag.attribute.javascript", { link = "TSParameter" }) + end + + -- ── Base UI ─────────────────────────────────────────────────────────────── + hi(0, "Normal", { bg = color.background, fg = color.foreground }) + hi(0, "NormalFloat", { bg = color.dark, fg = color.foreground }) + hi(0, "NormalNC", { bg = color.background, fg = color.foreground }) + + hi(0, "Bold", { bold = true }) + hi(0, "Italic", { italic = true }) + + hi(0, "Cursor", { bg = color.light_gray, fg = color.background }) + hi(0, "TermCursor", { bg = color.light_gray, fg = color.background }) + hi(0, "TermCursorNC", { bg = color.comment, fg = color.background }) + hi(0, "iCursor", { bg = color.teal, fg = color.background }) + hi(0, "lCursor", { bg = color.light_gray, fg = color.background }) + + hi(0, "CursorLine", { bg = color.cursor_line }) + hi(0, "CursorColumn", { bg = color.cursor_line }) + hi(0, "CursorLineNr", { bg = color.cursor_line, fg = color.light_gray, bold = true }) + hi(0, "LineNr", { fg = color.comment }) + hi(0, "SignColumn", { fg = color.comment }) + hi(0, "FoldColumn", { fg = color.comment }) + hi(0, "Folded", { bg = color.selection, fg = color.light_gray }) + + hi(0, "ColorColumn", { bg = color.cursor_line }) + hi(0, "VertSplit", { fg = color.medium_gray }) + hi(0, "WinSeparator", { fg = color.medium_gray }) + + hi(0, "StatusLine", { bg = color.selection, fg = color.foreground }) + hi(0, "StatusLineNC", { bg = color.medium_gray, fg = color.light_gray }) + + hi(0, "TabLine", { bg = color.inactive_bg, fg = color.comment }) + hi(0, "TabLineFill", { bg = color.inactive_bg }) + hi(0, "TabLineSel", { bg = color.selection, fg = color.foreground, bold = true }) + + hi(0, "WinBar", { fg = color.foreground }) + hi(0, "WinBarNC", { fg = color.light_gray }) + + hi(0, "Visual", { bg = color.selection }) + hi(0, "VisualNOS", { fg = color.red }) + + -- default uses reversed/highlighted search — keep that boldness + hi(0, "Search", { bg = color.yellow, fg = color.background, bold = true }) + hi(0, "IncSearch", { bg = color.light_yellow, fg = color.background, bold = true }) + hi(0, "Substitute", { bg = color.yellow, fg = color.background }) + + hi(0, "Pmenu", { bg = color.dark, fg = color.foreground }) + hi(0, "PmenuSel", { bg = color.selection, fg = color.foreground }) + hi(0, "PmenuSbar", { bg = color.medium_gray }) + hi(0, "PmenuThumb", { bg = color.light_gray }) + + hi(0, "FloatBorder", { fg = color.comment }) + hi(0, "MatchParen", { fg = color.light_teal, bold = true }) + + hi(0, "NonText", { fg = color.medium_gray }) + hi(0, "SpecialKey", { fg = color.comment }) + hi(0, "Whitespace", { fg = color.medium_gray }) + + hi(0, "Directory", { fg = color.teal, bold = true }) + hi(0, "Title", { fg = color.teal, bold = true }) + + hi(0, "ErrorMsg", { fg = color.red }) + hi(0, "WarningMsg", { fg = color.yellow }) + hi(0, "ModeMsg", { fg = color.light_green, bold = true }) + hi(0, "MoreMsg", { fg = color.light_green, bold = true }) + hi(0, "Question", { fg = color.light_green, bold = true }) + + hi(0, "QuickFixLine", { bg = color.cursor_line }) + hi(0, "WildMenu", { bg = color.yellow, fg = color.background }) + + hi(0, "IndentBlanklineChar", { fg = color.medium_gray, nocombine = true }) + hi(0, "IndentBlanklineContextChar", { fg = color.comment, nocombine = true }) + hi(0, "IndentBlanklineContextStart", { sp = color.teal, underline = true }) + hi(0, "IndentBlanklineSpaceChar", { fg = color.medium_gray, nocombine = true }) + + hi(0, "TreesitterContext", { bg = color.cursor_line, italic = true }) + + -- ── Syntax — default color philosophy, xcodedark hex values ────────────── + -- Comment → teal-gray (default: Cyan) + hi(0, "Comment", { fg = color.comment, italic = true }) + -- Constant → purple (default: Magenta) + hi(0, "Constant", { fg = color.purple }) + -- String → purple (default: Magenta — strings = constants in default) + hi(0, "String", { fg = color.purple }) + hi(0, "Character", { fg = color.purple }) + -- Number → light-yellow (default: Magenta, we keep xcode numeric color) + hi(0, "Number", { fg = color.light_yellow }) + hi(0, "Boolean", { fg = color.purple }) + hi(0, "Float", { fg = color.light_yellow }) + -- Identifier/Function → teal/cyan (default: Cyan) + hi(0, "Identifier", { fg = color.teal }) + hi(0, "Function", { fg = color.teal }) + -- Statement/Keyword → yellow bold (default: Yellow bold) + hi(0, "Statement", { fg = color.yellow, bold = true }) + hi(0, "Conditional", { fg = color.yellow, bold = true }) + hi(0, "Repeat", { fg = color.yellow, bold = true }) + hi(0, "Label", { fg = color.yellow, bold = true }) + hi(0, "Operator", { fg = color.light_gray }) + hi(0, "Keyword", { fg = color.yellow, bold = true }) + hi(0, "Exception", { fg = color.yellow, bold = true }) + -- PreProc → pink/magenta (default: Magenta bright) + hi(0, "PreProc", { fg = color.pink }) + hi(0, "Include", { fg = color.pink }) + hi(0, "Define", { fg = color.pink }) + hi(0, "Macro", { fg = color.pink }) + -- Type → green bold (default: Green bold) + hi(0, "Type", { fg = color.green, bold = true }) + hi(0, "StorageClass",{ fg = color.yellow, bold = true }) + hi(0, "Structure", { fg = color.green, bold = true }) + hi(0, "Typedef", { fg = color.green, bold = true }) + -- Special → light-blue/DarkCyan (default: DarkCyan) + hi(0, "Special", { fg = color.light_blue }) + hi(0, "SpecialChar", { fg = color.light_teal }) + hi(0, "Delimiter", { fg = color.light_gray }) + hi(0, "Debug", { fg = color.red }) + hi(0, "Error", { bg = color.red, fg = color.background, bold = true }) + hi(0, "Todo", { bg = color.selection, fg = color.yellow, bold = true }) + hi(0, "Underlined", { fg = color.teal, underline = true }) + hi(0, "Ignore", { fg = color.dark }) + hi(0, "Tag", { fg = color.light_yellow }) + + -- ── Treesitter — respects default's bold/italic conventions ────────────── + hi(0, "TSAnnotation", { fg = color.pink }) + hi(0, "TSAttribute", { fg = color.pink }) + hi(0, "TSBoolean", { fg = color.purple }) + hi(0, "TSCharacter", { fg = color.purple }) + hi(0, "TSComment", { fg = color.comment, italic = true }) + hi(0, "TSConditional", { fg = color.yellow, bold = true }) + hi(0, "TSConstant", { fg = color.purple }) + hi(0, "TSConstBuiltin", { fg = color.purple, italic = true }) + hi(0, "TSConstantBuiltin",{ fg = color.purple, italic = true }) + hi(0, "TSConstMacro", { fg = color.pink }) + hi(0, "TSConstructor", { fg = color.light_blue }) + hi(0, "TSCurrentScope", { bold = true }) + hi(0, "TSDefinition", { sp = color.light_gray, underline = true }) + hi(0, "TSDefinitionUsage",{ sp = color.light_gray, underline = true }) + hi(0, "TSEmphasis", { fg = color.yellow, italic = true }) + hi(0, "TSError", { fg = color.red }) + hi(0, "TSException", { fg = color.yellow, bold = true }) + hi(0, "TSField", { fg = color.foreground }) + hi(0, "TSFloat", { fg = color.light_yellow }) + hi(0, "TSFuncBuiltin", { fg = color.light_teal, bold = true }) + hi(0, "TSFuncMacro", { fg = color.pink }) + hi(0, "TSFunction", { fg = color.teal, bold = true }) -- bold like default Function + hi(0, "TSFunctionCall", { fg = color.teal }) + hi(0, "TSMethodCall", { fg = color.teal }) + hi(0, "TSInclude", { fg = color.pink }) + hi(0, "TSKeyword", { fg = color.yellow, bold = true }) + hi(0, "TSKeywordFunction",{ fg = color.yellow, bold = true }) + hi(0, "TSKeywordOperator",{ fg = color.yellow, bold = true }) + hi(0, "TSLabel", { fg = color.yellow, bold = true }) + hi(0, "TSLiteral", { fg = color.purple }) + hi(0, "TSMethod", { fg = color.teal, bold = true }) + hi(0, "TSNamespace", { fg = color.light_teal }) + hi(0, "TSNone", { fg = color.foreground }) + hi(0, "TSNumber", { fg = color.light_yellow }) + hi(0, "TSOperator", { fg = color.light_gray }) + hi(0, "TSParameter", { fg = color.foreground }) + hi(0, "TSParameterReference",{ fg = color.foreground }) + hi(0, "TSProperty", { fg = color.foreground }) + hi(0, "TSPunctBracket", { fg = color.light_gray }) + hi(0, "TSPunctDelimiter", { fg = color.light_gray }) + hi(0, "TSPunctSpecial", { fg = color.light_teal }) + hi(0, "TSRepeat", { fg = color.yellow, bold = true }) + hi(0, "TSString", { fg = color.purple }) -- strings=magenta in default + hi(0, "TSStringEscape", { fg = color.light_teal }) + hi(0, "TSStringRegex", { fg = color.light_teal }) + hi(0, "TSStrong", { bold = true }) + hi(0, "TSStrike", { fg = color.dark, strikethrough = true }) + hi(0, "TSSymbol", { fg = color.light_green }) + hi(0, "TSTag", { fg = color.yellow, bold = true }) + hi(0, "TSTagDelimiter", { fg = color.light_gray }) + hi(0, "TSText", { fg = color.foreground }) + hi(0, "TSTitle", { fg = color.teal, bold = true }) + hi(0, "TSType", { fg = color.green, bold = true }) + hi(0, "TSTypeBuiltin", { fg = color.green, bold = true, italic = true }) + hi(0, "TSTypeDefinition", { fg = color.green, bold = true }) + hi(0, "TSURI", { fg = color.teal, underline = true }) + hi(0, "TSUnderline", { underline = true }) + hi(0, "TSVariable", { fg = color.foreground }) + hi(0, "TSVariableBuiltin",{ fg = color.light_teal, italic = true }) + + -- ── Statement / Identifier overrides ───────────────────────────────────── + hi(0, "Statement", { link = "TSKeyword" }) + hi(0, "Comment", { link = "TSComment" }) + hi(0, "Number", { link = "TSNumber" }) + hi(0, "String", { link = "TSString" }) + hi(0, "Identifier", { link = "TSVariable" }) + + hi(0, "@lsp.type.keyword.go", { link = "TSKeyword" }) + hi(0, "@lsp.type.string.go", { link = "TSString" }) + hi(0, "@lsp.type.function", { link = "TSFunctionCall" }) + hi(0, "@lsp.typemod.function.definition", { link = "TSFunction" }) + hi(0, "@lsp.type.method", { link = "TSMethod" }) + hi(0, "goBlock", { link = "TSVariable" }) + hi(0, "goImportString", { link = "TSString" }) + + -- ── Diagnostics ─────────────────────────────────────────────────────────── + hi(0, "DiagnosticError", { fg = color.red }) + hi(0, "DiagnosticWarn", { fg = color.yellow }) + hi(0, "DiagnosticInfo", { fg = color.teal }) + hi(0, "DiagnosticHint", { fg = color.light_teal }) + hi(0, "DiagnosticUnderlineError", { sp = color.red, undercurl = true }) + hi(0, "DiagnosticUnderlineWarn", { sp = color.yellow, undercurl = true }) + hi(0, "DiagnosticUnderlineInformation",{ sp = color.teal, undercurl = true }) + hi(0, "DiagnosticUnderlineHint", { sp = color.light_teal, undercurl = true }) + hi(0, "DiagnosticUnderlineWarning", { sp = color.yellow, undercurl = true }) + hi(0, "LspDiagnosticsDefaultError", { link = "DiagnosticError" }) + hi(0, "LspDiagnosticsDefaultHint", { link = "DiagnosticHint" }) + hi(0, "LspDiagnosticsDefaultInformation", { link = "DiagnosticInfo" }) + hi(0, "LspDiagnosticsDefaultWarning", { link = "DiagnosticWarn" }) + hi(0, "LspDiagnosticsUnderlineError", { link = "DiagnosticUnderlineError" }) + hi(0, "LspDiagnosticsUnderlineHint", { link = "DiagnosticUnderlineHint" }) + hi(0, "LspDiagnosticsUnderlineInformation",{ link = "DiagnosticUnderlineInformation" }) + hi(0, "LspDiagnosticsUnderlineWarning", { link = "DiagnosticUnderlineWarning" }) + hi(0, "LspReferenceRead", { sp = color.light_gray, underline = true }) + hi(0, "LspReferenceText", { sp = color.light_gray, underline = true }) + hi(0, "LspReferenceWrite", { sp = color.light_gray, underline = true }) + + -- ── nvim-cmp ────────────────────────────────────────────────────────────── + if M.config.opt.integrations.nvim_cmp then + hi(0, "CmpDocumentation", { fg = color.foreground }) + hi(0, "CmpDocumentationBorder", { fg = color.comment }) + hi(0, "CmpItemAbbr", { fg = color.foreground }) + hi(0, "CmpItemAbbrDeprecated", { fg = color.comment, strikethrough = true }) + hi(0, "CmpItemAbbrMatch", { fg = color.teal, bold = true }) + hi(0, "CmpItemAbbrMatchFuzzy", { fg = color.teal }) + hi(0, "CmpItemKindDefault", { fg = color.teal }) + hi(0, "CmpItemKindClass", { fg = color.green, bold = true }) + hi(0, "CmpItemKindConstant", { fg = color.purple }) + hi(0, "CmpItemKindConstructor", { fg = color.light_blue }) + hi(0, "CmpItemKindEnum", { fg = color.green, bold = true }) + hi(0, "CmpItemKindEnumMember", { fg = color.light_purple }) + hi(0, "CmpItemKindEvent", { fg = color.green }) + hi(0, "CmpItemKindField", { fg = color.foreground }) + hi(0, "CmpItemKindFunction", { fg = color.teal, bold = true }) + hi(0, "CmpItemKindInterface", { fg = color.green }) + hi(0, "CmpItemKindKeyword", { fg = color.yellow, bold = true }) + hi(0, "CmpItemKindMethod", { fg = color.teal, bold = true }) + hi(0, "CmpItemKindModule", { fg = color.foreground }) + hi(0, "CmpItemKindOperator", { fg = color.light_gray }) + hi(0, "CmpItemKindProperty", { fg = color.foreground }) + hi(0, "CmpItemKindReference", { fg = color.foreground }) + hi(0, "CmpItemKindSnippet", { fg = color.light_gray }) + hi(0, "CmpItemKindStruct", { fg = color.green, bold = true }) + hi(0, "CmpItemKindTypeParameter",{ fg = color.light_purple }) + hi(0, "CmpItemKindUnit", { fg = color.light_yellow }) + hi(0, "CmpItemKindValue", { fg = color.purple }) + hi(0, "CmpItemKindVariable", { fg = color.foreground }) + hi(0, "CmpItemMenu", { fg = color.comment }) + end + + -- ── DAP ─────────────────────────────────────────────────────────────────── + if M.config.opt.integrations.dap_nvim then + hi(0, "DapUIBreakpointsCurrentLine", { bold = true, fg = color.light_green }) + hi(0, "DapUIBreakpointsDisabledLine",{ fg = color.comment }) + hi(0, "DapUIBreakpointsInfo", { fg = color.light_green }) + hi(0, "DapUIBreakpointsPath", { fg = color.light_teal }) + hi(0, "DapUIDecoration", { fg = color.light_teal }) + hi(0, "DapUIFloatBorder", { fg = color.light_teal }) + hi(0, "DapUILineNumber", { fg = color.light_teal }) + hi(0, "DapUIModifiedValue", { bold = true, fg = color.light_teal }) + hi(0, "DapUIPlayPause", { fg = color.light_green }) + hi(0, "DapUIPlayPauseNC", { fg = color.light_green }) + hi(0, "DapUIRestart", { fg = color.light_green }) + hi(0, "DapUIRestartNC", { fg = color.light_green }) + hi(0, "DapUIScope", { fg = color.teal }) + hi(0, "DapUISource", { fg = color.light_purple }) + hi(0, "DapUIStepBack", { fg = color.teal }) + hi(0, "DapUIStepBackNC", { fg = color.teal }) + hi(0, "DapUIStepInto", { fg = color.teal }) + hi(0, "DapUIStepIntoNC", { fg = color.teal }) + hi(0, "DapUIStepOut", { fg = color.teal }) + hi(0, "DapUIStepOutNC", { fg = color.teal }) + hi(0, "DapUIStepOver", { fg = color.teal }) + hi(0, "DapUIStepOverNC", { fg = color.teal }) + hi(0, "DapUIStop", { fg = color.red }) + hi(0, "DapUIStopNC", { fg = color.red }) + hi(0, "DapUIStoppedThread", { fg = color.light_teal }) + hi(0, "DapUIThread", { fg = color.light_green }) + hi(0, "DapUIType", { fg = color.light_purple }) + hi(0, "DapUIUnavailable", { fg = color.comment }) + hi(0, "DapUIUnavailableNC", { fg = color.comment }) + hi(0, "DapUIWatchesEmpty", { fg = color.red }) + hi(0, "DapUIWatchesError", { fg = color.red }) + hi(0, "DapUIWatchesValue", { fg = color.light_green }) + end + + -- ── Git ─────────────────────────────────────────────────────────────────── + hi(0, "GitGutterAdd", { fg = color.green }) + hi(0, "GitGutterChange", { fg = color.teal }) + hi(0, "GitGutterChangeDelete", { fg = color.yellow }) + hi(0, "GitGutterDelete", { fg = color.red }) + + hi(0, "GitSignsCurrentLineBlame", { fg = color.comment, italic = true }) + hi(0, "GitSignsStagedAdd", { fg = color.light_green }) + hi(0, "GitSignsStagedChange", { fg = color.teal }) + hi(0, "GitSignsStagedDelete", { fg = color.red }) + + hi(0, "gitcommitBranch", { bold = true, fg = color.yellow }) + hi(0, "gitcommitComment", { fg = color.comment }) + hi(0, "gitcommitDiscarded", { fg = color.comment }) + hi(0, "gitcommitDiscardedFile", { bold = true, fg = color.red }) + hi(0, "gitcommitDiscardedType", { fg = color.teal }) + hi(0, "gitcommitHeader", { fg = color.yellow, bold = true }) + hi(0, "gitcommitOverflow", { fg = color.red }) + hi(0, "gitcommitSelected", { fg = color.comment }) + hi(0, "gitcommitSelectedFile", { bold = true, fg = color.light_green }) + hi(0, "gitcommitSelectedType", { fg = color.teal }) + hi(0, "gitcommitSummary", { fg = color.light_green }) + hi(0, "gitcommitUnmergedFile", { bold = true, fg = color.red }) + hi(0, "gitcommitUnmergedType", { fg = color.teal }) + hi(0, "gitcommitUntracked", { fg = color.comment }) + hi(0, "gitcommitUntrackedFile", { fg = color.light_yellow }) + + -- ── Notify ──────────────────────────────────────────────────────────────── + hi(0, "NotifyDEBUGBody", { link = "Normal" }) + hi(0, "NotifyDEBUGBorder", { fg = color.comment }) + hi(0, "NotifyDEBUGIcon", { fg = color.comment }) + hi(0, "NotifyDEBUGTitle", { fg = color.comment }) + hi(0, "NotifyERRORBody", { link = "Normal" }) + hi(0, "NotifyERRORBorder", { fg = color.red }) + hi(0, "NotifyERRORIcon", { fg = color.red }) + hi(0, "NotifyERRORTitle", { fg = color.red }) + hi(0, "NotifyINFOBody", { link = "Normal" }) + hi(0, "NotifyINFOBorder", { fg = color.light_gray }) + hi(0, "NotifyINFOIcon", { fg = color.light_gray }) + hi(0, "NotifyINFOTitle", { fg = color.light_gray }) + hi(0, "NotifyTRACEBody", { link = "Normal" }) + hi(0, "NotifyTRACEBorder", { fg = color.purple }) + hi(0, "NotifyTRACEIcon", { fg = color.purple }) + hi(0, "NotifyTRACETitle", { fg = color.purple }) + hi(0, "NotifyWARNBody", { link = "Normal" }) + hi(0, "NotifyWARNBorder", { fg = color.yellow }) + hi(0, "NotifyWARNIcon", { fg = color.yellow }) + hi(0, "NotifyWARNTitle", { fg = color.yellow }) + + -- ── Telescope ───────────────────────────────────────────────────────────── + if M.config.opt.integrations.telescope then + hi(0, "TelescopeBorder", { bg = color.dark, fg = color.dark }) + hi(0, "TelescopeNormal", { bg = color.dark }) + hi(0, "TelescopePreviewLine", { bg = color.cursor_line }) + hi(0, "TelescopePreviewTitle", { bg = color.light_green, fg = color.background }) + hi(0, "TelescopePromptBorder", { bg = color.medium_gray, fg = color.medium_gray }) + hi(0, "TelescopePromptNormal", { bg = color.medium_gray, fg = color.foreground }) + hi(0, "TelescopePromptPrefix", { bg = color.medium_gray, fg = color.red }) + hi(0, "TelescopePromptTitle", { bg = color.red, fg = color.background }) + hi(0, "TelescopeResultsTitle", { bg = color.dark, fg = color.dark }) + hi(0, "TelescopeSelection", { bg = color.medium_gray }) + end + + -- ── Snacks Dashboard ────────────────────────────────────────────────────── + hi(0, "SnacksDashboardHeader", { fg = color.yellow, bold = true }) + hi(0, "SnacksDashboardTitle", { fg = color.yellow, bold = true }) + hi(0, "SnacksDashboardIcon", { fg = color.teal }) + hi(0, "SnacksDashboardDesc", { fg = color.light_gray }) + hi(0, "SnacksDashboardFile", { fg = color.light_teal, bold = true }) + hi(0, "SnacksDashboardKey", { fg = color.yellow, bold = true }) + hi(0, "SnacksDashboardSpecial", { fg = color.light_gray }) + hi(0, "SnacksDashboardDir", { fg = color.light_gray }) + hi(0, "SnacksDashboardNormal", { fg = color.light_gray }) + hi(0, "SnacksDashboardTerminal", { fg = color.light_gray }) + hi(0, "SnacksDashboardFooter", { fg = color.comment }) + + -- ── Neo-Tree ────────────────────────────────────────────────────────────── + hi(0, "NeoTreeFileName", { fg = color.foreground }) + hi(0, "NeoTreeDotfile", { fg = color.comment }) + hi(0, "NeoTreeDirectoryName", { fg = color.yellow, bold = true }) + hi(0, "NeoTreeDirectoryIcon", { fg = color.yellow }) + hi(0, "NeoTreeGitModified", { fg = color.yellow }) + hi(0, "NeoTreeGitStaged", { fg = color.green }) + hi(0, "NeoTreeGitUntracked", { fg = color.purple }) + hi(0, "NeoTreeNormal", { fg = color.foreground, bg = color.dark }) + hi(0, "NeoTreeNormalNC", { fg = color.foreground, bg = color.dark }) + hi(0, "NeoTreeTabActive", { fg = color.foreground, bg = color.dark, bold = true }) + hi(0, "NeoTreeTabInactive", { fg = color.comment, bg = color.dark }) + hi(0, "NeoTreeTabSeparatorActive", { fg = color.foreground, bg = color.dark }) + hi(0, "NeoTreeTabSeparatorInactive", { fg = color.comment, bg = color.dark }) + + -- ── Copilot ─────────────────────────────────────────────────────────────── + hi(0, "CopilotSuggestion", { fg = color.comment }) + + -- ── Spell ───────────────────────────────────────────────────────────────── + hi(0, "SpellBad", { sp = color.red, undercurl = true }) + hi(0, "SpellCap", { sp = color.teal, undercurl = true }) + hi(0, "SpellLocal", { sp = color.green, undercurl = true }) + hi(0, "SpellRare", { sp = color.yellow, undercurl = true }) + + -- ── nvim-ts-rainbow ─────────────────────────────────────────────────────── + hi(0, "rainbowcol1", { fg = color.foreground }) + hi(0, "rainbowcol2", { fg = color.yellow }) + hi(0, "rainbowcol3", { fg = color.green }) + hi(0, "rainbowcol4", { fg = color.light_purple }) + hi(0, "rainbowcol5", { fg = color.teal }) + hi(0, "rainbowcol6", { fg = color.pink }) + hi(0, "rainbowcol7", { fg = color.light_teal }) + + -- ── User / StatusLine accents ───────────────────────────────────────────── + hi(0, "User1", { bg = color.selection, fg = color.red }) + hi(0, "User2", { bg = color.selection, fg = color.yellow }) + hi(0, "User3", { bg = color.selection, fg = color.foreground }) + hi(0, "User4", { bg = color.selection, fg = color.teal }) + hi(0, "User5", { bg = color.selection, fg = color.light_gray }) + hi(0, "User6", { bg = color.dark, fg = color.light_gray }) + hi(0, "User7", { bg = color.selection, fg = color.light_gray }) + hi(0, "User8", { bg = color.selection, fg = color.background }) + hi(0, "User9", { bg = color.selection, fg = color.background }) + + -- ── Terminal colors ─────────────────────────────────────────────────────── + local g = vim.g + g.terminal_color_0 = color.background + g.terminal_color_1 = color.red + g.terminal_color_2 = color.green + g.terminal_color_3 = color.yellow + g.terminal_color_4 = color.teal + g.terminal_color_5 = color.purple + g.terminal_color_6 = color.light_teal + g.terminal_color_7 = color.light_gray + g.terminal_color_8 = color.comment + g.terminal_color_9 = color.pink + g.terminal_color_10 = color.light_green + g.terminal_color_11 = color.light_yellow + g.terminal_color_12 = color.light_blue + g.terminal_color_13 = color.light_purple + g.terminal_color_14 = color.blue + g.terminal_color_15 = color.foreground +end + +return M diff --git a/nvim/nvim/build_targets.json b/nvim/nvim/build_targets.json deleted file mode 100644 index c7a9f2a..0000000 --- a/nvim/nvim/build_targets.json +++ /dev/null @@ -1 +0,0 @@ -{"barsic": "cp ~/engine/builddir/pmc2/pmc2-engine bin/.", "build": "meson compile -C builddir pmc2-engine", "test": "meson test -C builddir -v pmc2_tests", "barsic-master": "cp ~/builddir/pmc2/pmc2-engine && make run_alice"} diff --git a/nvim/nvim/init.lua b/nvim/nvim/init.lua deleted file mode 100644 index dd1640b..0000000 --- a/nvim/nvim/init.lua +++ /dev/null @@ -1,11 +0,0 @@ --- Default my settings -vim.g.mapleader = " " -vim.wo.number = true -vim.wo.relativenumber = true -vim.opt.wrap = false - --- Add basic configs -require("configs.lazy") -require("mappings") -require("options") -require("custom.init") diff --git a/nvim/nvim/lazy-lock.json b/nvim/nvim/lazy-lock.json deleted file mode 100644 index 5b634ac..0000000 --- a/nvim/nvim/lazy-lock.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" }, - "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "cmp-async-path": { "branch": "main", "commit": "98185a91d49ff5dd249aebf2f7456e18063fa2a0" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, - "cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, - "duckytype.nvim": { "branch": "main", "commit": "fa59fbd7cf8407337bfe07d01b361a3449f34743" }, - "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" }, - "gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" }, - "gitui.nvim": { "branch": "main", "commit": "686d74e79899af760ed9f5f0ad2bd1bb1c135e26" }, - "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "log-highlight.nvim": { "branch": "main", "commit": "b2e00cfd41ca94338265a595f3f3f423d9f9322e" }, - "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, - "marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "0a695750d747db1e7e70bcf0267ef8951c95fc83" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, - "mason.nvim": { "branch": "main", "commit": "16ba83bfc8a25f52bb545134f5bee082b195c460" }, - "mini.nvim": { "branch": "main", "commit": "a995fe9cd4193fb492b5df69175a351a74b3d36b" }, - "mini.pairs": { "branch": "main", "commit": "30cf2f01c4aaa2033db67376b9924fa2442c05d6" }, - "neotest": { "branch": "master", "commit": "ad991822b7076b1d940b33a9d6d0d30416d5df81" }, - "neotest-gtest": { "branch": "main", "commit": "b66f1d33cbf3b37b9803e6bc7ef47ac60eba86b1" }, - "neotest-phpunit": { "branch": "main", "commit": "40e53c4294726a16f34f1a383a94c570553c6d46" }, - "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, - "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" }, - "nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" }, - "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, - "nvim-lspconfig": { "branch": "master", "commit": "ed19590a3a9792901553c388d1aadafce012f80d" }, - "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" }, - "nvim-tree.lua": { "branch": "master", "commit": "82f58063d67defc620e1ef8be606fc62a7b5dc1e" }, - "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, - "nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" }, - "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, - "persisted.nvim": { "branch": "main", "commit": "1a8e9dcf277d61105619498b2002c287c50424b8" }, - "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, - "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, - "screenkey.nvim": { "branch": "main", "commit": "16390931d847b1d5d77098daccac4e55654ac9e2" }, - "snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" }, - "telescope.nvim": { "branch": "master", "commit": "7d324792b7943e4aa16ad007212e6acc6f9fe335" }, - "vim-highlightedyank": { "branch": "master", "commit": "285a61425e79742997bbde76a91be6189bc988fb" }, - "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } -} diff --git a/nvim/nvim/lua/configs/bufferline.lua b/nvim/nvim/lua/configs/bufferline.lua deleted file mode 100644 index 5eb2748..0000000 --- a/nvim/nvim/lua/configs/bufferline.lua +++ /dev/null @@ -1,81 +0,0 @@ -local bufferline = require('bufferline') -bufferline.setup { - options = { - mode = "buffers", -- set to "tabs" to only show tabpages instead - style_preset = bufferline.style_preset.default, - themable = true, - indicator = { - icon = '▎', - style = 'icon', - }, - groups = { - items = { - { - name = 'tornado', - matcher = function(buf) - return (buf.path or ""):lower():match("tornado") - end, - }, - { - name = 'gornado', - matcher = function(buf) - return (buf.path or ""):lower():match("gornado") - end, - }, - { - name = 'tests', - matcher = function(buf) - return (buf.name or ""):lower():match("*test*%.cpp$") - end, - }, - { - name = 'code', - matcher = function(buf) - return (buf.name or ""):lower():match("%.h$") - or (buf.name or ""):lower():match("%.c$") - or (buf.name or ""):lower():match("%.cpp$") - end, - }, - }, - hidden = false, - }, - buffer_close_icon = '󰅖', - modified_icon = '● ', - close_icon = ' ', - left_trunc_marker = ' ', - right_trunc_marker = ' ', - max_name_length = 18, - max_prefix_length = 15, - truncate_names = true, - tab_size = 18, - offsets = { - { - filetype = "NvimTree", - text = "File Explorer", - text_align = "left", - separator = true - } - }, - color_icons = true, - get_element_icon = function(element) - local icon, hl = require('nvim-web-devicons').get_icon_by_filetype(element.filetype, { default = false }) - return icon, hl - end, - show_buffer_icons = true, - show_buffer_close_icons = true, - show_close_icon = true, - show_tab_indicators = true, - separator_style = "slant", - enforce_regular_tabs = false, - always_show_bufferline = true, - auto_toggle_bufferline = true, - hover = { - enabled = true, - delay = 200, - reveal = {'close'} - }, - pick = { - alphabet = "abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ1234567890", - }, - } -} diff --git a/nvim/nvim/lua/configs/cmp.lua b/nvim/nvim/lua/configs/cmp.lua deleted file mode 100644 index e576e37..0000000 --- a/nvim/nvim/lua/configs/cmp.lua +++ /dev/null @@ -1,55 +0,0 @@ -local cmp = require "cmp" - -local options = { - completion = { completeopt = "menu,menuone" }, - - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - - mapping = { - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.close(), - - [""] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Insert, - select = true, - }, - - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then - require("luasnip").expand_or_jump() - else - fallback() - end - end, { "i", "s" }), - - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then - require("luasnip").jump(-1) - else - fallback() - end - end, { "i", "s" }), - }, - - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "buffer" }, - { name = "nvim_lua" }, - { name = "async_path" }, - }, -} - -return vim.tbl_deep_extend("force", options, {}) diff --git a/nvim/nvim/lua/configs/conform.lua b/nvim/nvim/lua/configs/conform.lua deleted file mode 100644 index 9167dfe..0000000 --- a/nvim/nvim/lua/configs/conform.lua +++ /dev/null @@ -1,14 +0,0 @@ -require('conform').setup({ - formatters_by_ft = { - lua = { "stylua" }, - cpp = { "clang-format" }, - go = { "gofmr" }, - }, - - format_on_save = { - -- These options will be passed to conform.format() - timeout_ms = 500, - lsp_fallback = true, - }, - notify_on_error = true, -}) diff --git a/nvim/nvim/lua/configs/gitsigns.lua b/nvim/nvim/lua/configs/gitsigns.lua deleted file mode 100644 index d911b56..0000000 --- a/nvim/nvim/lua/configs/gitsigns.lua +++ /dev/null @@ -1,53 +0,0 @@ -return { - signs = { - add = { text = "▎" }, - change = { text = "▎" }, - delete = { text = "" }, - topdelete = { text = "" }, - changedelete = { text = "▎" }, - untracked = { text = "▎" }, - }, - signs_staged = { - add = { text = "▎" }, - change = { text = "▎" }, - delete = { text = "" }, - topdelete = { text = "" }, - changedelete = { text = "▎" }, - }, - on_attach = function(buffer) - local gs = package.loaded.gitsigns - - local function map(mode, l, r, desc) - vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc, silent = true }) - end - - -- stylua: ignore start - map("n", "]h", function() - if vim.wo.diff then - vim.cmd.normal({ "]c", bang = true }) - else - gs.nav_hunk("next") - end - end, "Next Hunk") - map("n", "[h", function() - if vim.wo.diff then - vim.cmd.normal({ "[c", bang = true }) - else - gs.nav_hunk("prev") - end - end, "Prev Hunk") - map("n", "]H", function() gs.nav_hunk("last") end, "Last Hunk") - map("n", "[H", function() gs.nav_hunk("first") end, "First Hunk") - map({ "n", "x" }, "ghs", ":Gitsigns stage_hunk", "Stage Hunk") - map({ "n", "x" }, "ghr", ":Gitsigns reset_hunk", "Reset Hunk") - map("n", "ghS", gs.stage_buffer, "Stage Buffer") - map("n", "ghu", gs.undo_stage_hunk, "Undo Stage Hunk") - map("n", "ghR", gs.reset_buffer, "Reset Buffer") - map("n", "ghp", gs.preview_hunk_inline, "Preview Hunk Inline") - map("n", "ghb", function() gs.blame_line({ full = true }) end, "Blame Line") - map("n", "ghB", function() gs.blame() end, "Blame Buffer") - map("n", "ghd", gs.diffthis, "Diff This") - map("n", "ghD", function() gs.diffthis("~") end, "Diff This ~") - map({ "o", "x" }, "ih", ":Gitsigns select_hunk", "GitSigns Select Hunk") - end, -} diff --git a/nvim/nvim/lua/configs/lazy.lua b/nvim/nvim/lua/configs/lazy.lua deleted file mode 100644 index f533341..0000000 --- a/nvim/nvim/lua/configs/lazy.lua +++ /dev/null @@ -1,26 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - -vim.g.mapleader = " " -vim.g.maplocalleader = "\\" - -require("lazy").setup({ - spec = { - { import = "plugins" }, - }, - install = { colorscheme = { "habamax" } }, - checker = { enabled = true }, -}) diff --git a/nvim/nvim/lua/configs/lsp/e-lspconfig.lua b/nvim/nvim/lua/configs/lsp/e-lspconfig.lua deleted file mode 100644 index 48c2f29..0000000 --- a/nvim/nvim/lua/configs/lsp/e-lspconfig.lua +++ /dev/null @@ -1,55 +0,0 @@ -local M = {} -local map = vim.keymap.set - --- export on_attach & capabilities -M.on_attach = function(_, bufnr) - local function opts(desc) - return { buffer = bufnr, desc = "LSP " .. desc } - end - - map("n", "gD", vim.lsp.buf.declaration, opts "Go to declaration") - map("n", "gd", vim.lsp.buf.definition, opts "Go to definition") - map("n", "wa", vim.lsp.buf.add_workspace_folder, opts "Add workspace folder") - map("n", "wr", vim.lsp.buf.remove_workspace_folder, opts "Remove workspace folder") - - map("n", "wl", function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts "List workspace folders") - - map("n", "D", vim.lsp.buf.type_definition, opts "Go to type definition") -end - --- disable semanticTokens -M.on_init = function(client, _) - if vim.fn.has "nvim-0.11" ~= 1 then - if client.supports_method "textDocument/semanticTokens" then - client.server_capabilities.semanticTokensProvider = nil - end - else - if client:supports_method "textDocument/semanticTokens" then - client.server_capabilities.semanticTokensProvider = nil - end - end -end - -M.capabilities = vim.lsp.protocol.make_client_capabilities() - -M.capabilities.textDocument.completion.completionItem = { - documentationFormat = { "markdown", "plaintext" }, - snippetSupport = true, - preselectSupport = true, - insertReplaceSupport = true, - labelDetailsSupport = true, - deprecatedSupport = true, - commitCharactersSupport = true, - tagSupport = { valueSet = { 1 } }, - resolveSupport = { - properties = { - "documentation", - "detail", - "additionalTextEdits", - }, - }, -} - -return M diff --git a/nvim/nvim/lua/configs/lsp/lspconfig.lua b/nvim/nvim/lua/configs/lsp/lspconfig.lua deleted file mode 100644 index 1d983f8..0000000 --- a/nvim/nvim/lua/configs/lsp/lspconfig.lua +++ /dev/null @@ -1,111 +0,0 @@ -local on_attach = require("configs.lsp.e-lspconfig").on_attach -local on_init = require("configs.lsp.e-lspconfig").on_init -local capabilities = require("configs.lsp.e-lspconfig").capabilities - --- C/C++ -vim.lsp.config('clangd', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { - "clangd-22", - "--clang-tidy", - }, - filetypes = { "c", "cpp", "h", "hpp", "objc", "objcpp" }, - root_markers = { '.git' }, -}) -vim.lsp.enable('clangd') - --- Go (gopls) lsp server -vim.lsp.config('gopls', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'gopls' }, - filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' }, - root_markers = { 'go.mod', '.git' }, - single_file_support = true, - settings = { - gopls = { - completeUnimported = true, - usePlaceholders = true, - analyses = { - unusedparams = true, - }, - staticcheck = true, - gofumpt = true, - }, - }, -}) -vim.lsp.enable('gopls') - --- PhP -vim.lsp.config('phpactor', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'phpactor', 'language-server' }, - filetypes = { 'php' }, - root_markers = { 'composer.json', '.git' }, - init_options = { - ["language_server_phpstan.enabled"] = false, - ["language_server_psalm.enabled"] = false, - } -}) -vim.lsp.enable('phpactor') - --- Lua -vim.lsp.config('lua_ls', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'lua-language-server' }, - filetypes = { 'lua' }, - root_markers = { '.luarc.json', '.luarc.jsonc', '.git' }, - single_file_support = true, - settings = { - Lua = { - telemetry = { enable = false }, - runtime = { version = 'LuaJIT' }, - diagnostics = { globals = { 'vim' } }, - workspace = { - checkThirdParty = false, - library = { - vim.env.VIMRUNTIME, - vim.fn.stdpath('config'), - }, - }, - }, - } -}) -vim.lsp.enable('lua_ls') - --- Bash -vim.lsp.config('bashls', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'bash-language-server', 'start' }, - filetypes = { 'sh', 'bash' }, - root_markers = { '.git' }, - single_file_support = true, -}) -vim.lsp.enable('bashls') - --- Meson -vim.lsp.config('meson_ls', { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - cmd = { 'mesonlsp' }, - filetypes = { 'meson' }, - root_markers = { 'meson.build', '.git' }, - single_file_support = true, - settings = {} -}) -vim.lsp.enable('meson_ls') - --- For all -vim.diagnostic.config({ - virtual_text = false, -}) diff --git a/nvim/nvim/lua/configs/lualine.lua b/nvim/nvim/lua/configs/lualine.lua deleted file mode 100644 index d20bc9c..0000000 --- a/nvim/nvim/lua/configs/lualine.lua +++ /dev/null @@ -1,54 +0,0 @@ -require('lualine').setup { - options = { - icons_enabled = true, - theme = 'auto', - component_separators = { left = '', right = '' }, - section_separators = { left = '', right = '' }, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - always_show_tabline = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - refresh_time = 16, -- ~60fps - events = { - 'WinEnter', - 'BufEnter', - 'BufWritePost', - 'SessionLoadPost', - 'FileChangedShellPost', - 'VimResized', - 'Filetype', - 'CursorMoved', - 'CursorMovedI', - 'ModeChanged', - }, - } - }, - sections = { - lualine_a = { 'mode' }, - lualine_b = { 'branch', 'diff', 'diagnostics' }, - lualine_c = { 'filename' }, - lualine_x = { 'fileformat', 'filetype' }, - lualine_y = { 'lsp_status' }, - lualine_z = { 'location' } - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { 'filename' }, - lualine_x = { 'location' }, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} -} diff --git a/nvim/nvim/lua/configs/luasnip.lua b/nvim/nvim/lua/configs/luasnip.lua deleted file mode 100644 index ef53ac6..0000000 --- a/nvim/nvim/lua/configs/luasnip.lua +++ /dev/null @@ -1,11 +0,0 @@ --- vscode format -require("luasnip.loaders.from_vscode").lazy_load { exclude = vim.g.vscode_snippets_exclude or {} } -require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" } - --- snipmate format -require("luasnip.loaders.from_snipmate").load() -require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" } - --- lua format -require("luasnip.loaders.from_lua").load() -require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" } diff --git a/nvim/nvim/lua/configs/nvim-dap.lua b/nvim/nvim/lua/configs/nvim-dap.lua deleted file mode 100644 index d7aec4f..0000000 --- a/nvim/nvim/lua/configs/nvim-dap.lua +++ /dev/null @@ -1,94 +0,0 @@ -local M = {} - -function M.setup() - local dap = require("dap") - local dapui = require("dapui") - - -- Настройка адаптера codelldb для C/C++ - dap.adapters.codelldb = { - type = 'server', - port = '${port}', - executable = { - command = vim.fn.stdpath("data") .. '/mason/bin/codelldb', - args = { '--port', '${port}' }, - env = { - ASAN_OPTIONS = "ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1", - }, - } - } - - -- Конфигурации для C/C++ - dap.configurations.cpp = { - { - name = "Launch file", - type = "codelldb", - request = "launch", - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - args = {}, - }, - } - - -- Используем те же конфигурации для C - dap.configurations.c = dap.configurations.cpp - - -- Настройка dap-ui :cite[1]:cite[4] - dapui.setup({ - layouts = { - { - elements = { - { id = "scopes", size = 0.33 }, - { id = "stacks", size = 0.25 }, - { id = "watches", size = 0.25 }, - }, - size = 0.33, - position = "right", - }, - { - elements = { - { id = "console", size = 0.55 }, - }, - size = 0.67, - position = "bottom", - }, - }, - }) - - -- Автоматическое открытие/закрытие UI :cite[1]:cite[9] - dap.listeners.after.event_initialized["dapui_config"] = function() - dapui.open({}) - end - - dap.listeners.before.event_terminated["dapui_config"] = function() - dapui.close({}) - end - - dap.listeners.before.event_exited["dapui_config"] = function() - dapui.close({}) - end - - -- Цвета на задний фон для debug - vim.api.nvim_set_hl(0, 'DapBreakpoint', { fg = '#993939', bg = '#31353f' }) - vim.api.nvim_set_hl(0, 'DapLogPoint', { fg = '#61afef', bg = '#31353f' }) - vim.api.nvim_set_hl(0, 'DapStopped', { fg = '#98c379', bg = '#31353f' }) - -- Настройка значков для точек останова :cite[1]:cite[10] - vim.fn.sign_define('DapBreakpoint', { - text = '', - texthl = 'DapBreakpoint', - linehl = 'DapBreakpoint', - numhl = - 'DapBreakpoint' - }) - vim.fn.sign_define('DapBreakpointCondition', - { text = 'ﳁ', texthl = 'DapBreakpoint', linehl = 'DapBreakpoint', numhl = 'DapBreakpoint' }) - vim.fn.sign_define('DapBreakpointRejected', - { text = '', texthl = 'DapBreakpoint', linehl = 'DapBreakpoint', numhl = 'DapBreakpoint' }) - vim.fn.sign_define('DapLogPoint', { text = '', texthl = 'DapLogPoint', linehl = 'DapLogPoint', numhl = 'DapLogPoint' }) - vim.fn.sign_define('DapStopped', { text = '', texthl = 'DapStopped', linehl = 'DapStopped', numhl = 'DapStopped' }) - vim.fn.sign_define("DapBreakpointRejected", { text = "❌", texthl = "LspDiagnosticsSignHint" }) -end - -return M diff --git a/nvim/nvim/lua/configs/nvimtree.lua b/nvim/nvim/lua/configs/nvimtree.lua deleted file mode 100644 index 49be810..0000000 --- a/nvim/nvim/lua/configs/nvimtree.lua +++ /dev/null @@ -1,105 +0,0 @@ --- return { --- filters = { dotfiles = false, git_ignored = false, }, --- disable_netrw = true, --- hijack_cursor = true, --- sync_root_with_cwd = true, --- update_focused_file = { --- enable = true, --- update_root = false, --- }, --- bookmarks = { --- persist = true, --- }, --- view = { --- width = 30, --- preserve_window_proportions = true, --- }, --- renderer = { --- root_folder_label = false, --- highlight_git = true, --- indent_markers = { enable = true }, --- icons = { --- glyphs = { --- default = "󰈚", --- folder = { --- default = "", --- empty = "", --- empty_open = "", --- open = "", --- symlink = "", --- }, --- git = { unmerged = "" }, --- }, --- }, --- }, --- } -return { - filters = { - dotfiles = false, - git_ignored = false, - }, - - disable_netrw = true, - hijack_cursor = true, - sync_root_with_cwd = true, - - update_focused_file = { - enable = true, - update_root = false, - }, - - bookmarks = { - persist = true, - }, - - git = { - enable = true, - ignore = false, - timeout = 5000, - }, - - - view = { - width = 30, - preserve_window_proportions = true, - }, - - renderer = { - root_folder_label = false, - highlight_git = "all", - - indent_markers = { - enable = true, - }, - - icons = { - show = { - git = true, - modified = false, - file = true, - folder = true, - folder_arrow = true, - }, - - glyphs = { - default = "󰈚", - folder = { - default = "", - empty = "", - empty_open = "", - open = "", - symlink = "", - }, - git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★", - deleted = "", - ignored = "◌", - }, - }, - }, - }, -} diff --git a/nvim/nvim/lua/configs/telescope.lua b/nvim/nvim/lua/configs/telescope.lua deleted file mode 100644 index ee5a959..0000000 --- a/nvim/nvim/lua/configs/telescope.lua +++ /dev/null @@ -1,22 +0,0 @@ -require("telescope").setup(){ - defaults = { - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - sorting_strategy = "ascending", - layout_config = { - horizontal = { - prompt_position = "top", - preview_width = 0.55, - }, - width = 0.87, - height = 0.80, - }, - mappings = { - n = { ["q"] = require("telescope.actions").close }, - }, - }, - - extensions_list = { "themes", "terms", "noice", "persisted" }, - extensions = { "noice", "persisted" }, -} diff --git a/nvim/nvim/lua/configs/ufo.lua b/nvim/nvim/lua/configs/ufo.lua deleted file mode 100644 index 2f54ac3..0000000 --- a/nvim/nvim/lua/configs/ufo.lua +++ /dev/null @@ -1,21 +0,0 @@ -vim.o.foldcolumn = '1' -- '0' is not bad -vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value -vim.o.foldlevelstart = 99 -vim.o.foldenable = true - --- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself -vim.keymap.set('n', 'zR', require('ufo').openAllFolds) -vim.keymap.set('n', 'zM', require('ufo').closeAllFolds) -vim.keymap.set('n', 'zK', function() - local winid = require('ufo').peekFoldedLinesUnderCursor() - if not winid then - vim.lsp.buf.hover() - end -end, {desc = "Peek Fold"}) - -require("ufo").setup({ - provider_selector = function(bufnr, filetype, buftype) - return { 'lsp', 'indent' } - end -}) - diff --git a/nvim/nvim/lua/custom/init.lua b/nvim/nvim/lua/custom/init.lua deleted file mode 100644 index 1cdd773..0000000 --- a/nvim/nvim/lua/custom/init.lua +++ /dev/null @@ -1,30 +0,0 @@ --- ========== Telescope ============= -- -require("telescope").load_extension("noice") -require("telescope.themes").get_dropdown() - - --- ========== Theme ============= -- -require("custom.darcula").setup() - --- ========== Make ============= -- -require("custom.make") - --- ========== Formating ============= -- --- vim.api.nvim_create_autocmd("BufWritePre", { --- pattern = { "*.c", "*.cpp", "*.h", "*.hpp", "*.go" }, --- callback = function() --- vim.lsp.buf.format() --- end, --- }) - --- ========== Clipboard ============= -- -vim.o.clipboard = "unnamedplus" -vim.api.nvim_create_autocmd("TextYankPost", { - callback = function() - -- vim.highlight.on_yank() - local copy_to_unnamedplus = require("vim.ui.clipboard.osc52").copy("+") - copy_to_unnamedplus(vim.v.event.regcontents) - local copy_to_unnamed = require("vim.ui.clipboard.osc52").copy("*") - copy_to_unnamed(vim.v.event.regcontents) - end, -}) diff --git a/nvim/nvim/lua/custom/make.lua b/nvim/nvim/lua/custom/make.lua deleted file mode 100644 index a97b473..0000000 --- a/nvim/nvim/lua/custom/make.lua +++ /dev/null @@ -1,184 +0,0 @@ -_G.last_make_command = nil -_G.make_terminal_buf = nil -_G.build_targets = {} - -local config_file = vim.fn.stdpath('config') .. '/build_targets.json' - --- Загрузка таргетов из файла -local function load_targets() - local ok, data = pcall(vim.fn.readfile, config_file) - if ok and data[1] then - _G.build_targets = vim.fn.json_decode(data[1]) - else - _G.build_targets = {} - end -end - --- Сохранение таргетов в файл -local function save_targets() - local data = vim.fn.json_encode(_G.build_targets) - vim.fn.writefile({data}, config_file) -end - --- Загружаем таргеты при старте -load_targets() - -local function run_make_command(command) - if _G.make_terminal_buf and vim.api.nvim_buf_is_valid(_G.make_terminal_buf) then - vim.cmd('buffer ' .. _G.make_terminal_buf) - else - vim.cmd('terminal') - _G.make_terminal_buf = vim.api.nvim_get_current_buf() - end - vim.cmd('startinsert') - vim.defer_fn(function() - if vim.b.terminal_job_id then - vim.fn.chansend(vim.b.terminal_job_id, "clear\n") - vim.fn.chansend(vim.b.terminal_job_id, command .. "\n") - end - end, 300) -end - --- Основная команда сборки (оставьте вашу текущую) -vim.api.nvim_create_user_command('Build', function() - vim.ui.input({ - prompt = 'Флаги сборки: ', - default = '', - }, function(flags) - if flags == nil then return end - vim.ui.input({ - prompt = 'Имя проекта: ', - default = '', - }, function(project_name) - if project_name == nil then return end - local make_cmd = "meson compile" .. flags .. " " .. project_name - _G.last_make_command = make_cmd - run_make_command(make_cmd) - vim.notify("🔨 Сборка запущена: " .. make_cmd) - end) - end) -end, { - desc = "Сборка проекта в терминале" -}) - -vim.api.nvim_create_user_command('TargetNew', function() - vim.ui.input({ - prompt = 'Название таргета: ', - default = '', - }, function(target_name) - if target_name == nil or target_name == '' then return end - vim.ui.input({ - prompt = 'Команда сборки для "' .. target_name .. '": ', - default = '', - }, function(build_command) - if build_command == nil or build_command == '' then return end - _G.build_targets[target_name] = build_command - save_targets() - vim.notify("✅ Таргет '" .. target_name .. "' сохранен") - end) - end) -end, { - desc = "Создать новый таргет сборки" -}) - --- ПЕРЕПИСАННАЯ команда для выбора таргета с использованием vim.ui.select -vim.api.nvim_create_user_command('Target', function() - local target_count = 0 - for _ in pairs(_G.build_targets) do - target_count = target_count + 1 - end - if target_count == 0 then - vim.notify("❌ Нет сохраненных таргетов. Используйте :TargetNew", vim.log.levels.ERROR) - return - end - -- Подготавливаем список для vim.ui.select - local targets_list = {} - for name, cmd in pairs(_G.build_targets) do - table.insert(targets_list, { - name = name, - cmd = cmd, - -- Форматируем для красивого отображения - display = string.format("🔨 %s\n 📝 %s", name, cmd) - }) - end - -- Сортируем по имени - table.sort(targets_list, function(a, b) return a.name < b.name end) - vim.ui.select(targets_list, { - prompt = '📋 Выберите таргет сборки:', - format_item = function(item) - return item.display - end, - }, function(selected) - if not selected then - vim.notify("❌ Выбор отменен", vim.log.levels.WARN) - return - end - _G.last_make_command = selected.cmd - run_make_command(selected.cmd) - vim.notify("🔨 Запускаю: " .. selected.cmd) - end) -end, { - desc = "Выбрать таргет сборки" -}) - --- Команда для просмотра всех таргетов -vim.api.nvim_create_user_command('TargetList', function() - local target_count = 0 - for _ in pairs(_G.build_targets) do - target_count = target_count + 1 - end - if target_count == 0 then - print("📝 Список таргетов пуст") - return - end - print("📋 Сохраненные таргеты сборки:") - local targets_list = {} - for name, cmd in pairs(_G.build_targets) do - table.insert(targets_list, { name = name, cmd = cmd }) - end - table.sort(targets_list, function(a, b) return a.name < b.name end) - for i, target in ipairs(targets_list) do - print(string.format(" %d. %s → %s", i, target.name, target.cmd)) - end -end, { - desc = "Показать список всех таргетов" -}) - --- Команда для удаления таргета (уже использует vim.ui.select - оставляем как есть) -vim.api.nvim_create_user_command('TargetDelete', function() - local target_count = 0 - for _ in pairs(_G.build_targets) do - target_count = target_count + 1 - end - if target_count == 0 then - vim.notify("❌ Нет сохраненных таргетов", vim.log.levels.ERROR) - return - end - local targets_list = {} - for name, cmd in pairs(_G.build_targets) do - table.insert(targets_list, name) - end - table.sort(targets_list) - vim.ui.select(targets_list, { - prompt = 'Выберите таргет для удаления:', - }, function(selected) - if not selected then return end - _G.build_targets[selected] = nil - save_targets() - vim.notify("🗑️ Таргет '" .. selected .. "' удален") - end) -end, { - desc = "Удалить таргет сборки" -}) - --- Повтор последней сборки (оставьте вашу текущую) -vim.api.nvim_create_user_command('LastBuild', function() - if _G.last_make_command then - run_make_command(_G.last_make_command) - vim.notify("🔁 Повторяю: " .. _G.last_make_command) - else - vim.notify("❌ Нет истории сборок", vim.log.levels.ERROR) - end -end, { - desc = "Повторить последнюю сборку в терминале" -}) diff --git a/nvim/nvim/lua/custom/timetracker.lua b/nvim/nvim/lua/custom/timetracker.lua deleted file mode 100644 index 53638c1..0000000 --- a/nvim/nvim/lua/custom/timetracker.lua +++ /dev/null @@ -1,234 +0,0 @@ -local M = {} - -local uv = vim.loop -local data_dir = vim.fn.stdpath("data") .. "/time_tracker" -local stats_file = data_dir .. "/stats.json" -local heartbeat_file = data_dir .. "/heartbeat_" .. vim.fn.getpid() - -local timer = nil -local last_tick = os.time() - --------------------------------------------------- --- Utils --------------------------------------------------- - -local function ensure_dir() - vim.fn.mkdir(data_dir, "p") -end - -local function read_stats() - local f = io.open(stats_file, "r") - if not f then return {} end - local content = f:read("*a") - f:close() - return vim.json.decode(content) or {} -end - -local function write_stats(data) - local f = io.open(stats_file, "w") - if not f then return end - f:write(vim.json.encode(data)) - f:close() -end - -local function format_time(seconds) - local h = math.floor(seconds / 3600) - local m = math.floor((seconds % 3600) / 60) - return string.format("%dh %dm", h, m) -end - -local function current_filetype() - return vim.bo.filetype ~= "" and vim.bo.filetype or "unknown" -end - --------------------------------------------------- --- Time tracking --------------------------------------------------- - -local function update_heartbeat() - local f = io.open(heartbeat_file, "w") - if f then - f:write(os.time()) - f:close() - end -end - -local function add_time(seconds) - local stats = read_stats() - local date = os.date("%Y-%m-%d") - local ft = current_filetype() - - stats[date] = stats[date] or { total = 0, languages = {} } - stats[date].total = stats[date].total + seconds - stats[date].languages[ft] = - (stats[date].languages[ft] or 0) + seconds - - write_stats(stats) -end - -local function start_timer() - timer = uv.new_timer() - timer:start(0, 5000, vim.schedule_wrap(function() - local now = os.time() - local diff = now - last_tick - last_tick = now - - update_heartbeat() - add_time(diff) - end)) -end - -local function cleanup() - os.remove(heartbeat_file) -end - --------------------------------------------------- --- :TimeToday --------------------------------------------------- - -local function show_today() - local stats = read_stats() - local today = os.date("%Y-%m-%d") - local data = stats[today] - - if not data then - vim.notify("No activity today 🚀", vim.log.levels.INFO) - return - end - - local lines = {} - table.insert(lines, "📅 " .. today) - table.insert(lines, "") - table.insert(lines, "Total: " .. format_time(data.total)) - table.insert(lines, "") - table.insert(lines, "Languages:") - - for lang, time in pairs(data.languages) do - table.insert(lines, string.format(" %s: %s", lang, format_time(time))) - end - - vim.notify(table.concat(lines, "\n"), vim.log.levels.INFO, { - title = "Nvim Time Tracker", - }) -end - --------------------------------------------------- --- Heatmap --------------------------------------------------- - -local function setup_highlights() - vim.api.nvim_set_hl(0, "TimeHeat0", { fg = "#2d333b" }) - vim.api.nvim_set_hl(0, "TimeHeat1", { fg = "#0e4429" }) - vim.api.nvim_set_hl(0, "TimeHeat2", { fg = "#006d32" }) - vim.api.nvim_set_hl(0, "TimeHeat3", { fg = "#26a641" }) - vim.api.nvim_set_hl(0, "TimeHeat4", { fg = "#39d353" }) -end - -local function get_level(seconds) - if seconds == 0 then return 0 end - if seconds < 1800 then return 1 end - if seconds < 7200 then return 2 end - if seconds < 14400 then return 3 end - return 4 -end - -local function build_matrix() - local stats = read_stats() - local matrix = {} - - for w = 1, 53 do - matrix[w] = {} - for d = 1, 7 do - matrix[w][d] = 0 - end - end - - local today = os.time() - - for i = 0, 364 do - local ts = today - i * 86400 - local date = os.date("%Y-%m-%d", ts) - local weekday = tonumber(os.date("%w", ts)) - weekday = weekday == 0 and 7 or weekday - - local week = math.floor((364 - i) / 7) + 1 - if week <= 53 then - matrix[week][weekday] = - stats[date] and stats[date].total or 0 - end - end - - return matrix -end - -local function show_year() - setup_highlights() - local matrix = build_matrix() - - local buf = vim.api.nvim_create_buf(false, true) - - local lines = {} - table.insert(lines, " 📈 Nvim Activity — Last 365 Days") - table.insert(lines, "") - - for day = 1, 7 do - local line = "" - for week = 1, 53 do - line = line .. "██" - end - table.insert(lines, line) - end - - vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines) - - for day = 1, 7 do - for week = 1, 53 do - local seconds = matrix[week][day] - local level = get_level(seconds) - - vim.api.nvim_buf_add_highlight( - buf, - -1, - "TimeHeat" .. level, - day + 1, - (week - 1) * 2, - (week - 1) * 2 + 2 - ) - end - end - - local width = 53 * 2 + 4 - local height = 10 - - local win = vim.api.nvim_open_win(buf, true, { - relative = "editor", - width = width, - height = height, - row = math.floor((vim.o.lines - height) / 2), - col = math.floor((vim.o.columns - width) / 2), - style = "minimal", - border = "rounded", - }) - - vim.keymap.set("n", "q", function() - vim.api.nvim_win_close(win, true) - end, { buffer = buf }) -end - --------------------------------------------------- --- Setup --------------------------------------------------- - -function M.setup() - ensure_dir() - start_timer() - - vim.api.nvim_create_user_command("TimeToday", show_today, {}) - vim.api.nvim_create_user_command("TimeYear", show_year, {}) - - vim.api.nvim_create_autocmd("VimLeavePre", { - callback = cleanup, - }) -end - -return M diff --git a/nvim/nvim/lua/mappings.lua b/nvim/nvim/lua/mappings.lua deleted file mode 100644 index 256e130..0000000 --- a/nvim/nvim/lua/mappings.lua +++ /dev/null @@ -1,114 +0,0 @@ -local map = vim.keymap.set - --- ========== Basics =========== -- -map("n", ";", ":", { desc = "CMD enter command mode" }) -map("i", "jk", "") -map("n", "t", "terminal", { desc = "Create new terminal" }) -map("t", "jk", "") -map("n", "h", "s | terminal | i"); - --- ========== Debug =========== -- -map('n', 'db', 'DapToggleBreakpoint', { desc = 'Toggle breakpoint' }) -map('n', 'dr', 'DapContinue', { desc = 'Start/continue debug' }) -map('n', 'ds', 'DapStepOver', { desc = 'Step over' }) -map('n', 'di', 'DapStepInto', { desc = 'Step into' }) -map('n', 'do', 'DapStepOut', { desc = 'Step out' }) -map('n', 'dq', 'DapTerminate', { desc = 'Stop debug' }) -map('n', 'du', 'lua require("dapui").toggle()', { desc = 'Toggle DAP UI' }) - --- ========== LSP =========== -- -map('n', 'lo', 'lua vim.diagnostic.open_float()', - { noremap = true, silent = true, desc = 'Open diagnostic' }) -map("n", "ll", 'lua vim.lsp.buf.code_action()', - { noremap = true, silent = true, desc = 'Show complete by lsp' }) -map('n', '[l', 'DapContinue', { noremap = true, silent = true, desc = 'Go to prev diagnostic' }) -map('n', ']l', 'DapStepOver', { noremap = true, silent = true, desc = 'Go to next diagnostic' }) -map('n', 'lt', 'DapStepInto', { noremap = true, silent = true, desc = 'Open toggle' }) -map("n", "ls", vim.diagnostic.setloclist, { desc = "LSP diagnostic loclist" }) -map('n', 'lu', function() vim.diagnostic.enable(not vim.diagnostic.is_enabled()) end, - { desc = "Toggle Diagnostics" }) -map("n", "", "noh", { desc = "general clear highlights" }) - --- ========== Sessions ============= -- -map("n", "ss", ":SessionSave", { noremap = true, silent = true }) -map("n", "sl", ":SessionLoad", { noremap = true, silent = true }) -map("n", "st", ":Telescope persisted", { noremap = true, silent = true }) - --- ========== Window moves ============= -- -map("n", "", "h", { desc = "switch window left" }) -map("n", "", "l", { desc = "switch window right" }) -map("n", "", "j", { desc = "switch window down" }) -map("n", "", "k", { desc = "switch window up" }) - --- ========== Line moves ============= -- -map("i", "", "^i", { desc = "move beginning of line" }) -map("i", "", "", { desc = "move end of line" }) -map("i", "", "", { desc = "move left" }) -map("i", "", "", { desc = "move right" }) -map("i", "", "", { desc = "move down" }) -map("i", "", "", { desc = "move up" }) - --- ========== Comments ============= -- -map("n", "/", "gcc", { desc = "toggle comment", remap = true }) -map("v", "/", "gc", { desc = "toggle comment", remap = true }) - --- ========== Nvim-tree ============= -- -map("n", "", "NvimTreeToggle", { desc = "nvimtree toggle window" }) -map("n", "e", "NvimTreeFocus", { desc = "nvimtree focus window" }) - --- ========== Telescope ============= -- -map("n", "fw", "Telescope live_grep", { desc = "telescope live grep" }) -map("n", "fb", "Telescope buffers", { desc = "telescope find buffers" }) -map("n", "fh", "Telescope help_tags", { desc = "telescope help page" }) -map("n", "ma", "Telescope marks", { desc = "telescope find marks" }) -map("n", "fo", "Telescope oldfiles", { desc = "telescope find oldfiles" }) -map("n", "fz", "Telescope current_buffer_fuzzy_find", { desc = "telescope find in current buffer" }) -map("n", "cm", "Telescope git_commits", { desc = "telescope git commits" }) -map("n", "gt", "Telescope git_status", { desc = "telescope git status" }) -map("n", "pt", "Telescope terms", { desc = "telescope pick hidden term" }) -map("n", "ff", "Telescope find_files", { desc = "telescope find files" }) -map("n", "fa", "Telescope find_files follow=true no_ignore=true hidden=true", - { desc = "telescope find all files" }) - --- ========== Which-key ============= -- -map("n", "wK", "WhichKey ", { desc = "whichkey all keymaps" }) - --- ========== Buffers ============= -- -map("n", "x", function() - local bufnr = vim.api.nvim_get_current_buf() - local buftype = vim.api.nvim_buf_get_option(bufnr, 'buftype') - local modified = vim.api.nvim_buf_get_option(bufnr, 'modified') - - if buftype == 'terminal' then - vim.cmd('bp | sp | bn | bd!') - return - end - - if modified then - vim.notify("Changes not saved") - else - vim.cmd('bp | sp | bn | bd') - end -end, { desc = "Close buffer" }) -map("n", "e", "enew", { desc = "Create buffer" }) -map("n", "", "BufferLineCycleNext", { desc = "Go to next buffer" }) -map("n", "", "BufferLineCyclePrev", { desc = "Go to prev buffer" }) -map("n", "bt", "BufferLineGroupToggle tests", { desc = "Toggle 'tests' group" }) -map("n", "bc", "BufferLineGroupToggle code", { desc = "Toggle 'code' group" }) -map("n", "bp", "BufferLineGroupToggle tornado", { desc = "Toggle 'tornado' group" }) -map("n", "bg", "BufferLineGroupToggle gornado", { desc = "Toggle 'gornado' group" }) - - --- ========== Git ============= -- -map("n", "gb", "Gitsigns blame", { desc = "Open blame for file" }) -map("n", "gl", "Gitsigns blame", { desc = "Open blame for file" }) -map("n", "gco", "GitConflictChooseOurs", { desc = "Select the current changes" }) -map("n", "gct", "GitConflictChooseTheirs", { desc = "Select the incoming changes" }) -map("n", "gcb", "GitConflictChooseBoth", { desc = "Seletct both changes" }) -map("n", "gcn", "GitConflictNextConflict", { desc = "Move to the next conflict" }) -map("n", "gcp", "GitConflictPrevConflict", { desc = "Move to the previous conflict" }) -map("n", "ghn", "Gitsigns blame", { desc = "Show hunk in normal mode" }) -map("n", "ghi", "Gitsigns blame", { desc = "Show hunk inline" }) -map("n", "gd", "Gitsigns diffthis", { desc = "Show diff of buffer" }) -map("n", "gs", "Gitsigns stage_buffer", { desc = "Stage this buffer" }) -map("n", "gu", "Gitui", { desc = "Stage this buffer" }) diff --git a/nvim/nvim/lua/options.lua b/nvim/nvim/lua/options.lua deleted file mode 100644 index 47c9476..0000000 --- a/nvim/nvim/lua/options.lua +++ /dev/null @@ -1,57 +0,0 @@ -local opt = vim.opt -local o = vim.o -local g = vim.g - --------------------------------------- options ------------------------------------------ -o.laststatus = 3 -o.showmode = false -o.splitkeep = "screen" - -o.clipboard = "unnamedplus" -o.cursorline = true -o.cursorlineopt = "number" - --- Indenting -o.expandtab = true -o.shiftwidth = 2 -o.smartindent = true -o.tabstop = 2 -o.softtabstop = 2 - -opt.fillchars = { eob = " " } -o.ignorecase = true -o.smartcase = true -o.mouse = "a" - --- Numbers -o.number = true -o.numberwidth = 2 -o.ruler = false - --- disable nvim intro -opt.shortmess:append "sI" - -o.signcolumn = "yes" -o.splitbelow = true -o.splitright = true -o.timeoutlen = 400 -o.undofile = true - --- interval for writing swap file to disk, also used by gitsigns -o.updatetime = 250 - --- go to previous/next line with h,l,left arrow and right arrow --- when cursor reaches end/beginning of line -opt.whichwrap:append "<>[]hl" - --- disable some default providers -g.loaded_node_provider = 0 -g.loaded_python3_provider = 0 -g.loaded_perl_provider = 0 -g.loaded_ruby_provider = 0 - --- add binaries installed by mason.nvim to path -local is_windows = vim.fn.has "win32" ~= 0 -local sep = is_windows and "\\" or "/" -local delim = is_windows and ";" or ":" -vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. delim .. vim.env.PATH diff --git a/nvim/nvim/lua/plugins/common.lua b/nvim/nvim/lua/plugins/common.lua deleted file mode 100644 index d32a6ac..0000000 --- a/nvim/nvim/lua/plugins/common.lua +++ /dev/null @@ -1,81 +0,0 @@ -return { - -- Dev icons - { - "nvim-tree/nvim-web-devicons", - opts = {}, - }, - { - 'nvim-mini/mini.nvim', - version = '*' - }, - -- Screenkey - { - "NStefan002/screenkey.nvim", - lazy = false, - version = "*", -- or branch = "main", to use the latest commit - }, - -- Marks - { - "chentoast/marks.nvim", - event = "VeryLazy", - opts = {}, - }, - -- Git - { - "lewis6991/gitsigns.nvim", - event = { "BufReadPre", "BufNewFile" }, - opts = function() - require("configs.gitsigns") - end, - }, - { - 'akinsho/git-conflict.nvim', - version = "*", - config = true - }, - -- Nvim tree - { - "nvim-tree/nvim-tree.lua", - cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - opts = function() - return require "configs.nvimtree" - end, - }, - -- Pairs - { - "nvim-mini/mini.pairs", - event = { "BufReadPost", "BufNewFile" }, - opts = { - modes = { insert = true, command = true, terminal = false }, - skip_next = [=[[%w%%%'%[%"%.%`%$]]=], - skip_ts = { "string" }, - skip_unbalanced = true, - markdown = true, - }, - }, - -- Formating - { - "stevearc/conform.nvim", - event = 'BufWritePre', - config = function() - require "configs.conform" - end, - }, - -- Yank highlight - { - "machakann/vim-highlightedyank", - event = "VeryLazy", - }, - -- Sessions - { - "olimorris/persisted.nvim", - event = "BufReadPre", - opts = { - autostart = true, - autosave = true, - save_dir = vim.fn.expand(vim.fn.stdpath("data") .. "/sessions/"), - use_git_branch = true, - autoload = false, - }, - }, -} diff --git a/nvim/nvim/lua/plugins/development.lua b/nvim/nvim/lua/plugins/development.lua deleted file mode 100644 index e06cb65..0000000 --- a/nvim/nvim/lua/plugins/development.lua +++ /dev/null @@ -1,195 +0,0 @@ -return { - -- Nvim lspconfig - { - "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile" }, - config = function() - require("configs.lsp.lspconfig") - end - }, - -- Mason - { - "mason-org/mason.nvim", - opts = {} - }, - -- Mason lspconfig - { - "mason-org/mason-lspconfig.nvim", - opts = {}, - dependencies = { - "mason-org/mason.nvim", - "neovim/nvim-lspconfig", - } - }, - -- Nvim complete - { - "hrsh7th/nvim-cmp", - event = "InsertEnter", - dependencies = { - { - "L3MON4D3/LuaSnip", - dependencies = "rafamadriz/friendly-snippets", - opts = { history = true, updateevents = "TextChanged,TextChangedI" }, - config = function(_, opts) - require("luasnip").config.set_config(opts) - require "configs.luasnip" - end, - }, - { - "windwp/nvim-autopairs", - opts = { - fast_wrap = {}, - disable_filetype = { "TelescopePrompt", "vim" }, - }, - config = function(_, opts) - require("nvim-autopairs").setup(opts) - -- setup cmp for autopairs - local cmp_autopairs = require "nvim-autopairs.completion.cmp" - require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) - end, - }, - { - "saadparwaiz1/cmp_luasnip", - "hrsh7th/cmp-nvim-lua", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "https://codeberg.org/FelipeLema/cmp-async-path.git" - } - }, - opts = function() - return require "configs.cmp" - end, - }, - -- Treesitter (syntax) - { - "nvim-treesitter/nvim-treesitter", - branch = "main", - lazy = false, - build = ":TSUpdate", - opts = function() - return require("configs.treesitter") - end, - config = function(_, opts) - require("nvim-treesitter").setup(opts) - - vim.api.nvim_create_autocmd("FileType", { - pattern = { - "c", - "cpp", - "go", - "lua", - "python", - "javascript", - "typescript", - "tsx", - "json", - "jsonc", - "vim", - "vimdoc", - "query", - "markdown", - "markdown_inline", - "html", - "xml", - "yaml", - "toml", - "sql", - "php", - "make", - "cmake", - "diff", - "gitcommit", - "gitignore", - }, - callback = function(args) - pcall(vim.treesitter.start, args.buf) - vim.bo[args.buf].syntax = "on" - end, - }) - end, - }, - -- Logs - { - 'fei6409/log-highlight.nvim', - event = 'BufReadPre', -- Lazy load the plugin - config = function() - require('log-highlight').setup({ - keyword = { - error = 'ERROR', - warning = { 'ALWAYS', 'WARN' }, - info = { 'INFO' }, - debug = { 'DEBUG' }, - pass = {}, - }, - }) - end - }, - -- Folders - { - 'kevinhwang91/nvim-ufo', - dependencies = 'kevinhwang91/promise-async', - event = "VeryLazy", - config = function() - require("configs.ufo") - end - }, - -- Tests - { - "nvim-neotest/neotest", - event = "VeryLazy", - dependencies = { - "nvim-lua/plenary.nvim", - "alfaix/neotest-gtest", - "olimorris/neotest-phpunit", - }, - config = function() - require("neotest").setup({ - adapters = { - require("neotest-phpunit"), - require("neotest-gtest").setup({}), - }, - }) - end, - }, - -- These are for C/C++ Debbuger - { - "nvim-neotest/nvim-nio", - event = "VeryLazy", - }, - { - "mfussenegger/nvim-dap", - event = "VeryLazy", - config = function() - require("configs.nvim-dap").setup() - end - }, - { - "rcarriga/nvim-dap-ui", - event = "VeryLazy", - dependencies = "mfussenegger/nvim-dap", - }, - { - "jay-babu/mason-nvim-dap.nvim", - event = "VeryLazy", - dependencies = { - "williamboman/mason.nvim", - "mfussenegger/nvim-dap", - }, - opts = { - handlers = {} - }, - }, - { - "theHamsta/nvim-dap-virtual-text", - dependencies = "mfussenegger/nvim-dap", - config = function() - require("nvim-dap-virtual-text").setup() - end, - }, - { - 'aspeddro/gitui.nvim', - config = function() - require("gitui").setup() - end, - }, -} diff --git a/nvim/nvim/lua/plugins/joke.lua b/nvim/nvim/lua/plugins/joke.lua deleted file mode 100644 index a7ce17b..0000000 --- a/nvim/nvim/lua/plugins/joke.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - 'kwakzalver/duckytype.nvim', - config = function() - require('duckytype').setup {} - end - }, -} diff --git a/nvim/nvim/lua/plugins/lines.lua b/nvim/nvim/lua/plugins/lines.lua deleted file mode 100644 index f013eca..0000000 --- a/nvim/nvim/lua/plugins/lines.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require("configs.lualine") - end, - }, - { - 'akinsho/bufferline.nvim', - version = "*", - dependencies = 'nvim-tree/nvim-web-devicons', - config = function() - require("configs.bufferline") - end, - }, -} diff --git a/nvim/nvim/lua/plugins/noice.lua b/nvim/nvim/lua/plugins/noice.lua deleted file mode 100644 index bf05981..0000000 --- a/nvim/nvim/lua/plugins/noice.lua +++ /dev/null @@ -1,30 +0,0 @@ -return { - "folke/noice.nvim", - event = "VeryLazy", - opts ={ - -- add any options here - }, - dependencies = { - "MunifTanjim/nui.nvim", - "rcarriga/nvim-notify", - }, - config = { - lsp = { - signature = { - enabled = false, - }, - hover = { - enabled = false, - }, - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - }, - }, - presets = { - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help - }, - } -} diff --git a/nvim/nvim/lua/plugins/snacks.lua b/nvim/nvim/lua/plugins/snacks.lua deleted file mode 100644 index ea2a05b..0000000 --- a/nvim/nvim/lua/plugins/snacks.lua +++ /dev/null @@ -1,102 +0,0 @@ -return { - "folke/snacks.nvim", - priority = 1000, - lazy = false, - ---@type snacks.Config - opts = { - - - bigfile = { enabled = true }, - dashboard = { - enabled = true, - width = 60, - row = nil, -- dashboard position. nil for center - col = nil, -- dashboard position. nil for center - pane_gap = 4, -- empty columns between vertical panes - autokeys = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", -- autokey sequence - -- These settings are used by some built-in sections - preset = { - -- Defaults to a picker that supports `fzf-lua`, `telescope.nvim` and `mini.pick` - ---@type fun(cmd:string, opts:table)|nil - pick = nil, - -- Used by the `keys` section to show keymaps. - -- Set your custom keymaps here. - -- When using a function, the `items` argument are the default keymaps. - -- stylua: ignore - ---@type snacks.dashboard.Item[] - keys = { - { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" }, - { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, - { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" }, - { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" }, - { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" }, - { icon = " ", key = "s", desc = "Restore Session", section = "session" }, - { icon = "󰒲 ", key = "L", desc = "Lazy", action = ":Lazy", enabled = package.loaded.lazy ~= nil }, - { icon = " ", key = "q", desc = "Quit", action = ":qa" }, - }, - -- Used by the `header` section - header = [[ -⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⡴⠶⠶⠒⠒⠒⠶⠶⣦⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀ -⠀⠀⠀⠀⠀⣠⡶⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⢷⣦⡀⠀⠀⠀⠀⠀ -⠀⠀⠀⣠⠞⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣦⡀⠀⠀⠀ -⠀⠀⣼⠋⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣆⠀⠀ -⠀⣼⠃⠀⠀⠀⠀⠀⢀⣤⣾⡿⠟⠉⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠈⢻⣆⠀ -⢸⡇⠀⠀⠀⠀⠀⣠⣿⡿⠋⠁⠒⠠⡀⠀⢀⠔⠚⠻⣿⣦⠀⠀⠀⠀⠀⠈⢿⡆ -⣼⠀⠀⠀⠀⠀⢠⣿⣿⠁⠀⠀⠀⠀⠘⡶⠁⠀⠀⠀⠸⣿⣷⡀⠀⠀⠀⠀⢸⣧ -⢿⠀⠀⠀⠀⠀⢸⢻⣿⠀⠀⠀⠙⠀⢠⢇⠀⠘⠁⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⣿ -⢸⡇⠀⠀⠀⠀⢸⠘⣿⣆⠀⠀⢀⠔⠁⠈⢦⡀⠀⠀⣸⣿⡟⡇⠀⠀⠀⠀⢠⡏ -⠈⢿⡄⠀⠀⠀⠀⢆⠈⠻⣿⣏⡀⠀⠀⠀⠀⠉⣳⣾⡿⠟⡰⠁⠀⠀⠀⠀⣼⠃ -⠀⠘⢿⣄⠀⠀⠀⠀⠣⡀⠈⠛⠿⢦⣄⣤⠶⠿⠛⠉⣀⠜⠁⠀⠀⠀⠀⣼⠏⠀ -⠀⠀⠈⠻⣦⣀⠀⠀⠀⠈⠑⠢⠤⢤⣯⣧⠤⠤⠔⠋⠁⠀⠀⠀⠀⣠⡾⠃⠀⠀ -⠀⠀⠀⢀⡼⠛⠷⣄⡀⠀⠀⠀⠀⡼⠀⢸⠀⠀⠀⠀⠀⠀⢀⣤⣾⡋⠀⠀⠀⠀ -⠀⠀⢠⠞⠀⠀⠀⠈⠉⠓⠶⣤⣄⣀⣀⣈⣀⣀⣤⠤⠶⠚⠉⠁⠀⠹⣆⠀⠀⠀ -⠀⢠⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⡆⠀⠀ -⠀⣞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⠀⠀ -⣼⠉⠉⠉⠑⡆⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠤⠤⢼⡀⠀ -⠙⠦⠤⣴⣚⣁⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠸⣀⠀⠀⢀⡟⠀ -⠀⠀⠀⠀⣿⠀⣈⣉⣉⣀⡀⠀⠀⠒⠛⠒⠒⠒⠒⠒⠒⠒⠒⠒⡏⠉⠉⠁⠀⠀ -⠀⠀⠠⠾⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠶⠶⢷⣤⠀⠀]], - }, - -- item field formatters - formats = { - icon = function(item) - if item.file and item.icon == "file" or item.icon == "directory" then - return Snacks.dashboard.icon(item.file, item.icon) - end - return { item.icon, width = 2, hl = "icon" } - end, - footer = { "%s", align = "center" }, - header = { "%s", align = "center" }, - file = function(item, ctx) - local fname = vim.fn.fnamemodify(item.file, ":~") - fname = ctx.width and #fname > ctx.width and vim.fn.pathshorten(fname) or fname - if #fname > ctx.width then - local dir = vim.fn.fnamemodify(fname, ":h") - local file = vim.fn.fnamemodify(fname, ":t") - if dir and file then - file = file:sub(-(ctx.width - #dir - 2)) - fname = dir .. "/…" .. file - end - end - local dir, file = fname:match("^(.*)/(.+)$") - return dir and { { dir .. "/", hl = "dir" }, { file, hl = "file" } } or { { fname, hl = "file" } } - end, - }, - sections = { - { section = "header" }, - { section = "keys", gap = 1, padding = 1 }, - }, - debug = false, - }, - explorer = { enabled = false }, - indent = { enabled = true }, - input = { enabled = true }, - picker = { enabled = true }, - notifier = { enabled = true }, - quickfile = { enabled = true }, - scope = { enabled = true }, - scroll = { enabled = true }, - statuscolumn = { enabled = true }, - words = { enabled = true }, - }, -} diff --git a/nvim/nvim/lua/plugins/telescope.lua b/nvim/nvim/lua/plugins/telescope.lua deleted file mode 100644 index d696d4b..0000000 --- a/nvim/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - dependencies = { "nvim-treesitter/nvim-treesitter" }, - cmd = "Telescope", - configs = function() - return require "configs.telescope" - end, -} diff --git a/nvim/nvim/lua/plugins/whichkey.lua b/nvim/nvim/lua/plugins/whichkey.lua deleted file mode 100644 index 9400187..0000000 --- a/nvim/nvim/lua/plugins/whichkey.lua +++ /dev/null @@ -1,67 +0,0 @@ -return { - "folke/which-key.nvim", - event = "VeryLazy", - opts_extend = { "spec" }, - opts = { - preset = "helix", - defaults = {}, - spec = { - { - mode = { "n", "x" }, - { "", group = "tabs" }, - { "c", group = "code" }, - { "d", group = "debug" }, - { "dp", group = "profiler" }, - { "f", group = "file/find" }, - { "g", group = "git" }, - { "gh", group = "hunks" }, - { "q", group = "quit/session" }, - { "s", group = "search" }, - { "u", group = "ui" }, - { "x", group = "diagnostics/quickfix" }, - { "[", group = "prev" }, - { "]", group = "next" }, - { "g", group = "goto" }, - { "gs", group = "surround" }, - { "z", group = "fold" }, - { - "b", - group = "buffer", - expand = function() - return require("which-key.extras").expand.buf() - end, - }, - { - "w", - group = "windows", - proxy = "", - expand = function() - return require("which-key.extras").expand.win() - end, - }, - -- better descriptions - { "gx", desc = "Open with system app" }, - }, - }, - }, - keys = { - { - "?", - function() - require("which-key").show({ global = false }) - end, - desc = "Buffer Keymaps (which-key)", - }, - { - "", - function() - require("which-key").show({ keys = "", loop = true }) - end, - desc = "Window Hydra Mode (which-key)", - }, - }, - config = function(_, opts) - local wk = require("which-key") - wk.setup(opts) - end, -} diff --git a/nvim/nvim/stylua.toml b/nvim/nvim/stylua.toml deleted file mode 100644 index ecb6dca..0000000 --- a/nvim/nvim/stylua.toml +++ /dev/null @@ -1,6 +0,0 @@ -column_width = 120 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferDouble" -call_parentheses = "None"