Compare commits
40 Commits
8723c409b6
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 09bb156e47 | |||
|
|
1437d1826e | ||
|
|
2aa4027f9d | ||
|
|
704a095798 | ||
|
|
04bdd470fd | ||
|
|
3e2ee388e6 | ||
|
|
ee2bbcf84f | ||
|
|
c665c5ba37 | ||
|
|
43e7fb01f5 | ||
|
|
6f0948c365 | ||
|
|
ec21773823 | ||
|
|
4ebfe540ad | ||
|
|
f6ecd9592c | ||
|
|
fcecb7f575 | ||
|
|
801ba0dfdf | ||
|
|
0daaf4add5 | ||
|
|
14cf97683d | ||
|
|
27eda40ccb | ||
|
|
063a693f19 | ||
|
|
6cfad76308 | ||
|
|
6e13939c5b | ||
|
|
cd711ea4bf | ||
|
|
388d2b0b30 | ||
|
|
687646da32 | ||
|
|
a2832ed454 | ||
|
|
e67379b132 | ||
|
|
157d72fe33 | ||
|
|
d37d2c2493 | ||
|
|
4bd5c09035 | ||
|
|
05e8624509 | ||
|
|
fc417a90fd | ||
|
|
373581fd36 | ||
|
|
c55b301dc4 | ||
|
|
71f71cb3ce | ||
|
|
0acc861edd | ||
|
|
dbc1095cb4 | ||
|
|
050795801f | ||
|
|
c436875e4b | ||
|
|
ec0ae0ee13 | ||
|
|
48b7bcbf4f |
@@ -1,5 +1,9 @@
|
|||||||
Xft.dpi: 96
|
Xft.dpi: 96
|
||||||
Xcursor.size: 16
|
Xcursor.size: 6
|
||||||
|
Xft.antialias: true
|
||||||
|
Xft.hinting: true
|
||||||
|
Xft.rgba: rgb
|
||||||
|
Xft.hintstyle: hintslight
|
||||||
! URxvt
|
! URxvt
|
||||||
URxvt.font:xft:iM WritingMonoS Nerd Font:size=12
|
URxvt.font:xft:iM WritingMonoS Nerd Font:size=12
|
||||||
URxvt.boldFont:xft:iM WritingMonoS Nerd Font:size=12:style=bold
|
URxvt.boldFont:xft:iM WritingMonoS Nerd Font:size=12:style=bold
|
||||||
|
|||||||
@@ -1,995 +0,0 @@
|
|||||||
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
|
||||||
|
|
||||||
# Import additional configuration files
|
|
||||||
#
|
|
||||||
# Imports are loaded in order, skipping all missing files, with the importing
|
|
||||||
# file being loaded last. If a field is already present in a previous import, it
|
|
||||||
# will be replaced.
|
|
||||||
#
|
|
||||||
# All imports must either be absolute paths starting with `/`, or paths relative
|
|
||||||
# to the user's home directory starting with `~/`.
|
|
||||||
#import:
|
|
||||||
# - /path/to/alacritty.yml
|
|
||||||
|
|
||||||
# Any items in the `env` entry below will be added as
|
|
||||||
# environment variables. Some entries may override variables
|
|
||||||
# set by alacritty itself.
|
|
||||||
#env:
|
|
||||||
# TERM variable
|
|
||||||
#
|
|
||||||
# This value is used to set the `$TERM` environment variable for
|
|
||||||
# each instance of Alacritty. If it is not present, alacritty will
|
|
||||||
# check the local terminfo database and use `alacritty` if it is
|
|
||||||
# available, otherwise `xterm-256color` is used.
|
|
||||||
#TERM: alacritty
|
|
||||||
|
|
||||||
window:
|
|
||||||
# Window dimensions (changes require restart)
|
|
||||||
#
|
|
||||||
# Number of lines/columns (not pixels) in the terminal. Both lines and columns
|
|
||||||
# must be non-zero for this to take effect. The number of columns must be at
|
|
||||||
# least `2`, while using a value of `0` for columns and lines will fall back
|
|
||||||
# to the window manager's recommended size
|
|
||||||
#dimensions:
|
|
||||||
# columns: 0
|
|
||||||
# lines: 0
|
|
||||||
|
|
||||||
# Window position (changes require restart)
|
|
||||||
#
|
|
||||||
# Specified in number of pixels.
|
|
||||||
# If the position is not set, the window manager will handle the placement.
|
|
||||||
#position:
|
|
||||||
# x: 0
|
|
||||||
# y: 0
|
|
||||||
|
|
||||||
# Window padding (changes require restart)
|
|
||||||
#
|
|
||||||
# Blank space added around the window in pixels. This padding is scaled
|
|
||||||
# by DPI and the specified value is always added at both opposing sides.
|
|
||||||
padding:
|
|
||||||
x: 15
|
|
||||||
y: 15
|
|
||||||
|
|
||||||
# Spread additional padding evenly around the terminal content.
|
|
||||||
#dynamic_padding: false
|
|
||||||
|
|
||||||
# Window decorations
|
|
||||||
#
|
|
||||||
# Values for `decorations`:
|
|
||||||
# - full: Borders and title bar
|
|
||||||
# - none: Neither borders nor title bar
|
|
||||||
#
|
|
||||||
# Values for `decorations` (macOS only):
|
|
||||||
# - transparent: Title bar, transparent background and title bar buttons
|
|
||||||
# - buttonless: Title bar, transparent background and no title bar buttons
|
|
||||||
#decorations: full
|
|
||||||
|
|
||||||
# Background opacity
|
|
||||||
#
|
|
||||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
|
||||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
|
||||||
#opacity: 1.0
|
|
||||||
|
|
||||||
# Startup Mode (changes require restart)
|
|
||||||
#
|
|
||||||
# Values for `startup_mode`:
|
|
||||||
# - Windowed
|
|
||||||
# - Maximized
|
|
||||||
# - Fullscreen
|
|
||||||
#
|
|
||||||
# Values for `startup_mode` (macOS only):
|
|
||||||
# - SimpleFullscreen
|
|
||||||
#startup_mode: Windowed
|
|
||||||
|
|
||||||
# Window title
|
|
||||||
#title: Alacritty
|
|
||||||
|
|
||||||
# Allow terminal applications to change Alacritty's window title.
|
|
||||||
#dynamic_title: true
|
|
||||||
|
|
||||||
# Window class (Linux/BSD only):
|
|
||||||
#class:
|
|
||||||
# Application instance name
|
|
||||||
#instance: Alacritty
|
|
||||||
# General application class
|
|
||||||
#general: Alacritty
|
|
||||||
|
|
||||||
# Decorations theme variant
|
|
||||||
#
|
|
||||||
# Override the variant of the System theme/GTK theme/Wayland client side
|
|
||||||
# decorations. Commonly supported values are `Dark`, `Light`, and `None` for
|
|
||||||
# auto pick-up. Set this to `None` to use the default theme variant.
|
|
||||||
#decorations_theme_variant: None
|
|
||||||
|
|
||||||
# Resize increments
|
|
||||||
#
|
|
||||||
# Prefer resizing window by discrete steps equal to cell dimensions.
|
|
||||||
#resize_increments: false
|
|
||||||
|
|
||||||
# Make `Option` key behave as `Alt` (macOS only):
|
|
||||||
# - OnlyLeft
|
|
||||||
# - OnlyRight
|
|
||||||
# - Both
|
|
||||||
# - None (default)
|
|
||||||
#option_as_alt: None
|
|
||||||
|
|
||||||
#scrolling:
|
|
||||||
# Maximum number of lines in the scrollback buffer.
|
|
||||||
# Specifying '0' will disable scrolling.
|
|
||||||
#history: 10000
|
|
||||||
|
|
||||||
# Scrolling distance multiplier.
|
|
||||||
#multiplier: 3
|
|
||||||
|
|
||||||
# Font configuration
|
|
||||||
font:
|
|
||||||
# Normal (roman) font face
|
|
||||||
normal:
|
|
||||||
# Font family
|
|
||||||
#
|
|
||||||
# Default:
|
|
||||||
# - (macOS) Menlo
|
|
||||||
# - (Linux/BSD) monospace
|
|
||||||
# - (Windows) Consolas
|
|
||||||
family: iM WritingMonoS Nerd Font
|
|
||||||
|
|
||||||
# The `style` can be specified to pick a specific face.
|
|
||||||
#style: Text
|
|
||||||
|
|
||||||
# Bold font face
|
|
||||||
bold:
|
|
||||||
# Font family
|
|
||||||
#
|
|
||||||
# If the bold family is not specified, it will fall back to the
|
|
||||||
# value specified for the normal font.
|
|
||||||
#family: monospace
|
|
||||||
|
|
||||||
# The `style` can be specified to pick a specific face.
|
|
||||||
style: Bold
|
|
||||||
|
|
||||||
# Italic font face
|
|
||||||
italic:
|
|
||||||
# Font family
|
|
||||||
#
|
|
||||||
# If the italic family is not specified, it will fall back to the
|
|
||||||
# value specified for the normal font.
|
|
||||||
#family: monospace
|
|
||||||
|
|
||||||
# The `style` can be specified to pick a specific face.
|
|
||||||
style: Italic
|
|
||||||
|
|
||||||
# Bold italic font face
|
|
||||||
bold_italic:
|
|
||||||
# Font family
|
|
||||||
#
|
|
||||||
# If the bold italic family is not specified, it will fall back to the
|
|
||||||
# value specified for the normal font.
|
|
||||||
#family:
|
|
||||||
|
|
||||||
# The `style` can be specified to pick a specific face.
|
|
||||||
style: Bold Italic
|
|
||||||
|
|
||||||
# Point size
|
|
||||||
size: 9.0
|
|
||||||
|
|
||||||
# Offset is the extra space around each character. `offset.y` can be thought
|
|
||||||
# of as modifying the line spacing, and `offset.x` as modifying the letter
|
|
||||||
# spacing.
|
|
||||||
#offset:
|
|
||||||
# x: 0
|
|
||||||
# y: 0
|
|
||||||
|
|
||||||
# Glyph offset determines the locations of the glyphs within their cells with
|
|
||||||
# the default being at the bottom. Increasing `x` moves the glyph to the
|
|
||||||
# right, increasing `y` moves the glyph upward.
|
|
||||||
#glyph_offset:
|
|
||||||
# x: 0
|
|
||||||
# y: 0
|
|
||||||
|
|
||||||
# Use built-in font for box drawing characters.
|
|
||||||
#
|
|
||||||
# If `true`, Alacritty will use a custom built-in font for box drawing
|
|
||||||
# characters (Unicode points 2500 - 259f).
|
|
||||||
#
|
|
||||||
#builtin_box_drawing: true
|
|
||||||
|
|
||||||
# If `true`, bold text is drawn using the bright color variants.
|
|
||||||
#draw_bold_text_with_bright_colors: false
|
|
||||||
|
|
||||||
# Colors (Tomorrow Night)
|
|
||||||
#colors:
|
|
||||||
# Default colors
|
|
||||||
#primary:
|
|
||||||
# background: '#1d1f21'
|
|
||||||
# foreground: '#c5c8c6'
|
|
||||||
|
|
||||||
# Bright and dim foreground colors
|
|
||||||
#
|
|
||||||
# The dimmed foreground color is calculated automatically if it is not
|
|
||||||
# present. If the bright foreground color is not set, or
|
|
||||||
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
|
|
||||||
# color will be used.
|
|
||||||
#dim_foreground: '#828482'
|
|
||||||
#bright_foreground: '#eaeaea'
|
|
||||||
|
|
||||||
# Cursor colors
|
|
||||||
#
|
|
||||||
# Colors which should be used to draw the terminal cursor.
|
|
||||||
#
|
|
||||||
# Allowed values are CellForeground/CellBackground, which reference the
|
|
||||||
# affected cell, or hexadecimal colors like #ff00ff.
|
|
||||||
#cursor:
|
|
||||||
# text: CellBackground
|
|
||||||
# cursor: CellForeground
|
|
||||||
|
|
||||||
# Vi mode cursor colors
|
|
||||||
#
|
|
||||||
# Colors for the cursor when the vi mode is active.
|
|
||||||
#
|
|
||||||
# Allowed values are CellForeground/CellBackground, which reference the
|
|
||||||
# affected cell, or hexadecimal colors like #ff00ff.
|
|
||||||
#vi_mode_cursor:
|
|
||||||
# text: CellBackground
|
|
||||||
# cursor: CellForeground
|
|
||||||
|
|
||||||
# Search colors
|
|
||||||
#
|
|
||||||
# Colors used for the search bar and match highlighting.
|
|
||||||
#search:
|
|
||||||
# Allowed values are CellForeground/CellBackground, which reference the
|
|
||||||
# affected cell, or hexadecimal colors like #ff00ff.
|
|
||||||
#matches:
|
|
||||||
# foreground: '#000000'
|
|
||||||
# background: '#ffffff'
|
|
||||||
#focused_match:
|
|
||||||
# foreground: '#ffffff'
|
|
||||||
# background: '#000000'
|
|
||||||
|
|
||||||
# Keyboard hints
|
|
||||||
#hints:
|
|
||||||
# First character in the hint label
|
|
||||||
#
|
|
||||||
# Allowed values are CellForeground/CellBackground, which reference the
|
|
||||||
# affected cell, or hexadecimal colors like #ff00ff.
|
|
||||||
#start:
|
|
||||||
# foreground: '#1d1f21'
|
|
||||||
# background: '#e9ff5e'
|
|
||||||
|
|
||||||
# All characters after the first one in the hint label
|
|
||||||
#
|
|
||||||
# Allowed values are CellForeground/CellBackground, which reference the
|
|
||||||
# affected cell, or hexadecimal colors like #ff00ff.
|
|
||||||
#end:
|
|
||||||
# foreground: '#e9ff5e'
|
|
||||||
# background: '#1d1f21'
|
|
||||||
|
|
||||||
# Line indicator
|
|
||||||
#
|
|
||||||
# Color used for the indicator displaying the position in history during
|
|
||||||
# search and vi mode.
|
|
||||||
#
|
|
||||||
# By default, these will use the opposing primary color.
|
|
||||||
#line_indicator:
|
|
||||||
# foreground: None
|
|
||||||
# background: None
|
|
||||||
|
|
||||||
# Footer bar
|
|
||||||
#
|
|
||||||
# Color used for the footer bar on the bottom, used by search regex input,
|
|
||||||
# hyperlink URI preview, etc.
|
|
||||||
#
|
|
||||||
#footer_bar:
|
|
||||||
# background: '#c5c8c6'
|
|
||||||
# foreground: '#1d1f21'
|
|
||||||
|
|
||||||
# Selection colors
|
|
||||||
#
|
|
||||||
# Colors which should be used to draw the selection area.
|
|
||||||
#
|
|
||||||
# Allowed values are CellForeground/CellBackground, which reference the
|
|
||||||
# affected cell, or hexadecimal colors like #ff00ff.
|
|
||||||
#selection:
|
|
||||||
# text: CellBackground
|
|
||||||
# background: CellForeground
|
|
||||||
|
|
||||||
# Normal colors
|
|
||||||
#normal:
|
|
||||||
# black: '#1d1f21'
|
|
||||||
# red: '#cc6666'
|
|
||||||
# green: '#b5bd68'
|
|
||||||
# yellow: '#f0c674'
|
|
||||||
# blue: '#81a2be'
|
|
||||||
# magenta: '#b294bb'
|
|
||||||
# cyan: '#8abeb7'
|
|
||||||
# white: '#c5c8c6'
|
|
||||||
|
|
||||||
# Bright colors
|
|
||||||
#bright:
|
|
||||||
# black: '#666666'
|
|
||||||
# red: '#d54e53'
|
|
||||||
# green: '#b9ca4a'
|
|
||||||
# yellow: '#e7c547'
|
|
||||||
# blue: '#7aa6da'
|
|
||||||
# magenta: '#c397d8'
|
|
||||||
# cyan: '#70c0b1'
|
|
||||||
# white: '#eaeaea'
|
|
||||||
|
|
||||||
# Dim colors
|
|
||||||
#
|
|
||||||
# If the dim colors are not set, they will be calculated automatically based
|
|
||||||
# on the `normal` colors.
|
|
||||||
#dim:
|
|
||||||
# black: '#131415'
|
|
||||||
# red: '#864343'
|
|
||||||
# green: '#777c44'
|
|
||||||
# yellow: '#9e824c'
|
|
||||||
# blue: '#556a7d'
|
|
||||||
# magenta: '#75617b'
|
|
||||||
# cyan: '#5b7d78'
|
|
||||||
# white: '#828482'
|
|
||||||
|
|
||||||
# Indexed Colors
|
|
||||||
#
|
|
||||||
# The indexed colors include all colors from 16 to 256.
|
|
||||||
# When these are not set, they're filled with sensible defaults.
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# `- { index: 16, color: '#ff00ff' }`
|
|
||||||
#
|
|
||||||
#indexed_colors: []
|
|
||||||
|
|
||||||
# Transparent cell backgrounds
|
|
||||||
#
|
|
||||||
# Whether or not `window.opacity` applies to all cell backgrounds or only to
|
|
||||||
# the default background. When set to `true` all cells will be transparent
|
|
||||||
# regardless of their background color.
|
|
||||||
#transparent_background_colors: false
|
|
||||||
|
|
||||||
# Bell
|
|
||||||
#
|
|
||||||
# The bell is rung every time the BEL control character is received.
|
|
||||||
#bell:
|
|
||||||
# Visual Bell Animation
|
|
||||||
#
|
|
||||||
# Animation effect for flashing the screen when the visual bell is rung.
|
|
||||||
#
|
|
||||||
# Values for `animation`:
|
|
||||||
# - Ease
|
|
||||||
# - EaseOut
|
|
||||||
# - EaseOutSine
|
|
||||||
# - EaseOutQuad
|
|
||||||
# - EaseOutCubic
|
|
||||||
# - EaseOutQuart
|
|
||||||
# - EaseOutQuint
|
|
||||||
# - EaseOutExpo
|
|
||||||
# - EaseOutCirc
|
|
||||||
# - Linear
|
|
||||||
#animation: EaseOutExpo
|
|
||||||
|
|
||||||
# Duration of the visual bell flash in milliseconds. A `duration` of `0` will
|
|
||||||
# disable the visual bell animation.
|
|
||||||
#duration: 0
|
|
||||||
|
|
||||||
# Visual bell animation color.
|
|
||||||
#color: '#ffffff'
|
|
||||||
|
|
||||||
# Bell Command
|
|
||||||
#
|
|
||||||
# This program is executed whenever the bell is rung.
|
|
||||||
#
|
|
||||||
# When set to `command: None`, no command will be executed.
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# command:
|
|
||||||
# program: notify-send
|
|
||||||
# args: ["Hello, World!"]
|
|
||||||
#
|
|
||||||
#command: None
|
|
||||||
|
|
||||||
#selection:
|
|
||||||
# This string contains all characters that are used as separators for
|
|
||||||
# "semantic words" in Alacritty.
|
|
||||||
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
|
||||||
|
|
||||||
# When set to `true`, selected text will be copied to the primary clipboard.
|
|
||||||
#save_to_clipboard: false
|
|
||||||
|
|
||||||
#cursor:
|
|
||||||
# Cursor style
|
|
||||||
#style:
|
|
||||||
# Cursor shape
|
|
||||||
#
|
|
||||||
# Values for `shape`:
|
|
||||||
# - ▇ Block
|
|
||||||
# - _ Underline
|
|
||||||
# - | Beam
|
|
||||||
#shape: Block
|
|
||||||
|
|
||||||
# Cursor blinking state
|
|
||||||
#
|
|
||||||
# Values for `blinking`:
|
|
||||||
# - Never: Prevent the cursor from ever blinking
|
|
||||||
# - Off: Disable blinking by default
|
|
||||||
# - On: Enable blinking by default
|
|
||||||
# - Always: Force the cursor to always blink
|
|
||||||
#blinking: Off
|
|
||||||
|
|
||||||
# Vi mode cursor style
|
|
||||||
#
|
|
||||||
# If the vi mode cursor style is `None` or not specified, it will fall back to
|
|
||||||
# the style of the active value of the normal cursor.
|
|
||||||
#
|
|
||||||
# See `cursor.style` for available options.
|
|
||||||
#vi_mode_style: None
|
|
||||||
|
|
||||||
# Cursor blinking interval in milliseconds.
|
|
||||||
#blink_interval: 750
|
|
||||||
|
|
||||||
# Time after which cursor stops blinking, in seconds.
|
|
||||||
#
|
|
||||||
# Specifying '0' will disable timeout for blinking.
|
|
||||||
#blink_timeout: 5
|
|
||||||
|
|
||||||
# If this is `true`, the cursor will be rendered as a hollow box when the
|
|
||||||
# window is not focused.
|
|
||||||
#unfocused_hollow: true
|
|
||||||
|
|
||||||
# Thickness of the cursor relative to the cell width as floating point number
|
|
||||||
# from `0.0` to `1.0`.
|
|
||||||
#thickness: 0.15
|
|
||||||
|
|
||||||
# Live config reload (changes require restart)
|
|
||||||
#live_config_reload: true
|
|
||||||
|
|
||||||
# Shell
|
|
||||||
#
|
|
||||||
# You can set `shell.program` to the path of your favorite shell, e.g.
|
|
||||||
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
|
|
||||||
# shell.
|
|
||||||
#
|
|
||||||
# Default:
|
|
||||||
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
|
|
||||||
# - (Windows) powershell
|
|
||||||
#shell:
|
|
||||||
# program: /bin/bash
|
|
||||||
# args:
|
|
||||||
# - --login
|
|
||||||
|
|
||||||
# Startup directory
|
|
||||||
#
|
|
||||||
# Directory the shell is started in. If this is unset, or `None`, the working
|
|
||||||
# directory of the parent process will be used.
|
|
||||||
#working_directory: None
|
|
||||||
|
|
||||||
# Offer IPC using `alacritty msg` (unix only)
|
|
||||||
#ipc_socket: true
|
|
||||||
|
|
||||||
#mouse:
|
|
||||||
# Click settings
|
|
||||||
#
|
|
||||||
# The `double_click` and `triple_click` settings control the time
|
|
||||||
# alacritty should wait for accepting multiple clicks as one double
|
|
||||||
# or triple click.
|
|
||||||
#double_click: { threshold: 300 }
|
|
||||||
#triple_click: { threshold: 300 }
|
|
||||||
|
|
||||||
# If this is `true`, the cursor is temporarily hidden when typing.
|
|
||||||
#hide_when_typing: false
|
|
||||||
|
|
||||||
# Hints
|
|
||||||
#
|
|
||||||
# Terminal hints can be used to find text or hyperlink in the visible part of
|
|
||||||
# the terminal and pipe it to other applications.
|
|
||||||
hints:
|
|
||||||
# Keys used for the hint labels.
|
|
||||||
#alphabet: "jfkdls;ahgurieowpq"
|
|
||||||
|
|
||||||
# List with all available hints
|
|
||||||
#
|
|
||||||
# Each hint must have any of `regex` or `hyperlinks` field and either an
|
|
||||||
# `action` or a `command` field. The fields `mouse`, `binding` and
|
|
||||||
# `post_processing` are optional.
|
|
||||||
#
|
|
||||||
# The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be
|
|
||||||
# highlighted.
|
|
||||||
#
|
|
||||||
# The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and
|
|
||||||
# `mouse.mods` accept the same values as they do in the `key_bindings` section.
|
|
||||||
#
|
|
||||||
# The `mouse.enabled` field controls if the hint should be underlined while
|
|
||||||
# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
|
|
||||||
#
|
|
||||||
# If the `post_processing` field is set to `true`, heuristics will be used to
|
|
||||||
# shorten the match if there are characters likely not to be part of the hint
|
|
||||||
# (e.g. a trailing `.`). This is most useful for URIs and applies only to
|
|
||||||
# `regex` matches.
|
|
||||||
#
|
|
||||||
# Values for `action`:
|
|
||||||
# - Copy
|
|
||||||
# Copy the hint's text to the clipboard.
|
|
||||||
# - Paste
|
|
||||||
# Paste the hint's text to the terminal or search.
|
|
||||||
# - Select
|
|
||||||
# Select the hint's text.
|
|
||||||
# - MoveViModeCursor
|
|
||||||
# Move the vi mode cursor to the beginning of the hint.
|
|
||||||
enabled:
|
|
||||||
- regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
|
|
||||||
[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
|
|
||||||
hyperlinks: true
|
|
||||||
command: xdg-open
|
|
||||||
post_processing: true
|
|
||||||
mouse:
|
|
||||||
enabled: true
|
|
||||||
mods: Control
|
|
||||||
# binding:
|
|
||||||
# key: U
|
|
||||||
# mods: Control|Shift
|
|
||||||
|
|
||||||
# Mouse bindings
|
|
||||||
#
|
|
||||||
# Mouse bindings are specified as a list of objects, much like the key
|
|
||||||
# bindings further below.
|
|
||||||
#
|
|
||||||
# To trigger mouse bindings when an application running within Alacritty
|
|
||||||
# captures the mouse, the `Shift` modifier is automatically added as a
|
|
||||||
# requirement.
|
|
||||||
#
|
|
||||||
# Each mouse binding will specify a:
|
|
||||||
#
|
|
||||||
# - `mouse`:
|
|
||||||
#
|
|
||||||
# - Middle
|
|
||||||
# - Left
|
|
||||||
# - Right
|
|
||||||
# - Numeric identifier such as `5`
|
|
||||||
#
|
|
||||||
# - `action` (see key bindings for actions not exclusive to mouse mode)
|
|
||||||
#
|
|
||||||
# - Mouse exclusive actions:
|
|
||||||
#
|
|
||||||
# - ExpandSelection
|
|
||||||
# Expand the selection to the current mouse cursor location.
|
|
||||||
#
|
|
||||||
# And optionally:
|
|
||||||
#
|
|
||||||
# - `mods` (see key bindings)
|
|
||||||
#mouse_bindings:
|
|
||||||
# - { mouse: Right, action: ExpandSelection }
|
|
||||||
# - { mouse: Right, mods: Control, action: ExpandSelection }
|
|
||||||
# - { mouse: Middle, mode: ~Vi, action: PasteSelection }
|
|
||||||
|
|
||||||
# Key bindings
|
|
||||||
#
|
|
||||||
# Key bindings are specified as a list of objects. For example, this is the
|
|
||||||
# default paste binding:
|
|
||||||
#
|
|
||||||
# `- { key: V, mods: Control|Shift, action: Paste }`
|
|
||||||
#
|
|
||||||
# Each key binding will specify a:
|
|
||||||
#
|
|
||||||
# - `key`: Identifier of the key pressed
|
|
||||||
#
|
|
||||||
# - A-Z
|
|
||||||
# - F1-F24
|
|
||||||
# - Key0-Key9
|
|
||||||
#
|
|
||||||
# A full list with available key codes can be found here:
|
|
||||||
# https://docs.rs/winit/*/winit/event/enum.VirtualKeyCode.html#variants
|
|
||||||
#
|
|
||||||
# Instead of using the name of the keys, the `key` field also supports using
|
|
||||||
# the scancode of the desired key. Scancodes have to be specified as a
|
|
||||||
# decimal number. This command will allow you to display the hex scancodes
|
|
||||||
# for certain keys:
|
|
||||||
#
|
|
||||||
# `showkey --scancodes`.
|
|
||||||
#
|
|
||||||
# Then exactly one of:
|
|
||||||
#
|
|
||||||
# - `chars`: Send a byte sequence to the running application
|
|
||||||
#
|
|
||||||
# The `chars` field writes the specified string to the terminal. This makes
|
|
||||||
# it possible to pass escape sequences. To find escape codes for bindings
|
|
||||||
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
|
||||||
# of tmux. Note that applications use terminfo to map escape sequences back
|
|
||||||
# to keys. It is therefore required to update the terminfo when changing an
|
|
||||||
# escape sequence.
|
|
||||||
#
|
|
||||||
# - `action`: Execute a predefined action
|
|
||||||
#
|
|
||||||
# - ToggleViMode
|
|
||||||
# - SearchForward
|
|
||||||
# Start searching toward the right of the search origin.
|
|
||||||
# - SearchBackward
|
|
||||||
# Start searching toward the left of the search origin.
|
|
||||||
# - Copy
|
|
||||||
# - Paste
|
|
||||||
# - IncreaseFontSize
|
|
||||||
# - DecreaseFontSize
|
|
||||||
# - ResetFontSize
|
|
||||||
# - ScrollPageUp
|
|
||||||
# - ScrollPageDown
|
|
||||||
# - ScrollHalfPageUp
|
|
||||||
# - ScrollHalfPageDown
|
|
||||||
# - ScrollLineUp
|
|
||||||
# - ScrollLineDown
|
|
||||||
# - ScrollToTop
|
|
||||||
# - ScrollToBottom
|
|
||||||
# - ClearHistory
|
|
||||||
# Remove the terminal's scrollback history.
|
|
||||||
# - Hide
|
|
||||||
# Hide the Alacritty window.
|
|
||||||
# - Minimize
|
|
||||||
# Minimize the Alacritty window.
|
|
||||||
# - Quit
|
|
||||||
# Quit Alacritty.
|
|
||||||
# - ToggleFullscreen
|
|
||||||
# - ToggleMaximized
|
|
||||||
# - SpawnNewInstance
|
|
||||||
# Spawn a new instance of Alacritty.
|
|
||||||
# - CreateNewWindow
|
|
||||||
# Create a new Alacritty window from the current process.
|
|
||||||
# - ClearLogNotice
|
|
||||||
# Clear Alacritty's UI warning and error notice.
|
|
||||||
# - ClearSelection
|
|
||||||
# Remove the active selection.
|
|
||||||
# - ReceiveChar
|
|
||||||
# - None
|
|
||||||
#
|
|
||||||
# - Vi mode exclusive actions:
|
|
||||||
#
|
|
||||||
# - Open
|
|
||||||
# Perform the action of the first matching hint under the vi mode cursor
|
|
||||||
# with `mouse.enabled` set to `true`.
|
|
||||||
# - ToggleNormalSelection
|
|
||||||
# - ToggleLineSelection
|
|
||||||
# - ToggleBlockSelection
|
|
||||||
# - ToggleSemanticSelection
|
|
||||||
# Toggle semantic selection based on `selection.semantic_escape_chars`.
|
|
||||||
# - CenterAroundViCursor
|
|
||||||
# Center view around vi mode cursor
|
|
||||||
#
|
|
||||||
# - Vi mode exclusive cursor motion actions:
|
|
||||||
#
|
|
||||||
# - Up
|
|
||||||
# One line up.
|
|
||||||
# - Down
|
|
||||||
# One line down.
|
|
||||||
# - Left
|
|
||||||
# One character left.
|
|
||||||
# - Right
|
|
||||||
# One character right.
|
|
||||||
# - First
|
|
||||||
# First column, or beginning of the line when already at the first column.
|
|
||||||
# - Last
|
|
||||||
# Last column, or beginning of the line when already at the last column.
|
|
||||||
# - FirstOccupied
|
|
||||||
# First non-empty cell in this terminal row, or first non-empty cell of
|
|
||||||
# the line when already at the first cell of the row.
|
|
||||||
# - High
|
|
||||||
# Top of the screen.
|
|
||||||
# - Middle
|
|
||||||
# Center of the screen.
|
|
||||||
# - Low
|
|
||||||
# Bottom of the screen.
|
|
||||||
# - SemanticLeft
|
|
||||||
# Start of the previous semantically separated word.
|
|
||||||
# - SemanticRight
|
|
||||||
# Start of the next semantically separated word.
|
|
||||||
# - SemanticLeftEnd
|
|
||||||
# End of the previous semantically separated word.
|
|
||||||
# - SemanticRightEnd
|
|
||||||
# End of the next semantically separated word.
|
|
||||||
# - WordLeft
|
|
||||||
# Start of the previous whitespace separated word.
|
|
||||||
# - WordRight
|
|
||||||
# Start of the next whitespace separated word.
|
|
||||||
# - WordLeftEnd
|
|
||||||
# End of the previous whitespace separated word.
|
|
||||||
# - WordRightEnd
|
|
||||||
# End of the next whitespace separated word.
|
|
||||||
# - Bracket
|
|
||||||
# Character matching the bracket at the cursor's location.
|
|
||||||
# - SearchNext
|
|
||||||
# Beginning of the next match.
|
|
||||||
# - SearchPrevious
|
|
||||||
# Beginning of the previous match.
|
|
||||||
# - SearchStart
|
|
||||||
# Start of the match to the left of the vi mode cursor.
|
|
||||||
# - SearchEnd
|
|
||||||
# End of the match to the right of the vi mode cursor.
|
|
||||||
#
|
|
||||||
# - Search mode exclusive actions:
|
|
||||||
# - SearchFocusNext
|
|
||||||
# Move the focus to the next search match.
|
|
||||||
# - SearchFocusPrevious
|
|
||||||
# Move the focus to the previous search match.
|
|
||||||
# - SearchConfirm
|
|
||||||
# - SearchCancel
|
|
||||||
# - SearchClear
|
|
||||||
# Reset the search regex.
|
|
||||||
# - SearchDeleteWord
|
|
||||||
# Delete the last word in the search regex.
|
|
||||||
# - SearchHistoryPrevious
|
|
||||||
# Go to the previous regex in the search history.
|
|
||||||
# - SearchHistoryNext
|
|
||||||
# Go to the next regex in the search history.
|
|
||||||
#
|
|
||||||
# - macOS exclusive actions:
|
|
||||||
# - ToggleSimpleFullscreen
|
|
||||||
# Enter fullscreen without occupying another space.
|
|
||||||
#
|
|
||||||
# - Linux/BSD exclusive actions:
|
|
||||||
#
|
|
||||||
# - CopySelection
|
|
||||||
# Copy from the selection buffer.
|
|
||||||
# - PasteSelection
|
|
||||||
# Paste from the selection buffer.
|
|
||||||
#
|
|
||||||
# - `command`: Fork and execute a specified command plus arguments
|
|
||||||
#
|
|
||||||
# The `command` field must be a map containing a `program` string and an
|
|
||||||
# `args` array of command line parameter strings. For example:
|
|
||||||
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
|
||||||
#
|
|
||||||
# And optionally:
|
|
||||||
#
|
|
||||||
# - `mods`: Key modifiers to filter binding actions
|
|
||||||
#
|
|
||||||
# - Command
|
|
||||||
# - Control
|
|
||||||
# - Option
|
|
||||||
# - Super
|
|
||||||
# - Shift
|
|
||||||
# - Alt
|
|
||||||
#
|
|
||||||
# Multiple `mods` can be combined using `|` like this:
|
|
||||||
# `mods: Control|Shift`.
|
|
||||||
# Whitespace and capitalization are relevant and must match the example.
|
|
||||||
#
|
|
||||||
# - `mode`: Indicate a binding for only specific terminal reported modes
|
|
||||||
#
|
|
||||||
# This is mainly used to send applications the correct escape sequences
|
|
||||||
# when in different modes.
|
|
||||||
#
|
|
||||||
# - AppCursor
|
|
||||||
# - AppKeypad
|
|
||||||
# - Search
|
|
||||||
# - Alt
|
|
||||||
# - Vi
|
|
||||||
#
|
|
||||||
# A `~` operator can be used before a mode to apply the binding whenever
|
|
||||||
# the mode is *not* active, e.g. `~Alt`.
|
|
||||||
#
|
|
||||||
# Bindings are always filled by default, but will be replaced when a new
|
|
||||||
# binding with the same triggers is defined. To unset a default binding, it can
|
|
||||||
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
|
||||||
# a no-op if you do not wish to receive input characters for that binding.
|
|
||||||
#
|
|
||||||
# If the same trigger is assigned to multiple actions, all of them are executed
|
|
||||||
# in the order they were defined in.
|
|
||||||
key_bindings:
|
|
||||||
- { key: N, mods: Control|Shift, action: SpawnNewInstance }
|
|
||||||
#- { key: Paste, action: Paste }
|
|
||||||
#- { key: Copy, action: Copy }
|
|
||||||
#- { key: L, mods: Control, action: ClearLogNotice }
|
|
||||||
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
|
|
||||||
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp }
|
|
||||||
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
|
|
||||||
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop }
|
|
||||||
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
|
|
||||||
|
|
||||||
# Vi Mode
|
|
||||||
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
|
|
||||||
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
|
|
||||||
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
|
|
||||||
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
|
|
||||||
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
|
|
||||||
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
|
|
||||||
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
|
|
||||||
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
|
|
||||||
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
|
|
||||||
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
|
|
||||||
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
|
|
||||||
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
|
|
||||||
#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
|
|
||||||
#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
|
|
||||||
#- { key: Y, mode: Vi|~Search, action: Copy }
|
|
||||||
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
|
|
||||||
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
|
|
||||||
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
|
|
||||||
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
|
|
||||||
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
|
|
||||||
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
|
|
||||||
#- { key: Return, mode: Vi|~Search, action: Open }
|
|
||||||
#- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor }
|
|
||||||
#- { key: K, mode: Vi|~Search, action: Up }
|
|
||||||
#- { key: J, mode: Vi|~Search, action: Down }
|
|
||||||
#- { key: H, mode: Vi|~Search, action: Left }
|
|
||||||
#- { key: L, mode: Vi|~Search, action: Right }
|
|
||||||
#- { key: Up, mode: Vi|~Search, action: Up }
|
|
||||||
#- { key: Down, mode: Vi|~Search, action: Down }
|
|
||||||
#- { key: Left, mode: Vi|~Search, action: Left }
|
|
||||||
#- { key: Right, mode: Vi|~Search, action: Right }
|
|
||||||
#- { key: Key0, mode: Vi|~Search, action: First }
|
|
||||||
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
|
|
||||||
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
|
|
||||||
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
|
|
||||||
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
|
|
||||||
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
|
|
||||||
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
|
|
||||||
#- { key: W, mode: Vi|~Search, action: SemanticRight }
|
|
||||||
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
|
|
||||||
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
|
|
||||||
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
|
|
||||||
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
|
|
||||||
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
|
|
||||||
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
|
|
||||||
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
|
|
||||||
#- { key: N, mode: Vi|~Search, action: SearchNext }
|
|
||||||
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
|
|
||||||
|
|
||||||
# Search Mode
|
|
||||||
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
|
|
||||||
#- { key: Escape, mode: Search, action: SearchCancel }
|
|
||||||
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
|
|
||||||
#- { key: U, mods: Control, mode: Search, action: SearchClear }
|
|
||||||
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
|
|
||||||
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
|
|
||||||
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
|
|
||||||
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
|
|
||||||
#- { key: Down, mode: Search, action: SearchHistoryNext }
|
|
||||||
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
|
|
||||||
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
|
|
||||||
|
|
||||||
# (Windows, Linux, and BSD only)
|
|
||||||
#- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
|
|
||||||
#- { key: C, mods: Control|Shift, action: Copy }
|
|
||||||
#- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward }
|
|
||||||
#- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward }
|
|
||||||
#- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection }
|
|
||||||
#- { key: Insert, mods: Shift, action: PasteSelection }
|
|
||||||
#- { key: Key0, mods: Control, action: ResetFontSize }
|
|
||||||
#- { key: Equals, mods: Control, action: IncreaseFontSize }
|
|
||||||
#- { key: Plus, mods: Control, action: IncreaseFontSize }
|
|
||||||
#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
|
|
||||||
#- { key: Minus, mods: Control, action: DecreaseFontSize }
|
|
||||||
#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
|
|
||||||
|
|
||||||
# (Windows only)
|
|
||||||
#- { key: Return, mods: Alt, action: ToggleFullscreen }
|
|
||||||
|
|
||||||
# (macOS only)
|
|
||||||
#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
|
|
||||||
#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory }
|
|
||||||
#- { key: Key0, mods: Command, action: ResetFontSize }
|
|
||||||
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
|
||||||
#- { key: Plus, mods: Command, action: IncreaseFontSize }
|
|
||||||
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
|
|
||||||
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
|
||||||
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
|
|
||||||
#- { key: V, mods: Command, action: Paste }
|
|
||||||
#- { key: C, mods: Command, action: Copy }
|
|
||||||
#- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection }
|
|
||||||
#- { key: H, mods: Command, action: Hide }
|
|
||||||
#- { key: H, mods: Command|Alt, action: HideOtherApplications }
|
|
||||||
#- { key: M, mods: Command, action: Minimize }
|
|
||||||
#- { key: Q, mods: Command, action: Quit }
|
|
||||||
#- { key: W, mods: Command, action: Quit }
|
|
||||||
#- { key: N, mods: Command, action: CreateNewWindow }
|
|
||||||
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
|
||||||
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
|
|
||||||
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
|
|
||||||
|
|
||||||
#debug:
|
|
||||||
# Display the time it takes to redraw each frame.
|
|
||||||
#render_timer: false
|
|
||||||
|
|
||||||
# Keep the log file after quitting Alacritty.
|
|
||||||
#persistent_logging: false
|
|
||||||
|
|
||||||
# Log level
|
|
||||||
#
|
|
||||||
# Values for `log_level`:
|
|
||||||
# - Off
|
|
||||||
# - Error
|
|
||||||
# - Warn
|
|
||||||
# - Info
|
|
||||||
# - Debug
|
|
||||||
# - Trace
|
|
||||||
#log_level: Warn
|
|
||||||
|
|
||||||
# Renderer override.
|
|
||||||
# - glsl3
|
|
||||||
# - gles2
|
|
||||||
# - gles2_pure
|
|
||||||
#renderer: None
|
|
||||||
|
|
||||||
# Print all received window events.
|
|
||||||
#print_events: false
|
|
||||||
|
|
||||||
# Highlight window damage information.
|
|
||||||
#highlight_damage: false
|
|
||||||
import:
|
|
||||||
# - ~/various/alacritty-theme/themes/Cobalt2.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/afterglow.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/alabaster.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/alabaster_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/argonaut.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/atom_one_light.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/ayu_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/ayu_light.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/base16_default_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/blood_moon.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/bluish.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/breeze.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/campbell.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/carbonfox.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/challenger_deep.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/citylights.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/cyber_punk_neon.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/darcula.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/dark_pastels.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/doom_one.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/dracula.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/everforest_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/everforest_light.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/falcon.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/flat_remix.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/github_dark_colorblind.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/github_dark_default.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/github_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/github_dimmed.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/github_light_colorblind.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/github_light_default.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/github_light.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/gnome_terminal.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/gotham.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/gruvbox_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/gruvbox_light.yaml
|
|
||||||
- ~/various/alacritty-theme/themes/gruvbox_material.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/high_contrast.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/horizon-dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/hyper.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/iterm.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/konsole_linux.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/low_contrast.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/Mariana.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/material_theme_mod.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/material_theme.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/monokai_charcoal.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/monokai_pro.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/moonlight_ii_vscode.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/night_owlish_light.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/nord.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/oceanic_next.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/omni.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/one_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/palenight.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/papercolor_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/papercolor_light.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/papertheme.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/pencil_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/pencil_light.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/rainbow.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/remedy_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/rose-pine.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/seashells.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/smoooooth.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/snazzy.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/solarized_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/solarized_light.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/srcery.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/taerminal.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/tango_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/tender.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/terminal_app.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/thelovelace.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/tokyo-night-storm.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/tokyo-night.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/tomorrow_night_bright.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/tomorrow_night.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/ubuntu.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/wombat.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/xterm.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/zenburm.yaml
|
|
||||||
@@ -12,39 +12,24 @@ local wibox = require("wibox")
|
|||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
-- Notification library
|
-- Notification library
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
|
-- Declarative object management
|
||||||
|
local ruled = require("ruled")
|
||||||
local menubar = require("menubar")
|
local menubar = require("menubar")
|
||||||
local hotkeys_popup = require("awful.hotkeys_popup")
|
local hotkeys_popup = require("awful.hotkeys_popup")
|
||||||
-- Enable hotkeys help widget for VIM and other apps
|
-- Enable hotkeys help widget for VIM and other apps
|
||||||
-- when client with a matching name is opened:
|
-- when client with a matching name is opened:
|
||||||
require("awful.hotkeys_popup.keys")
|
require("awful.hotkeys_popup.keys")
|
||||||
|
|
||||||
-- Load Debian menu entries
|
|
||||||
local debian = require("debian.menu")
|
|
||||||
local has_fdo, freedesktop = pcall(require, "freedesktop")
|
|
||||||
|
|
||||||
-- {{{ Error handling
|
-- {{{ Error handling
|
||||||
-- Check if awesome encountered an error during startup and fell back to
|
-- Check if awesome encountered an error during startup and fell back to
|
||||||
-- another config (This code will only ever execute for the fallback config)
|
-- another config (This code will only ever execute for the fallback config)
|
||||||
if awesome.startup_errors then
|
naughty.connect_signal("request::display_error", function(message, startup)
|
||||||
naughty.notify({ preset = naughty.config.presets.critical,
|
naughty.notification {
|
||||||
title = "Oops, there were errors during startup!",
|
urgency = "critical",
|
||||||
text = awesome.startup_errors })
|
title = "Oops, an error happened"..(startup and " during startup!" or "!"),
|
||||||
end
|
message = message
|
||||||
|
}
|
||||||
-- Handle runtime errors after startup
|
end)
|
||||||
do
|
|
||||||
local in_error = false
|
|
||||||
awesome.connect_signal("debug::error", function (err)
|
|
||||||
-- Make sure we don't go into an endless error loop
|
|
||||||
if in_error then return end
|
|
||||||
in_error = true
|
|
||||||
|
|
||||||
naughty.notify({ preset = naughty.config.presets.critical,
|
|
||||||
title = "Oops, an error happened!",
|
|
||||||
text = tostring(err) })
|
|
||||||
in_error = false
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
@@ -52,7 +37,7 @@ end
|
|||||||
beautiful.init(gears.filesystem.get_configuration_dir() .. "my_theme.lua")
|
beautiful.init(gears.filesystem.get_configuration_dir() .. "my_theme.lua")
|
||||||
|
|
||||||
-- This is used later as the default terminal and editor to run.
|
-- This is used later as the default terminal and editor to run.
|
||||||
terminal = "/home/kmcr/.cargo/bin/alacritty"
|
terminal = "/home/rkmiec/.cargo/bin/alacritty"
|
||||||
editor = os.getenv("EDITOR") or "neovide"
|
editor = os.getenv("EDITOR") or "neovide"
|
||||||
editor_cmd = terminal .. " -e " .. editor
|
editor_cmd = terminal .. " -e " .. editor
|
||||||
|
|
||||||
@@ -62,26 +47,6 @@ editor_cmd = terminal .. " -e " .. editor
|
|||||||
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
|
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
|
||||||
-- However, you can use another modifier like Mod1, but it may interact with others.
|
-- However, you can use another modifier like Mod1, but it may interact with others.
|
||||||
modkey = "Mod4"
|
modkey = "Mod4"
|
||||||
|
|
||||||
-- Table of layouts to cover with awful.layout.inc, order matters.
|
|
||||||
awful.layout.layouts = {
|
|
||||||
awful.layout.suit.floating,
|
|
||||||
awful.layout.suit.tile,
|
|
||||||
awful.layout.suit.tile.left,
|
|
||||||
-- awful.layout.suit.tile.bottom,
|
|
||||||
-- awful.layout.suit.tile.top,
|
|
||||||
-- awful.layout.suit.fair,
|
|
||||||
-- awful.layout.suit.fair.horizontal,
|
|
||||||
-- awful.layout.suit.spiral,
|
|
||||||
-- awful.layout.suit.spiral.dwindle,
|
|
||||||
awful.layout.suit.max,
|
|
||||||
awful.layout.suit.max.fullscreen,
|
|
||||||
-- awful.layout.suit.magnifier,
|
|
||||||
-- awful.layout.suit.corner.nw,
|
|
||||||
-- awful.layout.suit.corner.ne,
|
|
||||||
-- awful.layout.suit.corner.sw,
|
|
||||||
-- awful.layout.suit.corner.se,
|
|
||||||
}
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Menu
|
-- {{{ Menu
|
||||||
@@ -97,20 +62,12 @@ myawesomemenu = {
|
|||||||
local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon }
|
local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon }
|
||||||
local menu_terminal = { "open terminal", terminal }
|
local menu_terminal = { "open terminal", terminal }
|
||||||
|
|
||||||
if has_fdo then
|
mymainmenu = awful.menu({
|
||||||
mymainmenu = freedesktop.menu.build({
|
items = {
|
||||||
before = { menu_awesome },
|
menu_awesome,
|
||||||
after = { menu_terminal }
|
menu_terminal,
|
||||||
})
|
}
|
||||||
else
|
})
|
||||||
mymainmenu = awful.menu({
|
|
||||||
items = {
|
|
||||||
menu_awesome,
|
|
||||||
{ "Debian", debian.menu.Debian_menu.Debian },
|
|
||||||
menu_terminal,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||||
@@ -120,10 +77,53 @@ mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
|||||||
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
|
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Tag layout
|
||||||
|
-- Table of layouts to cover with awful.layout.inc, order matters.
|
||||||
|
tag.connect_signal("request::default_layouts", function()
|
||||||
|
awful.layout.append_default_layouts({
|
||||||
|
awful.layout.suit.floating,
|
||||||
|
awful.layout.suit.tile,
|
||||||
|
awful.layout.suit.tile.left,
|
||||||
|
-- awful.layout.suit.tile.bottom,
|
||||||
|
-- awful.layout.suit.tile.top,
|
||||||
|
-- awful.layout.suit.fair,
|
||||||
|
-- awful.layout.suit.fair.horizontal,
|
||||||
|
-- awful.layout.suit.spiral,
|
||||||
|
-- awful.layout.suit.spiral.dwindle,
|
||||||
|
awful.layout.suit.max,
|
||||||
|
awful.layout.suit.max.fullscreen,
|
||||||
|
-- awful.layout.suit.magnifier,
|
||||||
|
-- awful.layout.suit.corner.nw,
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Wallpaper
|
||||||
|
screen.connect_signal("request::wallpaper", function(s)
|
||||||
|
-- awful.wallpaper {
|
||||||
|
-- screen = s,
|
||||||
|
-- widget = {
|
||||||
|
-- {
|
||||||
|
-- image = beautiful.wallpaper,
|
||||||
|
-- upscale = true,
|
||||||
|
-- downscale = true,
|
||||||
|
-- widget = wibox.widget.imagebox,
|
||||||
|
-- },
|
||||||
|
-- valign = "center",
|
||||||
|
-- halign = "center",
|
||||||
|
-- tiled = false,
|
||||||
|
-- widget = wibox.container.tile,
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
awful.spawn.single_instance("feh --bg-scale /home/rkmiec/Downloads/a45eca3302b5d07d7f95b57f1df52f96.webp")
|
||||||
|
end)
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Wibar
|
||||||
|
|
||||||
-- Keyboard map indicator and switcher
|
-- Keyboard map indicator and switcher
|
||||||
mykeyboardlayout = awful.widget.keyboardlayout()
|
mykeyboardlayout = awful.widget.keyboardlayout()
|
||||||
|
|
||||||
-- {{{ Wibar
|
|
||||||
-- Create a textclock widget
|
-- Create a textclock widget
|
||||||
mytextclock = wibox.widget {
|
mytextclock = wibox.widget {
|
||||||
format = "%a %y %m %_d - %_H %M %S",
|
format = "%a %y %m %_d - %_H %M %S",
|
||||||
@@ -131,65 +131,7 @@ mytextclock = wibox.widget {
|
|||||||
widget = wibox.widget.textclock
|
widget = wibox.widget.textclock
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
screen.connect_signal("request::desktop_decoration", function(s)
|
||||||
local taglist_buttons = gears.table.join(
|
|
||||||
awful.button({ }, 1, function(t) t:view_only() end),
|
|
||||||
awful.button({ modkey }, 1, function(t)
|
|
||||||
if client.focus then
|
|
||||||
client.focus:move_to_tag(t)
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.button({ }, 3, awful.tag.viewtoggle),
|
|
||||||
awful.button({ modkey }, 3, function(t)
|
|
||||||
if client.focus then
|
|
||||||
client.focus:toggle_tag(t)
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
|
|
||||||
awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
|
|
||||||
)
|
|
||||||
|
|
||||||
local tasklist_buttons = gears.table.join(
|
|
||||||
awful.button({ }, 1, function (c)
|
|
||||||
if c == client.focus then
|
|
||||||
c.minimized = true
|
|
||||||
else
|
|
||||||
c:emit_signal(
|
|
||||||
"request::activate",
|
|
||||||
"tasklist",
|
|
||||||
{raise = true}
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.button({ }, 3, function()
|
|
||||||
awful.menu.client_list({ theme = { width = 250 } })
|
|
||||||
end),
|
|
||||||
awful.button({ }, 4, function ()
|
|
||||||
awful.client.focus.byidx(1)
|
|
||||||
end),
|
|
||||||
awful.button({ }, 5, function ()
|
|
||||||
awful.client.focus.byidx(-1)
|
|
||||||
end))
|
|
||||||
|
|
||||||
local function set_wallpaper(s)
|
|
||||||
-- Wallpaper
|
|
||||||
if beautiful.wallpaper then
|
|
||||||
local wallpaper = beautiful.wallpaper
|
|
||||||
-- If wallpaper is a function, call it with the screen
|
|
||||||
if type(wallpaper) == "function" then
|
|
||||||
wallpaper = wallpaper(s)
|
|
||||||
end
|
|
||||||
gears.wallpaper.maximized(wallpaper, s, true)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
|
|
||||||
screen.connect_signal("property::geometry", set_wallpaper)
|
|
||||||
|
|
||||||
awful.screen.connect_for_each_screen(function(s)
|
|
||||||
-- Wallpaper
|
|
||||||
set_wallpaper(s)
|
|
||||||
|
|
||||||
-- Each screen has its own tag table.
|
-- Each screen has its own tag table.
|
||||||
if s.index == 1 then
|
if s.index == 1 then
|
||||||
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[3])
|
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[3])
|
||||||
@@ -199,20 +141,54 @@ awful.screen.connect_for_each_screen(function(s)
|
|||||||
|
|
||||||
-- Create a promptbox for each screen
|
-- Create a promptbox for each screen
|
||||||
s.mypromptbox = awful.widget.prompt()
|
s.mypromptbox = awful.widget.prompt()
|
||||||
|
|
||||||
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
|
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
|
||||||
-- We need one layoutbox per screen.
|
-- We need one layoutbox per screen.
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox {
|
||||||
s.mylayoutbox:buttons(gears.table.join(
|
screen = s,
|
||||||
awful.button({ }, 1, function () awful.layout.inc( 1) end),
|
buttons = {
|
||||||
awful.button({ }, 3, function () awful.layout.inc(-1) end),
|
awful.button({ }, 1, function () awful.layout.inc( 1) end),
|
||||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
awful.button({ }, 3, function () awful.layout.inc(-1) end),
|
||||||
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
|
awful.button({ }, 4, function () awful.layout.inc(-1) end),
|
||||||
|
awful.button({ }, 5, function () awful.layout.inc( 1) end),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-- Create a taglist widget
|
-- Create a taglist widget
|
||||||
s.mytaglist = awful.widget.taglist {
|
s.mytaglist = awful.widget.taglist {
|
||||||
screen = s,
|
screen = s,
|
||||||
filter = awful.widget.taglist.filter.all,
|
filter = awful.widget.taglist.filter.all,
|
||||||
buttons = taglist_buttons,
|
--widget = wibox.container.rotate,
|
||||||
layout = wibox.layout.fixed.vertical,
|
buttons = {
|
||||||
|
awful.button({ }, 1, function(t) t:view_only() end),
|
||||||
|
awful.button({ modkey }, 1, function(t)
|
||||||
|
if client.focus then
|
||||||
|
client.focus:move_to_tag(t)
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
awful.button({ }, 3, awful.tag.viewtoggle),
|
||||||
|
awful.button({ modkey }, 3, function(t)
|
||||||
|
if client.focus then
|
||||||
|
client.focus:toggle_tag(t)
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
|
||||||
|
awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Create a tasklist widget
|
||||||
|
s.mytasklist = awful.widget.tasklist {
|
||||||
|
screen = s,
|
||||||
|
filter = awful.widget.tasklist.filter.currenttags,
|
||||||
|
buttons = {
|
||||||
|
awful.button({ }, 1, function (c)
|
||||||
|
c:activate { context = "tasklist", action = "toggle_minimization" }
|
||||||
|
end),
|
||||||
|
awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end),
|
||||||
|
awful.button({ }, 4, function() awful.client.focus.byidx(-1) end),
|
||||||
|
awful.button({ }, 5, function() awful.client.focus.byidx( 1) end),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Create the wibox
|
-- Create the wibox
|
||||||
@@ -237,7 +213,6 @@ awful.screen.connect_for_each_screen(function(s)
|
|||||||
direction = s.rotation,
|
direction = s.rotation,
|
||||||
widget = wibox.container.rotate
|
widget = wibox.container.rotate
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Add widgets to the wibox
|
-- Add widgets to the wibox
|
||||||
s.mywibox:setup {
|
s.mywibox:setup {
|
||||||
layout = wibox.layout.align.vertical,
|
layout = wibox.layout.align.vertical,
|
||||||
@@ -257,27 +232,61 @@ awful.screen.connect_for_each_screen(function(s)
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Mouse bindings
|
-- {{{ Mouse bindings
|
||||||
root.buttons(gears.table.join(
|
awful.mouse.append_global_mousebindings({
|
||||||
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
||||||
awful.button({ }, 4, awful.tag.viewnext),
|
awful.button({ }, 4, awful.tag.viewprev),
|
||||||
awful.button({ }, 5, awful.tag.viewprev)
|
awful.button({ }, 5, awful.tag.viewnext),
|
||||||
))
|
})
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Key bindings
|
-- {{{ Key bindings
|
||||||
globalkeys = gears.table.join(
|
|
||||||
|
-- General Awesome keys
|
||||||
|
awful.keyboard.append_global_keybindings({
|
||||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||||
{description="show help", group="awesome"}),
|
{description="show help", group="awesome"}),
|
||||||
|
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
||||||
|
{description = "show main menu", group = "awesome"}),
|
||||||
|
awful.key({ modkey, "Control" }, "r", awesome.restart,
|
||||||
|
{description = "reload awesome", group = "awesome"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "c", awesome.quit,
|
||||||
|
{description = "quit awesome", group = "awesome"}),
|
||||||
|
-- awful.key({ modkey }, "y",
|
||||||
|
-- function ()
|
||||||
|
-- awful.prompt.run {
|
||||||
|
-- prompt = "Run Lua code: ",
|
||||||
|
-- textbox = awful.screen.focused().mypromptbox.widget,
|
||||||
|
-- exe_callback = awful.util.eval,
|
||||||
|
-- history_path = awful.util.get_cache_dir() .. "/history_eval"
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- {description = "lua execute prompt", group = "awesome"}),
|
||||||
|
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
||||||
|
{description = "open a terminal", group = "launcher"}),
|
||||||
|
-- awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
||||||
|
-- {description = "run prompt", group = "launcher"}),
|
||||||
|
awful.key({ modkey, }, "d", function () awful.spawn(terminal) end,
|
||||||
|
{description = "open a terminal", group = "launcher"}),
|
||||||
|
awful.key({ modkey }, "p", function() menubar.show() end,
|
||||||
|
{description = "show the menubar", group = "launcher"}),
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Tags related keybindings
|
||||||
|
awful.keyboard.append_global_keybindings({
|
||||||
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
||||||
{description = "view previous", group = "tag"}),
|
{description = "view previous", group = "tag"}),
|
||||||
awful.key({ modkey, }, "Right", awful.tag.viewnext,
|
awful.key({ modkey, }, "Right", awful.tag.viewnext,
|
||||||
{description = "view next", group = "tag"}),
|
{description = "view next", group = "tag"}),
|
||||||
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
|
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
|
||||||
{description = "go back", group = "tag"}),
|
{description = "go back", group = "tag"}),
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Focus related keybindings
|
||||||
|
awful.keyboard.append_global_keybindings({
|
||||||
awful.key({ modkey, }, "j",
|
awful.key({ modkey, }, "j",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.byidx( 1)
|
awful.client.focus.byidx( 1)
|
||||||
@@ -290,20 +299,6 @@ globalkeys = gears.table.join(
|
|||||||
end,
|
end,
|
||||||
{description = "focus previous by index", group = "client"}
|
{description = "focus previous by index", group = "client"}
|
||||||
),
|
),
|
||||||
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
|
||||||
{description = "show main menu", group = "awesome"}),
|
|
||||||
|
|
||||||
-- Layout manipulation
|
|
||||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
|
||||||
{description = "swap with next client by index", group = "client"}),
|
|
||||||
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
|
|
||||||
{description = "swap with previous client by index", group = "client"}),
|
|
||||||
awful.key({ modkey, }, "h", function () awful.screen.focus_relative( 1) end,
|
|
||||||
{description = "focus the next screen", group = "screen"}),
|
|
||||||
awful.key({ modkey, }, "l", function () awful.screen.focus_relative(-1) end,
|
|
||||||
{description = "focus the previous screen", group = "screen"}),
|
|
||||||
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
|
|
||||||
{description = "jump to urgent client", group = "client"}),
|
|
||||||
awful.key({ modkey, }, "Tab",
|
awful.key({ modkey, }, "Tab",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.history.previous()
|
awful.client.focus.history.previous()
|
||||||
@@ -312,15 +307,29 @@ globalkeys = gears.table.join(
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{description = "go back", group = "client"}),
|
{description = "go back", group = "client"}),
|
||||||
|
awful.key({ modkey, "Control" }, "h", function () awful.screen.focus_relative( 1) end,
|
||||||
|
{description = "focus the next screen", group = "screen"}),
|
||||||
|
awful.key({ modkey, "Control" }, "l", function () awful.screen.focus_relative(-1) end,
|
||||||
|
{description = "focus the previous screen", group = "screen"}),
|
||||||
|
awful.key({ modkey, "Control" }, "n",
|
||||||
|
function ()
|
||||||
|
local c = awful.client.restore()
|
||||||
|
-- Focus restored client
|
||||||
|
if c then
|
||||||
|
c:activate { raise = true, context = "key.unminimize" }
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{description = "restore minimized", group = "client"}),
|
||||||
|
})
|
||||||
|
|
||||||
-- Standard program
|
-- Layout related keybindings
|
||||||
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
awful.keyboard.append_global_keybindings({
|
||||||
{description = "open a terminal", group = "launcher"}),
|
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
||||||
awful.key({ modkey, "Control" }, "r", awesome.restart,
|
{description = "swap with next client by index", group = "client"}),
|
||||||
{description = "reload awesome", group = "awesome"}),
|
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
|
||||||
awful.key({ modkey, "Shift" }, "c", awesome.quit,
|
{description = "swap with previous client by index", group = "client"}),
|
||||||
{description = "quit awesome", group = "awesome"}),
|
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
|
||||||
|
{description = "jump to urgent client", group = "client"}),
|
||||||
awful.key({ modkey, "Control" }, "j", function () awful.tag.incmwfact( 0.05) end,
|
awful.key({ modkey, "Control" }, "j", function () awful.tag.incmwfact( 0.05) end,
|
||||||
{description = "increase master width factor", group = "layout"}),
|
{description = "increase master width factor", group = "layout"}),
|
||||||
awful.key({ modkey, "Control" }, "k", function () awful.tag.incmwfact(-0.05) end,
|
awful.key({ modkey, "Control" }, "k", function () awful.tag.incmwfact(-0.05) end,
|
||||||
@@ -337,201 +346,187 @@ globalkeys = gears.table.join(
|
|||||||
{description = "select next", group = "layout"}),
|
{description = "select next", group = "layout"}),
|
||||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
|
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
|
||||||
{description = "select previous", group = "layout"}),
|
{description = "select previous", group = "layout"}),
|
||||||
|
})
|
||||||
|
|
||||||
awful.key({ modkey, "Control" }, "n",
|
|
||||||
function ()
|
|
||||||
local c = awful.client.restore()
|
|
||||||
-- Focus restored client
|
|
||||||
if c then
|
|
||||||
c:emit_signal(
|
|
||||||
"request::activate", "key.unminimize", {raise = true}
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{description = "restore minimized", group = "client"}),
|
|
||||||
|
|
||||||
-- -- Prompt
|
awful.keyboard.append_global_keybindings({
|
||||||
-- awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
awful.key {
|
||||||
-- {description = "run prompt", group = "launcher"}),
|
modifiers = { modkey },
|
||||||
|
keygroup = "numrow",
|
||||||
-- awful.key({ modkey }, "y",
|
description = "only view tag",
|
||||||
-- function ()
|
group = "tag",
|
||||||
-- awful.prompt.run {
|
on_press = function (index)
|
||||||
-- prompt = "Run Lua code: ",
|
local screen = awful.screen.focused()
|
||||||
-- textbox = awful.screen.focused().mypromptbox.widget,
|
local tag = screen.tags[index]
|
||||||
-- exe_callback = awful.util.eval,
|
if tag then
|
||||||
-- history_path = awful.util.get_cache_dir() .. "/history_eval"
|
tag:view_only()
|
||||||
-- }
|
end
|
||||||
-- end,
|
|
||||||
-- {description = "lua execute prompt", group = "awesome"}),
|
|
||||||
-- Menubar
|
|
||||||
awful.key({ modkey }, "p", function() menubar.show() end,
|
|
||||||
{description = "show the menubar", group = "launcher"})
|
|
||||||
)
|
|
||||||
|
|
||||||
clientkeys = gears.table.join(
|
|
||||||
awful.key({ modkey, }, "f",
|
|
||||||
function (c)
|
|
||||||
c.fullscreen = not c.fullscreen
|
|
||||||
c:raise()
|
|
||||||
end,
|
end,
|
||||||
{description = "toggle fullscreen", group = "client"}),
|
},
|
||||||
awful.key({ modkey, }, "q", function (c) c:kill() end,
|
awful.key {
|
||||||
{description = "close", group = "client"}),
|
modifiers = { modkey, "Control" },
|
||||||
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
|
keygroup = "numrow",
|
||||||
{description = "toggle floating", group = "client"}),
|
description = "toggle tag",
|
||||||
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
|
group = "tag",
|
||||||
{description = "move to master", group = "client"}),
|
on_press = function (index)
|
||||||
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
local screen = awful.screen.focused()
|
||||||
{description = "move to screen", group = "client"}),
|
local tag = screen.tags[index]
|
||||||
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
|
if tag then
|
||||||
{description = "toggle keep on top", group = "client"}),
|
awful.tag.viewtoggle(tag)
|
||||||
awful.key({ modkey, }, "n",
|
end
|
||||||
function (c)
|
end,
|
||||||
-- The client currently has the input focus, so it cannot be
|
},
|
||||||
-- minimized, since minimized clients can't have the focus.
|
awful.key {
|
||||||
c.minimized = true
|
modifiers = { modkey, "Shift" },
|
||||||
end ,
|
keygroup = "numrow",
|
||||||
{description = "minimize", group = "client"}),
|
description = "move focused client to tag",
|
||||||
awful.key({ modkey, }, "m",
|
group = "tag",
|
||||||
function (c)
|
on_press = function (index)
|
||||||
c.maximized = not c.maximized
|
if client.focus then
|
||||||
c:raise()
|
local tag = client.focus.screen.tags[index]
|
||||||
end ,
|
if tag then
|
||||||
{description = "(un)maximize", group = "client"}),
|
client.focus:move_to_tag(tag)
|
||||||
awful.key({ modkey, "Control" }, "m",
|
end
|
||||||
function (c)
|
end
|
||||||
c.maximized_vertical = not c.maximized_vertical
|
end,
|
||||||
c:raise()
|
},
|
||||||
end ,
|
awful.key {
|
||||||
{description = "(un)maximize vertically", group = "client"}),
|
modifiers = { modkey, "Control", "Shift" },
|
||||||
awful.key({ modkey, "Shift" }, "m",
|
keygroup = "numrow",
|
||||||
function (c)
|
description = "toggle focused client on tag",
|
||||||
c.maximized_horizontal = not c.maximized_horizontal
|
group = "tag",
|
||||||
c:raise()
|
on_press = function (index)
|
||||||
end ,
|
if client.focus then
|
||||||
{description = "(un)maximize horizontally", group = "client"})
|
local tag = client.focus.screen.tags[index]
|
||||||
)
|
if tag then
|
||||||
|
client.focus:toggle_tag(tag)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
awful.key {
|
||||||
|
modifiers = { modkey },
|
||||||
|
keygroup = "numpad",
|
||||||
|
description = "select layout directly",
|
||||||
|
group = "layout",
|
||||||
|
on_press = function (index)
|
||||||
|
local t = awful.screen.focused().selected_tag
|
||||||
|
if t then
|
||||||
|
t.layout = t.layouts[index] or t.layout
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- Bind all key numbers to tags.
|
client.connect_signal("request::default_mousebindings", function()
|
||||||
-- Be careful: we use keycodes to make it work on any keyboard layout.
|
awful.mouse.append_client_mousebindings({
|
||||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
awful.button({ }, 1, function (c)
|
||||||
for i = 1, 9 do
|
c:activate { context = "mouse_click" }
|
||||||
globalkeys = gears.table.join(globalkeys,
|
end),
|
||||||
-- View tag only.
|
awful.button({ modkey }, 1, function (c)
|
||||||
awful.key({ modkey }, "#" .. i + 9,
|
c:activate { context = "mouse_click", action = "mouse_move" }
|
||||||
function ()
|
end),
|
||||||
local screen = awful.screen.focused()
|
awful.button({ modkey }, 3, function (c)
|
||||||
local tag = screen.tags[i]
|
c:activate { context = "mouse_click", action = "mouse_resize"}
|
||||||
if tag then
|
end),
|
||||||
tag:view_only()
|
})
|
||||||
end
|
end)
|
||||||
end,
|
|
||||||
{description = "view tag #"..i, group = "tag"}),
|
|
||||||
-- Toggle tag display.
|
|
||||||
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
|
||||||
function ()
|
|
||||||
local screen = awful.screen.focused()
|
|
||||||
local tag = screen.tags[i]
|
|
||||||
if tag then
|
|
||||||
awful.tag.viewtoggle(tag)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{description = "toggle tag #" .. i, group = "tag"}),
|
|
||||||
-- Move client to tag.
|
|
||||||
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
|
||||||
function ()
|
|
||||||
if client.focus then
|
|
||||||
local tag = client.focus.screen.tags[i]
|
|
||||||
if tag then
|
|
||||||
client.focus:move_to_tag(tag)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{description = "move focused client to tag #"..i, group = "tag"}),
|
|
||||||
-- Toggle tag on focused client.
|
|
||||||
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
|
||||||
function ()
|
|
||||||
if client.focus then
|
|
||||||
local tag = client.focus.screen.tags[i]
|
|
||||||
if tag then
|
|
||||||
client.focus:toggle_tag(tag)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{description = "toggle focused client on tag #" .. i, group = "tag"})
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
clientbuttons = gears.table.join(
|
client.connect_signal("request::default_keybindings", function()
|
||||||
awful.button({ }, 1, function (c)
|
awful.keyboard.append_client_keybindings({
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
awful.key({ modkey, }, "f",
|
||||||
end),
|
function (c)
|
||||||
awful.button({ modkey }, 1, function (c)
|
c.fullscreen = not c.fullscreen
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
c:raise()
|
||||||
awful.mouse.client.move(c)
|
end,
|
||||||
end),
|
{description = "toggle fullscreen", group = "client"}),
|
||||||
awful.button({ modkey }, 3, function (c)
|
awful.key({ modkey, }, "q", function (c) c:kill() end,
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
{description = "close", group = "client"}),
|
||||||
awful.mouse.client.resize(c)
|
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
|
||||||
end)
|
{description = "toggle floating", group = "client"}),
|
||||||
)
|
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
|
||||||
|
{description = "move to master", group = "client"}),
|
||||||
|
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
||||||
|
{description = "move to screen", group = "client"}),
|
||||||
|
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
|
||||||
|
{description = "toggle keep on top", group = "client"}),
|
||||||
|
awful.key({ modkey, }, "n",
|
||||||
|
function (c)
|
||||||
|
-- The client currently has the input focus, so it cannot be
|
||||||
|
-- minimized, since minimized clients can't have the focus.
|
||||||
|
c.minimized = true
|
||||||
|
end ,
|
||||||
|
{description = "minimize", group = "client"}),
|
||||||
|
awful.key({ modkey, }, "m",
|
||||||
|
function (c)
|
||||||
|
c.maximized = not c.maximized
|
||||||
|
c:raise()
|
||||||
|
end ,
|
||||||
|
{description = "(un)maximize", group = "client"}),
|
||||||
|
awful.key({ modkey, "Control" }, "m",
|
||||||
|
function (c)
|
||||||
|
c.maximized_vertical = not c.maximized_vertical
|
||||||
|
c:raise()
|
||||||
|
end ,
|
||||||
|
{description = "(un)maximize vertically", group = "client"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "m",
|
||||||
|
function (c)
|
||||||
|
c.maximized_horizontal = not c.maximized_horizontal
|
||||||
|
c:raise()
|
||||||
|
end ,
|
||||||
|
{description = "(un)maximize horizontally", group = "client"}),
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
|
||||||
-- Set keys
|
|
||||||
root.keys(globalkeys)
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Rules
|
-- {{{ Rules
|
||||||
-- Rules to apply to new clients (through the "manage" signal).
|
-- Rules to apply to new clients.
|
||||||
awful.rules.rules = {
|
ruled.client.connect_signal("request::rules", function()
|
||||||
-- All clients will match this rule.
|
-- All clients will match this rule.
|
||||||
{ rule = { },
|
ruled.client.append_rule {
|
||||||
properties = { border_width = beautiful.border_width,
|
id = "global",
|
||||||
border_color = beautiful.border_normal,
|
rule = { },
|
||||||
focus = awful.client.focus.filter,
|
properties = {
|
||||||
raise = true,
|
focus = awful.client.focus.filter,
|
||||||
keys = clientkeys,
|
raise = true,
|
||||||
buttons = clientbuttons,
|
screen = awful.screen.preferred,
|
||||||
screen = awful.screen.preferred,
|
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||||
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
-- Floating clients.
|
-- Floating clients.
|
||||||
{ rule_any = {
|
ruled.client.append_rule {
|
||||||
instance = {
|
id = "floating",
|
||||||
"DTA", -- Firefox addon DownThemAll.
|
rule_any = {
|
||||||
"copyq", -- Includes session name in class.
|
instance = {
|
||||||
"pinentry",
|
"DTA", -- Firefox addon DownThemAll.
|
||||||
|
"copyq", -- Includes session name in class.
|
||||||
|
"pinentry", },
|
||||||
|
class = {
|
||||||
|
"Arandr", "Blueman-manager", "Gpick", "Sxiv",
|
||||||
|
"Tor Browser", "Wpa_gui", "veromix", "xtightvncviewer"
|
||||||
|
},
|
||||||
|
-- Note that the name property shown in xprop might be set slightly after creation of the client
|
||||||
|
-- and the name shown there might not match defined rules here.
|
||||||
|
name = {
|
||||||
|
"Event Tester", -- xev.
|
||||||
|
},
|
||||||
|
role = {
|
||||||
|
"AlarmWindow", -- Thunderbird's calendar.
|
||||||
|
"ConfigManager", -- Thunderbird's about:config.
|
||||||
|
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
||||||
|
}
|
||||||
},
|
},
|
||||||
class = {
|
properties = { floating = true }
|
||||||
"Arandr",
|
}
|
||||||
"Blueman-manager",
|
|
||||||
"Gpick",
|
|
||||||
"Kruler",
|
|
||||||
"MessageWin", -- kalarm.
|
|
||||||
"Sxiv",
|
|
||||||
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
|
|
||||||
"Wpa_gui",
|
|
||||||
"veromix",
|
|
||||||
"xtightvncviewer"},
|
|
||||||
|
|
||||||
-- Note that the name property shown in xprop might be set slightly after creation of the client
|
|
||||||
-- and the name shown there might not match defined rules here.
|
|
||||||
name = {
|
|
||||||
"Event Tester", -- xev.
|
|
||||||
},
|
|
||||||
role = {
|
|
||||||
"AlarmWindow", -- Thunderbird's calendar.
|
|
||||||
"ConfigManager", -- Thunderbird's about:config.
|
|
||||||
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
|
||||||
}
|
|
||||||
}, properties = { floating = true }},
|
|
||||||
|
|
||||||
-- Add titlebars to normal clients and dialogs
|
-- Add titlebars to normal clients and dialogs
|
||||||
{ rule_any = {type = { "normal", "dialog" }
|
ruled.client.append_rule {
|
||||||
}, properties = { titlebars_enabled = false }
|
id = "titlebars",
|
||||||
},
|
rule_any = { type = { "normal", "dialog" } },
|
||||||
|
properties = { titlebars_enabled = false }
|
||||||
|
}
|
||||||
|
|
||||||
-- Set Firefox to always map on the tag named "1" on screen 1 and disable
|
-- Set Firefox to always map on the tag named "1" on screen 1 and disable
|
||||||
-- title for that window
|
-- title for that window
|
||||||
@@ -541,39 +536,23 @@ awful.rules.rules = {
|
|||||||
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
|
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
|
||||||
--{ rule = { class = "Google-chrome-beta" },
|
--{ rule = { class = "Google-chrome-beta" },
|
||||||
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
|
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
|
||||||
}
|
end)
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Signals
|
-- {{{ Titlebars
|
||||||
-- Signal function to execute when a new client appears.
|
|
||||||
client.connect_signal("manage", function (c)
|
|
||||||
-- Set the windows at the slave,
|
|
||||||
-- i.e. put it at the end of others instead of setting it master.
|
|
||||||
-- if not awesome.startup then awful.client.setslave(c) end
|
|
||||||
|
|
||||||
if awesome.startup
|
|
||||||
and not c.size_hints.user_position
|
|
||||||
and not c.size_hints.program_position then
|
|
||||||
-- Prevent clients from being unreachable after screen count changes.
|
|
||||||
awful.placement.no_offscreen(c)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
||||||
client.connect_signal("request::titlebars", function(c)
|
client.connect_signal("request::titlebars", function(c)
|
||||||
-- buttons for the titlebar
|
-- buttons for the titlebar
|
||||||
local buttons = gears.table.join(
|
local buttons = {
|
||||||
awful.button({ }, 1, function()
|
awful.button({ }, 1, function()
|
||||||
c:emit_signal("request::activate", "titlebar", {raise = true})
|
c:activate { context = "titlebar", action = "mouse_move" }
|
||||||
awful.mouse.client.move(c)
|
|
||||||
end),
|
end),
|
||||||
awful.button({ }, 3, function()
|
awful.button({ }, 3, function()
|
||||||
c:emit_signal("request::activate", "titlebar", {raise = true})
|
c:activate { context = "titlebar", action = "mouse_resize"}
|
||||||
awful.mouse.client.resize(c)
|
end),
|
||||||
end)
|
}
|
||||||
)
|
|
||||||
|
|
||||||
awful.titlebar(c) : setup {
|
awful.titlebar(c).widget = {
|
||||||
{ -- Left
|
{ -- Left
|
||||||
awful.titlebar.widget.iconwidget(c),
|
awful.titlebar.widget.iconwidget(c),
|
||||||
buttons = buttons,
|
buttons = buttons,
|
||||||
@@ -581,7 +560,7 @@ client.connect_signal("request::titlebars", function(c)
|
|||||||
},
|
},
|
||||||
{ -- Middle
|
{ -- Middle
|
||||||
{ -- Title
|
{ -- Title
|
||||||
align = "center",
|
halign = "center",
|
||||||
widget = awful.titlebar.widget.titlewidget(c)
|
widget = awful.titlebar.widget.titlewidget(c)
|
||||||
},
|
},
|
||||||
buttons = buttons,
|
buttons = buttons,
|
||||||
@@ -598,15 +577,34 @@ client.connect_signal("request::titlebars", function(c)
|
|||||||
layout = wibox.layout.align.horizontal
|
layout = wibox.layout.align.horizontal
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Notifications
|
||||||
|
|
||||||
|
ruled.notification.connect_signal('request::rules', function()
|
||||||
|
-- All notifications will match this rule.
|
||||||
|
ruled.notification.append_rule {
|
||||||
|
rule = { },
|
||||||
|
properties = {
|
||||||
|
screen = awful.screen.preferred,
|
||||||
|
implicit_timeout = 5,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
|
naughty.connect_signal("request::display", function(n)
|
||||||
|
naughty.layout.box { notification = n }
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- }}}
|
||||||
|
|
||||||
-- Enable sloppy focus, so that focus follows mouse.
|
-- Enable sloppy focus, so that focus follows mouse.
|
||||||
client.connect_signal("mouse::enter", function(c)
|
client.connect_signal("mouse::enter", function(c)
|
||||||
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
c:activate { context = "mouse_enter", raise = false }
|
||||||
end)
|
end)
|
||||||
|
|
||||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||||
-- }}}
|
|
||||||
|
|
||||||
awful.spawn.with_shell(
|
awful.spawn.with_shell(
|
||||||
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
|
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
|
||||||
@@ -620,11 +618,11 @@ do
|
|||||||
{
|
{
|
||||||
"xset b off",
|
"xset b off",
|
||||||
"xdotool key --clearmodifiers Num_Lock",
|
"xdotool key --clearmodifiers Num_Lock",
|
||||||
"autorandr -c",
|
--"autorandr -c",
|
||||||
"pasystray -m 100",
|
"pasystray -m 100",
|
||||||
"cbatticon",
|
--"cbatticon",
|
||||||
"barrierc --disable-crypto 192.168.10.2:24800",
|
--"barrierc --disable-crypto 192.168.10.2:24800",
|
||||||
"xbindkeys -f /home/kmcr/.config/xbindkeysrc",
|
"xbindkeys -f /home/rkmiec/.config/xbindkeysrc",
|
||||||
}
|
}
|
||||||
for _,i in ipairs(cmds_once) do
|
for _,i in ipairs(cmds_once) do
|
||||||
awful.spawn(i)
|
awful.spawn(i)
|
||||||
@@ -632,10 +630,10 @@ do
|
|||||||
--"dunst -config /home/kmcr/.config/i3/dunst_config",
|
--"dunst -config /home/kmcr/.config/i3/dunst_config",
|
||||||
local cmds_single_instance =
|
local cmds_single_instance =
|
||||||
{
|
{
|
||||||
"nm-applet",
|
--"nm-applet",
|
||||||
"blueman-applet",
|
"blueman-applet",
|
||||||
"flameshot",
|
"flameshot",
|
||||||
"feh --no-xinerama --bg-scale /home/kmcr/.config/i3/wallpaper.jpg",
|
"feh --bg-scale /home/rkmiec/Downloads/a45eca3302b5d07d7f95b57f1df52f96.webp",
|
||||||
}
|
}
|
||||||
for _,i in ipairs(cmds_single_instance) do
|
for _,i in ipairs(cmds_single_instance) do
|
||||||
awful.spawn.single_instance(i)
|
awful.spawn.single_instance(i)
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ theme.fg_focus = srcery_colors.blue
|
|||||||
theme.fg_urgent = srcery_colors.magenta
|
theme.fg_urgent = srcery_colors.magenta
|
||||||
theme.fg_minimize = srcery_colors.white
|
theme.fg_minimize = srcery_colors.white
|
||||||
|
|
||||||
theme.useless_gap = dpi(2)
|
theme.useless_gap = dpi(1)
|
||||||
theme.border_width = dpi(2)
|
theme.border_width = dpi(1)
|
||||||
theme.border_normal = srcery_colors.brightblack
|
theme.border_normal = srcery_colors.brightblack
|
||||||
theme.border_focus = srcery_colors.white
|
theme.border_focus = srcery_colors.white
|
||||||
theme.border_marked = srcery_colors.brightred
|
theme.border_marked = srcery_colors.brightred
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ alias .5='cd ../../../../..'
|
|||||||
alias v='nvim'
|
alias v='nvim'
|
||||||
alias n='nnn -e'
|
alias n='nnn -e'
|
||||||
alias pdf='zathura'
|
alias pdf='zathura'
|
||||||
|
alias bc='bc -q'
|
||||||
|
|
||||||
if type -q lsd
|
if type -q lsd
|
||||||
alias lsl="lsd -l"
|
alias lsl="lsd -l"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
set -x EDITOR nvim
|
set -x EDITOR nvim
|
||||||
set -x PAGER less
|
set -x PAGER less
|
||||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
#set -x MANPAGER 'sh -c \'col -bx | bat -l man -p\''
|
||||||
set -x fish_prompt_pwd_dir_length 1
|
set -x fish_prompt_pwd_dir_length 1
|
||||||
set -x fish_greeting ''
|
set -x fish_greeting ''
|
||||||
set fish_complete_path $fish_complete_path /usr/share/fish/completions
|
set fish_complete_path $fish_complete_path /usr/share/fish/completions
|
||||||
@@ -21,8 +21,12 @@ set -x PATH $PATH /home/kmcr/.codon
|
|||||||
#if status is-interactive
|
#if status is-interactive
|
||||||
# cat ~/.cache/wal/sequences
|
# cat ~/.cache/wal/sequences
|
||||||
#end
|
#end
|
||||||
source ~/.local/share/nvim/lazy/falcon/exa/EXA_COLORS
|
if test -e ~/.local/share/nvim/lazy/falcon/exa/EXA_COLORS
|
||||||
|
source ~/.local/share/nvim/lazy/falcon/exa/EXA_COLORS
|
||||||
function list_dir --on-variable PWD
|
end
|
||||||
ls
|
|
||||||
|
if status is-interactive
|
||||||
|
function list_dir --on-variable PWD
|
||||||
|
ls
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
.ackrc
|
.ackrc
|
||||||
.notags
|
.notags
|
||||||
|
.gitmessage
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
# start a terminal
|
|
||||||
bindsym Mod4+t exec ~/.cargo/bin/alacritty
|
|
||||||
|
|
||||||
# Use pulseaudio-ctl to adjust volume in PulseAudio.
|
|
||||||
bindsym XF86AudioRaiseVolume exec pulseaudio-ctl up && $refresh_i3status
|
|
||||||
bindsym XF86AudioLowerVolume exec pulseaudio-ctl down && $refresh_i3status
|
|
||||||
bindsym XF86AudioMute exec pulseaudio-ctl mute && $refresh_i3status
|
|
||||||
bindsym XF86AudioMicMute exec pulseaudio-ctl mute-input
|
|
||||||
bindsym XF86AudioPlay exec playerctl --ignore-player=chromium play-pause
|
|
||||||
bindsym XF86AudioPause exec playerctl --ignore-player=chromium play-pause
|
|
||||||
bindsym XF86AudioStop exec playerctl --ignore-player=chromium stop
|
|
||||||
bindsym XF86AudioNext exec playerctl --ignore-player=chromium next
|
|
||||||
bindsym XF86AudioPrev exec playerctl --ignore-player=chromium previous
|
|
||||||
|
|
||||||
bindsym XF86Calculator exec --no-startup-id gnome-calculator
|
|
||||||
|
|
||||||
# System state management
|
|
||||||
bindsym Pause exec systemctl suspend
|
|
||||||
bindsym Mod4+z exec i3lock -c 151515 -e -f
|
|
||||||
|
|
||||||
# Screen brightness controls
|
|
||||||
bindsym Mod1+Up exec brightnessctl s 5\%+
|
|
||||||
bindsym Mod1+Down exec brightnessctl s 5\%-
|
|
||||||
|
|
||||||
# start rofi (a program launcher)
|
|
||||||
bindsym Mod4+d exec --no-startup-id "rofi -show run"
|
|
||||||
bindsym Mod4+Shift+d exec --no-startup-id "rofi -show window"
|
|
||||||
bindsym Mod1+Tab exec --no-startup-id "rofi -show window"
|
|
||||||
bindsym Mod4+ctrl+d exec rofi-pass
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Start XDG autostart .desktop files using dex. See also
|
|
||||||
# https://wiki.archlinux.org/index.php/XDG_Autostart
|
|
||||||
exec --no-startup-id dex --autostart --environment i3
|
|
||||||
|
|
||||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
|
|
||||||
# they are included here as an example. Modify as you see fit.
|
|
||||||
|
|
||||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
|
||||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
|
||||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
|
||||||
|
|
||||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
|
||||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
|
||||||
exec --no-startup-id nm-applet
|
|
||||||
|
|
||||||
exec setxkbmap pl
|
|
||||||
exec --no-startup-id dunst -config ~/.config/i3/dunst_config
|
|
||||||
exec --no-startup-id pasystray -m 100
|
|
||||||
exec --no-startup-id blueman-applet
|
|
||||||
exec --no-startup-id xset b off
|
|
||||||
exec --no-startup-id flameshot
|
|
||||||
exec --no-startup-id autorandr -c
|
|
||||||
exec --no-startup-id wal -n -i ~/.config/i3/wallpaper.jpg
|
|
||||||
exec --no-startup-id feh --no-xinerama --bg-scale ~/.config/i3/wallpaper.jpg
|
|
||||||
exec --no-startup-id xdotool key --clearmodifiers Num_Lock
|
|
||||||
#exec --no-startup-id unclutter # generates some issues on work laptop
|
|
||||||
#exec --no-startup-id barriers -c ~/.config/barrier.conf --screen-change-script ~/.local/bin/switch_pc.sh
|
|
||||||
exec --no-startup-id barrierc 192.168.10.2:24800
|
|
||||||
@@ -1,14 +1,8 @@
|
|||||||
# i3 config file (v4)
|
# i3 config file (v4)
|
||||||
#
|
#
|
||||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||||
#
|
|
||||||
# This config file uses keycodes (bindsym) and was written for the QWERTY
|
|
||||||
# layout.
|
|
||||||
#
|
|
||||||
# To get a config file with the same key positions, but for your current
|
|
||||||
# layout, use the i3-config-wizard
|
|
||||||
#
|
|
||||||
|
|
||||||
|
set $mod Mod4
|
||||||
set_from_resource $main_color i3wm.color1 #fdff00
|
set_from_resource $main_color i3wm.color1 #fdff00
|
||||||
set_from_resource $secondary_color i3wm.color0 #98d1ce
|
set_from_resource $secondary_color i3wm.color0 #98d1ce
|
||||||
set_from_resource $bg_color i3wm.color4 #0c1014
|
set_from_resource $bg_color i3wm.color4 #0c1014
|
||||||
@@ -18,14 +12,14 @@ set $refresh_i3status killall -SIGUSR1 i3status-rs
|
|||||||
|
|
||||||
# Font for window titles. Will also be used by the bar unless a different font
|
# Font for window titles. Will also be used by the bar unless a different font
|
||||||
# is used in the bar {} block below.
|
# is used in the bar {} block below.
|
||||||
font Monoid Nerd Font 9
|
font pango:CommitMonotuned 9
|
||||||
|
|
||||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||||
#font pango:DejaVu Sans Mono 8
|
#font pango:DejaVu Sans Mono 8
|
||||||
|
|
||||||
include conf.d/exec.conf
|
include exec.conf
|
||||||
include conf.d/binds.conf
|
#include binds.conf
|
||||||
|
|
||||||
# use these keys for focus, movement, and resize directions when reaching for
|
# use these keys for focus, movement, and resize directions when reaching for
|
||||||
# the arrows is not convenient
|
# the arrows is not convenient
|
||||||
@@ -34,68 +28,84 @@ set $down j
|
|||||||
set $up k
|
set $up k
|
||||||
set $right l
|
set $right l
|
||||||
|
|
||||||
# use Mouse+Mod4 to drag floating windows to their wanted position
|
# use Mouse+$mod to drag floating windows to their wanted position
|
||||||
floating_modifier Mod4
|
floating_modifier $mod
|
||||||
|
|
||||||
|
# move tiling windows via drag & drop by left-clicking into the title bar,
|
||||||
|
# or left-clicking anywhere into the window while holding the floating modifier.
|
||||||
|
tiling_drag modifier titlebar
|
||||||
|
|
||||||
|
# start a terminal
|
||||||
|
set $TERMINAL ~/.cargo/bin/wezterm
|
||||||
|
bindsym $mod+t exec $TERMINAL
|
||||||
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym Mod4+Shift+q kill
|
bindsym $mod+Shift+q kill
|
||||||
|
|
||||||
|
# start dmenu (a program launcher)
|
||||||
|
bindsym $mod+d exec --no-startup-id dmenu_run
|
||||||
|
# A more modern dmenu replacement is rofi:
|
||||||
|
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
|
||||||
|
# There also is i3-dmenu-desktop which only displays applications shipping a
|
||||||
|
# .desktop file. It is a wrapper around dmenu, so you need that installed.
|
||||||
|
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
|
||||||
|
|
||||||
# change focus
|
# change focus
|
||||||
bindsym Mod4+$left focus left
|
bindsym $mod+$left focus left
|
||||||
bindsym Mod4+$down focus down
|
bindsym $mod+$down focus down
|
||||||
bindsym Mod4+$up focus up
|
bindsym $mod+$up focus up
|
||||||
bindsym Mod4+$right focus right
|
bindsym $mod+$right focus right
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
# alternatively, you can use the cursor keys:
|
||||||
bindsym Mod4+Left focus left
|
bindsym $mod+Left focus left
|
||||||
bindsym Mod4+Down focus down
|
bindsym $mod+Down focus down
|
||||||
bindsym Mod4+Up focus up
|
bindsym $mod+Up focus up
|
||||||
bindsym Mod4+Right focus right
|
bindsym $mod+Right focus right
|
||||||
|
|
||||||
# move focused window
|
# move focused window
|
||||||
bindsym Mod4+Shift+$left move left
|
bindsym $mod+Shift+$left move left
|
||||||
bindsym Mod4+Shift+$down move down
|
bindsym $mod+Shift+$down move down
|
||||||
bindsym Mod4+Shift+$up move up
|
bindsym $mod+Shift+$up move up
|
||||||
bindsym Mod4+Shift+$right move right
|
bindsym $mod+Shift+$right move right
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
# alternatively, you can use the cursor keys:
|
||||||
bindsym Mod4+Shift+Left move left
|
bindsym $mod+Shift+Left move left
|
||||||
bindsym Mod4+Shift+Down move down
|
bindsym $mod+Shift+Down move down
|
||||||
bindsym Mod4+Shift+Up move up
|
bindsym $mod+Shift+Up move up
|
||||||
bindsym Mod4+Shift+Right move right
|
bindsym $mod+Shift+Right move right
|
||||||
|
|
||||||
# split in horizontal orientation
|
# split in horizontal orientation
|
||||||
bindsym Mod4+b split h
|
bindsym $mod+semicolon split h
|
||||||
|
|
||||||
# split in vertical orientation
|
# split in vertical orientation
|
||||||
bindsym Mod4+v split v
|
bindsym $mod+v split v
|
||||||
|
|
||||||
# enter fullscreen mode for the focused container
|
# enter fullscreen mode for the focused container
|
||||||
bindsym Mod4+f fullscreen toggle
|
bindsym $mod+f fullscreen toggle
|
||||||
|
|
||||||
# change container layout (stacked, tabbed, toggle split)
|
# change container layout (stacked, tabbed, toggle split)
|
||||||
bindsym Mod4+q layout stacking
|
bindsym $mod+q layout stacking
|
||||||
bindsym Mod4+w layout tabbed
|
bindsym $mod+w layout tabbed
|
||||||
bindsym Mod4+e layout toggle split
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
# toggle tiling / floating
|
# toggle tiling / floating
|
||||||
bindsym Mod4+Shift+space floating toggle
|
bindsym $mod+Shift+space floating toggle
|
||||||
|
|
||||||
# change focus between tiling / floating windows
|
# change focus between tiling / floating windows
|
||||||
bindsym Mod4+space focus mode_toggle
|
bindsym $mod+space focus mode_toggle
|
||||||
|
|
||||||
# focus the parent container
|
# focus the parent container
|
||||||
bindsym Mod4+a focus parent
|
bindsym $mod+a focus parent
|
||||||
|
|
||||||
# focus the child container
|
# focus the child container
|
||||||
#bindsym Mod4+d focus child
|
#bindsym $mod+d focus child
|
||||||
|
|
||||||
# move the currently focused window to the scratchpad
|
# move the currently focused window to the scratchpad
|
||||||
bindsym Mod4+m move scratchpad
|
bindsym $mod+m move scratchpad
|
||||||
|
|
||||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||||
# If there are multiple scratchpad windows, this command cycles through them.
|
# If there are multiple scratchpad windows, this command cycles through them.
|
||||||
bindsym Mod4+s scratchpad show
|
bindsym $mod+s scratchpad show
|
||||||
|
|
||||||
# Define names for default workspaces for which we configure key bindings later on.
|
# Define names for default workspaces for which we configure key bindings later on.
|
||||||
# We use variables to avoid repeating the names in multiple places.
|
# We use variables to avoid repeating the names in multiple places.
|
||||||
@@ -109,90 +119,38 @@ set $ws7 " 7 "
|
|||||||
set $ws8 " 8 "
|
set $ws8 " 8 "
|
||||||
set $ws9 " 9 "
|
set $ws9 " 9 "
|
||||||
set $ws10 " 10 "
|
set $ws10 " 10 "
|
||||||
set $ws11 " 11 "
|
|
||||||
set $ws12 " 12 "
|
|
||||||
set $ws13 " 13 "
|
|
||||||
set $ws14 " 14 "
|
|
||||||
set $ws15 " 15 "
|
|
||||||
set $ws16 " 16 "
|
|
||||||
set $ws17 " 17 "
|
|
||||||
set $ws18 " 18 "
|
|
||||||
set $ws19 " 19 "
|
|
||||||
set $ws20 " 20 "
|
|
||||||
|
|
||||||
workspace $ws1 output $output_main
|
|
||||||
workspace $ws2 output $output_main
|
|
||||||
workspace $ws3 output $output_main
|
|
||||||
workspace $ws4 output $output_main
|
|
||||||
workspace $ws5 output $output_main
|
|
||||||
workspace $ws6 output $output_main
|
|
||||||
workspace $ws7 output $output_main
|
|
||||||
workspace $ws8 output $output_main
|
|
||||||
workspace $ws9 output $output_main
|
|
||||||
workspace $ws10 output $output_main
|
|
||||||
workspace $ws11 output $output_secondary
|
|
||||||
workspace $ws12 output $output_secondary
|
|
||||||
workspace $ws13 output $output_secondary
|
|
||||||
workspace $ws14 output $output_secondary
|
|
||||||
workspace $ws15 output $output_secondary
|
|
||||||
workspace $ws16 output $output_secondary
|
|
||||||
workspace $ws17 output $output_secondary
|
|
||||||
workspace $ws18 output $output_secondary
|
|
||||||
workspace $ws19 output $output_secondary
|
|
||||||
workspace $ws20 output $output_secondary
|
|
||||||
|
|
||||||
# switch to workspace
|
# switch to workspace
|
||||||
bindsym Mod4+1 workspace number $ws1
|
bindsym $mod+1 workspace number $ws1
|
||||||
bindsym Mod4+2 workspace number $ws2
|
bindsym $mod+2 workspace number $ws2
|
||||||
bindsym Mod4+3 workspace number $ws3
|
bindsym $mod+3 workspace number $ws3
|
||||||
bindsym Mod4+4 workspace number $ws4
|
bindsym $mod+4 workspace number $ws4
|
||||||
bindsym Mod4+5 workspace number $ws5
|
bindsym $mod+5 workspace number $ws5
|
||||||
bindsym Mod4+6 workspace number $ws6
|
bindsym $mod+6 workspace number $ws6
|
||||||
bindsym Mod4+7 workspace number $ws7
|
bindsym $mod+7 workspace number $ws7
|
||||||
bindsym Mod4+8 workspace number $ws8
|
bindsym $mod+8 workspace number $ws8
|
||||||
bindsym Mod4+9 workspace number $ws9
|
bindsym $mod+9 workspace number $ws9
|
||||||
bindsym Mod4+0 workspace number $ws10
|
bindsym $mod+0 workspace number $ws10
|
||||||
bindsym Mod1+1 workspace number $ws11
|
|
||||||
bindsym Mod1+2 workspace number $ws12
|
|
||||||
bindsym Mod1+3 workspace number $ws13
|
|
||||||
bindsym Mod1+4 workspace number $ws14
|
|
||||||
bindsym Mod1+5 workspace number $ws15
|
|
||||||
bindsym Mod1+6 workspace number $ws16
|
|
||||||
bindsym Mod1+7 workspace number $ws17
|
|
||||||
bindsym Mod1+8 workspace number $ws18
|
|
||||||
bindsym Mod1+9 workspace number $ws19
|
|
||||||
bindsym Mod1+0 workspace number $ws20
|
|
||||||
|
|
||||||
# move focused container to workspace
|
# move focused container to workspace
|
||||||
bindsym Mod4+Shift+1 move container to workspace number $ws1
|
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||||
bindsym Mod4+Shift+2 move container to workspace number $ws2
|
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||||
bindsym Mod4+Shift+3 move container to workspace number $ws3
|
bindsym $mod+Shift+3 move container to workspace number $ws3
|
||||||
bindsym Mod4+Shift+4 move container to workspace number $ws4
|
bindsym $mod+Shift+4 move container to workspace number $ws4
|
||||||
bindsym Mod4+Shift+5 move container to workspace number $ws5
|
bindsym $mod+Shift+5 move container to workspace number $ws5
|
||||||
bindsym Mod4+Shift+6 move container to workspace number $ws6
|
bindsym $mod+Shift+6 move container to workspace number $ws6
|
||||||
bindsym Mod4+Shift+7 move container to workspace number $ws7
|
bindsym $mod+Shift+7 move container to workspace number $ws7
|
||||||
bindsym Mod4+Shift+8 move container to workspace number $ws8
|
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||||
bindsym Mod4+Shift+9 move container to workspace number $ws9
|
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||||
bindsym Mod4+Shift+0 move container to workspace number $ws10
|
bindsym $mod+Shift+0 move container to workspace number $ws10
|
||||||
bindsym Mod1+Shift+1 move container to workspace number $ws11
|
bindsym $mod+n exec i3-new-workspace
|
||||||
bindsym Mod1+Shift+2 move container to workspace number $ws12
|
|
||||||
bindsym Mod1+Shift+3 move container to workspace number $ws13
|
|
||||||
bindsym Mod1+Shift+4 move container to workspace number $ws14
|
|
||||||
bindsym Mod1+Shift+5 move container to workspace number $ws15
|
|
||||||
bindsym Mod1+Shift+6 move container to workspace number $ws16
|
|
||||||
bindsym Mod1+Shift+7 move container to workspace number $ws17
|
|
||||||
bindsym Mod1+Shift+8 move container to workspace number $ws18
|
|
||||||
bindsym Mod1+Shift+9 move container to workspace number $ws19
|
|
||||||
bindsym Mod1+Shift+0 move container to workspace number $ws20
|
|
||||||
|
|
||||||
bindsym Mod4+n exec i3-new-workspace
|
|
||||||
|
|
||||||
# reload the configuration file
|
# reload the configuration file
|
||||||
bindsym Mod4+Shift+c reload
|
bindsym $mod+Shift+c reload
|
||||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||||
bindsym Mod4+Shift+r restart
|
bindsym $mod+Shift+r restart
|
||||||
# exit i3 (logs you out of your X session)
|
# exit i3 (logs you out of your X session)
|
||||||
bindsym Mod4+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
|
||||||
# resize window (you can also use the mouse for that)
|
# resize window (you can also use the mouse for that)
|
||||||
mode "resize" {
|
mode "resize" {
|
||||||
@@ -208,29 +166,26 @@ mode "resize" {
|
|||||||
bindsym $right resize grow width 10 px or 10 ppt
|
bindsym $right resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
# same bindings, but for the arrow keys
|
# same bindings, but for the arrow keys
|
||||||
bindsym Left resize shrink width 10 px or 10 ppt
|
bindsym Left resize shrink width 5 px or 5 ppt
|
||||||
bindsym Down resize grow height 10 px or 10 ppt
|
bindsym Down resize grow height 5 px or 5 ppt
|
||||||
bindsym Up resize shrink height 10 px or 10 ppt
|
bindsym Up resize shrink height 5 px or 5 ppt
|
||||||
bindsym Right resize grow width 10 px or 10 ppt
|
bindsym Right resize grow width 5 px or 5 ppt
|
||||||
|
|
||||||
# back to normal: Enter or Escape or Mod4+r
|
# back to normal: Enter or Escape or $mod+r
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
bindsym Mod4+r mode "default"
|
bindsym $mod+r mode "default"
|
||||||
}
|
}
|
||||||
|
|
||||||
bindsym Mod4+r mode "resize"
|
bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||||
# finds out, if available)
|
# finds out, if available)
|
||||||
bar {
|
bar {
|
||||||
font pango:Monoid Nerd Font 9
|
mode hide
|
||||||
status_command ~/.cargo/bin/i3status-rs ~/.config/i3/i3status-rs.toml
|
status_command i3status-rs ~/.config/i3/i3status-rs.toml
|
||||||
mode dock
|
modifier $mod
|
||||||
modifier Mod4
|
font pango:CommitMonotuned 9
|
||||||
tray_padding 0
|
|
||||||
tray_output primary
|
|
||||||
|
|
||||||
colors {
|
colors {
|
||||||
separator #268bd2
|
separator #268bd2
|
||||||
background $bg_color
|
background $bg_color
|
||||||
@@ -255,8 +210,8 @@ for_window [title="Figure *"] move container to workspace $ws10 floating enable
|
|||||||
assign [class="com-mathworks-util-PostVMInit" title="^Fig"] $ws10
|
assign [class="com-mathworks-util-PostVMInit" title="^Fig"] $ws10
|
||||||
|
|
||||||
#without borders
|
#without borders
|
||||||
new_window pixel 1
|
default_border pixel 2
|
||||||
new_float pixel 3
|
default_floating_border pixel 3
|
||||||
hide_edge_borders smart
|
hide_edge_borders smart
|
||||||
#focus_on_window_activation focus
|
#focus_on_window_activation focus
|
||||||
focus_on_window_activation urgent
|
focus_on_window_activation urgent
|
||||||
|
|||||||
@@ -1,40 +1,52 @@
|
|||||||
theme = "solarized-dark"
|
[icons]
|
||||||
icons = "awesome"
|
icons = "awesome"
|
||||||
|
|
||||||
[[block]]
|
[theme]
|
||||||
block = "custom"
|
theme = "solarized-dark"
|
||||||
command = "echo vpn:(vpn | head -1 | cut -d: -f 2)"
|
|
||||||
interval = 5
|
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "disk_space"
|
block = "disk_space"
|
||||||
path = "/home"
|
path = "/home"
|
||||||
alias = "~"
|
|
||||||
info_type = "available"
|
info_type = "available"
|
||||||
unit = "GB"
|
alert_unit = "GB"
|
||||||
interval = 20
|
interval = 20
|
||||||
warning = 20.0
|
warning = 20.0
|
||||||
alert = 10.0
|
alert = 10.0
|
||||||
|
format = " $icon home: $available.eng(w:2) "
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "disk_space"
|
||||||
|
path = "/"
|
||||||
|
info_type = "available"
|
||||||
|
alert_unit = "GB"
|
||||||
|
interval = 20
|
||||||
|
warning = 20.0
|
||||||
|
alert = 10.0
|
||||||
|
format = " $icon root: $available.eng(w:2) "
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "memory"
|
block = "memory"
|
||||||
display_type = "memory"
|
format = " $icon $mem_total_used_percents.eng(w:2) "
|
||||||
format_mem = "{mem_total_used_percents}"
|
format_alt = " $icon_swap $swap_used_percents.eng(w:2) "
|
||||||
format_swap = "{swap_used_percents}"
|
|
||||||
|
[[block]]
|
||||||
|
block = "amd_gpu"
|
||||||
|
format = " $icon $utilization "
|
||||||
|
format_alt = " $icon MEM: $vram_used_percents ($vram_used/$vram_total) "
|
||||||
|
interval = 1
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "cpu"
|
block = "cpu"
|
||||||
interval = 1
|
info_cpu = 20
|
||||||
|
warning_cpu = 50
|
||||||
|
critical_cpu = 90
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "load"
|
block = "load"
|
||||||
interval = 1
|
interval = 1
|
||||||
format = "{1m}"
|
format = " $icon 1min avg: $1m.eng(w:4) "
|
||||||
|
|
||||||
[[block]]
|
|
||||||
block = "sound"
|
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "time"
|
block = "time"
|
||||||
interval = 60
|
interval = 5
|
||||||
format = "%a %d.%m %R"
|
format = " $timestamp.datetime(f:'%a %F %T') "
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 520 KiB |
@@ -1,22 +1,4 @@
|
|||||||
require('core.config')
|
require('core.config')
|
||||||
require('core.plugins')
|
require('core.plugins')
|
||||||
require('core.mappings')
|
require('core.mappings')
|
||||||
|
require('core.autocmd')
|
||||||
vim.cmd([[
|
|
||||||
"highlight MatchParen cterm=underline ctermbg=black ctermfg=NONE
|
|
||||||
"highlight VirtColumn ctermfg=DarkGrey ctermbg=NONE
|
|
||||||
"hi clear SpellBad
|
|
||||||
"hi SpellBad cterm=underline
|
|
||||||
|
|
||||||
" Ctags {{{
|
|
||||||
if isdirectory($HOME . '/.cache/nvim/tags') == 0
|
|
||||||
:silent !mkdir -p ~/.cache/nvim/tags > /dev/null 2>&1
|
|
||||||
endif
|
|
||||||
let g:gutentags_cache_dir='~/.cache/nvim/tags'
|
|
||||||
|
|
||||||
if isdirectory($HOME . '/.cache/nvim/undo') == 0
|
|
||||||
:silent !mkdir -p ~/.cache/nvim/undo > /dev/null 2>&1
|
|
||||||
endif
|
|
||||||
set undodir=~/.cache/nvim/undo/
|
|
||||||
set undofile
|
|
||||||
]])
|
|
||||||
|
|||||||
3
.config/nvim/lua/.luarc.json
Normal file
3
.config/nvim/lua/.luarc.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"workspace.checkThirdParty": false
|
||||||
|
}
|
||||||
29
.config/nvim/lua/core/autocmd.lua
Normal file
29
.config/nvim/lua/core/autocmd.lua
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
local api = vim.api
|
||||||
|
local autocmd = api.nvim_create_autocmd
|
||||||
|
local augroup = api.nvim_create_augroup
|
||||||
|
local opt = vim.opt
|
||||||
|
local o = vim.o
|
||||||
|
local g = vim.g
|
||||||
|
local fn = vim.fn
|
||||||
|
|
||||||
|
autocmd("BufWritePre", {
|
||||||
|
desc = "Autocreate a dir when saving a file",
|
||||||
|
group = augroup("auto_create_dir", { clear = true }),
|
||||||
|
callback = function(event)
|
||||||
|
if event.match:match("^%w%w+:[\\/][\\/]") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local file = vim.uv.fs_realpath(event.match) or event.match
|
||||||
|
fn.mkdir(fn.fnamemodify(file, ":p:h"), "p")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
autocmd("BufReadPost", {
|
||||||
|
desc = "Auto jump to last position",
|
||||||
|
group = augroup("auto-last-position", { clear = true }),
|
||||||
|
callback = function(args)
|
||||||
|
local position = api.nvim_buf_get_mark(args.buf, [["]])
|
||||||
|
local winid = fn.bufwinid(args.buf)
|
||||||
|
pcall(api.nvim_win_set_cursor, winid, position)
|
||||||
|
end,
|
||||||
|
})
|
||||||
@@ -1,13 +1,25 @@
|
|||||||
vim.g.loaded = 1
|
vim.g.loaded = 1
|
||||||
vim.g.loaded_netrwPlugin = 1
|
-- uncomment to disable netrw, but nvim scp://xx will not work:
|
||||||
|
-- vim.g.loaded_netrwPlugin = 1
|
||||||
vim.g.plug_install = 0
|
vim.g.plug_install = 0
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
|
vim.opt.startofline = true
|
||||||
|
|
||||||
vim.opt.shell = '/bin/bash'
|
vim.g.loaded_ruby_provider = 0
|
||||||
|
vim.g.loaded_perl_provider = 0
|
||||||
|
|
||||||
|
local undodir = vim.fn.expand('~/.cache/nvim/undo')
|
||||||
|
vim.fn.mkdir(undodir, 'p')
|
||||||
|
vim.opt.undodir = undodir
|
||||||
|
vim.opt.undofile = true
|
||||||
|
|
||||||
|
vim.opt.conceallevel = 1
|
||||||
|
|
||||||
|
--vim.opt.shell = '/bin/bash'
|
||||||
|
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
--vim.o.relativenumber = 1
|
--vim.o.relativenumber = 1
|
||||||
vim.opt.numberwidth = 1
|
vim.opt.numberwidth = 2
|
||||||
vim.opt.clipboard = "unnamedplus"
|
vim.opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
vim.opt.showmode = true
|
vim.opt.showmode = true
|
||||||
@@ -21,15 +33,15 @@ vim.opt.splitright = true
|
|||||||
-- gui settings
|
-- gui settings
|
||||||
vim.opt.guifont="IBM Plex Mono Text:h9:e-subpixelantyalias"
|
vim.opt.guifont="IBM Plex Mono Text:h9:e-subpixelantyalias"
|
||||||
vim.g.neovide_cursor_vfx_mode = 'pixiedust'
|
vim.g.neovide_cursor_vfx_mode = 'pixiedust'
|
||||||
vim.g.neovide_refresh_rate = 120
|
vim.g.neovide_refresh_rate = 165
|
||||||
vim.g.neovide_refresh_rate_idle = 5
|
vim.g.neovide_refresh_rate_idle = 5
|
||||||
vim.g.neovide_remember_window_size = 0
|
vim.g.neovide_remember_window_size = 0
|
||||||
|
|
||||||
vim.opt.listchars = { tab = "▸ ", trail = "¬" }
|
vim.opt.listchars = { tab = "▸ ", trail = "¬" }
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
vim.opt.tabstop=2
|
vim.opt.tabstop=4
|
||||||
vim.opt.shiftwidth=2
|
vim.opt.shiftwidth=4
|
||||||
vim.opt.softtabstop=2
|
vim.opt.softtabstop=4
|
||||||
|
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
@@ -61,20 +73,20 @@ vim.opt.cmdheight = 1
|
|||||||
|
|
||||||
-- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
-- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
||||||
-- delays and poor user experience.
|
-- delays and poor user experience.
|
||||||
--vim.opt.updatetime = 300
|
vim.opt.updatetime = 300
|
||||||
|
|
||||||
-- Don't pass messages to |ins-completion-menu|.
|
-- Don't pass messages to |ins-completion-menu|.
|
||||||
vim.opt.shortmess:append('c')
|
vim.opt.shortmess:append('c')
|
||||||
vim.opt.shortmess:remove('F')
|
vim.opt.shortmess:remove('F')
|
||||||
|
|
||||||
vim.opt.signcolumn = "auto"
|
vim.opt.signcolumn = "yes"
|
||||||
|
|
||||||
vim.opt.wildmode = { "longest", "list", "full" }
|
vim.opt.wildmode = { "longest", "list", "full" }
|
||||||
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||||
|
|
||||||
vim.opt.mouse = ""
|
vim.opt.mouse = ""
|
||||||
|
|
||||||
--match Error /\s\+$\|DU\cPA/
|
vim.cmd.match([[Error /\s\+$\|DU\cPA/]])
|
||||||
|
|
||||||
vim.opt.virtualedit = "block"
|
vim.opt.virtualedit = "block"
|
||||||
vim.opt.shiftround = true
|
vim.opt.shiftround = true
|
||||||
@@ -95,3 +107,4 @@ vim.opt.wildignore = [[
|
|||||||
*/tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**"
|
*/tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**"
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
vim.g.loaded_perl_provider = 0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
local default_options = { noremap = true, silent = true }
|
local default_options = { noremap = true, silent = true }
|
||||||
local expr_options = { noremap = true, expr = true, silent = true }
|
--local expr_options = { noremap = true, expr = true, silent = true }
|
||||||
|
|
||||||
-- space one line, home,end globally increase/decrease
|
-- space one line, home,end globally increase/decrease
|
||||||
map('n', '<Home>', 'zc', default_options)
|
map('n', '<Home>', 'zc', default_options)
|
||||||
@@ -11,7 +11,7 @@ map('t', '<ESC><ESC>', '<C-\\><C-n>', default_options)
|
|||||||
map('i', 'jj', '<ESC>', default_options)
|
map('i', 'jj', '<ESC>', default_options)
|
||||||
map('i', 'jk', '<ESC>', default_options)
|
map('i', 'jk', '<ESC>', default_options)
|
||||||
--map('i', ':w<CR>', '<Esc>:w<CR>', default_options)
|
--map('i', ':w<CR>', '<Esc>:w<CR>', default_options)
|
||||||
map('n', 'Q', '<cmd>q', default_options)
|
map('n', 'Q', ':q', default_options)
|
||||||
|
|
||||||
-- Reselect visual block after incrementing/decrementing
|
-- Reselect visual block after incrementing/decrementing
|
||||||
map('v', '<c-a>', '<c-a>gv', default_options)
|
map('v', '<c-a>', '<c-a>gv', default_options)
|
||||||
@@ -26,88 +26,3 @@ map('v', 'P', '"_dP', default_options)
|
|||||||
map('n', '<leader>2', '<cmd>set tabstop=2 softtabstop=2 shiftwidth=2<cr>', default_options)
|
map('n', '<leader>2', '<cmd>set tabstop=2 softtabstop=2 shiftwidth=2<cr>', default_options)
|
||||||
map('n', '<leader>4', '<cmd>set tabstop=4 softtabstop=4 shiftwidth=4<cr>', default_options)
|
map('n', '<leader>4', '<cmd>set tabstop=4 softtabstop=4 shiftwidth=4<cr>', default_options)
|
||||||
map('n', '<leader>8', '<cmd>set tabstop=8 softtabstop=8 shiftwidth=8<cr>', default_options)
|
map('n', '<leader>8', '<cmd>set tabstop=8 softtabstop=8 shiftwidth=8<cr>', default_options)
|
||||||
|
|
||||||
map('n', '<leader><space>', '<cmd>nohlsearch<cr>', default_options)
|
|
||||||
|
|
||||||
-- digraphs
|
|
||||||
map('i', '<C-k>d', '<cmd>lua require("better-digraphs").digraphs("i")<cr>', expr_options)
|
|
||||||
|
|
||||||
-- femaco
|
|
||||||
--map('n', '<leader>fe'. '<cmd>FeMaCo<cr>', expr_options)
|
|
||||||
|
|
||||||
-- fterm
|
|
||||||
map('n', '<leader>i', '<cmd>lua require("FTerm").toggle()<CR>', default_options)
|
|
||||||
map('t', '<leader>i', '<cmd>lua require("FTerm").toggle()<CR>', default_options)
|
|
||||||
|
|
||||||
-- icon picker
|
|
||||||
map('n', '<C-k>i', '<cmd>IconPickerNormal<cr>', expr_options)
|
|
||||||
map('n', '<C-k>y', '<cmd>IconPickerYank<cr>', expr_options)
|
|
||||||
map('i', '<C-k>i', '<cmd>IconPickerInsert<cr>', expr_options)
|
|
||||||
|
|
||||||
-- iswap
|
|
||||||
map('n', '<leader>sw', '<cmd>ISwapWith<cr>', expr_options)
|
|
||||||
map('n', '<leader>ss', '<cmd>ISwap<cr>', expr_options)
|
|
||||||
|
|
||||||
-- code window
|
|
||||||
require('codewindow').apply_default_keybinds()
|
|
||||||
|
|
||||||
-- nvim tree
|
|
||||||
map('n', '<leader>tt', '<cmd>NvimTreeToggle<cr>', default_options)
|
|
||||||
map('n', '<leader>tf', '<cmd>NvimTreeFindFile<cr>', default_options)
|
|
||||||
|
|
||||||
-- other
|
|
||||||
map('n', '<leader>oo', '<cmd>Other<cr>', default_options)
|
|
||||||
map('n', '<leader>os', '<cmd>OtherSplit<cr>', default_options)
|
|
||||||
map('n', '<leader>ov', '<cmd>OtherVSplit<cr>', default_options)
|
|
||||||
map('n', '<leader>oc', '<cmd>OtherClear<cr>', default_options)
|
|
||||||
-- Context specific bindings
|
|
||||||
map('n', '<leader>ot', '<cmd>Other test<cr>', default_options)
|
|
||||||
map('n', '<leader>os', '<cmd>Other scss<cr>', default_options)
|
|
||||||
|
|
||||||
-- quicknote
|
|
||||||
map('n', '<leader>qn', '<cmd>lua require("quicknote").NewNoteAtCurrentLine()<cr>', default_options)
|
|
||||||
map('n', '<leader>qs', '<cmd>lua require("quicknote").ShowNoteSigns()<cr>', default_options)
|
|
||||||
map('n', '<leader>qe', '<cmd>lua require("quicknote").OpenNoteAtCurrentLine()<cr>', default_options)
|
|
||||||
map('n', '<leader>qd', '<cmd>lua require("quicknote").DeleteNoteAtCurrentLine()<cr>', default_options)
|
|
||||||
|
|
||||||
-- telescope
|
|
||||||
map('n', '<leader>f', '<cmd>lua require("telescope").extensions.menufacture.find_files()<cr>', default_options)
|
|
||||||
map('n', '<leader>a', '<cmd>lua require("telescope").extensions.menufacture.grep_string()<cr>', default_options)
|
|
||||||
map('n', '<leader>A', '<cmd>lua require("telescope").extensions.menufacture.live_grep()<cr>', default_options)
|
|
||||||
map('n', '<leader>b', '<cmd>lua require("telescope.builtin").buffers()<cr>', default_options)
|
|
||||||
map('n', '<leader>r', '<cmd>lua require("telescope.builtin").resume()<cr>', default_options)
|
|
||||||
-- map('n', '<leader>fh', '<cmd>lua require('telescope.builtin').help_tags()<cr>, default_options)
|
|
||||||
map('n', '<leader>tc', '<cmd>lua require("telescope.builtin").commands()<cr>', default_options)
|
|
||||||
map('n', '<leader>t:', '<cmd>lua require("telescope.builtin").command_history()<cr>', default_options)
|
|
||||||
map('n', '<leader>t/', '<cmd>lua require("telescope.builtin").search_history()<cr>', default_options)
|
|
||||||
map('n', '<leader>tr', '<cmd>lua require("telescope.builtin").registers()<cr>', default_options)
|
|
||||||
-- Neovim lsp pickers
|
|
||||||
map('n', '<leader>tr', '<cmd>lua require("telescope.builtin").lsp_references()<cr>', default_options)
|
|
||||||
map('n', '<leader>td', '<cmd>lua require("telescope.builtin").lsp_definitions()<cr>', default_options)
|
|
||||||
-- git pickers
|
|
||||||
map('n', '<leader>gc', '<cmd>lua require("telescope.builtin").git_commits()<cr>', default_options)
|
|
||||||
map('n', '<leader>gC', '<cmd>lua require("telescope.builtin").git_bcommits()<cr>', default_options)
|
|
||||||
map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', default_options)
|
|
||||||
-- map('n', '<leader>s', '<cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>, default_options)
|
|
||||||
map('n', '<leader>u', '<cmd>lua require("telescope").extensions.undo.undo()<cr>', default_options)
|
|
||||||
map('n', '<leader>cf', '<cmd>lua require("telescope").extensions.agrolens.agrolens({query="functions, labels"})<cr>', default_options)
|
|
||||||
map('n', '<leader>cc', '<cmd>lua require("telescope").extensions.agrolens.agrolens({query="callings"})<cr>', default_options)
|
|
||||||
|
|
||||||
-- togger not active
|
|
||||||
--vim.keymap.set({'n', 'v'}, 'gt', require('nvim-toggler').toggle)
|
|
||||||
|
|
||||||
-- windows
|
|
||||||
map('n', '<C-w>z', "<cmd> WindowsMaximize<cr>")
|
|
||||||
map('n', '<C-w>_', "<cmd> WindowsMaximizeVertically<cr>")
|
|
||||||
map('n', '<C-w>|', "<cmd> WindowsMaximizeHorizontally<cr>")
|
|
||||||
map('n', '<C-w>=', "<cmd WindowsEqualize<cr>")
|
|
||||||
|
|
||||||
-- specs
|
|
||||||
-- You can even bind it to search jumping and more, example:
|
|
||||||
vim.api.nvim_set_keymap('n', 'n', 'n:lua require("specs").show_specs()<CR>', default_options)
|
|
||||||
vim.api.nvim_set_keymap('n', 'N', 'N:lua require("specs").show_specs()<CR>', default_options)
|
|
||||||
|
|
||||||
-- Or maybe you do a lot of screen-casts and want to call attention to a specific line of code:
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>v', ':lua require("specs").show_specs({width = 97, winhl = "Search", delay_ms = 610, inc_ms = 21})<CR>', { noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>cb', ':lua require("nvim-navbuddy").open()<cr>', default_options)
|
|
||||||
|
|||||||
@@ -5,13 +5,22 @@ if not vim.loop.fs_stat(lazypath) then
|
|||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable", -- latest stable release
|
--"--branch=stable", -- latest stable release
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
return require'lazy'.setup('plugins')
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
require'lazy'.setup('plugins')
|
||||||
|
-- , {
|
||||||
|
-- change_detection = {
|
||||||
|
-- enabled = false,
|
||||||
|
-- notify = false
|
||||||
|
-- },
|
||||||
|
-- dev = {
|
||||||
|
-- path = '/home/kmcr'
|
||||||
|
-- }
|
||||||
|
-- })
|
||||||
|
|||||||
6
.config/nvim/lua/plugins/actions-preview.lua
Normal file
6
.config/nvim/lua/plugins/actions-preview.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
"aznhe21/actions-preview.nvim",
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set({ "v", "n" }, "gra", require("actions-preview").code_actions)
|
||||||
|
end,
|
||||||
|
}
|
||||||
14
.config/nvim/lua/plugins/ascii_image.lua
Normal file
14
.config/nvim/lua/plugins/ascii_image.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
return {
|
||||||
|
'samodostal/image.nvim',
|
||||||
|
name = 'ascii-image',
|
||||||
|
opts = {
|
||||||
|
render = {
|
||||||
|
min_padding = 5,
|
||||||
|
show_label = true,
|
||||||
|
use_dither = true,
|
||||||
|
},
|
||||||
|
events = {
|
||||||
|
update_on_nvim_resize = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/auto-diff.lua
Normal file
5
.config/nvim/lua/plugins/auto-diff.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
"yutkat/git-rebase-auto-diff.nvim",
|
||||||
|
ft = { "gitrebase" },
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
17
.config/nvim/lua/plugins/bigfile.lua
Normal file
17
.config/nvim/lua/plugins/bigfile.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
"LunarVim/bigfile.nvim",
|
||||||
|
opts = {
|
||||||
|
filesize = 2, -- size of the file in MiB, the plugin round file sizes to the closest MiB
|
||||||
|
pattern = { "*" }, -- autocmd pattern or function see <### Overriding the detection of big files>
|
||||||
|
features = { -- features to disable
|
||||||
|
"indent_blankline",
|
||||||
|
"illuminate",
|
||||||
|
"lsp",
|
||||||
|
"treesitter",
|
||||||
|
"syntax",
|
||||||
|
"matchparen",
|
||||||
|
"vimopts",
|
||||||
|
"filetype",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
4
.config/nvim/lua/plugins/bitbake.lua
Normal file
4
.config/nvim/lua/plugins/bitbake.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
'kergoth/vim-bitbake', -- Bitbake templates and syntax
|
||||||
|
ft = { 'bitbake' }
|
||||||
|
}
|
||||||
12
.config/nvim/lua/plugins/bitbucket.lua
Normal file
12
.config/nvim/lua/plugins/bitbucket.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
--'tools/bitbucket.nvim',
|
||||||
|
dir = '~/tools/bitbucket.nvim/',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim'
|
||||||
|
},
|
||||||
|
-- dev = true,
|
||||||
|
config = function()
|
||||||
|
require('bitbucket-nvim').setup({ opt = "test"})
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
191
.config/nvim/lua/plugins/blink.lua
Normal file
191
.config/nvim/lua/plugins/blink.lua
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
return { {
|
||||||
|
'Saghen/blink.cmp',
|
||||||
|
-- optional: provides snippets for the snippet source
|
||||||
|
dependencies = {
|
||||||
|
'rafamadriz/friendly-snippets',
|
||||||
|
'xzbdmw/colorful-menu.nvim',
|
||||||
|
'disrupted/blink-cmp-conventional-commits',
|
||||||
|
'moyiz/blink-emoji.nvim',
|
||||||
|
'milanglacier/minuet-ai.nvim',
|
||||||
|
'mikavilpas/blink-ripgrep.nvim',
|
||||||
|
},
|
||||||
|
|
||||||
|
-- use a release tag to download pre-built binaries
|
||||||
|
version = '*',
|
||||||
|
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
||||||
|
-- build = 'cargo build --release',
|
||||||
|
-- If you use nix, you can build from source using latest nightly rust with:
|
||||||
|
-- build = 'nix run .#build-plugin',
|
||||||
|
|
||||||
|
---@module 'blink.cmp'
|
||||||
|
---@type blink.cmp.Config
|
||||||
|
opts = {
|
||||||
|
-- 'default' for mappings similar to built-in completion
|
||||||
|
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
|
||||||
|
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
|
||||||
|
-- See the full "keymap" documentation for information on defining your own keymap.
|
||||||
|
keymap = {
|
||||||
|
preset = 'default',
|
||||||
|
--['A-y'] = require('minuet').make_blink_map()
|
||||||
|
},
|
||||||
|
|
||||||
|
appearance = {
|
||||||
|
-- -- Sets the fallback highlight groups to nvim-cmp's highlight groups
|
||||||
|
-- -- Useful for when your theme doesn't support blink.cmp
|
||||||
|
-- -- Will be removed in a future release
|
||||||
|
-- use_nvim_cmp_as_default = true,
|
||||||
|
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||||
|
-- Adjusts spacing to ensure icons are aligned
|
||||||
|
nerd_font_variant = 'mono'
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Default list of enabled providers defined so that you can extend it
|
||||||
|
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||||
|
sources = {
|
||||||
|
default = {
|
||||||
|
'conventional_commits',
|
||||||
|
'lsp',
|
||||||
|
'path',
|
||||||
|
'snippets',
|
||||||
|
'buffer',
|
||||||
|
'emoji',
|
||||||
|
--'ripgrep',
|
||||||
|
--[[ 'minuet' ]]
|
||||||
|
},
|
||||||
|
providers = {
|
||||||
|
conventional_commits = {
|
||||||
|
name = "Conventional Commits",
|
||||||
|
module = 'blink-cmp-conventional-commits',
|
||||||
|
enabled = function()
|
||||||
|
return vim.bo.filetype == 'gitcommit'
|
||||||
|
end,
|
||||||
|
opts = {}
|
||||||
|
},
|
||||||
|
emoji = {
|
||||||
|
module = 'blink-emoji',
|
||||||
|
name = "Emoji",
|
||||||
|
score_offset = 15,
|
||||||
|
opts = { insert = true },
|
||||||
|
should_show_items = function()
|
||||||
|
return vim.tbl_contains({ "gitcommit", "markdown" }, vim.o.filetype)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
minuet = {
|
||||||
|
name = 'minuet',
|
||||||
|
module = 'minuet.blink',
|
||||||
|
async = true,
|
||||||
|
-- Should match minuet.config.request_timeout * 1000,
|
||||||
|
-- since minuet.config.request_timeout is in seconds
|
||||||
|
timeout_ms = 3000,
|
||||||
|
score_offset = 50, -- Gives minuet higher priority among suggestions
|
||||||
|
},
|
||||||
|
ripgrep = {
|
||||||
|
module = 'blink-ripgrep',
|
||||||
|
name = 'Ripgrep',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
completion = {
|
||||||
|
menu = {
|
||||||
|
draw = {
|
||||||
|
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
||||||
|
components = {
|
||||||
|
label = {
|
||||||
|
text = function(ctx)
|
||||||
|
return require("colorful-menu").blink_components_text(ctx)
|
||||||
|
end,
|
||||||
|
highlight = function(ctx)
|
||||||
|
return require("colorful-menu").blink_components_highlight(ctx)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
--trigger = { prefetch_on_insert = false },
|
||||||
|
|
||||||
|
accept = { auto_brackets = { enabled = false }, },
|
||||||
|
ghost_text = { enabled = false },
|
||||||
|
},
|
||||||
|
-- experimental:
|
||||||
|
signature = { enabled = true },
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" }
|
||||||
|
}, {
|
||||||
|
"xzbdmw/colorful-menu.nvim",
|
||||||
|
config = function()
|
||||||
|
-- You don't need to set these options.
|
||||||
|
require("colorful-menu").setup({
|
||||||
|
ls = {
|
||||||
|
lua_ls = {
|
||||||
|
-- Maybe you want to dim arguments a bit.
|
||||||
|
arguments_hl = "@comment",
|
||||||
|
},
|
||||||
|
gopls = {
|
||||||
|
-- By default, we render variable/function's type in the right most side,
|
||||||
|
-- to make them not to crowd together with the original label.
|
||||||
|
|
||||||
|
-- when true:
|
||||||
|
-- foo *Foo
|
||||||
|
-- ast "go/ast"
|
||||||
|
|
||||||
|
-- when false:
|
||||||
|
-- foo *Foo
|
||||||
|
-- ast "go/ast"
|
||||||
|
align_type_to_right = true,
|
||||||
|
-- When true, label for field and variable will format like "foo: Foo"
|
||||||
|
-- instead of go's original syntax "foo Foo". If align_type_to_right is
|
||||||
|
-- true, this option has no effect.
|
||||||
|
add_colon_before_type = false,
|
||||||
|
},
|
||||||
|
-- for lsp_config or typescript-tools
|
||||||
|
ts_ls = {
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
vtsls = {
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
-- Such as (as Iterator), (use std::io).
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
-- Similar to the same setting of gopls.
|
||||||
|
align_type_to_right = true,
|
||||||
|
},
|
||||||
|
clangd = {
|
||||||
|
-- Such as "From <stdio.h>".
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
-- Similar to the same setting of gopls.
|
||||||
|
align_type_to_right = true,
|
||||||
|
-- the hl group of leading dot of "•std::filesystem::permissions(..)"
|
||||||
|
import_dot_hl = "@comment",
|
||||||
|
},
|
||||||
|
zls = {
|
||||||
|
-- Similar to the same setting of gopls.
|
||||||
|
align_type_to_right = true,
|
||||||
|
},
|
||||||
|
roslyn = {
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
-- The same applies to pyright/pylance
|
||||||
|
basedpyright = {
|
||||||
|
-- It is usually import path such as "os"
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- If true, try to highlight "not supported" languages.
|
||||||
|
fallback = true,
|
||||||
|
},
|
||||||
|
-- If the built-in logic fails to find a suitable highlight group,
|
||||||
|
-- this highlight is applied to the label.
|
||||||
|
fallback_highlight = "@variable",
|
||||||
|
-- If provided, the plugin truncates the final displayed text to
|
||||||
|
-- this width (measured in display cells). Any highlights that extend
|
||||||
|
-- beyond the truncation point are ignored. When set to a float
|
||||||
|
-- between 0 and 1, it'll be treated as percentage of the width of
|
||||||
|
-- the window: math.floor(max_width * vim.api.nvim_win_get_width(0))
|
||||||
|
-- Default 60.
|
||||||
|
max_width = 60,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
} }
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"HampusHauffman/block.nvim",
|
"HampusHauffman/block.nvim",
|
||||||
|
enabled = false,
|
||||||
config = function()
|
config = function()
|
||||||
require("block").setup({})
|
require("block").setup({})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ return {
|
|||||||
},
|
},
|
||||||
-- User defined loops
|
-- User defined loops
|
||||||
additions = {
|
additions = {
|
||||||
{'tic', 'tac', 'toe'},
|
|
||||||
{'light', 'dark'},
|
{'light', 'dark'},
|
||||||
{'phaseOne', 'phaseTwo', 'phaseThree'},
|
{'phaseOne', 'phaseTwo', 'phaseThree'},
|
||||||
{'PhaseOne', 'PhaseTwo', 'PhaseThree'},
|
{'PhaseOne', 'PhaseTwo', 'PhaseThree'},
|
||||||
|
|||||||
37
.config/nvim/lua/plugins/cd-project.lua
Normal file
37
.config/nvim/lua/plugins/cd-project.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
return {
|
||||||
|
'LintaoAmons/cd-project.nvim',
|
||||||
|
opts = {
|
||||||
|
-- this json file is acting like a database to update and read the projects in real time.
|
||||||
|
-- So because it's just a json file, you can edit directly to add more paths you want manually
|
||||||
|
projects_config_filepath = vim.fs.normalize(vim.fn.stdpath("config") .. "/cd-project.nvim.json"),
|
||||||
|
-- this controls the behaviour of `CdProjectAdd` command about how to get the project directory
|
||||||
|
project_dir_pattern = { ".git", ".gitignore", "Cargo.toml", "package.json", "go.mod" },
|
||||||
|
choice_format = "both", -- optional, you can switch to "name" or "path"
|
||||||
|
projects_picker = "vim-ui", -- optional, you can switch to `telescope`
|
||||||
|
-- do whatever you like by hooks
|
||||||
|
hooks = {
|
||||||
|
{
|
||||||
|
callback = function(dir)
|
||||||
|
vim.notify("switched to dir: " .. dir)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
callback = function(_)
|
||||||
|
vim.cmd("Telescope find_files")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
callback = function(dir)
|
||||||
|
vim.notify("switched to dir: " .. dir)
|
||||||
|
end, -- required, action when trigger the hook
|
||||||
|
name = "cd hint", -- optional
|
||||||
|
order = 1, -- optional, the execution order if there're multiple hooks to be trigger at one point
|
||||||
|
pattern = "cd-project.nvim", -- optional, trigger hook if contains pattern
|
||||||
|
trigger_point = "DISABLE", -- optional, enum of trigger_points, default to `AFTER_CD`
|
||||||
|
match_rule = function(dir) -- optional, a function return bool. if have this fields, then pattern will be ignored
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
17
.config/nvim/lua/plugins/chatgpt.lua
Normal file
17
.config/nvim/lua/plugins/chatgpt.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
"jackMort/ChatGPT.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require("chatgpt").setup({
|
||||||
|
|
||||||
|
--api_key_cmd = "op read op://private/OpenAI/credential --no-newline"
|
||||||
|
api_key = "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"
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim"
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
49
.config/nvim/lua/plugins/codecompanion.lua
Normal file
49
.config/nvim/lua/plugins/codecompanion.lua
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
return {
|
||||||
|
"olimorris/codecompanion.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
strategies = {
|
||||||
|
-- Change the default chat adapter
|
||||||
|
chat = {
|
||||||
|
adapter = "ollama",
|
||||||
|
},
|
||||||
|
inline = {
|
||||||
|
adapter = "ollama",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
adapters = {
|
||||||
|
ollama = function()
|
||||||
|
return require("codecompanion.adapters").extend("ollama", {
|
||||||
|
name = "gemma3:12b",
|
||||||
|
env = {
|
||||||
|
url = "http://192.168.10.99:11434",
|
||||||
|
api_key = "OLLAMA_API_KEY",
|
||||||
|
},
|
||||||
|
headers = {
|
||||||
|
["Content-Type"] = "application/json",
|
||||||
|
["Authorization"] = "Bearer ${api_key}",
|
||||||
|
},
|
||||||
|
parameters = {
|
||||||
|
sync = true,
|
||||||
|
},
|
||||||
|
schema = {
|
||||||
|
model = {
|
||||||
|
default = "deepseek-r1:32b",
|
||||||
|
},
|
||||||
|
num_ctx = {
|
||||||
|
default = 16384,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- Set debug logging
|
||||||
|
log_level = "DEBUG",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
@@ -1,79 +1,53 @@
|
|||||||
return {{
|
return {
|
||||||
"xero/miasma.nvim",
|
'lmantw/themify.nvim',
|
||||||
|
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
|
dependencies = {
|
||||||
|
--'Iron-E/nvim-highlite'
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
--vim.cmd("colorscheme miasma")
|
require('themify').setup({
|
||||||
end,
|
activity = true,
|
||||||
},
|
"xero/miasma.nvim",
|
||||||
{
|
"wuelnerdotexe/vim-enfocado",
|
||||||
"wuelnerdotexe/vim-enfocado",
|
"fenetikm/falcon",
|
||||||
lazy = false,
|
"casr/vim-colors-reference",
|
||||||
config = function()
|
"blazkowolf/gruber-darker.nvim",
|
||||||
--vim.cmd([[ colorscheme enfoccado]])
|
"rebelot/kanagawa.nvim",
|
||||||
end
|
"jaredgorski/spacecamp",
|
||||||
},
|
"lifepillar/vim-gruvbox8",
|
||||||
{
|
"marko-cerovac/material.nvim",
|
||||||
"fenetikm/falcon",
|
"srcery-colors/srcery-vim",
|
||||||
lazy = false,
|
"tanvirtin/monokai.nvim",
|
||||||
config = function()
|
"dasupradyumna/midnight.nvim",
|
||||||
--vim.cmd([[ colorscheme falcon]])
|
"bluz71/vim-moonfly-colors",
|
||||||
end
|
"kepano/flexoki-neovim",
|
||||||
},
|
"nuvic/flexoki-nvim",
|
||||||
{
|
{
|
||||||
"casr/vim-colors-reference",
|
url = "https://gitlab.com/bartekjaszczak/distinct-nvim",
|
||||||
lazy = false,
|
},
|
||||||
config = function()
|
{
|
||||||
--vim.cmd([[ colorscheme reference]])
|
url = "https://gitlab.com/bartekjaszczak/finale-nvim",
|
||||||
end
|
},
|
||||||
},
|
'kevinm6/kurayami.nvim',
|
||||||
{
|
'gerardbm/vim-atomic',
|
||||||
"blazkowolf/gruber-darker.nvim",
|
'fynnfluegge/monet.nvim',
|
||||||
lazy = false,
|
'thesimonho/kanagawa-paper.nvim',
|
||||||
config = function()
|
'qaptoR-nvim/chocolatier.nvim',
|
||||||
--vim.cmd([[ colorscheme gruber-darker]])
|
'aliqyan-21/darkvoid.nvim',
|
||||||
end
|
'paulo-granthon/hyper.nvim',
|
||||||
},
|
'diegoulloao/neofusion.nvim',
|
||||||
{
|
'aktersnurra/no-clown-fiesta.nvim',
|
||||||
"rebelot/kanagawa.nvim",
|
'kdheepak/monochrome.nvim',
|
||||||
lazy = false,
|
'ficcdaf/ashen.nvim',
|
||||||
config = function()
|
-- 'm15a/nvim-srcerite', - requires buggy highlite
|
||||||
--vim.cmd([[ colorscheme kanagawa]])
|
'nyoom-engineering/oxocarbon.nvim',
|
||||||
end
|
'rjshkhr/shadow.nvim',
|
||||||
},
|
'folke/tokyonight.nvim',
|
||||||
{
|
'nendix/zen.nvim',
|
||||||
"jaredgorski/spacecamp",
|
'mcauley-penney/techbase.nvim',
|
||||||
lazy = false,
|
'default'
|
||||||
config = function()
|
})
|
||||||
--vim.cmd([[ colorscheme spacecamp]])
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"lifepillar/vim-gruvbox8",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
vim.cmd([[ colorscheme gruvbox8]])
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"marko-cerovac/material.nvim",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
--vim.cmd([[ colorscheme material]])
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"srcery-colors/srcery-vim",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
--vim.cmd([[ colorscheme srcery]])
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"tanvirtin/monokai.nvim",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
--vim.cmd([[ colorscheme monokai]])
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
24
.config/nvim/lua/plugins/column.lua
Normal file
24
.config/nvim/lua/plugins/column.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
'Bekaboo/deadcolumn.nvim',
|
||||||
|
opts = {
|
||||||
|
scope = 'buffer',
|
||||||
|
---@type string[]|fun(mode: string): boolean
|
||||||
|
modes = function() return true end,
|
||||||
|
blending = {
|
||||||
|
threshold = 0.4,
|
||||||
|
colorcode = '#000000',
|
||||||
|
hlgroup = { 'Normal', 'bg' },
|
||||||
|
},
|
||||||
|
warning = {
|
||||||
|
alpha = 0.3,
|
||||||
|
offset = 0,
|
||||||
|
colorcode = '#CC0000',
|
||||||
|
hlgroup = { 'Error', 'bg' },
|
||||||
|
},
|
||||||
|
extra = {
|
||||||
|
---@type string?
|
||||||
|
follow_tw = nil,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
@@ -1,4 +1,23 @@
|
|||||||
return {
|
return {{
|
||||||
|
-- 'gcc' to toggle comments
|
||||||
'numToStr/Comment.nvim',
|
'numToStr/Comment.nvim',
|
||||||
config = true
|
config = true
|
||||||
}
|
}, {
|
||||||
|
"soemre/commentless.nvim",
|
||||||
|
cmd = "Commentless",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"z/",
|
||||||
|
function()
|
||||||
|
require("commentless").toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Comments",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- Customize Configuration
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ return {
|
|||||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||||
throttle = true, -- Throttles plugin updates (may improve performance)
|
throttle = true, -- Throttles plugin updates (may improve performance)
|
||||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||||
|
mode = 'topline',
|
||||||
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
|
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
|
||||||
-- For all filetypes
|
-- For all filetypes
|
||||||
-- Note that setting an entry here replaces all other patterns for this entry.
|
-- Note that setting an entry here replaces all other patterns for this entry.
|
||||||
@@ -35,7 +36,15 @@ return {
|
|||||||
-- Treat patterns.rust as a Lua pattern (i.e "^impl_item$" will
|
-- Treat patterns.rust as a Lua pattern (i.e "^impl_item$" will
|
||||||
-- exactly match "impl_item" only)
|
-- exactly match "impl_item" only)
|
||||||
rust = true,
|
rust = true,
|
||||||
}
|
},
|
||||||
|
on_attach = function(buf)
|
||||||
|
local max_filesize = 100 * 1024
|
||||||
|
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||||
|
if ok and stats and stats.size > max_filesize then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
11
.config/nvim/lua/plugins/coolchunk.lua
Normal file
11
.config/nvim/lua/plugins/coolchunk.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
'Mr-LLLLL/cool-chunk.nvim',
|
||||||
|
event = { "CursorHold", "CursorHoldI" },
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('cool-chunk').setup({})
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
@@ -2,5 +2,5 @@ return {
|
|||||||
'Saecki/crates.nvim',
|
'Saecki/crates.nvim',
|
||||||
dependencies = 'jose-elias-alvarez/null-ls.nvim',
|
dependencies = 'jose-elias-alvarez/null-ls.nvim',
|
||||||
config = true,
|
config = true,
|
||||||
filetype = { "rust", "toml" }
|
ft = { "rust", "toml" }
|
||||||
}
|
}
|
||||||
|
|||||||
23
.config/nvim/lua/plugins/csv.lua
Normal file
23
.config/nvim/lua/plugins/csv.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
return {{
|
||||||
|
-- :DataViewer
|
||||||
|
-- :DataViewer [filepath] [filetype]
|
||||||
|
-- :DataViewerNextTable
|
||||||
|
-- :DataViewerPrevTable
|
||||||
|
|
||||||
|
'vidocqh/data-viewer.nvim',
|
||||||
|
opts = {},
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
ft = { "csv" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"chrisbra/csv.vim",
|
||||||
|
ft = { "csv" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hat0uma/csvview.nvim",
|
||||||
|
ft = { "csv" },
|
||||||
|
cmd = { "CsvViewEnable" },
|
||||||
|
config = true
|
||||||
|
}}
|
||||||
14
.config/nvim/lua/plugins/cursor.lua
Normal file
14
.config/nvim/lua/plugins/cursor.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
return {
|
||||||
|
"DanilaMihailov/beacon.nvim",
|
||||||
|
opts = {
|
||||||
|
enabled = true, --- (boolean | fun():boolean) check if enabled
|
||||||
|
speed = 2, --- integer speed at which animation goes
|
||||||
|
width = 40, --- integer width of the beacon window
|
||||||
|
winblend = 70, --- integer starting transparency of beacon window :h winblend
|
||||||
|
fps = 60, --- integer how smooth the animation going to be
|
||||||
|
min_jump = 10, --- integer what is considered a jump. Number of lines
|
||||||
|
cursor_events = { 'CursorMoved' }, -- table<string> what events trigger check for cursor moves
|
||||||
|
window_events = { 'WinEnter', 'FocusGained' }, -- table<string> what events trigger cursor highlight
|
||||||
|
highlight = { bg = 'white', ctermbg = 15 }, -- vim.api.keyset.highlight table passed to vim.api.nvim_set_hl
|
||||||
|
}
|
||||||
|
}
|
||||||
167
.config/nvim/lua/plugins/dap.lua
Normal file
167
.config/nvim/lua/plugins/dap.lua
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'mfussenegger/nvim-dap',
|
||||||
|
config = function()
|
||||||
|
local dap = require("dap")
|
||||||
|
dap.adapters.gdb = {
|
||||||
|
type = "executable",
|
||||||
|
command = "gdb",
|
||||||
|
args = { "--interpreter=dap", "--eval-command", "set print pretty on" }
|
||||||
|
}
|
||||||
|
dap.configurations.c = {
|
||||||
|
{
|
||||||
|
name = "Launch",
|
||||||
|
type = "gdb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
dap.configurations.cpp = {
|
||||||
|
{
|
||||||
|
name = "Launch",
|
||||||
|
type = "gdb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
dap.configurations.matlab = {
|
||||||
|
{
|
||||||
|
name = "Launch",
|
||||||
|
type = "matlab",
|
||||||
|
request = "launch",
|
||||||
|
program = "${file}",
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
rootDir = "${workspaceFolder}",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
dap.adapters.matlab = function(cb, config)
|
||||||
|
cb({
|
||||||
|
type = 'executable',
|
||||||
|
command = 'matlab-language-server',
|
||||||
|
args = { '--stdio' },
|
||||||
|
options = {
|
||||||
|
source_filetype = 'matlab',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
dap.configurations.python = {
|
||||||
|
{
|
||||||
|
-- The first three options are required by nvim-dap
|
||||||
|
type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python`
|
||||||
|
request = 'launch';
|
||||||
|
name = "Launch file";
|
||||||
|
|
||||||
|
-- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
|
||||||
|
|
||||||
|
program = "${file}"; -- This configuration will launch the current file if used.
|
||||||
|
pythonPath = function()
|
||||||
|
-- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
|
||||||
|
-- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
|
||||||
|
-- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
|
||||||
|
local cwd = vim.fn.getcwd()
|
||||||
|
if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then
|
||||||
|
return cwd .. '/venv/bin/python'
|
||||||
|
elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
|
||||||
|
return cwd .. '/.venv/bin/python'
|
||||||
|
else
|
||||||
|
return '/usr/bin/python3'
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dap.adapters.python = function(cb, config)
|
||||||
|
if config.request == 'attach' then
|
||||||
|
---@diagnostic disable-next-line: undefined-field
|
||||||
|
local port = (config.connect or config).port
|
||||||
|
---@diagnostic disable-next-line: undefined-field
|
||||||
|
local host = (config.connect or config).host or '127.0.0.1'
|
||||||
|
cb({
|
||||||
|
type = 'server',
|
||||||
|
port = assert(port, '`connect.port` is required for a python `attach` configuration'),
|
||||||
|
host = host,
|
||||||
|
options = {
|
||||||
|
source_filetype = 'python',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
else
|
||||||
|
cb({
|
||||||
|
type = 'executable',
|
||||||
|
command = '/home/kmcr/.virtualenvs/debugpy/bin/python',
|
||||||
|
args = { '-m', 'debugpy.adapter' },
|
||||||
|
options = {
|
||||||
|
source_filetype = 'python',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('n', '\\c', function() require("dap").continue() end, { noremap = true, silent = true, desc = "Continue" });
|
||||||
|
vim.keymap.set('n', '\\b', function() require("dap").toggle_breakpoint() end, { noremap = true, silent = true, desc = "breakpoint toggle" });
|
||||||
|
vim.keymap.set('n', '\\B', function() require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) end, { noremap = true, silent = true, desc = "conditional breakpoint" });
|
||||||
|
vim.keymap.set('n', '\\n', function() require("dap").step_over() end, { noremap = true, silent = true, desc = "step over" });
|
||||||
|
vim.keymap.set('n', '\\s', function() require("dap").step_into() end, { noremap = true, silent = true, desc = "step into" });
|
||||||
|
vim.keymap.set('n', '\\u', function() require("dap").step_out() end, { noremap = true, silent = true, desc = "step out" });
|
||||||
|
vim.keymap.set('n', '\\l', function() require("dap").run_last() end, { noremap = true, silent = true, desc = "run last" });
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'rcarriga/nvim-dap-ui',
|
||||||
|
dependencies = {
|
||||||
|
'mfussenegger/nvim-dap',
|
||||||
|
'nvim-neotest/nvim-nio'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local ui = require('dapui')
|
||||||
|
local dap = require('dap')
|
||||||
|
vim.keymap.set('n', '\\d', function()
|
||||||
|
dap.continue()
|
||||||
|
ui.toggle({})
|
||||||
|
end, { noremap = true, silent = true, desc = "toggle UI" })
|
||||||
|
vim.keymap.set('v', 'K', function() require("dapui").eval() end, { noremap = true, silent = true, desc = "eval val" })
|
||||||
|
ui.setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'theHamsta/nvim-dap-virtual-text',
|
||||||
|
config = function()
|
||||||
|
require("nvim-dap-virtual-text").setup{
|
||||||
|
enabled = true, -- enable this plugin (the default)
|
||||||
|
enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination)
|
||||||
|
highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText
|
||||||
|
highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables)
|
||||||
|
show_stop_reason = true, -- show stop reason when stopped for exceptions
|
||||||
|
commented = false, -- prefix virtual text with comment string
|
||||||
|
only_first_definition = true, -- only show virtual text at first definition (if there are multiple)
|
||||||
|
all_references = false, -- show virtual text on all all references of the variable (not only definitions)
|
||||||
|
clear_on_continue = false, -- clear virtual text on "continue" (might cause flickering when stepping)
|
||||||
|
--- A callback that determines how a variable is displayed or whether it should be omitted
|
||||||
|
--- @param variable Variable https://microsoft.github.io/debug-adapter-protocol/specification#Types_Variable
|
||||||
|
--- @param buf number
|
||||||
|
--- @param stackframe dap.StackFrame https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame
|
||||||
|
--- @param node userdata tree-sitter node identified as variable definition of reference (see `:h tsnode`)
|
||||||
|
--- @param options nvim_dap_virtual_text_options Current options for nvim-dap-virtual-text
|
||||||
|
--- @return string|nil A text how the virtual text should be displayed or nil, if this variable shouldn't be displayed
|
||||||
|
display_callback = function(variable, buf, stackframe, node, options)
|
||||||
|
if options.virt_text_pos == 'inline' then
|
||||||
|
return ' = ' .. variable.value
|
||||||
|
else
|
||||||
|
return variable.name .. ' = ' .. variable.value
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
-- position of virtual text, see `:h nvim_buf_set_extmark()`, default tries to inline the virtual text. Use 'eol' to set to end of line
|
||||||
|
virt_text_pos = vim.fn.has 'nvim-0.10' == 1 and 'inline' or 'eol',
|
||||||
|
|
||||||
|
-- experimental features:
|
||||||
|
all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
|
||||||
|
virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
|
||||||
|
virt_text_win_col = nil, -- position the virtual text at a fixed window column (starting from the first text column)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
|
-- g?v print variable
|
||||||
|
-- g?p print line
|
||||||
'andrewferrier/debugprint.nvim',
|
'andrewferrier/debugprint.nvim',
|
||||||
config = true,
|
config = true,
|
||||||
}
|
}
|
||||||
|
|||||||
94
.config/nvim/lua/plugins/devcontainer.lua
Normal file
94
.config/nvim/lua/plugins/devcontainer.lua
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
return {
|
||||||
|
url = "https://codeberg.org/esensar/nvim-dev-container",
|
||||||
|
opts = {
|
||||||
|
config_search_start = function()
|
||||||
|
-- By default this function uses vim.loop.cwd()
|
||||||
|
-- This is used to find a starting point for .devcontainer.json file search
|
||||||
|
-- Since by default, it is searched for recursively
|
||||||
|
-- That behavior can also be disabled
|
||||||
|
end,
|
||||||
|
workspace_folder_provider = function()
|
||||||
|
-- By default this function uses first workspace folder for integrated lsp if available and vim.loop.cwd() as a fallback
|
||||||
|
-- This is used to replace `${localWorkspaceFolder}` in devcontainer.json
|
||||||
|
-- Also used for creating default .devcontainer.json file
|
||||||
|
end,
|
||||||
|
terminal_handler = function(command)
|
||||||
|
-- By default this function creates a terminal in a new tab using :terminal command
|
||||||
|
-- It also removes statusline when that tab is active, to prevent double statusline
|
||||||
|
-- It can be overridden to provide custom terminal handling
|
||||||
|
end,
|
||||||
|
nvim_installation_commands_provider = function(path_binaries, version_string)
|
||||||
|
-- Returns table - list of commands to run when adding neovim to container
|
||||||
|
-- Each command can either be a string or a table (list of command parts)
|
||||||
|
-- Takes binaries available in path on current container and version_string passed to the command or current version of neovim
|
||||||
|
end,
|
||||||
|
devcontainer_json_template = function()
|
||||||
|
-- Returns table - list of lines to set when creating new devcontainer.json files
|
||||||
|
-- As a template
|
||||||
|
-- Used only when using functions from commands module or created commands
|
||||||
|
end,
|
||||||
|
-- Can be set to false to prevent generating default commands
|
||||||
|
-- Default commands are listed below
|
||||||
|
generate_commands = true,
|
||||||
|
-- By default no autocommands are generated
|
||||||
|
-- This option can be used to configure automatic starting and cleaning of containers
|
||||||
|
autocommands = {
|
||||||
|
-- can be set to true to automatically start containers when devcontainer.json is available
|
||||||
|
init = false,
|
||||||
|
-- can be set to true to automatically remove any started containers and any built images when exiting vim
|
||||||
|
clean = false,
|
||||||
|
-- can be set to true to automatically restart containers when devcontainer.json file is updated
|
||||||
|
update = false,
|
||||||
|
},
|
||||||
|
-- can be changed to increase or decrease logging from library
|
||||||
|
log_level = "info",
|
||||||
|
-- can be set to true to disable recursive search
|
||||||
|
-- in that case only .devcontainer.json and .devcontainer/devcontainer.json files will be checked relative
|
||||||
|
-- to the directory provided by config_search_start
|
||||||
|
disable_recursive_config_search = false,
|
||||||
|
-- can be set to false to disable image caching when adding neovim
|
||||||
|
-- by default it is set to true to make attaching to containers faster after first time
|
||||||
|
cache_images = true,
|
||||||
|
-- By default all mounts are added (config, data and state)
|
||||||
|
-- This can be changed to disable mounts or change their options
|
||||||
|
-- This can be useful to mount local configuration
|
||||||
|
-- And any other mounts when attaching to containers with this plugin
|
||||||
|
attach_mounts = {
|
||||||
|
neovim_config = {
|
||||||
|
-- enables mounting local config to /root/.config/nvim in container
|
||||||
|
enabled = false,
|
||||||
|
-- makes mount readonly in container
|
||||||
|
options = { "readonly" }
|
||||||
|
},
|
||||||
|
neovim_data = {
|
||||||
|
-- enables mounting local data to /root/.local/share/nvim in container
|
||||||
|
enabled = false,
|
||||||
|
-- no options by default
|
||||||
|
options = {}
|
||||||
|
},
|
||||||
|
-- Only useful if using neovim 0.8.0+
|
||||||
|
neovim_state = {
|
||||||
|
-- enables mounting local state to /root/.local/state/nvim in container
|
||||||
|
enabled = false,
|
||||||
|
-- no options by default
|
||||||
|
options = {}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- This takes a list of mounts (strings) that should always be added to every run container
|
||||||
|
-- This is passed directly as --mount option to docker command
|
||||||
|
-- Or multiple --mount options if there are multiple values
|
||||||
|
always_mount = {},
|
||||||
|
-- This takes a string (usually either "podman" or "docker") representing container runtime - "devcontainer-cli" is also partially supported
|
||||||
|
-- That is the command that will be invoked for container operations
|
||||||
|
-- If it is nil, plugin will use whatever is available (trying "podman" first)
|
||||||
|
container_runtime = nil,
|
||||||
|
-- Similar to container runtime, but will be used if main runtime does not support an action - useful for "devcontainer-cli"
|
||||||
|
backup_runtime = nil,
|
||||||
|
-- This takes a string (usually either "podman-compose" or "docker-compose") representing compose command - "devcontainer-cli" is also partially supported
|
||||||
|
-- That is the command that will be invoked for compose operations
|
||||||
|
-- If it is nil, plugin will use whatever is available (trying "podman-compose" first)
|
||||||
|
compose_command = nil,
|
||||||
|
-- Similar to compose command, but will be used if main command does not support an action - useful for "devcontainer-cli"
|
||||||
|
backup_compose_command = nil,
|
||||||
|
}
|
||||||
|
}
|
||||||
4
.config/nvim/lua/plugins/diffview.lua
Normal file
4
.config/nvim/lua/plugins/diffview.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
"sindrets/diffview.nvim",
|
||||||
|
cmd = { "DiffviewFileHistory", "DiffviewOpen"}
|
||||||
|
}
|
||||||
6
.config/nvim/lua/plugins/digraphs.lua
Normal file
6
.config/nvim/lua/plugins/digraphs.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
'protex/better-digraphs.nvim',
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set('i', '<C-k>d', '<cmd>lua require("better-digraphs").digraphs("i")<cr>', { noremap = true, silent = true})
|
||||||
|
end
|
||||||
|
}
|
||||||
6
.config/nvim/lua/plugins/doxygen.lua
Normal file
6
.config/nvim/lua/plugins/doxygen.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
'kkoomen/vim-doge',
|
||||||
|
config = function()
|
||||||
|
vim.cmd([[ let g:doge_doxygen_settings = { 'char': '@' } ]])
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -1,166 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
'stevearc/dressing.nvim',
|
'stevearc/dressing.nvim',
|
||||||
|
enabled = true,
|
||||||
opts = {
|
opts = {
|
||||||
input = {
|
|
||||||
-- Set to false to disable the vim.ui.input implementation
|
|
||||||
enabled = true,
|
|
||||||
|
|
||||||
-- Default prompt string
|
|
||||||
default_prompt = "Input:",
|
|
||||||
|
|
||||||
-- Can be 'left', 'right', or 'center'
|
|
||||||
prompt_align = "left",
|
|
||||||
|
|
||||||
-- When true, <Esc> will close the modal
|
|
||||||
insert_only = true,
|
|
||||||
|
|
||||||
-- When true, input will start in insert mode.
|
|
||||||
start_in_insert = true,
|
|
||||||
|
|
||||||
-- These are passed to nvim_open_win
|
|
||||||
border = "rounded",
|
|
||||||
-- 'editor' and 'win' will default to being centered
|
|
||||||
relative = "cursor",
|
|
||||||
|
|
||||||
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
|
||||||
prefer_width = 40,
|
|
||||||
width = nil,
|
|
||||||
-- min_width and max_width can be a list of mixed types.
|
|
||||||
-- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
|
|
||||||
max_width = { 140, 0.9 },
|
|
||||||
min_width = { 20, 0.2 },
|
|
||||||
|
|
||||||
buf_options = {},
|
|
||||||
win_options = {
|
|
||||||
-- Window transparency (0-100)
|
|
||||||
winblend = 10,
|
|
||||||
-- Disable line wrapping
|
|
||||||
wrap = false,
|
|
||||||
list = true,
|
|
||||||
listchars = "precedes:…,extends:…",
|
|
||||||
-- Increase this for more context when text scrolls off the window
|
|
||||||
sidescrolloff = 0,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Set to `false` to disable
|
|
||||||
mappings = {
|
|
||||||
n = {
|
|
||||||
["<Esc>"] = "Close",
|
|
||||||
["<CR>"] = "Confirm",
|
|
||||||
},
|
|
||||||
i = {
|
|
||||||
["<C-c>"] = "Close",
|
|
||||||
["<CR>"] = "Confirm",
|
|
||||||
["<Up>"] = "HistoryPrev",
|
|
||||||
["<Down>"] = "HistoryNext",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
override = function(conf)
|
|
||||||
-- This is the config that will be passed to nvim_open_win.
|
|
||||||
-- Change values here to customize the layout
|
|
||||||
return conf
|
|
||||||
end,
|
|
||||||
|
|
||||||
-- see :help dressing_get_config
|
|
||||||
get_config = nil,
|
|
||||||
},
|
|
||||||
select = {
|
|
||||||
-- Set to false to disable the vim.ui.select implementation
|
|
||||||
enabled = true,
|
|
||||||
|
|
||||||
-- Priority list of preferred vim.select implementations
|
|
||||||
backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" },
|
|
||||||
|
|
||||||
-- Trim trailing `:` from prompt
|
|
||||||
trim_prompt = true,
|
|
||||||
|
|
||||||
-- Options for telescope selector
|
|
||||||
-- These are passed into the telescope picker directly. Can be used like:
|
|
||||||
-- telescope = require('telescope.themes').get_ivy({...})
|
|
||||||
telescope = nil,
|
|
||||||
|
|
||||||
-- Options for fzf selector
|
|
||||||
fzf = {
|
|
||||||
window = {
|
|
||||||
width = 0.5,
|
|
||||||
height = 0.4,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Options for fzf_lua selector
|
|
||||||
fzf_lua = {
|
|
||||||
winopts = {
|
|
||||||
width = 0.5,
|
|
||||||
height = 0.4,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Options for nui Menu
|
|
||||||
nui = {
|
|
||||||
position = "50%",
|
|
||||||
size = nil,
|
|
||||||
relative = "editor",
|
|
||||||
border = {
|
|
||||||
style = "rounded",
|
|
||||||
},
|
|
||||||
buf_options = {
|
|
||||||
swapfile = false,
|
|
||||||
filetype = "DressingSelect",
|
|
||||||
},
|
|
||||||
win_options = {
|
|
||||||
winblend = 10,
|
|
||||||
},
|
|
||||||
max_width = 80,
|
|
||||||
max_height = 40,
|
|
||||||
min_width = 40,
|
|
||||||
min_height = 10,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Options for built-in selector
|
|
||||||
builtin = {
|
|
||||||
-- These are passed to nvim_open_win
|
|
||||||
border = "rounded",
|
|
||||||
-- 'editor' and 'win' will default to being centered
|
|
||||||
relative = "editor",
|
|
||||||
|
|
||||||
buf_options = {},
|
|
||||||
win_options = {
|
|
||||||
-- Window transparency (0-100)
|
|
||||||
winblend = 10,
|
|
||||||
cursorline = true,
|
|
||||||
cursorlineopt = "both",
|
|
||||||
},
|
|
||||||
|
|
||||||
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
|
||||||
-- the min_ and max_ options can be a list of mixed types.
|
|
||||||
-- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
|
|
||||||
width = nil,
|
|
||||||
max_width = { 140, 0.8 },
|
|
||||||
min_width = { 40, 0.2 },
|
|
||||||
height = nil,
|
|
||||||
max_height = 0.9,
|
|
||||||
min_height = { 10, 0.2 },
|
|
||||||
|
|
||||||
-- Set to `false` to disable
|
|
||||||
mappings = {
|
|
||||||
["<Esc>"] = "Close",
|
|
||||||
["<C-c>"] = "Close",
|
|
||||||
["<CR>"] = "Confirm",
|
|
||||||
},
|
|
||||||
|
|
||||||
override = function(conf)
|
|
||||||
-- This is the config that will be passed to nvim_open_win.
|
|
||||||
-- Change values here to customize the layout
|
|
||||||
return conf
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Used to override format_item. See :help dressing-format
|
|
||||||
format_item_override = {},
|
|
||||||
|
|
||||||
-- see :help dressing_get_config
|
|
||||||
get_config = nil,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
'kiran94/edit-markdown-table.nvim',
|
|
||||||
config = true,
|
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
|
||||||
cmd = "EditMarkdownTable",
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
return {
|
return {
|
||||||
'AckslD/nvim-FeMaco.lua',
|
'AckslD/nvim-FeMaco.lua',
|
||||||
config = true
|
config = function()
|
||||||
|
require('femaco').setup()
|
||||||
|
vim.keymap.set('n', '<leader>!', '<cmd>FeMaco<cr>', { noremap = true, silent = true })
|
||||||
|
end,
|
||||||
|
cmd = { "FeMaco" },
|
||||||
|
keys = { "<leader>!" }
|
||||||
}
|
}
|
||||||
|
|||||||
14
.config/nvim/lua/plugins/firenvim.lua
Normal file
14
.config/nvim/lua/plugins/firenvim.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
return {
|
||||||
|
'glacambre/firenvim',
|
||||||
|
build = ":call firenvim#install(0)",
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_create_autocmd({'UIEnter'}, {
|
||||||
|
callback = function(event)
|
||||||
|
local client = vim.api.nvim_get_chan_info(vim.v.event.chan).client
|
||||||
|
if client ~= nil and client.name == "Firenvim" then
|
||||||
|
vim.o.laststatus = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/focus.lua
Normal file
7
.config/nvim/lua/plugins/focus.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {{
|
||||||
|
"Pocco81/true-zen.nvim",
|
||||||
|
--"junegunn/goyo.vim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nullchilly/fsread.nvim",
|
||||||
|
}}
|
||||||
84
.config/nvim/lua/plugins/fold.lua
Normal file
84
.config/nvim/lua/plugins/fold.lua
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
-- return {
|
||||||
|
-- 'anuvyklack/pretty-fold.nvim',
|
||||||
|
-- config = function()
|
||||||
|
-- require('pretty-fold').setup()
|
||||||
|
-- require('pretty-fold').ft_setup('cpp', {
|
||||||
|
-- process_comment_signs = false,
|
||||||
|
-- --comment_signs = {
|
||||||
|
-- -- '//', -- C++ Doxygen comments
|
||||||
|
-- --},
|
||||||
|
-- })
|
||||||
|
-- end
|
||||||
|
-- },
|
||||||
|
-- {
|
||||||
|
-- 'anuvyklack/fold-preview.nvim',
|
||||||
|
-- dependencies = 'anuvyklack/keymap-amend.nvim',
|
||||||
|
-- config = function()
|
||||||
|
-- require('fold-preview').setup({
|
||||||
|
-- -- Your configuration goes here.
|
||||||
|
-- })
|
||||||
|
-- end
|
||||||
|
-- },
|
||||||
|
|
||||||
|
|
||||||
|
return
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"chrisgrieser/nvim-origami",
|
||||||
|
event = "BufReadPost", -- later or on keypress would prevent saving folds
|
||||||
|
opts = {
|
||||||
|
keepFoldsAcrossSessions = false,
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
}, {
|
||||||
|
"kevinhwang91/nvim-ufo",
|
||||||
|
dependencies = {
|
||||||
|
"kevinhwang91/promise-async"
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||||
|
local newVirtText = {}
|
||||||
|
local suffix = (' %d '):format(endLnum - lnum)
|
||||||
|
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||||
|
local targetWidth = width - sufWidth
|
||||||
|
local curWidth = 0
|
||||||
|
for _, chunk in ipairs(virtText) do
|
||||||
|
local chunkText = chunk[1]
|
||||||
|
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||||
|
if targetWidth > curWidth + chunkWidth then
|
||||||
|
table.insert(newVirtText, chunk)
|
||||||
|
else
|
||||||
|
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||||
|
local hlGroup = chunk[2]
|
||||||
|
table.insert(newVirtText, {chunkText, hlGroup})
|
||||||
|
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||||
|
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||||
|
if curWidth + chunkWidth < targetWidth then
|
||||||
|
suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth)
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
curWidth = curWidth + chunkWidth
|
||||||
|
end
|
||||||
|
table.insert(newVirtText, {suffix, 'MoreMsg'})
|
||||||
|
return newVirtText
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.cmd [[
|
||||||
|
hi default UfoFoldedFg guifg=Normal.foreground
|
||||||
|
hi default UfoFoldedBg guibg=Visual.background
|
||||||
|
hi default link UfoPreviewSbar PmenuSbar
|
||||||
|
hi default link UfoPreviewThumb PmenuThumb
|
||||||
|
hi default link UfoPreviewWinBar UfoFoldedBg
|
||||||
|
hi default link UfoPreviewCursorLine Visual
|
||||||
|
hi default link UfoFoldedEllipsis Visual
|
||||||
|
hi default link UfoCursorFoldedLine Normal
|
||||||
|
hi Folded gui=NONE guibg=Normal.background
|
||||||
|
]]
|
||||||
|
|
||||||
|
require("ufo").setup({
|
||||||
|
fold_virt_text_handler = handler
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
'numToStr/FTerm.nvim',
|
'numToStr/FTerm.nvim',
|
||||||
opts = {
|
config = function()
|
||||||
|
require('FTerm').setup({
|
||||||
-- Filetype of the terminal buffer
|
-- Filetype of the terminal buffer
|
||||||
ft = 'FTerm',
|
ft = 'FTerm',
|
||||||
|
|
||||||
@@ -23,10 +24,10 @@ return {
|
|||||||
-- Object containing the terminal window dimensions.
|
-- Object containing the terminal window dimensions.
|
||||||
-- The value for each field should be between `0` and `1`
|
-- The value for each field should be between `0` and `1`
|
||||||
dimensions = {
|
dimensions = {
|
||||||
height = 0.9, -- Height of the terminal window
|
height = 0.9, -- Height of the terminal window
|
||||||
width = 0.9, -- Width of the terminal window
|
width = 0.9, -- Width of the terminal window
|
||||||
x = 0.5, -- X axis of the terminal window
|
x = 0.5, -- X axis of the terminal window
|
||||||
y = 0.5, -- Y axis of the terminal window
|
y = 0.5, -- Y axis of the terminal window
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Callback invoked when the terminal exits.
|
-- Callback invoked when the terminal exits.
|
||||||
@@ -40,5 +41,10 @@ return {
|
|||||||
-- Callback invoked when the terminal emits stderr data.
|
-- Callback invoked when the terminal emits stderr data.
|
||||||
-- See `:h jobstart-options`
|
-- See `:h jobstart-options`
|
||||||
on_stderr = nil,
|
on_stderr = nil,
|
||||||
}
|
})
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>i', '<cmd>lua require("FTerm").toggle()<CR>', { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('t', '<leader>i', '<cmd>lua require("FTerm").toggle()<CR>', { noremap = true, silent = true })
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
3
.config/nvim/lua/plugins/fugitive.lua
Normal file
3
.config/nvim/lua/plugins/fugitive.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/garbage-day.lua
Normal file
7
.config/nvim/lua/plugins/garbage-day.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
'zeioth/garbage-day.nvim',
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
wakeup_delay = 5000
|
||||||
|
}
|
||||||
|
}
|
||||||
28
.config/nvim/lua/plugins/gen.lua
Normal file
28
.config/nvim/lua/plugins/gen.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
return {
|
||||||
|
"David-Kunz/gen.nvim",
|
||||||
|
opts = {
|
||||||
|
--model = "codellama:code", -- The default model to use.
|
||||||
|
model = "gemma2:9b", -- The default model to use.
|
||||||
|
host = "batman.local", -- The host running the Ollama service.
|
||||||
|
port = "11434", -- The port on which the Ollama service is listening.
|
||||||
|
quit_map = "q", -- set keymap for closing the response window
|
||||||
|
retry_map = "<c-r>", -- set keymap to re-send the current prompt
|
||||||
|
init = function(options) pcall(io.popen, "ollama serve > /dev/null 2>&1 &") end,
|
||||||
|
-- Function to initialize Ollama
|
||||||
|
command = function(options)
|
||||||
|
local body = { model = options.model, stream = true }
|
||||||
|
return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/chat -d $body"
|
||||||
|
end,
|
||||||
|
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
|
||||||
|
-- This can also be a command string.
|
||||||
|
-- The executed command must return a JSON object with { response, context }
|
||||||
|
-- (context property is optional).
|
||||||
|
-- list_models = '<omitted lua function>', -- Retrieves a list of model names
|
||||||
|
display_mode = "float", -- The display mode. Can be "float" or "split".
|
||||||
|
show_prompt = false, -- Shows the Prompt submitted to Ollama.
|
||||||
|
show_model = false, -- Displays which model you are using at the beginning of your chat session.
|
||||||
|
no_auto_close = false, -- Never closes the window automatically.
|
||||||
|
debug = false -- Prints errors and the command which is run.
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/git-dev.lua
Normal file
5
.config/nvim/lua/plugins/git-dev.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
"moyiz/git-dev.nvim",
|
||||||
|
lazy = true,
|
||||||
|
cmd = { "GitDevOpen", "GitDevCleanAll" }, opts = {},
|
||||||
|
}
|
||||||
@@ -1,29 +1,24 @@
|
|||||||
return {
|
return {
|
||||||
'ruifm/gitlinker.nvim',
|
'linrongbin16/gitlinker.nvim',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-lua/plenary.nvim'
|
'nvim-lua/plenary.nvim'
|
||||||
},
|
},
|
||||||
opts = {
|
config = function()
|
||||||
callbacks = {
|
require('gitlinker').setup({
|
||||||
["git.viessmann.com"] = function(url_data)
|
router = {
|
||||||
local url = require'gitlinker.hosts'.get_base_https_url(url_data)
|
browse = {
|
||||||
if not url_data.file or not url_data.rev then
|
-- example: ssh://git@git.viessmann.com:7999/sysfunc/efmclib.git
|
||||||
return url
|
["^git%.viessmann%.com"] = "https://git.viessmann.com/projects/"
|
||||||
end
|
.. "{_A.USER}/repos/"
|
||||||
url = url .. "/src/" .. url_data.rev .. "/" .. url_data.file
|
.. "{_A.REPO}/browse/"
|
||||||
|
.. "{_A.FILE}"
|
||||||
if not url_data.lstart then
|
.. "#{_A.LSTART}"
|
||||||
return url
|
.. "{(_A.LEND > _A.LSTART and ('-' .. _A.LEND) or '')}",
|
||||||
end
|
}
|
||||||
url = url .. "#lines-" .. url_data.lstart
|
},
|
||||||
if url_data.lend then
|
debug = true,
|
||||||
url = url .. ":" .. url_data.lend
|
file_log = true,
|
||||||
end
|
})
|
||||||
|
end,
|
||||||
return url
|
cmd = "GitLink"
|
||||||
end
|
|
||||||
},
|
|
||||||
-- default mapping to call url generation with action_callback
|
|
||||||
mappings = "<leader>gl"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
return {
|
return {
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
signs = {
|
-- signs = {
|
||||||
add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
-- add = {hl = 'GitSignsAdd' , text = '+', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
||||||
change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
-- change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||||
delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
-- delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||||
topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
-- topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||||
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
-- changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||||
},
|
-- },
|
||||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||||
numhl = true, -- Toggle with `:Gitsigns toggle_numhl`
|
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||||
--keymaps = {
|
--keymaps = {
|
||||||
@@ -82,16 +82,13 @@ return {
|
|||||||
current_line_blame_opts = {
|
current_line_blame_opts = {
|
||||||
virt_text = true,
|
virt_text = true,
|
||||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||||
delay = 5000,
|
delay = 2000,
|
||||||
ignore_whitespace = true,
|
ignore_whitespace = true,
|
||||||
},
|
},
|
||||||
current_line_blame_formatter_opts = {
|
|
||||||
relative_time = false
|
|
||||||
},
|
|
||||||
sign_priority = 6,
|
sign_priority = 6,
|
||||||
update_debounce = 100,
|
update_debounce = 100,
|
||||||
status_formatter = nil, -- Use default
|
status_formatter = nil, -- Use default
|
||||||
max_file_length = 40000,
|
max_file_length = 4000,
|
||||||
preview_config = {
|
preview_config = {
|
||||||
-- Options passed to nvim_open_win
|
-- Options passed to nvim_open_win
|
||||||
border = 'single',
|
border = 'single',
|
||||||
@@ -100,8 +97,5 @@ return {
|
|||||||
row = 0,
|
row = 0,
|
||||||
col = 1
|
col = 1
|
||||||
},
|
},
|
||||||
yadm = {
|
|
||||||
enable = true
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
.config/nvim/lua/plugins/godbolt.lua
Normal file
16
.config/nvim/lua/plugins/godbolt.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
url = "https://git.sr.ht/~p00f/godbolt.nvim",
|
||||||
|
opts = {
|
||||||
|
languages = {
|
||||||
|
cpp = { compiler = "g122", options = {} },
|
||||||
|
c = { compiler = "cg122", options = {} },
|
||||||
|
rust = { compiler = "r1650", options = {} },
|
||||||
|
-- any_additional_filetype = { compiler = ..., options = ... },
|
||||||
|
},
|
||||||
|
quickfix = {
|
||||||
|
enable = false, -- whether to populate the quickfix list in case of errors
|
||||||
|
auto_open = false -- whether to open the quickfix list in case of errors
|
||||||
|
},
|
||||||
|
url = "https://godbolt.org" -- can be changed to a different godbolt instance
|
||||||
|
}
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/gptmodels.lua
Normal file
5
.config/nvim/lua/plugins/gptmodels.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
'Aaronik/GPTModels.nvim',
|
||||||
|
config = true,
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/hardtime.lua
Normal file
7
.config/nvim/lua/plugins/hardtime.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
'm4xshen/hardtime.nvim',
|
||||||
|
dependencies = { "MunifTanjim/nui.nvim" },
|
||||||
|
opts = {
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
@@ -1,6 +1,20 @@
|
|||||||
return {
|
return {{
|
||||||
'ziontee113/icon-picker.nvim',
|
'ziontee113/icon-picker.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
require("icon-picker").setup({disable_legacy_commands = true })
|
require("icon-picker").setup({disable_legacy_commands = true })
|
||||||
end
|
end,
|
||||||
|
-- icon picker
|
||||||
|
-- map('n', '<C-k>i', '<cmd>IconPickerNormal<cr>', default_options)
|
||||||
|
-- map('n', '<C-k>y', '<cmd>IconPickerYank<cr>', default_options)
|
||||||
|
-- map('i', '<C-k>i', '<cmd>IconPickerInsert<cr>', default_options)
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'2kabhishek/nerdy.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'stevearc/dressing.nvim',
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
},
|
||||||
|
cmd = 'Nerdy',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ return {
|
|||||||
},
|
},
|
||||||
exclude_filetypes = {'log'},
|
exclude_filetypes = {'log'},
|
||||||
callbacks = {
|
callbacks = {
|
||||||
-- to trigger the close_events of vim.diagnostic.open_float.
|
-- -- to trigger the close_events of vim.diagnostic.open_float.
|
||||||
function ()
|
function ()
|
||||||
-- Close floating diag. and make it triggerable again.
|
-- Close floating diag. and make it triggerable again.
|
||||||
vim.api.nvim_exec_autocmds("User", { pattern = "MurmurDiagnostics"})
|
vim.api.nvim_exec_autocmds("User", { pattern = "MurmurDiagnostics"})
|
||||||
@@ -26,30 +26,30 @@ return {
|
|||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vim.api.nvim_create_autocmd('CursorHold', {
|
-- vim.api.nvim_create_autocmd('CursorHold', {
|
||||||
group = HIGHLIGHT,
|
-- group = HIGHLIGHT,
|
||||||
pattern = '*',
|
-- pattern = '*',
|
||||||
callback = function ()
|
-- callback = function ()
|
||||||
-- skip when a float-win already exists.
|
-- -- skip when a float-win already exists.
|
||||||
if vim.w.diag_shown then return end
|
-- if vim.w.diag_shown then return end
|
||||||
|
--
|
||||||
-- open float-win when hovering on a cursor-word.
|
-- -- open float-win when hovering on a cursor-word.
|
||||||
if vim.w.cursor_word ~= '' then
|
-- if vim.w.cursor_word ~= '' then
|
||||||
vim.diagnostic.open_float({
|
-- vim.diagnostic.open_float({
|
||||||
scope = 'cursor',
|
-- scope = 'cursor',
|
||||||
close_events = { "InsertEnter", "User MurmurDiagnostics" },
|
-- close_events = { "InsertEnter", "User MurmurDiagnostics" },
|
||||||
})
|
-- })
|
||||||
vim.api.nvim_create_autocmd("WinClosed", {
|
-- vim.api.nvim_create_autocmd("WinClosed", {
|
||||||
group = HIGHLIGHT,
|
-- group = HIGHLIGHT,
|
||||||
buffer = buf,
|
-- buffer = buf,
|
||||||
once = true,
|
-- once = true,
|
||||||
callback = function() vim.w.diag_shown = false end,
|
-- callback = function() vim.w.diag_shown = false end,
|
||||||
})
|
-- })
|
||||||
vim.w.diag_shown = true
|
-- vim.w.diag_shown = true
|
||||||
else
|
-- else
|
||||||
vim.w.diag_shown = false
|
-- vim.w.diag_shown = false
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
})
|
-- })
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,35 @@
|
|||||||
return {
|
return {
|
||||||
'samodostal/image.nvim',
|
'3rd/image.nvim',
|
||||||
opts = {
|
-- default config
|
||||||
render = {
|
config = function ()
|
||||||
min_padding = 5,
|
require('image').setup({
|
||||||
show_label = true,
|
backend = "kitty",
|
||||||
use_dither = true,
|
integrations = {
|
||||||
},
|
markdown = {
|
||||||
events = {
|
enabled = true,
|
||||||
update_on_nvim_resize = true,
|
clear_in_insert_mode = false,
|
||||||
},
|
download_remote_images = true,
|
||||||
}
|
only_render_image_at_cursor = false,
|
||||||
|
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
|
||||||
|
},
|
||||||
|
neorg = {
|
||||||
|
enabled = false,
|
||||||
|
clear_in_insert_mode = false,
|
||||||
|
download_remote_images = true,
|
||||||
|
only_render_image_at_cursor = false,
|
||||||
|
filetypes = { "norg" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
max_width = nil,
|
||||||
|
max_height = nil,
|
||||||
|
max_width_window_percentage = nil,
|
||||||
|
max_height_window_percentage = 50,
|
||||||
|
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
|
||||||
|
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
|
||||||
|
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
|
||||||
|
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
|
||||||
|
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif", "*.svg" }, -- render image files as images when opened
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,86 +1,10 @@
|
|||||||
return {{
|
return {{
|
||||||
-- Code development helpers {{{
|
-- "MunifTanjim/nui.nvim",
|
||||||
--"vim-test/vim-test",
|
-- "nvim-lua/plenary.nvim",
|
||||||
--"RRethy/vim-illuminate",
|
|
||||||
{ "ftilde/vim-ugdb", cmd = "UGDBBreakpoint" },
|
|
||||||
"HiPhish/nvim-ts-rainbow2",
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- Files switch, jump and grep-like tools {{{
|
|
||||||
--"inside/vim-search-pulse",
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-lua/popup.nvim",
|
|
||||||
"wellle/targets.vim",
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- Git integration {{{
|
|
||||||
"tpope/vim-fugitive",
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- Support for random filetypes {{{
|
|
||||||
"chrisbra/csv.vim",
|
|
||||||
--"iamcco/markdown-preview.nvim",, { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
|
--"iamcco/markdown-preview.nvim",, { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
|
||||||
--"vim-pandoc/vim-pandoc",
|
|
||||||
--"weirongxu/plantuml-previewer.vim", |
|
|
||||||
"aklt/plantuml-syntax",
|
|
||||||
{
|
|
||||||
"kergoth/vim-bitbake", -- Bitbake templates and syntax
|
|
||||||
ft = { "bitbake" }
|
|
||||||
},
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- Other plugins (external tools, etc) {{{
|
|
||||||
--"JMcKiern/vim-shoot",
|
|
||||||
--"junegunn/goyo.vim",
|
|
||||||
"protex/better-digraphs.nvim",
|
|
||||||
-- }}}
|
|
||||||
-- Appearance {{{
|
|
||||||
{
|
|
||||||
'anuvyklack/pretty-fold.nvim',
|
|
||||||
config = function()
|
|
||||||
require('pretty-fold').setup()
|
|
||||||
require('pretty-fold').ft_setup('cpp', {
|
|
||||||
process_comment_signs = false,
|
|
||||||
--comment_signs = {
|
|
||||||
-- '//', -- C++ Doxygen comments
|
|
||||||
--},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'anuvyklack/fold-preview.nvim',
|
|
||||||
dependencies = 'anuvyklack/keymap-amend.nvim',
|
|
||||||
config = function()
|
|
||||||
require('fold-preview').setup({
|
|
||||||
-- Your configuration goes here.
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- Testing phase {{{
|
|
||||||
--"RRethy/vim-hexokinase",, { 'do': 'make hexokinase' }
|
|
||||||
--"euclio/vim-markdown-composer",, {'do': ':!cargo build --release --locked'}
|
--"euclio/vim-markdown-composer",, {'do': ':!cargo build --release --locked'}
|
||||||
|
--"vim-pandoc/vim-pandoc",
|
||||||
|
|
||||||
--"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
--"RRethy/vim-hexokinase",, { 'do': 'make hexokinase' }
|
||||||
--require('lsp_lines').setup()
|
|
||||||
|
|
||||||
--"mfussenegger/nvim-dap",
|
|
||||||
--"rgroli/other.nvim", " Currently doesn't support C/C++
|
|
||||||
--"smolovk/projector.nvim",
|
|
||||||
"Pocco81/true-zen.nvim",
|
|
||||||
"nullchilly/fsread.nvim",
|
|
||||||
{
|
|
||||||
"cbochs/grapple.nvim",
|
|
||||||
enabled = false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"shortcuts/no-neck-pain.nvim",
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
--'jinzhongjia/PS_manager.nvim',
|
|
||||||
-- }}}
|
|
||||||
}}
|
}}
|
||||||
|
|||||||
17
.config/nvim/lua/plugins/join.lua
Normal file
17
.config/nvim/lua/plugins/join.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
'Wansmer/treesj',
|
||||||
|
config = function()
|
||||||
|
require('treesj').setup({
|
||||||
|
use_default_keymaps = false,
|
||||||
|
max_join_length = 1000,
|
||||||
|
})
|
||||||
|
-- For default preset
|
||||||
|
vim.keymap.set('n', '<leader>jt', require('treesj').toggle)
|
||||||
|
-- For extending default preset with `recursive = true`
|
||||||
|
vim.keymap.set('n', '<leader>jT', function()
|
||||||
|
require('treesj').toggle({ split = { recursive = true } })
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
-- it is loading very long or is it treesitter?
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
41
.config/nvim/lua/plugins/jupyter.lua
Normal file
41
.config/nvim/lua/plugins/jupyter.lua
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"benlubas/molten-nvim",
|
||||||
|
dependencies = { "3rd/image.nvim" },
|
||||||
|
build = ":UpdateRemotePlugins",
|
||||||
|
config = function()
|
||||||
|
-- these are examples, not defaults. Please see the readme
|
||||||
|
vim.g.molten_image_provider = "image.nvim"
|
||||||
|
vim.g.molten_output_win_max_height = 20
|
||||||
|
vim.g.molten_auto_open_output = false
|
||||||
|
vim.keymap.set("n", "<localleader>R", ":MoltenEvaluateOperator<CR>",
|
||||||
|
{ silent = true, noremap = true, desc = "run operator selection" })
|
||||||
|
vim.keymap.set("n", "<localleader>rl", ":MoltenEvaluateLine<CR>",
|
||||||
|
{ silent = true, noremap = true, desc = "evaluate line" })
|
||||||
|
vim.keymap.set("n", "<localleader>rc", ":MoltenReevaluateCell<CR>",
|
||||||
|
{ silent = true, noremap = true, desc = "re-evaluate cell" })
|
||||||
|
vim.keymap.set("v", "<localleader>r", ":<C-u>MoltenEvaluateVisual<CR>gv",
|
||||||
|
{ silent = true, noremap = true, desc = "evaluate visual selection" })
|
||||||
|
end,
|
||||||
|
ft = { 'markdown', 'jupyter' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- see the image.nvim readme for more information about configuring this plugin
|
||||||
|
"3rd/image.nvim",
|
||||||
|
opts = {
|
||||||
|
backend = "kitty", -- whatever backend you would like to use
|
||||||
|
max_width = 100,
|
||||||
|
max_height = 12,
|
||||||
|
max_height_window_percentage = math.huge,
|
||||||
|
max_width_window_percentage = math.huge,
|
||||||
|
window_overlap_clear_enabled = true, -- toggles images when windows are overlapped
|
||||||
|
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'goerz/jupytext.vim',
|
||||||
|
config = function()
|
||||||
|
vim.cmd([[ let g:jupytext_enable = 1 ]])
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
'frabjous/knap',
|
'frabjous/knap',
|
||||||
|
enabled = false,
|
||||||
config = function()
|
config = function()
|
||||||
local gknapsettings = {
|
local gknapsettings = {
|
||||||
htmloutputext = "html",
|
htmloutputext = "html",
|
||||||
|
|||||||
4
.config/nvim/lua/plugins/launch.lua
Normal file
4
.config/nvim/lua/plugins/launch.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
'dasupradyumna/launch.nvim',
|
||||||
|
config = true
|
||||||
|
}
|
||||||
25
.config/nvim/lua/plugins/lazydev.lua
Normal file
25
.config/nvim/lua/plugins/lazydev.lua
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/lazydev.nvim",
|
||||||
|
ft = "lua", -- only load on lua files
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
-- See the configuration section for more details
|
||||||
|
-- Load luvit types when the `vim.uv` word is found
|
||||||
|
{ path = "luvit-meta/library", words = { "vim%.uv" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings
|
||||||
|
{ -- optional completion source for require statements and module annotations
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.sources = opts.sources or {}
|
||||||
|
table.insert(opts.sources, {
|
||||||
|
name = "lazydev",
|
||||||
|
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- { "folke/neodev.nvim", enabled = false }, -- make sure to uninstall or disable neodev.nvim
|
||||||
|
}
|
||||||
@@ -1,10 +1,23 @@
|
|||||||
return {
|
return {
|
||||||
'ggandor/leap.nvim',
|
'smoka7/hop.nvim',
|
||||||
config = function()
|
version = "*",
|
||||||
local leap = require('leap')
|
config = function()
|
||||||
leap.add_default_mappings()
|
-- place this in one of your configuration file(s)
|
||||||
vim.cmd([[
|
local hop = require('hop')
|
||||||
autocmd ColorScheme * lua require('leap').init_highlight(true)
|
hop.setup()
|
||||||
]])
|
-- local directions = require('hop.hint').HintDirection
|
||||||
end
|
-- vim.keymap.set('', 'f', function()
|
||||||
|
-- hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = false })
|
||||||
|
-- end, {remap=true})
|
||||||
|
-- vim.keymap.set('', 'F', function()
|
||||||
|
-- hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = false })
|
||||||
|
-- end, {remap=true})
|
||||||
|
-- vim.keymap.set('', 't', function()
|
||||||
|
-- hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = false, hint_offset = -1 })
|
||||||
|
-- end, {remap=true})
|
||||||
|
-- vim.keymap.set('', 'T', function()
|
||||||
|
-- hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = false, hint_offset = 1 })
|
||||||
|
-- end, {remap=true})
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
385
.config/nvim/lua/plugins/line.lua
Normal file
385
.config/nvim/lua/plugins/line.lua
Normal file
@@ -0,0 +1,385 @@
|
|||||||
|
return {
|
||||||
|
"rebelot/heirline.nvim",
|
||||||
|
config = function()
|
||||||
|
local conditions = require("heirline.conditions")
|
||||||
|
local heirline = require('heirline')
|
||||||
|
|
||||||
|
local utils = require("heirline.utils")
|
||||||
|
|
||||||
|
local Space = { provider = " " }
|
||||||
|
local colors = {
|
||||||
|
bg = utils.get_highlight("Normal").bg,
|
||||||
|
fg = utils.get_highlight("Normal").fg,
|
||||||
|
bright_bg = utils.get_highlight("Normal").bg,
|
||||||
|
bright_fg = utils.get_highlight("Normal").fg,
|
||||||
|
red = utils.get_highlight("DiagnosticError").fg,
|
||||||
|
dark_red = utils.get_highlight("DiffDelete").bg,
|
||||||
|
green = utils.get_highlight("String").fg,
|
||||||
|
blue = utils.get_highlight("Function").fg,
|
||||||
|
gray = utils.get_highlight("NonText").fg,
|
||||||
|
orange = utils.get_highlight("Constant").fg,
|
||||||
|
purple = utils.get_highlight("Statement").fg,
|
||||||
|
cyan = utils.get_highlight("Special").fg,
|
||||||
|
diag_warn = utils.get_highlight("DiagnosticWarn").fg,
|
||||||
|
diag_error = utils.get_highlight("DiagnosticError").fg,
|
||||||
|
diag_hint = utils.get_highlight("DiagnosticHint").fg,
|
||||||
|
diag_info = utils.get_highlight("DiagnosticInfo").fg,
|
||||||
|
git_del = utils.get_highlight("diffDeleted").fg,
|
||||||
|
git_add = utils.get_highlight("diffAdded").fg,
|
||||||
|
git_change = utils.get_highlight("diffChanged").fg,
|
||||||
|
}
|
||||||
|
|
||||||
|
heirline.load_colors(colors)
|
||||||
|
|
||||||
|
-- --------------------------------------------------------------
|
||||||
|
local ViMode = {
|
||||||
|
-- get vim current mode, this information will be required by the provider
|
||||||
|
-- and the highlight functions, so we compute it only once per component
|
||||||
|
-- evaluation and store it as a component attribute
|
||||||
|
init = function(self)
|
||||||
|
self.mode = vim.fn.mode(1) -- :h mode()
|
||||||
|
|
||||||
|
-- execute this only once, this is required if you want the ViMode
|
||||||
|
-- component to be updated on operator pending mode
|
||||||
|
if not self.once then
|
||||||
|
vim.api.nvim_create_autocmd("ModeChanged", {
|
||||||
|
pattern = "*:*o",
|
||||||
|
command = 'redrawstatus'
|
||||||
|
})
|
||||||
|
self.once = true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
-- Now we define some dictionaries to map the output of mode() to the
|
||||||
|
-- corresponding string and color. We can put these into `static` to compute
|
||||||
|
-- them at initialisation time.
|
||||||
|
static = {
|
||||||
|
mode_names = { -- change the strings if you like it vvvvverbose!
|
||||||
|
n = "N",
|
||||||
|
no = "N?",
|
||||||
|
nov = "N?",
|
||||||
|
noV = "N?",
|
||||||
|
["no\22"] = "N?",
|
||||||
|
niI = "Ni",
|
||||||
|
niR = "Nr",
|
||||||
|
niV = "Nv",
|
||||||
|
nt = "Nt",
|
||||||
|
v = "V",
|
||||||
|
vs = "Vs",
|
||||||
|
V = "V_",
|
||||||
|
Vs = "Vs",
|
||||||
|
["\22"] = "^V",
|
||||||
|
["\22s"] = "^V",
|
||||||
|
s = "S",
|
||||||
|
S = "S_",
|
||||||
|
["\19"] = "^S",
|
||||||
|
i = "I",
|
||||||
|
ic = "Ic",
|
||||||
|
ix = "Ix",
|
||||||
|
R = "R",
|
||||||
|
Rc = "Rc",
|
||||||
|
Rx = "Rx",
|
||||||
|
Rv = "Rv",
|
||||||
|
Rvc = "Rv",
|
||||||
|
Rvx = "Rv",
|
||||||
|
c = "C",
|
||||||
|
cv = "Ex",
|
||||||
|
r = "...",
|
||||||
|
rm = "M",
|
||||||
|
["r?"] = "?",
|
||||||
|
["!"] = "!",
|
||||||
|
t = "T",
|
||||||
|
},
|
||||||
|
mode_colors = {
|
||||||
|
n = "red",
|
||||||
|
i = "green",
|
||||||
|
v = "cyan",
|
||||||
|
V = "cyan",
|
||||||
|
["\22"] = "cyan",
|
||||||
|
c = "orange",
|
||||||
|
s = "purple",
|
||||||
|
S = "purple",
|
||||||
|
["\19"] = "purple",
|
||||||
|
R = "orange",
|
||||||
|
r = "orange",
|
||||||
|
["!"] = "red",
|
||||||
|
t = "red",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
-- We can now access the value of mode() that, by now, would have been
|
||||||
|
-- computed by `init()` and use it to index our strings dictionary.
|
||||||
|
-- note how `static` fields become just regular attributes once the
|
||||||
|
-- component is instantiated.
|
||||||
|
-- To be extra meticulous, we can also add some vim statusline syntax to
|
||||||
|
-- control the padding and make sure our string is always at least 2
|
||||||
|
-- characters long. Plus a nice Icon.
|
||||||
|
provider = function(self)
|
||||||
|
return "%1(" .. self.mode_names[self.mode] .. "%)"
|
||||||
|
end,
|
||||||
|
-- Same goes for the highlight. Now the foreground will change according to the current mode.
|
||||||
|
hl = function(self)
|
||||||
|
local mode = self.mode:sub(1, 1) -- get only the first mode character
|
||||||
|
return { fg = self.mode_colors[mode], bold = true, }
|
||||||
|
end,
|
||||||
|
-- Re-evaluate the component only on ModeChanged event!
|
||||||
|
-- This is not required in any way, but it's there, and it's a small
|
||||||
|
-- performance improvement.
|
||||||
|
update = {
|
||||||
|
"ModeChanged",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
-- --------------------------------------------------------------
|
||||||
|
local FileNameBlock = {
|
||||||
|
-- let's first set up some attributes needed by this component and it's children
|
||||||
|
init = function(self)
|
||||||
|
self.filename = vim.api.nvim_buf_get_name(0)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
-- We can now define some children separately and add them later
|
||||||
|
|
||||||
|
local FileIcon = {
|
||||||
|
init = function(self)
|
||||||
|
local filename = self.filename
|
||||||
|
local extension = vim.fn.fnamemodify(filename, ":e")
|
||||||
|
self.icon, self.icon_color = require("nvim-web-devicons").get_icon_color(filename, extension,
|
||||||
|
{ default = true })
|
||||||
|
end,
|
||||||
|
provider = function(self)
|
||||||
|
return self.icon and (self.icon .. " ")
|
||||||
|
end,
|
||||||
|
hl = function(self)
|
||||||
|
return { fg = self.icon_color }
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
local FileName = {
|
||||||
|
provider = function(self)
|
||||||
|
-- first, trim the pattern relative to the current directory. For other
|
||||||
|
-- options, see :h filename-modifiers
|
||||||
|
local filename = vim.fn.fnamemodify(self.filename, ":.")
|
||||||
|
if filename == "" then return "[No Name]" end
|
||||||
|
-- now, if the filename would occupy more than 1/4th of the available
|
||||||
|
-- space, we trim the file path to its initials
|
||||||
|
-- See Flexible Components section below for dynamic truncation
|
||||||
|
if not conditions.width_percent_below(#filename, 0.5) then
|
||||||
|
filename = vim.fn.pathshorten(filename)
|
||||||
|
end
|
||||||
|
return filename
|
||||||
|
end,
|
||||||
|
hl = { fg = utils.get_highlight("Directory").fg },
|
||||||
|
}
|
||||||
|
|
||||||
|
local FileFlags = {
|
||||||
|
{
|
||||||
|
condition = function()
|
||||||
|
return vim.bo.modified
|
||||||
|
end,
|
||||||
|
provider = "[+]",
|
||||||
|
hl = { fg = "green" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
condition = function()
|
||||||
|
return not vim.bo.modifiable or vim.bo.readonly
|
||||||
|
end,
|
||||||
|
provider = "",
|
||||||
|
hl = { fg = "orange" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Now, let's say that we want the filename color to change if the buffer is
|
||||||
|
-- modified. Of course, we could do that directly using the FileName.hl field,
|
||||||
|
-- but we'll see how easy it is to alter existing components using a "modifier"
|
||||||
|
-- component
|
||||||
|
|
||||||
|
local FileNameModifier = {
|
||||||
|
hl = function()
|
||||||
|
if vim.bo.modified then
|
||||||
|
-- use `force` because we need to override the child's hl foreground
|
||||||
|
return { fg = "cyan", bold = true, force = true }
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- let's add the children to our FileNameBlock component
|
||||||
|
FileNameBlock = utils.insert(FileNameBlock,
|
||||||
|
FileIcon,
|
||||||
|
utils.insert(FileNameModifier, FileName), -- a new table where FileName is a child of FileNameModifier
|
||||||
|
FileFlags,
|
||||||
|
{ provider = '%<' } -- this means that the statusline is cut here when there's not enough space
|
||||||
|
)
|
||||||
|
-- --------------------------------------------------------------
|
||||||
|
-- We're getting minimalists here!
|
||||||
|
local Ruler = {
|
||||||
|
-- %l = current line number
|
||||||
|
-- %L = number of lines in the buffer
|
||||||
|
-- %c = column number
|
||||||
|
-- %P = percentage through file of displayed window
|
||||||
|
provider = "%7(%l/%3L%):%2c %P",
|
||||||
|
}
|
||||||
|
-- --------------------------------------------------------------
|
||||||
|
|
||||||
|
local LSPActive = {
|
||||||
|
condition = conditions.lsp_attached,
|
||||||
|
update = { 'LspAttach', 'LspDetach' },
|
||||||
|
|
||||||
|
-- You can keep it simple,
|
||||||
|
-- provider = " [LSP]",
|
||||||
|
|
||||||
|
-- Or complicate things a bit and get the servers names
|
||||||
|
provider = function()
|
||||||
|
local names = {}
|
||||||
|
for i, server in pairs(vim.lsp.get_clients({ bufnr = 0 })) do
|
||||||
|
table.insert(names, server.name)
|
||||||
|
end
|
||||||
|
return " " .. table.concat(names, ",")
|
||||||
|
end,
|
||||||
|
hl = { fg = "green", bold = true },
|
||||||
|
}
|
||||||
|
local LSPMessages = {
|
||||||
|
provider = vim.lsp.status(),
|
||||||
|
hl = { fg = "gray" },
|
||||||
|
}
|
||||||
|
-- --------------------------------------------------------------
|
||||||
|
local Diagnostics = {
|
||||||
|
|
||||||
|
condition = conditions.has_diagnostics,
|
||||||
|
|
||||||
|
static = {
|
||||||
|
-- these require something...
|
||||||
|
error_icon = "✘",
|
||||||
|
warn_icon = "",
|
||||||
|
info_icon = "◉",
|
||||||
|
hint_icon = "",
|
||||||
|
},
|
||||||
|
|
||||||
|
init = function(self)
|
||||||
|
self.errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR })
|
||||||
|
self.warnings = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
|
||||||
|
self.hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT })
|
||||||
|
self.info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO })
|
||||||
|
end,
|
||||||
|
|
||||||
|
update = { "DiagnosticChanged", "BufEnter" },
|
||||||
|
|
||||||
|
{
|
||||||
|
provider = function(self)
|
||||||
|
-- 0 is just another output, we can decide to print it or not!
|
||||||
|
return self.errors > 0 and (self.error_icon .. self.errors .. " ")
|
||||||
|
end,
|
||||||
|
hl = { fg = "diag_error" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provider = function(self)
|
||||||
|
return self.warnings > 0 and (self.warn_icon .. self.warnings .. " ")
|
||||||
|
end,
|
||||||
|
hl = { fg = "diag_warn" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provider = function(self)
|
||||||
|
return self.info > 0 and (self.info_icon .. self.info .. " ")
|
||||||
|
end,
|
||||||
|
hl = { fg = "diag_info" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provider = function(self)
|
||||||
|
return self.hints > 0 and (self.hint_icon .. self.hints)
|
||||||
|
end,
|
||||||
|
hl = { fg = "diag_hint" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
-- --------------------------------------------------------------
|
||||||
|
local DAPMessages = {
|
||||||
|
condition = function()
|
||||||
|
local session = require("dap").session()
|
||||||
|
return session ~= nil
|
||||||
|
end,
|
||||||
|
provider = function()
|
||||||
|
return " " .. require("dap").status()
|
||||||
|
end,
|
||||||
|
hl = "Debug"
|
||||||
|
-- see Click-it! section for clickable actions
|
||||||
|
}
|
||||||
|
-- --------------------------------------------------------------
|
||||||
|
local WorkDir = {
|
||||||
|
provider = function()
|
||||||
|
local icon = (vim.fn.haslocaldir(0) == 1 and "l" or "g") .. " " .. " "
|
||||||
|
local cwd = vim.fn.getcwd(0)
|
||||||
|
cwd = vim.fn.fnamemodify(cwd, ":~")
|
||||||
|
if not conditions.width_percent_below(#cwd, 0.25) then
|
||||||
|
cwd = vim.fn.pathshorten(cwd)
|
||||||
|
end
|
||||||
|
local trail = cwd:sub(-1) == '/' and '' or "/"
|
||||||
|
return icon .. cwd .. trail
|
||||||
|
end,
|
||||||
|
hl = { fg = "blue", bold = true },
|
||||||
|
}
|
||||||
|
-- --------------------------------------------------------------
|
||||||
|
local Align = { provider = "%=" }
|
||||||
|
-- ViMode = utils.surround({ "", "" }, "bright_bg", { ViMode })
|
||||||
|
|
||||||
|
local DefaultStatusline = {
|
||||||
|
ViMode, Space, FileNameBlock, Space, Align,
|
||||||
|
Align, DAPMessages,
|
||||||
|
LSPActive, Space, Diagnostics, Space, LSPMessages, Space, Ruler
|
||||||
|
}
|
||||||
|
|
||||||
|
local FileType = {
|
||||||
|
provider = function()
|
||||||
|
return string.upper(vim.bo.filetype)
|
||||||
|
end,
|
||||||
|
hl = { fg = utils.get_highlight("Type").fg, bold = true },
|
||||||
|
}
|
||||||
|
--
|
||||||
|
local InactiveStatusline = {
|
||||||
|
condition = conditions.is_not_active,
|
||||||
|
FileNameBlock,
|
||||||
|
Align,
|
||||||
|
}
|
||||||
|
|
||||||
|
local SpecialStatusline = {
|
||||||
|
condition = function()
|
||||||
|
return conditions.buffer_matches({
|
||||||
|
buftype = { "nofile", "prompt", "help", "quickfix" },
|
||||||
|
filetype = { "^git.*", "fugitive" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
|
FileType,
|
||||||
|
Space,
|
||||||
|
Align
|
||||||
|
}
|
||||||
|
local StatusLine = {
|
||||||
|
|
||||||
|
hl = function()
|
||||||
|
if conditions.is_active() then
|
||||||
|
return "StatusLine"
|
||||||
|
else
|
||||||
|
return "StatusLineNC"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
-- the first statusline with no condition, or which condition returns true is used.
|
||||||
|
-- think of it as a switch case with breaks to stop fallthrough.
|
||||||
|
fallthrough = false,
|
||||||
|
|
||||||
|
SpecialStatusline,
|
||||||
|
InactiveStatusline,
|
||||||
|
DefaultStatusline,
|
||||||
|
colors = colors
|
||||||
|
}
|
||||||
|
|
||||||
|
local Winbar = { { provider = "»" }, Space }
|
||||||
|
local TabLine = {}
|
||||||
|
-- local StatusColumn = {}
|
||||||
|
|
||||||
|
heirline.setup({
|
||||||
|
statusline = StatusLine,
|
||||||
|
-- winbar = Winbar,
|
||||||
|
tabline = TabLine,
|
||||||
|
-- statuscolumn = StatusColumn
|
||||||
|
opts = {
|
||||||
|
colors = colors
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
@@ -1,259 +1,198 @@
|
|||||||
return {
|
return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"SmiteshP/nvim-navbuddy",
|
-- "SmiteshP/nvim-navbuddy",
|
||||||
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
|
-- "jubnzv/virtual-types.nvim",
|
||||||
"jubnzv/virtual-types.nvim",
|
-- "ray-x/lsp_signature.nvim",
|
||||||
"ray-x/lsp_signature.nvim",
|
-- 'sontungexpt/better-diagnostic-virtual-text',
|
||||||
|
{ url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local nvim_lsp = require('lspconfig')
|
require('clangd_extensions').setup({
|
||||||
local clangd_extensions = require('clangd_extensions').setup({
|
|
||||||
inlay_hints = {
|
|
||||||
inline = false,
|
|
||||||
-- Options other than `highlight' and `priority' only work
|
|
||||||
-- if `inline' is disabled
|
|
||||||
-- Only show inlay hints for the current line
|
|
||||||
only_current_line = true,
|
|
||||||
-- Event which triggers a refresh of the inlay hints.
|
|
||||||
-- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but
|
|
||||||
-- not that this may cause higher CPU usage.
|
|
||||||
-- This option is only respected when only_current_line and
|
|
||||||
-- autoSetHints both are true.
|
|
||||||
only_current_line_autocmd = { "CursorHold" },
|
|
||||||
-- whether to show parameter hints with the inlay hints or not
|
|
||||||
show_parameter_hints = true,
|
|
||||||
-- prefix for parameter hints
|
|
||||||
parameter_hints_prefix = "←",
|
|
||||||
-- prefix for all the other hints (type, chaining)
|
|
||||||
other_hints_prefix = "→",
|
|
||||||
-- whether to align to the length of the longest line in the file
|
|
||||||
max_len_align = false,
|
|
||||||
-- padding from the left if max_len_align is true
|
|
||||||
max_len_align_padding = 1,
|
|
||||||
-- whether to align to the extreme right or not
|
|
||||||
right_align = false,
|
|
||||||
-- padding from the right if right_align is true
|
|
||||||
right_align_padding = 7,
|
|
||||||
-- The color of the hints
|
|
||||||
highlight = "Comment",
|
|
||||||
-- The highlight group priority for extmark
|
|
||||||
priority = 100,
|
|
||||||
},
|
|
||||||
ast = {
|
ast = {
|
||||||
-- These are unicode, should be available in any font
|
-- These are unicode, should be available in any font
|
||||||
role_icons = {
|
role_icons = {
|
||||||
type = "🄣",
|
type = "🄣",
|
||||||
declaration = "🄓",
|
declaration = "🄓",
|
||||||
expression = "🄔",
|
expression = "🄔",
|
||||||
statement = ";",
|
statement = ";",
|
||||||
specifier = "🄢",
|
specifier = "🄢",
|
||||||
["template argument"] = "🆃",
|
["template argument"] = "🆃",
|
||||||
},
|
},
|
||||||
kind_icons = {
|
kind_icons = {
|
||||||
Compound = "🄲",
|
Compound = "🄲",
|
||||||
Recovery = "🅁",
|
Recovery = "🅁",
|
||||||
TranslationUnit = "🅄",
|
TranslationUnit = "🅄",
|
||||||
PackExpansion = "🄿",
|
PackExpansion = "🄿",
|
||||||
TemplateTypeParm = "🅃",
|
TemplateTypeParm = "🅃",
|
||||||
TemplateTemplateParm = "🅃",
|
TemplateTemplateParm = "🅃",
|
||||||
TemplateParamObject = "🅃",
|
TemplateParamObject = "🅃",
|
||||||
},
|
},
|
||||||
--[[ These require codicons (https://github.com/microsoft/vscode-codicons)
|
highlights = {
|
||||||
role_icons = {
|
detail = "Comment",
|
||||||
type = "",
|
},
|
||||||
declaration = "",
|
memory_usage = {
|
||||||
expression = "",
|
border = "none",
|
||||||
specifier = "",
|
},
|
||||||
statement = "",
|
symbol_info = {
|
||||||
["template argument"] = "",
|
border = "none",
|
||||||
},
|
|
||||||
|
|
||||||
kind_icons = {
|
|
||||||
Compound = "",
|
|
||||||
Recovery = "",
|
|
||||||
TranslationUnit = "",
|
|
||||||
PackExpansion = "",
|
|
||||||
TemplateTypeParm = "",
|
|
||||||
TemplateTemplateParm = "",
|
|
||||||
TemplateParamObject = "",
|
|
||||||
}, ]]
|
|
||||||
highlights = {
|
|
||||||
detail = "Comment",
|
|
||||||
},
|
|
||||||
memory_usage = {
|
|
||||||
border = "none",
|
|
||||||
},
|
|
||||||
symbol_info = {
|
|
||||||
border = "none",
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
local lsp_signature = require('lsp_signature')
|
vim.lsp.enable('clangd_extensions')
|
||||||
|
--local lsp_signature = require('lsp_signature')
|
||||||
|
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
local opts = { noremap=true, silent=true }
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
|
||||||
vim.api.nvim_set_keymap('n', '<leader>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
|
vim.keymap.set('n', '<leader>E', vim.diagnostic.setloclist)
|
||||||
vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
|
|
||||||
vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
|
vim.lsp.inlay_hint.enable(true)
|
||||||
vim.api.nvim_set_keymap('n', '<leader>E', '<cmd>lua vim.diagnostic.set_loclist()<CR>', opts)
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>q", "<cmd>lua vim.lsp.buf.format{ async = true }<CR>", opts)
|
|
||||||
|
|
||||||
-- Use an on_attach function to only map the following keys
|
-- Use an on_attach function to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- after the language server attaches to the current buffer
|
||||||
local on_attach = function(client, bufnr)
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
--Enable completion triggered by <c-x><c-o>
|
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
callback = function(ev)
|
||||||
|
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||||
|
|
||||||
---- See `:help vim.lsp.*` for documentation on any of the below functions
|
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
local opts = { buffer = ev.buf }
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
-- vim.keymap.del("n", "gra", opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
-- vim.keymap.del("v", "gra", opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||||
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
--def vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||||
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
--vim.keymap.del("n", "grr", opts)
|
||||||
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
--def vim.keymap.set('n', 'gri', vim.lsp.buf.implementation, opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
--def vim.keymap.set('n', 'gO', vim.lsp.buf.document_symbol, opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
--def vim.keymap.set('n', 'grn', vim.lsp.buf.rename, opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
--vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
--vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<F6>', '<cmd>ClangdSwitchSourceHeader<cr>', opts)
|
--vim.keymap.set('n', '<space>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts)
|
||||||
|
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
|
||||||
|
vim.keymap.set('n', '<F6>', '<cmd>ClangdSwitchSourceHeader<CR>', opts)
|
||||||
|
vim.keymap.set("n", "<leader>q", function() vim.lsp.buf.format { async = true } end, opts)
|
||||||
|
|
||||||
-- require'illuminate'.on_attach(client)
|
-- require 'virtualtypes'.on_attach()
|
||||||
require'virtualtypes'.on_attach()
|
-- require'lsp_signature'.on_attach({
|
||||||
require'lsp_signature'.on_attach({
|
-- floating_window = true,
|
||||||
floating_window = true,
|
-- floating_window_above_cur_line = true,
|
||||||
floating_window_above_cur_line = false,
|
-- floating_window_off_x = 10,
|
||||||
floating_window_off_x = 500,
|
-- floating_window_off_y = 0,
|
||||||
floating_window_off_y = -5,
|
-- })
|
||||||
})
|
-- require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, {
|
||||||
require'nvim-navbuddy'.attach(client, bufnr)
|
-- ui = {
|
||||||
require'nvim-navic'.attach(client, bufnr)
|
-- wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
|
||||||
require("clangd_extensions.inlay_hints").setup_autocmd()
|
-- left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
|
||||||
require("clangd_extensions.inlay_hints").set_inlay_hints()
|
-- right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
|
||||||
end
|
-- arrow = " ",
|
||||||
|
-- up_arrow = " ",
|
||||||
|
-- down_arrow = " ",
|
||||||
|
-- above = false, -- the virtual text will be displayed above the line
|
||||||
|
-- },
|
||||||
|
-- priority = 2003, -- the priority of virtual text
|
||||||
|
-- inline = true
|
||||||
|
-- })
|
||||||
|
|
||||||
local signs = {
|
vim.diagnostic.config({
|
||||||
{ name = "DiagnosticSignError", text = "" },
|
underline = false,
|
||||||
{ name = "DiagnosticSignWarn", text = "" },
|
signs = {
|
||||||
{ name = "DiagnosticSignHint", text = "" },
|
text = {
|
||||||
{ name = "DiagnosticSignInfo", text = "" },
|
[vim.diagnostic.severity.HINT] = "",
|
||||||
}
|
[vim.diagnostic.severity.ERROR] = "✘",
|
||||||
|
[vim.diagnostic.severity.INFO] = "◉",
|
||||||
|
[vim.diagnostic.severity.WARN] = ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
virtual_text = false,
|
||||||
|
update_in_insert = false,
|
||||||
|
severity_sort = true,
|
||||||
|
-- virtual_lines = {
|
||||||
|
-- current_line = true,
|
||||||
|
-- }
|
||||||
|
})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
for _, sign in ipairs(signs) do
|
--local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
--local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
end
|
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||||
|
-- local capabilities = vim.tbl_deep_extend('force',
|
||||||
|
-- vim.lsp.protocol.make_client_capabilities(),
|
||||||
|
-- require('epo').register_cap()
|
||||||
|
-- )
|
||||||
|
--capabilities.offsetEncoding = { "utf-16" }
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
vim.lsp.config('groovyls', {
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
signs = {
|
|
||||||
active = signs,
|
|
||||||
--severity_limit = 'info',
|
|
||||||
},
|
|
||||||
severity_sort = true,
|
|
||||||
underline = false,
|
|
||||||
update_in_insert = false,
|
|
||||||
--virtual_text = {
|
|
||||||
-- spacing = 40,
|
|
||||||
-- severity_limit = 'Warning',
|
|
||||||
--},
|
|
||||||
virtual_text = false,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
capabilities.offsetEncoding = { "utf-16" }
|
|
||||||
|
|
||||||
nvim_lsp.groovyls.setup({
|
|
||||||
cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" },
|
cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" },
|
||||||
on_attach = on_attach,
|
|
||||||
--on_publish_diagnostics = diagnostic_handler,
|
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
})
|
||||||
|
|
||||||
-- nvim_lsp.ccls.setup(
|
vim.lsp.config('clangd_extensions', {
|
||||||
-- coq.lsp_ensure_capabilities({
|
cmd = {
|
||||||
-- init_options = {
|
"/workspace/WayveCode/bzl-build/WayveCode/external/llvm_toolchain_llvm/bin/clangd",
|
||||||
-- compilationDatabaseDirectory = ".";
|
"--background-index",
|
||||||
-- index = {
|
"-j=32",
|
||||||
-- threads = 0;
|
"--header-insertion=never"},
|
||||||
-- },
|
|
||||||
-- clang = {
|
|
||||||
-- excludeArgs = { "-frounding-math"} ;
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- root_dir = nvim_lsp.util.root_pattern("compile_commands.json"),
|
|
||||||
-- on_attach = on_attach,
|
|
||||||
-- on_publish_diagnostics = diagnostic_handler,
|
|
||||||
-- flags = {
|
|
||||||
-- debounce_text_changes = 150,
|
|
||||||
-- }}
|
|
||||||
-- )
|
|
||||||
-- )
|
|
||||||
|
|
||||||
nvim_lsp.clangd.setup({
|
|
||||||
settings = {
|
|
||||||
},
|
|
||||||
on_attach = on_attach,
|
|
||||||
--on_publish_diagnostics = diagnostic_handler,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
-- flags = {
|
filetypes = { "cpp" },
|
||||||
-- debounce_text_changes = 150,
|
|
||||||
-- }
|
|
||||||
})
|
})
|
||||||
|
|
||||||
nvim_lsp.pylsp.setup({
|
vim.lsp.config('pylsp', {
|
||||||
settings = {
|
settings = {
|
||||||
pylint = {
|
pylint = {
|
||||||
enabled = false
|
enabled = true
|
||||||
},
|
},
|
||||||
pyflakes = {
|
pyflakes = {
|
||||||
enabled = false,
|
enabled = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- flags = {
|
|
||||||
-- debounce_text_changes = 150,
|
|
||||||
-- },
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
--on_publish_diagnostics = diagnostic_handler,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
nvim_lsp.matlab_ls.setup({
|
vim.lsp.config('lua_ls', {
|
||||||
cmd = { "matlab-language-server", "--stdio"},
|
|
||||||
filetypes = { "matlab" },
|
|
||||||
handlers = { [ "workspace/configuration"] = function(_, _, ctx)
|
|
||||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
|
||||||
return {client.config.settings.matlab}
|
|
||||||
end
|
|
||||||
},
|
|
||||||
root_dir = nvim_lsp.util.find_git_ancestor,
|
|
||||||
single_file_support = false,
|
|
||||||
settings = {
|
settings = {
|
||||||
matlab = {
|
Lua = {
|
||||||
indexWorkspace = true,
|
diagnostics = { globals = { "vim" } },
|
||||||
installPath = "/home/kmcr/.local/usr/MATLAB/R2021b",
|
completion = {
|
||||||
matlabConnectionTiming = "onStart",
|
callSnippet = "Replace"
|
||||||
telemetry = true,
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
on_attach = on_attach,
|
})
|
||||||
capabilities = capabilities
|
|
||||||
|
-- nvim_lsp.matlab_ls.setup({
|
||||||
|
-- cmd = { "matlab-language-server", "--stdio" },
|
||||||
|
-- filetypes = { "matlab" },
|
||||||
|
-- -- root_dir = nvim_lsp.util.find_git_ancestor,
|
||||||
|
-- root_dir = vim.fs.dirname(vim.fs.find('.git',
|
||||||
|
-- { path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), upward = true })[1]),
|
||||||
|
-- single_file_support = true,
|
||||||
|
-- settings = {
|
||||||
|
-- matlab = {
|
||||||
|
-- -- indexWorkspace = false,
|
||||||
|
-- installPath = "/usr/local/MATLAB/R2024b",
|
||||||
|
-- -- matlabConnectionTiming = "onStart",
|
||||||
|
-- -- telemetry = true,
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
-- })
|
||||||
|
|
||||||
|
vim.lsp.config('typos_lsp', {
|
||||||
|
cmd = { 'typos-lsp' },
|
||||||
|
filetypes = { '*' },
|
||||||
|
root_dir = require("lspconfig.util").root_pattern('typos.toml', '_typos.toml', '.typos.toml'),
|
||||||
|
single_file_support = true,
|
||||||
|
settings = {},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
local servers = { "cmake", "rust_analyzer", "bashls", "marksman" }
|
local servers = { "cmake", "rust_analyzer", "bashls", "marksman", "bzl" }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup({
|
vim.lsp.config(lsp, {
|
||||||
on_attach = on_attach,
|
|
||||||
--on_publish_diagnostics = diagnostic_handler,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
-- flags = {
|
|
||||||
-- debounce_text_changes = 150,
|
|
||||||
-- }
|
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|||||||
75
.config/nvim/lua/plugins/mark.lua
Normal file
75
.config/nvim/lua/plugins/mark.lua
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
return {
|
||||||
|
'niuiic/track.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'niuiic/core.nvim'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("track").setup({
|
||||||
|
sign = {
|
||||||
|
text = "",
|
||||||
|
text_color = "#00ff00",
|
||||||
|
priority = 10,
|
||||||
|
},
|
||||||
|
search = {
|
||||||
|
--@param mark track.Mark
|
||||||
|
entry_label = function(mark)
|
||||||
|
return string.format("[%s] %s | %s:%s", mark.id, mark.desc, mark.file, mark.lnum)
|
||||||
|
end,
|
||||||
|
--@param marks track.Mark[]
|
||||||
|
--@return track.Mark[]
|
||||||
|
sort_entry = function(marks)
|
||||||
|
return require("core").lua.list.sort(marks, function(prev, cur)
|
||||||
|
return prev.id < cur.id
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
local keys = {
|
||||||
|
{
|
||||||
|
"mm",
|
||||||
|
function()
|
||||||
|
require("track").toggle()
|
||||||
|
end,
|
||||||
|
desc = "toggle mark",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mc",
|
||||||
|
function()
|
||||||
|
require("track").remove()
|
||||||
|
end,
|
||||||
|
desc = "remove all marks",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mj",
|
||||||
|
function()
|
||||||
|
require("track").jump_to_next()
|
||||||
|
end,
|
||||||
|
desc = "jump to next mark",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mk",
|
||||||
|
function()
|
||||||
|
require("track").jump_to_prev()
|
||||||
|
end,
|
||||||
|
desc = "jump to prev mark",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"me",
|
||||||
|
function()
|
||||||
|
require("track").edit()
|
||||||
|
end,
|
||||||
|
desc = "edit mark",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<space>om",
|
||||||
|
function()
|
||||||
|
require("track").search()
|
||||||
|
end,
|
||||||
|
desc = "search marks",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for key, value in pairs(keys) do
|
||||||
|
vim.keymap.set('n', value[1], value[2], {})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -1,5 +1,91 @@
|
|||||||
return {
|
return { {
|
||||||
'richardbizik/nvim-toc',
|
'richardbizik/nvim-toc',
|
||||||
ft = { "md", "markdown" },
|
ft = { "md", "markdown" },
|
||||||
config = true,
|
config = true,
|
||||||
|
}, {
|
||||||
|
{
|
||||||
|
'ChuufMaster/markdown-toc',
|
||||||
|
opts = {
|
||||||
|
|
||||||
|
-- The heading level to match (i.e the number of "#"s to match to) max 6
|
||||||
|
heading_level_to_match = -1,
|
||||||
|
|
||||||
|
-- Set to True display a dropdown to allow you to select the heading level
|
||||||
|
ask_for_heading_level = true,
|
||||||
|
|
||||||
|
-- TOC default string
|
||||||
|
-- WARN
|
||||||
|
toc_format = '%s- [%s](<%s#%s>)',
|
||||||
|
},
|
||||||
|
ft = { "md", "markdown" },
|
||||||
|
}, {
|
||||||
|
'SCJangra/table-nvim',
|
||||||
|
ft = {'markdown', 'md' },
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"iamcco/markdown-preview.nvim",
|
||||||
|
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||||
|
build = "cd app && npm install",
|
||||||
|
init = function()
|
||||||
|
vim.g.mkdp_filetypes = { "markdown" }
|
||||||
|
end,
|
||||||
|
ft = { "markdown", "md" },
|
||||||
|
},
|
||||||
|
-- {
|
||||||
|
-- "brianhuster/live-preview.nvim",
|
||||||
|
-- opts = {
|
||||||
|
-- cmd = "LivePreview", -- Main command of live-preview.nvim
|
||||||
|
-- port = 5500, -- Port to run the live preview server on.
|
||||||
|
-- autokill = false, -- If true, the plugin will autokill other processes running on the same port (except for Neovim) when starting the server.
|
||||||
|
-- browser = 'default', -- Terminal command to open the browser for live-previewing (eg. 'firefox', 'flatpak run com.vivaldi.Vivaldi'). By default, it will use the default browser.
|
||||||
|
-- dynamic_root = false, -- If true, the plugin will set the root directory to the previewed file's directory. If false, the root directory will be the current working directory (`:lua print(vim.uv.cwd())`).
|
||||||
|
-- sync_scroll = false, -- If true, the plugin will sync the scrolling in the browser as you scroll in the Markdown files in Neovim.
|
||||||
|
-- picker = nil, -- Picker to use for opening files. 3 choices are available: 'telescope', 'fzf-lua', 'mini.pick'. If nil, the plugin look for the first available picker when you call the `pick` command.
|
||||||
|
-- },
|
||||||
|
-- enabled = false,
|
||||||
|
-- },
|
||||||
|
{
|
||||||
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
|
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
|
||||||
|
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
|
||||||
|
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
||||||
|
---@module 'render-markdown'
|
||||||
|
---@type render.md.UserConfig
|
||||||
|
opts = {
|
||||||
|
completions = { blink = { enabled = true } },
|
||||||
|
render_modes = { 'n', 'c', 't' },
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'Thiago4532/mdmath.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- Filetypes that the plugin will be enabled by default.
|
||||||
|
filetypes = {'markdown'},
|
||||||
|
-- Color of the equation, can be a highlight group or a hex color.
|
||||||
|
-- Examples: 'Normal', '#ff0000'
|
||||||
|
foreground = 'Normal',
|
||||||
|
-- Hide the text when the equation is under the cursor.
|
||||||
|
anticonceal = true,
|
||||||
|
-- Hide the text when in the Insert Mode.
|
||||||
|
hide_on_insert = true,
|
||||||
|
-- Enable dynamic size for non-inline equations.
|
||||||
|
dynamic = true,
|
||||||
|
-- Configure the scale of dynamic-rendered equations.
|
||||||
|
dynamic_scale = 1.0,
|
||||||
|
-- Interval between updates (milliseconds).
|
||||||
|
update_interval = 400,
|
||||||
|
|
||||||
|
-- Internal scale of the equation images, increase to prevent blurry images when increasing terminal
|
||||||
|
-- font, high values may produce aliased images.
|
||||||
|
-- WARNING: This do not affect how the images are displayed, only how many pixels are used to render them.
|
||||||
|
-- See `dynamic_scale` to modify the displayed size.
|
||||||
|
internal_scale = 1.0,
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
return {
|
|
||||||
"echasnovski/mini.nvim",
|
|
||||||
version = false,
|
|
||||||
config = function()
|
|
||||||
local hipatterns = require('mini.hipatterns')
|
|
||||||
hipatterns.setup({
|
|
||||||
highlighters = {
|
|
||||||
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
|
|
||||||
fixme = { pattern = '%f[%w]()EFMC 0()%f[%W]', group = 'MiniHipatternsFixme' },
|
|
||||||
hack = { pattern = '%f[%w]()Vehicle 0()%f[%W]', group = 'MiniHipatternsHack' },
|
|
||||||
todo = { pattern = '%f[%w]()CoCo 0()%f[%W]', group = 'MiniHipatternsTodo' },
|
|
||||||
note = { pattern = '%f[%w]()EneM 0()%f[%W]', group = 'MiniHipatternsNote' },
|
|
||||||
|
|
||||||
-- Highlight hex color strings (`#rrggbb`) using that color
|
|
||||||
hex_color = hipatterns.gen_highlighter.hex_color(),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
return {
|
return {
|
||||||
|
-- <leader>mm
|
||||||
'gorbit99/codewindow.nvim',
|
'gorbit99/codewindow.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
require('codewindow').setup()
|
require('codewindow').setup()
|
||||||
end
|
require('codewindow').apply_default_keybinds()
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,5 +88,6 @@ return {
|
|||||||
MkdnFoldSection = {'n', '<leader>f'},
|
MkdnFoldSection = {'n', '<leader>f'},
|
||||||
MkdnUnfoldSection = {'n', '<leader>F'}
|
MkdnUnfoldSection = {'n', '<leader>F'}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,5 +8,7 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require'nvim-navic'.setup()
|
require'nvim-navic'.setup()
|
||||||
require'nvim-navbuddy'.setup()
|
require'nvim-navbuddy'.setup()
|
||||||
end
|
vim.keymap.set('n', '<leader>cb', ':lua require("nvim-navbuddy").open()<cr>', {noremap = true, silent = true})
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
'danymat/neogen',
|
'danymat/neogen',
|
||||||
|
enabled = false,
|
||||||
opts = {
|
opts = {
|
||||||
--snippet_engine = 'ultisnips',
|
--snippet_engine = 'ultisnips',
|
||||||
input_after_comment = true,
|
input_after_comment = true,
|
||||||
|
|||||||
4
.config/nvim/lua/plugins/no-neck-pain.lua
Normal file
4
.config/nvim/lua/plugins/no-neck-pain.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
"shortcuts/no-neck-pain.nvim",
|
||||||
|
config = true
|
||||||
|
}
|
||||||
12
.config/nvim/lua/plugins/notify.lua
Normal file
12
.config/nvim/lua/plugins/notify.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
opts = {
|
||||||
|
stages = "static",
|
||||||
|
fps = 0,
|
||||||
|
on_open = function(win)
|
||||||
|
if vim.api.nvim_win_is_valid(win) then
|
||||||
|
vim.api.nvim_win_set_config(win, { border = "single" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,16 +1,20 @@
|
|||||||
return {
|
return {
|
||||||
'jose-elias-alvarez/null-ls.nvim',
|
'nvimtools/none-ls.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
null_ls = require("null-ls")
|
local none_ls = require("null-ls")
|
||||||
null_ls.setup({
|
none_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.formatting.stylua,
|
none_ls.builtins.code_actions.gitsigns,
|
||||||
--null_ls.builtins.completion.spell,
|
none_ls.builtins.diagnostics.gitlint,
|
||||||
null_ls.builtins.code_actions.gitsigns,
|
none_ls.builtins.diagnostics.cmake_lint,
|
||||||
null_ls.builtins.diagnostics.cmake_lint,
|
none_ls.builtins.diagnostics.codespell,
|
||||||
null_ls.builtins.diagnostics.codespell,
|
none_ls.builtins.diagnostics.fish,
|
||||||
null_ls.builtins.diagnostics.hadolint,
|
none_ls.builtins.diagnostics.mypy,
|
||||||
null_ls.builtins.hover.dictionary},
|
--none_ls.builtins.diagnostics.mlint, - find it
|
||||||
|
--none_ls.builtins.diagnostics.commitlint, - written in npm
|
||||||
|
--none_ls.builtins.diagnostics.checkmake, - written in go
|
||||||
|
none_ls.builtins.hover.dictionary,
|
||||||
|
none_ls.builtins.formatting.black},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,84 +1,185 @@
|
|||||||
return {
|
return {
|
||||||
'hrsh7th/nvim-cmp',
|
{
|
||||||
dependencies = {
|
"nomnivore/ollama.nvim",
|
||||||
'dcampos/cmp-snippy',
|
dependencies = {
|
||||||
--'mstanciu552/cmp-matlab',
|
"nvim-lua/plenary.nvim",
|
||||||
'petertriho/cmp-git',
|
},
|
||||||
'hrsh7th/cmp-buffer',
|
|
||||||
'hrsh7th/cmp-cmdline',
|
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
|
||||||
'hrsh7th/cmp-path',
|
|
||||||
'hrsh7th/cmp-calc',
|
|
||||||
},
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
|
||||||
local cmp = require'cmp'
|
|
||||||
|
|
||||||
cmp.setup({
|
-- All the user commands added by the plugin
|
||||||
-- snippet = {
|
cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" },
|
||||||
-- expand = function(args)
|
|
||||||
-- require('snippy').expand_snippet(args.body)
|
keys = {
|
||||||
-- end,
|
-- Sample keybind for prompt menu. Note that the <c-u> is important for selections to work properly.
|
||||||
-- },
|
{
|
||||||
|
"<leader>oo",
|
||||||
|
":<c-u>lua require('ollama').prompt()<cr>",
|
||||||
|
desc = "ollama prompt",
|
||||||
|
mode = { "n", "v" },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Sample keybind for direct prompting. Note that the <c-u> is important for selections to work properly.
|
||||||
|
{
|
||||||
|
"<leader>oG",
|
||||||
|
":<c-u>lua require('ollama').prompt('Generate_Code')<cr>",
|
||||||
|
desc = "ollama Generate Code",
|
||||||
|
mode = { "n", "v" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
---@type Ollama.Config
|
||||||
|
opts = {
|
||||||
|
model = "qwen2.5-coder",
|
||||||
|
url = "http://192.168.10.99:11434",
|
||||||
|
-- your configuration overrides
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mireq/luasnip-snippets",
|
||||||
|
dependencies = {
|
||||||
|
"L3MON4D3/LuaSnip"
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('luasnip_snippets.common.snip_utils').setup()
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
dependencies = {
|
||||||
|
"saadparwaiz1/cmp_luasnip"
|
||||||
|
},
|
||||||
|
-- follow latest release.
|
||||||
|
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
|
||||||
|
-- install jsregexp (optional!).
|
||||||
|
build = "make install_jsregexp",
|
||||||
|
config = function()
|
||||||
|
-- Mandatory setup function
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
luasnip.setup({
|
||||||
|
load_ft_func = require('luasnip_snippets.common.snip_utils').load_ft_func,
|
||||||
|
ft_func = require('luasnip_snippets.common.snip_utils').ft_func,
|
||||||
|
-- To enable auto expansin
|
||||||
|
enable_autosnippets = true,
|
||||||
|
})
|
||||||
|
vim.keymap.set({"i", "s"}, "<Tab>", function() if luasnip.expand_or_jumpable() then luasnip.expand_or_jump() else vim.api.nvim_input('<C-V><Tab>') end end, {silent = true})
|
||||||
|
vim.keymap.set({"i", "s"}, "<S-Tab>", function() luasnip.jump(-1) end, {silent = true})
|
||||||
|
vim.keymap.set({"i", "s"}, "<C-E>", function() if luasnip.choice_active() then luasnip.change_choice(1) end end, {silent = true})
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'tzachar/cmp-ai',
|
||||||
|
dependencies = 'nvim-lua/plenary.nvim',
|
||||||
|
enabled = false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
dependencies = {
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-buffer',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
'hrsh7th/cmp-cmdline',
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
'tzachar/cmp-ai',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
local cmp_ai = require('cmp_ai.config')
|
||||||
|
|
||||||
|
cmp_ai:setup({
|
||||||
|
max_lines = 100,
|
||||||
|
provider = 'Ollama',
|
||||||
|
provider_options = {
|
||||||
|
base_url = 'http://192.168.10.99:11434/api/generate',
|
||||||
|
model = 'qwen2.5-coder:latest',
|
||||||
|
prompt = function(lines_before, lines_after)
|
||||||
|
return "<|fim_prefix|>" .. lines_before .. "<|fim_suffix|>" .. lines_after .. "<|fim_middle|>"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
notify = true,
|
||||||
|
notify_callback = function(msg)
|
||||||
|
vim.notify(msg)
|
||||||
|
end,
|
||||||
|
run_on_every_keystroke = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
-- REQUIRED - you must specify a snippet engine
|
||||||
|
expand = function(args)
|
||||||
|
--vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||||
|
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||||
|
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||||
|
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||||
|
-- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+)
|
||||||
|
end,
|
||||||
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
['<C-e>'] = cmp.mapping.abort(),
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
['<C-y>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'path' },
|
-- { name = 'vsnip' }, -- For vsnip users.
|
||||||
{ name = 'snippy' },
|
{ name = 'luasnip' }, -- For luasnip users.
|
||||||
{ name = 'calc' },
|
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||||
-- { name = 'cmp_matlab' },
|
-- { name = 'snippy' }, -- For snippy users.
|
||||||
{ name = 'cmp_git' },
|
--{ name = 'cmp_ai' }
|
||||||
}, {
|
}, {
|
||||||
{ name = 'buffer', keyword_length = 5, max_item_count = 10, priority = -5 },
|
{ name = 'buffer' },
|
||||||
}),
|
}),
|
||||||
sorting = {
|
performance = {
|
||||||
comparators = {
|
fetching_timeout = 20,
|
||||||
cmp.config.compare.offset,
|
debounce = 10,
|
||||||
cmp.config.compare.exact,
|
throttle = 10,
|
||||||
cmp.config.compare.recently_used,
|
async_budget = 20000,
|
||||||
require("clangd_extensions.cmp_scores"),
|
max_view_entries = 10,
|
||||||
cmp.config.compare.kind,
|
confirm_resolve_timeout = 10,
|
||||||
cmp.config.compare.sort_text,
|
filtering_context_budget = 10
|
||||||
cmp.config.compare.length,
|
}
|
||||||
cmp.config.compare.order,
|
})
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup.cmdline({'/', '?'}, {
|
-- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below
|
||||||
|
-- Set configuration for specific filetype.
|
||||||
|
--[[ cmp.setup.filetype('gitcommit', {
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'git' },
|
||||||
|
}, {
|
||||||
|
{ name = 'buffer' },
|
||||||
|
})
|
||||||
|
})
|
||||||
|
require("cmp_git").setup() ]]
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||||
|
cmp.setup.cmdline({ '/', '?' }, {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'buffer' }
|
{ name = 'buffer' }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
cmp.setup.cmdline(':', {
|
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||||
|
cmp.setup.cmdline(':', {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'path' }
|
{ name = 'path' }
|
||||||
}, {
|
}, {
|
||||||
{ name = 'cmdline' }
|
{ name = 'cmdline' }
|
||||||
})
|
}),
|
||||||
})
|
matching = { disallow_symbol_nonprefix_matching = false }
|
||||||
|
})
|
||||||
cmp.setup.filetype('gitcommit', {
|
end,
|
||||||
sources = cmp.config.sources({
|
enabled = false
|
||||||
{name = 'cmp_git' },
|
}
|
||||||
}, {
|
|
||||||
{name = 'buffer' }
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
require("cmp_git").setup()
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
'kyazdani42/nvim-tree.lua',
|
'nvim-tree/nvim-tree.lua',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'kyazdani42/nvim-web-devicons',
|
'nvim-tree/nvim-web-devicons',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.nvim_tree_refresh_wait = 1000
|
vim.g.nvim_tree_refresh_wait = 1000
|
||||||
@@ -9,7 +9,7 @@ return {
|
|||||||
-- following options are the default
|
-- following options are the default
|
||||||
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
|
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
|
||||||
require'nvim-tree'.setup {
|
require'nvim-tree'.setup {
|
||||||
disable_netrw = true,
|
disable_netrw = false,
|
||||||
hijack_netrw = true,
|
hijack_netrw = true,
|
||||||
open_on_tab = false,
|
open_on_tab = false,
|
||||||
hijack_cursor = true,
|
hijack_cursor = true,
|
||||||
@@ -55,7 +55,6 @@ return {
|
|||||||
cursorline = true,
|
cursorline = true,
|
||||||
debounce_delay = 15,
|
debounce_delay = 15,
|
||||||
width = 35,
|
width = 35,
|
||||||
hide_root_folder = false,
|
|
||||||
side = "left",
|
side = "left",
|
||||||
preserve_window_proportions = false,
|
preserve_window_proportions = false,
|
||||||
number = false,
|
number = false,
|
||||||
@@ -142,5 +141,8 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
vim.keymap.set('n', '<leader>tt', '<cmd>NvimTreeToggle<cr>', { noremap = true, silent = true})
|
||||||
|
vim.keymap.set('n', '<leader>tf', '<cmd>NvimTreeFindFile<cr>', { noremap = true, silent = true})
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
25
.config/nvim/lua/plugins/obsidian.lua
Normal file
25
.config/nvim/lua/plugins/obsidian.lua
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
"epwalsh/obsidian.nvim",
|
||||||
|
--lazy = true,
|
||||||
|
--ft = "markdown",
|
||||||
|
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
|
||||||
|
-- event = {
|
||||||
|
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
|
||||||
|
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
|
||||||
|
-- "BufReadPre path/to/my-vault/**.md",
|
||||||
|
-- "BufNewFile path/to/my-vault/**.md",
|
||||||
|
-- },
|
||||||
|
opts = {
|
||||||
|
workspaces = {
|
||||||
|
{
|
||||||
|
name = "personal",
|
||||||
|
path = "~/vaults/personal",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "work",
|
||||||
|
path = "~/vaults/work",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
15
.config/nvim/lua/plugins/oil.lua
Normal file
15
.config/nvim/lua/plugins/oil.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
return {{
|
||||||
|
'stevearc/oil.nvim',
|
||||||
|
opts = {
|
||||||
|
delete_to_trash = true,
|
||||||
|
|
||||||
|
},
|
||||||
|
vim.keymap.set("n", "<leader>tt", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||||
|
}, {
|
||||||
|
'mong8se/buffish.nvim',
|
||||||
|
vim.keymap.set("n", "<leader>tb", function() require('buffish').open() end, { desc = "Open buffers list" })
|
||||||
|
}, {
|
||||||
|
"benomahony/oil-git.nvim",
|
||||||
|
dependencies = { "stevearc/oil.nvim" },
|
||||||
|
enabled = false
|
||||||
|
}}
|
||||||
6
.config/nvim/lua/plugins/orphans.lua
Normal file
6
.config/nvim/lua/plugins/orphans.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
"ZWindL/orphans.nvim",
|
||||||
|
config = function()
|
||||||
|
require('orphans').setup({})
|
||||||
|
end
|
||||||
|
}
|
||||||
57
.config/nvim/lua/plugins/paint.lua
Normal file
57
.config/nvim/lua/plugins/paint.lua
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
return { -- Custom highlight for stim files
|
||||||
|
"folke/paint.nvim",
|
||||||
|
config = function()
|
||||||
|
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
log = 'log',
|
||||||
|
}})
|
||||||
|
|
||||||
|
require("paint").setup({
|
||||||
|
---@type PaintHighlight[]
|
||||||
|
highlights = {
|
||||||
|
{
|
||||||
|
filter = { filetype = "log" },
|
||||||
|
pattern = "EFMC",
|
||||||
|
hl = "DiffDelete",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filter = { filetype = "log" },
|
||||||
|
pattern = "CoCo",
|
||||||
|
hl = "DiffAdd",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filter = { filetype = "log" },
|
||||||
|
pattern = "EneM",
|
||||||
|
hl = "DiffChange",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filter = { filetype = "log" },
|
||||||
|
pattern = "CuLi",
|
||||||
|
hl = "DiffChange",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filter = { filetype = "log" },
|
||||||
|
pattern = "Hoca",
|
||||||
|
hl = "MatchParen",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filter = { filetype = "log" },
|
||||||
|
pattern = "Inverter",
|
||||||
|
hl = "RedrawDebugClear",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filter = { filetype = "log" },
|
||||||
|
pattern = "Wallbox",
|
||||||
|
hl = "RedrawDebugComposed",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filter = { filetype = "log" },
|
||||||
|
pattern = "Vehicle",
|
||||||
|
hl = "RedrawDebugRecompose",
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -39,5 +39,6 @@ return {
|
|||||||
--vim.fn.system('i3-msg move left')
|
--vim.fn.system('i3-msg move left')
|
||||||
end
|
end
|
||||||
end, {})
|
end, {})
|
||||||
end
|
end,
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
7
.config/nvim/lua/plugins/pendulum.lua
Normal file
7
.config/nvim/lua/plugins/pendulum.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"ptdewey/pendulum-nvim",
|
||||||
|
config = function()
|
||||||
|
require("pendulum").setup()
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
@@ -68,24 +68,24 @@ return {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
local keymap = vim.api.nvim_set_keymap
|
-- local keymap = vim.api.nvim_set_keymap
|
||||||
local opts = {noremap = true, silent = true}
|
-- local opts = {noremap = true, silent = true}
|
||||||
|
--
|
||||||
keymap("n", "<LEADER>plf", ":PerfLoadFlat<CR>", opts)
|
-- keymap("n", "<LEADER>plf", ":PerfLoadFlat<CR>", opts)
|
||||||
keymap("n", "<LEADER>plg", ":PerfLoadCallGraph<CR>", opts)
|
-- keymap("n", "<LEADER>plg", ":PerfLoadCallGraph<CR>", opts)
|
||||||
keymap("n", "<LEADER>plo", ":PerfLoadFlameGraph<CR>", opts)
|
-- keymap("n", "<LEADER>plo", ":PerfLoadFlameGraph<CR>", opts)
|
||||||
|
--
|
||||||
keymap("n", "<LEADER>pe", ":PerfPickEvent<CR>", opts)
|
-- keymap("n", "<LEADER>pe", ":PerfPickEvent<CR>", opts)
|
||||||
|
--
|
||||||
keymap("n", "<LEADER>pa", ":PerfAnnotate<CR>", opts)
|
-- keymap("n", "<LEADER>pa", ":PerfAnnotate<CR>", opts)
|
||||||
keymap("n", "<LEADER>pf", ":PerfAnnotateFunction<CR>", opts)
|
-- keymap("n", "<LEADER>pf", ":PerfAnnotateFunction<CR>", opts)
|
||||||
keymap("v", "<LEADER>pa", ":PerfAnnotateSelection<CR>", opts)
|
-- keymap("v", "<LEADER>pa", ":PerfAnnotateSelection<CR>", opts)
|
||||||
|
--
|
||||||
keymap("n", "<LEADER>pt", ":PerfToggleAnnotations<CR>", opts)
|
-- keymap("n", "<LEADER>pt", ":PerfToggleAnnotations<CR>", opts)
|
||||||
|
--
|
||||||
keymap("n", "<LEADER>ph", ":PerfHottestLines<CR>", opts)
|
-- keymap("n", "<LEADER>ph", ":PerfHottestLines<CR>", opts)
|
||||||
keymap("n", "<LEADER>ps", ":PerfHottestSymbols<CR>", opts)
|
-- keymap("n", "<LEADER>ps", ":PerfHottestSymbols<CR>", opts)
|
||||||
keymap("n", "<LEADER>pc", ":PerfHottestCallersFunction<CR>", opts)
|
-- keymap("n", "<LEADER>pc", ":PerfHottestCallersFunction<CR>", opts)
|
||||||
keymap("v", "<LEADER>pc", ":PerfHottestCallersSelection<CR>", opts)
|
-- keymap("v", "<LEADER>pc", ":PerfHottestCallersSelection<CR>", opts)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
4
.config/nvim/lua/plugins/plantuml.lua
Normal file
4
.config/nvim/lua/plugins/plantuml.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
--"weirongxu/plantuml-previewer.vim"
|
||||||
|
return {
|
||||||
|
'aklt/plantuml-syntax'
|
||||||
|
}
|
||||||
34
.config/nvim/lua/plugins/quicker.lua
Normal file
34
.config/nvim/lua/plugins/quicker.lua
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
return {
|
||||||
|
'stevearc/quicker.nvim',
|
||||||
|
config = function()
|
||||||
|
require('quicker').setup()
|
||||||
|
vim.keymap.set("n", "<leader>q", function()
|
||||||
|
require("quicker").toggle()
|
||||||
|
end, {
|
||||||
|
desc = "Toggle quickfix",
|
||||||
|
})
|
||||||
|
vim.keymap.set("n", "<leader>l", function()
|
||||||
|
require("quicker").toggle({ loclist = true })
|
||||||
|
end, {
|
||||||
|
desc = "Toggle loclist",
|
||||||
|
})
|
||||||
|
require("quicker").setup({
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
">",
|
||||||
|
function()
|
||||||
|
require("quicker").expand({ before = 2, after = 2, add_to_existing = true })
|
||||||
|
end,
|
||||||
|
desc = "Expand quickfix context",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<",
|
||||||
|
function()
|
||||||
|
require("quicker").collapse()
|
||||||
|
end,
|
||||||
|
desc = "Collapse quickfix context",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -3,5 +3,13 @@ return {
|
|||||||
dependencies= {
|
dependencies= {
|
||||||
'nvim-lua/plenary.nvim'
|
'nvim-lua/plenary.nvim'
|
||||||
},
|
},
|
||||||
config = true
|
config = true,
|
||||||
|
|
||||||
|
-- -- quicknote
|
||||||
|
-- map('n', '<leader>qn', '<cmd>lua require("quicknote").NewNoteAtCurrentLine()<cr>', default_options)
|
||||||
|
-- map('n', '<leader>qs', '<cmd>lua require("quicknote").ShowNoteSigns()<cr>', default_options)
|
||||||
|
-- map('n', '<leader>qe', '<cmd>lua require("quicknote").OpenNoteAtCurrentLine()<cr>', default_options)
|
||||||
|
-- map('n', '<leader>qd', '<cmd>lua require("quicknote").DeleteNoteAtCurrentLine()<cr>', default_options)
|
||||||
|
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
27
.config/nvim/lua/plugins/rainbow.lua
Normal file
27
.config/nvim/lua/plugins/rainbow.lua
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
return {
|
||||||
|
'HiPhish/rainbow-delimiters.nvim',
|
||||||
|
config = function()
|
||||||
|
-- This module contains a number of default definitions
|
||||||
|
local rainbow_delimiters = require 'rainbow-delimiters'
|
||||||
|
|
||||||
|
vim.g.rainbow_delimiters = {
|
||||||
|
strategy = {
|
||||||
|
[''] = rainbow_delimiters.strategy['global'],
|
||||||
|
vim = rainbow_delimiters.strategy['local'],
|
||||||
|
},
|
||||||
|
query = {
|
||||||
|
[''] = 'rainbow-delimiters',
|
||||||
|
lua = 'rainbow-blocks',
|
||||||
|
},
|
||||||
|
highlight = {
|
||||||
|
'RainbowDelimiterRed',
|
||||||
|
'RainbowDelimiterYellow',
|
||||||
|
'RainbowDelimiterBlue',
|
||||||
|
'RainbowDelimiterOrange',
|
||||||
|
'RainbowDelimiterGreen',
|
||||||
|
'RainbowDelimiterViolet',
|
||||||
|
'RainbowDelimiterCyan',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
5
.config/nvim/lua/plugins/remote.lua
Normal file
5
.config/nvim/lua/plugins/remote.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
'amitds1997/remote-nvim.nvim',
|
||||||
|
config = true,
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
31
.config/nvim/lua/plugins/repl.lua
Normal file
31
.config/nvim/lua/plugins/repl.lua
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
return {
|
||||||
|
"petrichorma/nvim_ds_repl",
|
||||||
|
requires = "nvim-treesitter",
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||||
|
pattern = { "*.py", "*.R" },
|
||||||
|
callback = function()
|
||||||
|
-- Execute the current statement or block under the cursor
|
||||||
|
vim.keymap.set("n", '<CR>', function()
|
||||||
|
require('nvim_ds_repl').send_statement_definition()
|
||||||
|
end, { noremap = true })
|
||||||
|
|
||||||
|
-- Execute the selected visual block of code
|
||||||
|
vim.keymap.set("v", '<CR>', function()
|
||||||
|
require('nvim_ds_repl').send_visual_to_repl()
|
||||||
|
end, { noremap = true })
|
||||||
|
|
||||||
|
-- Query global environment variable information
|
||||||
|
vim.keymap.set("n", '<leader>wi', function()
|
||||||
|
require('nvim_ds_repl').query_global()
|
||||||
|
end, { noremap = true })
|
||||||
|
|
||||||
|
-- Query information about the specific object under the cursor
|
||||||
|
vim.keymap.set("n", '<leader>si', function()
|
||||||
|
require('nvim_ds_repl').inspect()
|
||||||
|
end, { noremap = true })
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
3
.config/nvim/lua/plugins/replace.lua
Normal file
3
.config/nvim/lua/plugins/replace.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
'tpope/vim-abolish'
|
||||||
|
}
|
||||||
101
.config/nvim/lua/plugins/repolink.lua
Normal file
101
.config/nvim/lua/plugins/repolink.lua
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
return {
|
||||||
|
"9seconds/repolink.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
cmd = {
|
||||||
|
"RepoLink"
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
-- ssh://git@git.viessmann.com:7999/sysfunc/hemsapplication.git
|
||||||
|
-- https://git.viessmann.com/projects/SYSFUNC/repos/hemsdocumentation/browse/README.md?useDefaultHandler=true#13
|
||||||
|
viessmann = function(args)
|
||||||
|
local anchor = "#" .. tostring(args.start_line)
|
||||||
|
|
||||||
|
return string.format(
|
||||||
|
"https://%s/projects/%s/repos/%s/browse/%s#%s",
|
||||||
|
args.host,
|
||||||
|
args.host_data.user,
|
||||||
|
args.host_data.project,
|
||||||
|
args.path,
|
||||||
|
anchor
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- ssh://git@git.viessmann.com:7999/sysfunc/hemsapplication.git
|
||||||
|
-- https://git.viessmann.com/projects/SYSFUNC/repos/hemsdocumentation/browse/README.md?useDefaultHandler=true#13
|
||||||
|
url_parser = function(remote_url)
|
||||||
|
vim.pretty_print(remote_url)
|
||||||
|
local host, group, project = string.match(remote_url,
|
||||||
|
"ssh://git@([^:]+):7999/([^/]+)/([^%.]+)")
|
||||||
|
return host, { user = group, project = project }
|
||||||
|
end
|
||||||
|
|
||||||
|
require("repolink").setup({
|
||||||
|
-- By default, repolink tries to create links with short commits
|
||||||
|
-- like, 42dd21c instead of 42dd21cf54779c9175c4ff7450d91a9ad0387491
|
||||||
|
-- If you like to have full commits, please enable this flag
|
||||||
|
use_full_commit_hash = false,
|
||||||
|
|
||||||
|
-- repolink takes remote URLs from git itself and can parse
|
||||||
|
-- most common ones: from Github, Bitbucket, Sourcehut, Gitlab, Gitea, etc.
|
||||||
|
-- but sometimes you can have a quite weird configuration, made with,
|
||||||
|
-- for example, cgit, so the default one won't work for you.
|
||||||
|
--
|
||||||
|
-- If you provide this custom parser, it should be a function that
|
||||||
|
-- parses a remote URL and returns a hostname and some data blob
|
||||||
|
-- that could be used later, on URL building.
|
||||||
|
--
|
||||||
|
-- host parameter would be used to find out a function that is used
|
||||||
|
-- to convert remote URL and repository data to an HTTP permalink
|
||||||
|
--
|
||||||
|
-- data parameter can be anything but you want to use the default URL
|
||||||
|
-- builders, it should be a table of
|
||||||
|
-- { user = "YOUR USER", project = "PROJECT NAME" }
|
||||||
|
--
|
||||||
|
-- Example of parser for git@github.com:9seconds/repolink.nvim.git URL:
|
||||||
|
--
|
||||||
|
-- function(remote_url)
|
||||||
|
-- local host, user, project = string.match(
|
||||||
|
-- remote_url,
|
||||||
|
-- "^git@([^:]+):([^/]+)/(.+)%.git$")
|
||||||
|
-- if host then
|
||||||
|
-- return host, {
|
||||||
|
-- user = user,
|
||||||
|
-- project = project
|
||||||
|
-- }
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
custom_url_parser = url_parser,
|
||||||
|
|
||||||
|
-- By default RepoLink just notifies about generated URL but if
|
||||||
|
-- this setting is not nil, then URL could also be copied into
|
||||||
|
-- a given register.
|
||||||
|
--
|
||||||
|
-- If you want to copy it into a register, run RepoLink! (with bang).
|
||||||
|
bang_register = "+",
|
||||||
|
|
||||||
|
-- repolink runs Git. Usually, it finishes quite fast but if you have a
|
||||||
|
-- slow storage, like NFS, can take some time. This is a timeout
|
||||||
|
-- after which repolink fails.
|
||||||
|
timeout = 5000,
|
||||||
|
url_builders = {
|
||||||
|
--["git.viessmann.com"] = require("repolink").url_builder_for_bitbucket("git.viessmann.com"),
|
||||||
|
["git.viessmann.com"] = viessmann,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- start_line = 1
|
||||||
|
-- end_line = 2,
|
||||||
|
-- host = "github.com",
|
||||||
|
-- host_data = {
|
||||||
|
-- user = "9seconds",
|
||||||
|
-- project = "repolink.nvim"
|
||||||
|
-- },
|
||||||
|
-- commit_hash = "42dd21c",
|
||||||
|
-- path = "doc/repolink.txt",
|
||||||
|
-- }
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
6
.config/nvim/lua/plugins/search.lua
Normal file
6
.config/nvim/lua/plugins/search.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
'nvimdev/hlsearch.nvim',
|
||||||
|
event = 'BufRead',
|
||||||
|
config = true,
|
||||||
|
enabled = false,
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user