Compare commits
68 Commits
a8dc526720
...
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 | ||
|
|
8723c409b6 | ||
|
|
3ceeb5b7fb | ||
|
|
3729e67247 | ||
|
|
89b4343ca1 | ||
|
|
0db7f3a9c2 | ||
|
|
8e017728d2 | ||
|
|
0bb033cca0 | ||
|
|
e254e6e313 | ||
|
|
55cc17b86a | ||
|
|
9f04f73f5e | ||
|
|
a1e245f38c | ||
|
|
d933a42841 | ||
|
|
64e3bfcf63 | ||
|
|
c4a1e560ed | ||
|
|
ebfb84e7fe | ||
|
|
7253772baa | ||
|
|
90378c1a75 | ||
|
|
44d1da2188 | ||
|
|
00f8c3a002 | ||
|
|
08e34a3227 | ||
|
|
05c22419bd | ||
|
|
8dd3f1942b | ||
|
|
bff439a6c6 | ||
|
|
593d27f333 | ||
|
|
2acb8c969d | ||
|
|
0b566445a1 | ||
|
|
dd12fee249 | ||
|
|
f1e79ee50e |
82
.Xresources
82
.Xresources
@@ -1,12 +1,17 @@
|
|||||||
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:IBM Plex Mono:size=8
|
URxvt.font:xft:iM WritingMonoS Nerd Font:size=12
|
||||||
URxvt.boldFont:xft:IBM Plex Mono:size=8
|
URxvt.boldFont:xft:iM WritingMonoS Nerd Font:size=12:style=bold
|
||||||
URxvt.italicFont:xft:IBM Plex Mono:size=8
|
URxvt.italicFont:xft:iM WritingMonoS Nerd Font:size=12:style=italic
|
||||||
URxvt.boldItalicFont:xft:IBM Plex Mono:size=8
|
URxvt.boldItalicFont:xft:iM WritingMonoS Nerd Font:size=12:style=bold italic
|
||||||
URxvt.secondaryScreen: 1
|
URxvt.secondaryScreen: 1
|
||||||
URxvt.secondaryScroll: 0
|
URxvt.secondaryScroll: 0
|
||||||
|
URxvt.letterSpace: -1
|
||||||
|
|
||||||
! General settings
|
! General settings
|
||||||
URxvt.iso14755 : false
|
URxvt.iso14755 : false
|
||||||
@@ -36,43 +41,42 @@ URxvt.underlineURLs: True
|
|||||||
URxvt.keysym.Shift-Control-C: perl:clipboard:copy
|
URxvt.keysym.Shift-Control-C: perl:clipboard:copy
|
||||||
URxvt.keysym.Shift-Control-V: perl:clipboard:paste
|
URxvt.keysym.Shift-Control-V: perl:clipboard:paste
|
||||||
|
|
||||||
! Font
|
! special
|
||||||
!URxvt.font: xft:Fantasque Sans Mono-10,xft:FontAwesome-10
|
*foreground: #fce8c3
|
||||||
!URxvt.boldFont: xft:Fantasque Sans Mono-10,xft:FontAwesome-10
|
*background: #1c1b19
|
||||||
URxvt.letterSpace: 0
|
*cursorColor: #fbb829
|
||||||
|
|
||||||
! Gruvbox theme
|
! black
|
||||||
URxvt.background: #282828
|
*color0: #1c1b19
|
||||||
URxvt.foreground: #ebdbb2
|
*color8: #918175
|
||||||
|
|
||||||
! Black + DarkGrey
|
! red
|
||||||
URxvt.color0: #282828
|
*color1: #ef2f27
|
||||||
URxvt.color8: #928374
|
*color9: #f75341
|
||||||
! DarkRed + Red
|
|
||||||
URxvt.color1: #cc241d
|
|
||||||
URxvt.color9: #fb4934
|
|
||||||
! DarkGreen + Green
|
|
||||||
URxvt.color2: #98971a
|
|
||||||
URxvt.color10: #b8bb26
|
|
||||||
! DarkYellow + Yellow
|
|
||||||
URxvt.color3: #d79921
|
|
||||||
URxvt.color11: #fabd2f
|
|
||||||
! DarkBlue + Blue
|
|
||||||
URxvt.color4: #458588
|
|
||||||
URxvt.color12: #83a598
|
|
||||||
! DarkMagenta + Magenta
|
|
||||||
URxvt.color5: #b16286
|
|
||||||
URxvt.color13: #d3869b
|
|
||||||
! DarkCyan + Cyan
|
|
||||||
URxvt.color6: #689d6a
|
|
||||||
URxvt.color14: #8ec07c
|
|
||||||
! LightGrey + White
|
|
||||||
URxvt.color7: #a89984
|
|
||||||
URxvt.color15: #ebdbb2
|
|
||||||
|
|
||||||
! Fading text on focus lost
|
! green
|
||||||
URxvt.fading: 30
|
*color2: #519f50
|
||||||
URxvt.cutchars: BACKSLASH '"'&()*,;<=>?@[]^{|}/
|
*color10: #98bc37
|
||||||
|
|
||||||
|
! yellow
|
||||||
|
*color3: #fbb829
|
||||||
|
*color11: #fed06e
|
||||||
|
|
||||||
|
! blue
|
||||||
|
*color4: #2c78bf
|
||||||
|
*color12: #68a8e4
|
||||||
|
|
||||||
|
! magenta
|
||||||
|
*color5: #e02c6d
|
||||||
|
*color13: #ff5c8f
|
||||||
|
|
||||||
|
! cyan
|
||||||
|
*color6: #0aaeb3
|
||||||
|
*color14: #2be4d0
|
||||||
|
|
||||||
|
! white
|
||||||
|
*color7: #baa67f
|
||||||
|
*color15: #fce8c3
|
||||||
|
|
||||||
! Xresources
|
! Xresources
|
||||||
|
|
||||||
|
|||||||
@@ -1,962 +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 (Linux/BSD only)
|
|
||||||
#
|
|
||||||
# Override the variant of the GTK theme/Wayland client side decorations.
|
|
||||||
# Commonly supported values are `dark` and `light`. Set this to `None` to use
|
|
||||||
# the default theme variant.
|
|
||||||
#decorations_theme_variant: 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: IBM Plex Mono Text
|
|
||||||
|
|
||||||
# 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: 8.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
|
|
||||||
|
|
||||||
# Send ESC (\x1b) before characters when alt is pressed.
|
|
||||||
#alt_send_esc: true
|
|
||||||
|
|
||||||
# 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
|
|
||||||
# - 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: SpawnNewInstance }
|
|
||||||
#- { 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/afterglow.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/base16_default_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/blood_moon.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/breeze.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/campbell.yaml # A good one
|
|
||||||
# - ~/various/alacritty-theme/themes/challenger_deep.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/Cobalt2.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/cyber_punk_neon.yaml # Quite good one
|
|
||||||
# - ~/various/alacritty-theme/themes/darcula.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/dark_pastels.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/doom_one.yml
|
|
||||||
# - ~/various/alacritty-theme/themes/dracula.yaml
|
|
||||||
- ~/various/alacritty-theme/themes/falcon.yaml
|
|
||||||
#- ~/various/alacritty-theme/themes/flat_remix.yml
|
|
||||||
# - ~/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.yml
|
|
||||||
# - ~/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/material_theme_mod.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/material_theme.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.yml
|
|
||||||
# - ~/various/alacritty-theme/themes/one_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/palenight.yml
|
|
||||||
# - ~/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/remedy_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/seashells.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/smoooooth.yml
|
|
||||||
# - ~/various/alacritty-theme/themes/snazzy.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/solarized_dark.yaml
|
|
||||||
# - ~/various/alacritty-theme/themes/solarized_light.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/wombat.yaml
|
|
||||||
#- ~/various/alacritty-theme/themes/xterm.yaml
|
|
||||||
1
.config/awesome/my_theme.lua
Symbolic link
1
.config/awesome/my_theme.lua
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
themes/srcery.lua
|
||||||
641
.config/awesome/rc.lua
Normal file
641
.config/awesome/rc.lua
Normal file
@@ -0,0 +1,641 @@
|
|||||||
|
-- If LuaRocks is installed, make sure that packages installed through it are
|
||||||
|
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
|
||||||
|
pcall(require, "luarocks.loader")
|
||||||
|
|
||||||
|
-- Standard awesome library
|
||||||
|
local gears = require("gears")
|
||||||
|
local awful = require("awful")
|
||||||
|
require("awful.autofocus")
|
||||||
|
-- Widget and layout library
|
||||||
|
local wibox = require("wibox")
|
||||||
|
-- Theme handling library
|
||||||
|
local beautiful = require("beautiful")
|
||||||
|
-- Notification library
|
||||||
|
local naughty = require("naughty")
|
||||||
|
-- Declarative object management
|
||||||
|
local ruled = require("ruled")
|
||||||
|
local menubar = require("menubar")
|
||||||
|
local hotkeys_popup = require("awful.hotkeys_popup")
|
||||||
|
-- Enable hotkeys help widget for VIM and other apps
|
||||||
|
-- when client with a matching name is opened:
|
||||||
|
require("awful.hotkeys_popup.keys")
|
||||||
|
|
||||||
|
-- {{{ Error handling
|
||||||
|
-- Check if awesome encountered an error during startup and fell back to
|
||||||
|
-- another config (This code will only ever execute for the fallback config)
|
||||||
|
naughty.connect_signal("request::display_error", function(message, startup)
|
||||||
|
naughty.notification {
|
||||||
|
urgency = "critical",
|
||||||
|
title = "Oops, an error happened"..(startup and " during startup!" or "!"),
|
||||||
|
message = message
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Variable definitions
|
||||||
|
-- Themes define colours, icons, font and wallpapers.
|
||||||
|
beautiful.init(gears.filesystem.get_configuration_dir() .. "my_theme.lua")
|
||||||
|
|
||||||
|
-- This is used later as the default terminal and editor to run.
|
||||||
|
terminal = "/home/rkmiec/.cargo/bin/alacritty"
|
||||||
|
editor = os.getenv("EDITOR") or "neovide"
|
||||||
|
editor_cmd = terminal .. " -e " .. editor
|
||||||
|
|
||||||
|
-- Default modkey.
|
||||||
|
-- Usually, Mod4 is the key with a logo between Control and Alt.
|
||||||
|
-- If you do not like this or do not have such a key,
|
||||||
|
-- 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.
|
||||||
|
modkey = "Mod4"
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Menu
|
||||||
|
-- Create a launcher widget and a main menu
|
||||||
|
myawesomemenu = {
|
||||||
|
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
|
||||||
|
{ "manual", terminal .. " -e man awesome" },
|
||||||
|
{ "edit config", editor_cmd .. " " .. awesome.conffile },
|
||||||
|
{ "restart", awesome.restart },
|
||||||
|
{ "quit", function() awesome.quit() end },
|
||||||
|
}
|
||||||
|
|
||||||
|
local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon }
|
||||||
|
local menu_terminal = { "open terminal", terminal }
|
||||||
|
|
||||||
|
mymainmenu = awful.menu({
|
||||||
|
items = {
|
||||||
|
menu_awesome,
|
||||||
|
menu_terminal,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||||
|
menu = mymainmenu })
|
||||||
|
|
||||||
|
-- Menubar configuration
|
||||||
|
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
|
||||||
|
mykeyboardlayout = awful.widget.keyboardlayout()
|
||||||
|
|
||||||
|
-- Create a textclock widget
|
||||||
|
mytextclock = wibox.widget {
|
||||||
|
format = "%a %y %m %_d - %_H %M %S",
|
||||||
|
refresh = 5,
|
||||||
|
widget = wibox.widget.textclock
|
||||||
|
}
|
||||||
|
|
||||||
|
screen.connect_signal("request::desktop_decoration", function(s)
|
||||||
|
-- Each screen has its own tag table.
|
||||||
|
if s.index == 1 then
|
||||||
|
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[3])
|
||||||
|
else
|
||||||
|
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[2])
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Create a promptbox for each screen
|
||||||
|
s.mypromptbox = awful.widget.prompt()
|
||||||
|
|
||||||
|
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
|
||||||
|
-- We need one layoutbox per screen.
|
||||||
|
s.mylayoutbox = awful.widget.layoutbox {
|
||||||
|
screen = s,
|
||||||
|
buttons = {
|
||||||
|
awful.button({ }, 1, function () awful.layout.inc( 1) end),
|
||||||
|
awful.button({ }, 3, 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
|
||||||
|
s.mytaglist = awful.widget.taglist {
|
||||||
|
screen = s,
|
||||||
|
filter = awful.widget.taglist.filter.all,
|
||||||
|
--widget = wibox.container.rotate,
|
||||||
|
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
|
||||||
|
if s.index == 2 then
|
||||||
|
s.mywibox = awful.wibar({ position = "right", screen = s })
|
||||||
|
s.rotation = "west"
|
||||||
|
else
|
||||||
|
s.mywibox = awful.wibar({ position = "left", screen = s })
|
||||||
|
s.rotation = "east"
|
||||||
|
end
|
||||||
|
s.tasklist = wibox.container {
|
||||||
|
awful.widget.tasklist {
|
||||||
|
screen = s,
|
||||||
|
filter = awful.widget.tasklist.filter.currenttags,
|
||||||
|
buttons = tasklist_buttons,
|
||||||
|
},
|
||||||
|
direction = s.rotation,
|
||||||
|
widget = wibox.container.rotate
|
||||||
|
}
|
||||||
|
s.systray = wibox.container {
|
||||||
|
wibox.widget.systray(),
|
||||||
|
direction = s.rotation,
|
||||||
|
widget = wibox.container.rotate
|
||||||
|
}
|
||||||
|
-- Add widgets to the wibox
|
||||||
|
s.mywibox:setup {
|
||||||
|
layout = wibox.layout.align.vertical,
|
||||||
|
{ -- Left widgets
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
s.mylayoutbox,
|
||||||
|
mylauncher,
|
||||||
|
s.mytaglist,
|
||||||
|
s.mypromptbox,
|
||||||
|
},
|
||||||
|
s.tasklist,
|
||||||
|
{ -- Right widgets
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
mykeyboardlayout,
|
||||||
|
s.systray,
|
||||||
|
mytextclock,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Mouse bindings
|
||||||
|
awful.mouse.append_global_mousebindings({
|
||||||
|
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
||||||
|
awful.button({ }, 4, awful.tag.viewprev),
|
||||||
|
awful.button({ }, 5, awful.tag.viewnext),
|
||||||
|
})
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Key bindings
|
||||||
|
|
||||||
|
-- General Awesome keys
|
||||||
|
awful.keyboard.append_global_keybindings({
|
||||||
|
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||||
|
{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,
|
||||||
|
{description = "view previous", group = "tag"}),
|
||||||
|
awful.key({ modkey, }, "Right", awful.tag.viewnext,
|
||||||
|
{description = "view next", group = "tag"}),
|
||||||
|
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
|
||||||
|
{description = "go back", group = "tag"}),
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Focus related keybindings
|
||||||
|
awful.keyboard.append_global_keybindings({
|
||||||
|
awful.key({ modkey, }, "j",
|
||||||
|
function ()
|
||||||
|
awful.client.focus.byidx( 1)
|
||||||
|
end,
|
||||||
|
{description = "focus next by index", group = "client"}
|
||||||
|
),
|
||||||
|
awful.key({ modkey, }, "k",
|
||||||
|
function ()
|
||||||
|
awful.client.focus.byidx(-1)
|
||||||
|
end,
|
||||||
|
{description = "focus previous by index", group = "client"}
|
||||||
|
),
|
||||||
|
awful.key({ modkey, }, "Tab",
|
||||||
|
function ()
|
||||||
|
awful.client.focus.history.previous()
|
||||||
|
if client.focus then
|
||||||
|
client.focus:raise()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{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"}),
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Layout related keybindings
|
||||||
|
awful.keyboard.append_global_keybindings({
|
||||||
|
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, }, "u", awful.client.urgent.jumpto,
|
||||||
|
{description = "jump to urgent client", group = "client"}),
|
||||||
|
awful.key({ modkey, "Control" }, "j", function () awful.tag.incmwfact( 0.05) end,
|
||||||
|
{description = "increase master width factor", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Control" }, "k", function () awful.tag.incmwfact(-0.05) end,
|
||||||
|
{description = "decrease master width factor", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
|
||||||
|
{description = "increase the number of master clients", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
|
||||||
|
{description = "decrease the number of master clients", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
|
||||||
|
{description = "increase the number of columns", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
|
||||||
|
{description = "decrease the number of columns", group = "layout"}),
|
||||||
|
awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
|
||||||
|
{description = "select next", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
|
||||||
|
{description = "select previous", group = "layout"}),
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
awful.keyboard.append_global_keybindings({
|
||||||
|
awful.key {
|
||||||
|
modifiers = { modkey },
|
||||||
|
keygroup = "numrow",
|
||||||
|
description = "only view tag",
|
||||||
|
group = "tag",
|
||||||
|
on_press = function (index)
|
||||||
|
local screen = awful.screen.focused()
|
||||||
|
local tag = screen.tags[index]
|
||||||
|
if tag then
|
||||||
|
tag:view_only()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
awful.key {
|
||||||
|
modifiers = { modkey, "Control" },
|
||||||
|
keygroup = "numrow",
|
||||||
|
description = "toggle tag",
|
||||||
|
group = "tag",
|
||||||
|
on_press = function (index)
|
||||||
|
local screen = awful.screen.focused()
|
||||||
|
local tag = screen.tags[index]
|
||||||
|
if tag then
|
||||||
|
awful.tag.viewtoggle(tag)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
awful.key {
|
||||||
|
modifiers = { modkey, "Shift" },
|
||||||
|
keygroup = "numrow",
|
||||||
|
description = "move focused client to tag",
|
||||||
|
group = "tag",
|
||||||
|
on_press = function (index)
|
||||||
|
if client.focus then
|
||||||
|
local tag = client.focus.screen.tags[index]
|
||||||
|
if tag then
|
||||||
|
client.focus:move_to_tag(tag)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
awful.key {
|
||||||
|
modifiers = { modkey, "Control", "Shift" },
|
||||||
|
keygroup = "numrow",
|
||||||
|
description = "toggle focused client on tag",
|
||||||
|
group = "tag",
|
||||||
|
on_press = function (index)
|
||||||
|
if client.focus then
|
||||||
|
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,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
client.connect_signal("request::default_mousebindings", function()
|
||||||
|
awful.mouse.append_client_mousebindings({
|
||||||
|
awful.button({ }, 1, function (c)
|
||||||
|
c:activate { context = "mouse_click" }
|
||||||
|
end),
|
||||||
|
awful.button({ modkey }, 1, function (c)
|
||||||
|
c:activate { context = "mouse_click", action = "mouse_move" }
|
||||||
|
end),
|
||||||
|
awful.button({ modkey }, 3, function (c)
|
||||||
|
c:activate { context = "mouse_click", action = "mouse_resize"}
|
||||||
|
end),
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
|
||||||
|
client.connect_signal("request::default_keybindings", function()
|
||||||
|
awful.keyboard.append_client_keybindings({
|
||||||
|
awful.key({ modkey, }, "f",
|
||||||
|
function (c)
|
||||||
|
c.fullscreen = not c.fullscreen
|
||||||
|
c:raise()
|
||||||
|
end,
|
||||||
|
{description = "toggle fullscreen", group = "client"}),
|
||||||
|
awful.key({ modkey, }, "q", function (c) c:kill() end,
|
||||||
|
{description = "close", group = "client"}),
|
||||||
|
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
|
||||||
|
{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)
|
||||||
|
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Rules
|
||||||
|
-- Rules to apply to new clients.
|
||||||
|
ruled.client.connect_signal("request::rules", function()
|
||||||
|
-- All clients will match this rule.
|
||||||
|
ruled.client.append_rule {
|
||||||
|
id = "global",
|
||||||
|
rule = { },
|
||||||
|
properties = {
|
||||||
|
focus = awful.client.focus.filter,
|
||||||
|
raise = true,
|
||||||
|
screen = awful.screen.preferred,
|
||||||
|
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Floating clients.
|
||||||
|
ruled.client.append_rule {
|
||||||
|
id = "floating",
|
||||||
|
rule_any = {
|
||||||
|
instance = {
|
||||||
|
"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.
|
||||||
|
}
|
||||||
|
},
|
||||||
|
properties = { floating = true }
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Add titlebars to normal clients and dialogs
|
||||||
|
ruled.client.append_rule {
|
||||||
|
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
|
||||||
|
-- title for that window
|
||||||
|
--{ rule = { class = "Firefox" },
|
||||||
|
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
|
||||||
|
--{ rule = { class = "firefox" },
|
||||||
|
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
|
||||||
|
--{ rule = { class = "Google-chrome-beta" },
|
||||||
|
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
|
||||||
|
end)
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Titlebars
|
||||||
|
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
||||||
|
client.connect_signal("request::titlebars", function(c)
|
||||||
|
-- buttons for the titlebar
|
||||||
|
local buttons = {
|
||||||
|
awful.button({ }, 1, function()
|
||||||
|
c:activate { context = "titlebar", action = "mouse_move" }
|
||||||
|
end),
|
||||||
|
awful.button({ }, 3, function()
|
||||||
|
c:activate { context = "titlebar", action = "mouse_resize"}
|
||||||
|
end),
|
||||||
|
}
|
||||||
|
|
||||||
|
awful.titlebar(c).widget = {
|
||||||
|
{ -- Left
|
||||||
|
awful.titlebar.widget.iconwidget(c),
|
||||||
|
buttons = buttons,
|
||||||
|
layout = wibox.layout.fixed.horizontal
|
||||||
|
},
|
||||||
|
{ -- Middle
|
||||||
|
{ -- Title
|
||||||
|
halign = "center",
|
||||||
|
widget = awful.titlebar.widget.titlewidget(c)
|
||||||
|
},
|
||||||
|
buttons = buttons,
|
||||||
|
layout = wibox.layout.flex.horizontal
|
||||||
|
},
|
||||||
|
{ -- Right
|
||||||
|
awful.titlebar.widget.floatingbutton (c),
|
||||||
|
awful.titlebar.widget.maximizedbutton(c),
|
||||||
|
awful.titlebar.widget.stickybutton (c),
|
||||||
|
awful.titlebar.widget.ontopbutton (c),
|
||||||
|
awful.titlebar.widget.closebutton (c),
|
||||||
|
layout = wibox.layout.fixed.horizontal()
|
||||||
|
},
|
||||||
|
layout = wibox.layout.align.horizontal
|
||||||
|
}
|
||||||
|
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.
|
||||||
|
client.connect_signal("mouse::enter", function(c)
|
||||||
|
c:activate { context = "mouse_enter", raise = false }
|
||||||
|
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)
|
||||||
|
|
||||||
|
awful.spawn.with_shell(
|
||||||
|
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
|
||||||
|
'echo "awesome.started:true" | xrdb -merge ; ' ..
|
||||||
|
-- list each of your autostart commands, followed by ; inside single quotes, followed by ..
|
||||||
|
'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' -- https://github.com/jceb/dex
|
||||||
|
)
|
||||||
|
|
||||||
|
do
|
||||||
|
local cmds_once =
|
||||||
|
{
|
||||||
|
"xset b off",
|
||||||
|
"xdotool key --clearmodifiers Num_Lock",
|
||||||
|
--"autorandr -c",
|
||||||
|
"pasystray -m 100",
|
||||||
|
--"cbatticon",
|
||||||
|
--"barrierc --disable-crypto 192.168.10.2:24800",
|
||||||
|
"xbindkeys -f /home/rkmiec/.config/xbindkeysrc",
|
||||||
|
}
|
||||||
|
for _,i in ipairs(cmds_once) do
|
||||||
|
awful.spawn(i)
|
||||||
|
end
|
||||||
|
--"dunst -config /home/kmcr/.config/i3/dunst_config",
|
||||||
|
local cmds_single_instance =
|
||||||
|
{
|
||||||
|
--"nm-applet",
|
||||||
|
"blueman-applet",
|
||||||
|
"flameshot",
|
||||||
|
"feh --bg-scale /home/rkmiec/Downloads/a45eca3302b5d07d7f95b57f1df52f96.webp",
|
||||||
|
}
|
||||||
|
for _,i in ipairs(cmds_single_instance) do
|
||||||
|
awful.spawn.single_instance(i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Before Width: | Height: | Size: 520 KiB After Width: | Height: | Size: 520 KiB |
151
.config/awesome/themes/falcon.lua
Normal file
151
.config/awesome/themes/falcon.lua
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
---------------------------
|
||||||
|
-- Default awesome theme --
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
|
local xresources = require("beautiful.xresources")
|
||||||
|
local dpi = xresources.apply_dpi
|
||||||
|
|
||||||
|
local gfs = require("gears.filesystem")
|
||||||
|
local themes_path = gfs.get_themes_dir()
|
||||||
|
|
||||||
|
local theme = {}
|
||||||
|
|
||||||
|
theme.font = "sans 8"
|
||||||
|
|
||||||
|
local falcon_colors = {}
|
||||||
|
falcon_colors.black = "#000004"
|
||||||
|
falcon_colors.red = "#ff3600"
|
||||||
|
falcon_colors.green = "#859933"
|
||||||
|
falcon_colors.yellow = "#ffc552"
|
||||||
|
falcon_colors.blue = "#635196"
|
||||||
|
falcon_colors.magenta = "#ff761a"
|
||||||
|
falcon_colors.cyan = "#34bfa4"
|
||||||
|
falcon_colors.white = "#b4b4b9"
|
||||||
|
|
||||||
|
falcon_colors.brightblack = "#020221"
|
||||||
|
falcon_colors.brightred = "#ff8e78"
|
||||||
|
falcon_colors.brightgreen = "#b2bc55"
|
||||||
|
falcon_colors.brightyellow = "#ffd392"
|
||||||
|
falcon_colors.brightblue = "#99a4bc"
|
||||||
|
falcon_colors.brightmagenta = "#ffb07b"
|
||||||
|
falcon_colors.brightcyan = "#8bccbf"
|
||||||
|
falcon_colors.brightwhite = "#f8f8ff"
|
||||||
|
|
||||||
|
-- Theme setting.
|
||||||
|
theme.bg_normal = falcon_colors.brightblack
|
||||||
|
theme.bg_focus = falcon_colors.blue
|
||||||
|
theme.bg_urgent = falcon_colors.brightred
|
||||||
|
theme.bg_minimize = falcon_colors.black
|
||||||
|
theme.bg_systray = theme.bg_normal
|
||||||
|
|
||||||
|
theme.fg_normal = falcon_colors.white
|
||||||
|
theme.fg_focus = falcon_colors.brightwhite
|
||||||
|
theme.fg_urgent = falcon_colors.brightwhite
|
||||||
|
theme.fg_minimize = falcon_colors.brightwhite
|
||||||
|
|
||||||
|
theme.useless_gap = dpi(0)
|
||||||
|
theme.border_width = dpi(2)
|
||||||
|
theme.border_normal = falcon_colors.black
|
||||||
|
theme.border_focus = falcon_colors.blue
|
||||||
|
theme.border_marked = falcon_colors.magenta
|
||||||
|
|
||||||
|
-- There are other variable sets
|
||||||
|
-- overriding the default one when
|
||||||
|
-- defined, the sets are:
|
||||||
|
-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
|
||||||
|
-- tasklist_[bg|fg]_[focus|urgent]
|
||||||
|
-- titlebar_[bg|fg]_[normal|focus]
|
||||||
|
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
|
||||||
|
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
|
||||||
|
-- prompt_[fg|bg|fg_cursor|bg_cursor|font]
|
||||||
|
-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
|
||||||
|
-- Example:
|
||||||
|
--theme.taglist_bg_focus = "#ff0000"
|
||||||
|
|
||||||
|
-- Generate taglist squares:
|
||||||
|
local taglist_square_size = dpi(5)
|
||||||
|
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
|
||||||
|
taglist_square_size, theme.fg_normal
|
||||||
|
)
|
||||||
|
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
|
||||||
|
taglist_square_size, theme.fg_normal
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Variables set for theming notifications:
|
||||||
|
-- notification_font
|
||||||
|
-- notification_[bg|fg]
|
||||||
|
-- notification_[width|height|margin]
|
||||||
|
-- notification_[border_color|border_width|shape|opacity]
|
||||||
|
|
||||||
|
-- Variables set for theming the menu:
|
||||||
|
-- menu_[bg|fg]_[normal|focus]
|
||||||
|
-- menu_[border_color|border_width]
|
||||||
|
theme.menu_submenu_icon = themes_path.."default/submenu.png"
|
||||||
|
theme.menu_height = dpi(20)
|
||||||
|
theme.menu_width = dpi(100)
|
||||||
|
|
||||||
|
-- You can add as many variables as
|
||||||
|
-- you wish and access them by using
|
||||||
|
-- beautiful.variable in your rc.lua
|
||||||
|
--theme.bg_widget = "#cc0000"
|
||||||
|
|
||||||
|
-- Define the image to load
|
||||||
|
theme.titlebar_close_button_normal = themes_path.."default/titlebar/close_normal.png"
|
||||||
|
theme.titlebar_close_button_focus = themes_path.."default/titlebar/close_focus.png"
|
||||||
|
|
||||||
|
theme.titlebar_minimize_button_normal = themes_path.."default/titlebar/minimize_normal.png"
|
||||||
|
theme.titlebar_minimize_button_focus = themes_path.."default/titlebar/minimize_focus.png"
|
||||||
|
|
||||||
|
theme.titlebar_ontop_button_normal_inactive = themes_path.."default/titlebar/ontop_normal_inactive.png"
|
||||||
|
theme.titlebar_ontop_button_focus_inactive = themes_path.."default/titlebar/ontop_focus_inactive.png"
|
||||||
|
theme.titlebar_ontop_button_normal_active = themes_path.."default/titlebar/ontop_normal_active.png"
|
||||||
|
theme.titlebar_ontop_button_focus_active = themes_path.."default/titlebar/ontop_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_sticky_button_normal_inactive = themes_path.."default/titlebar/sticky_normal_inactive.png"
|
||||||
|
theme.titlebar_sticky_button_focus_inactive = themes_path.."default/titlebar/sticky_focus_inactive.png"
|
||||||
|
theme.titlebar_sticky_button_normal_active = themes_path.."default/titlebar/sticky_normal_active.png"
|
||||||
|
theme.titlebar_sticky_button_focus_active = themes_path.."default/titlebar/sticky_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_floating_button_normal_inactive = themes_path.."default/titlebar/floating_normal_inactive.png"
|
||||||
|
theme.titlebar_floating_button_focus_inactive = themes_path.."default/titlebar/floating_focus_inactive.png"
|
||||||
|
theme.titlebar_floating_button_normal_active = themes_path.."default/titlebar/floating_normal_active.png"
|
||||||
|
theme.titlebar_floating_button_focus_active = themes_path.."default/titlebar/floating_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_maximized_button_normal_inactive = themes_path.."default/titlebar/maximized_normal_inactive.png"
|
||||||
|
theme.titlebar_maximized_button_focus_inactive = themes_path.."default/titlebar/maximized_focus_inactive.png"
|
||||||
|
theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/maximized_normal_active.png"
|
||||||
|
theme.titlebar_maximized_button_focus_active = themes_path.."default/titlebar/maximized_focus_active.png"
|
||||||
|
|
||||||
|
theme.wallpaper = themes_path.."default/background.jpg"
|
||||||
|
|
||||||
|
-- You can use your own layout icons like this:
|
||||||
|
theme.layout_fairh = themes_path.."default/layouts/fairhw.png"
|
||||||
|
theme.layout_fairv = themes_path.."default/layouts/fairvw.png"
|
||||||
|
theme.layout_floating = themes_path.."default/layouts/floatingw.png"
|
||||||
|
theme.layout_magnifier = themes_path.."default/layouts/magnifierw.png"
|
||||||
|
theme.layout_max = themes_path.."default/layouts/maxw.png"
|
||||||
|
theme.layout_fullscreen = themes_path.."default/layouts/fullscreenw.png"
|
||||||
|
theme.layout_tilebottom = themes_path.."default/layouts/tilebottomw.png"
|
||||||
|
theme.layout_tileleft = themes_path.."default/layouts/tileleftw.png"
|
||||||
|
theme.layout_tile = themes_path.."default/layouts/tilew.png"
|
||||||
|
theme.layout_tiletop = themes_path.."default/layouts/tiletopw.png"
|
||||||
|
theme.layout_spiral = themes_path.."default/layouts/spiralw.png"
|
||||||
|
theme.layout_dwindle = themes_path.."default/layouts/dwindlew.png"
|
||||||
|
theme.layout_cornernw = themes_path.."default/layouts/cornernww.png"
|
||||||
|
theme.layout_cornerne = themes_path.."default/layouts/cornernew.png"
|
||||||
|
theme.layout_cornersw = themes_path.."default/layouts/cornersww.png"
|
||||||
|
theme.layout_cornerse = themes_path.."default/layouts/cornersew.png"
|
||||||
|
|
||||||
|
-- Generate Awesome icon:
|
||||||
|
theme.awesome_icon = theme_assets.awesome_icon(
|
||||||
|
theme.menu_height, theme.bg_focus, theme.fg_focus
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Define the icon theme for application icons. If not set then the icons
|
||||||
|
-- from /usr/share/icons and /usr/share/icons/kicolor will be used.
|
||||||
|
theme.icon_theme = nil
|
||||||
|
|
||||||
|
return theme
|
||||||
|
|
||||||
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
150
.config/awesome/themes/srcery.lua
Normal file
150
.config/awesome/themes/srcery.lua
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
---------------------------
|
||||||
|
-- Default awesome theme --
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
|
local xresources = require("beautiful.xresources")
|
||||||
|
local dpi = xresources.apply_dpi
|
||||||
|
|
||||||
|
local gfs = require("gears.filesystem")
|
||||||
|
local themes_path = gfs.get_themes_dir()
|
||||||
|
|
||||||
|
local theme = {}
|
||||||
|
|
||||||
|
theme.font = "iM WritingMonoS Nerd Font 8"
|
||||||
|
|
||||||
|
local srcery_colors = {}
|
||||||
|
srcery_colors.black = "#1C1B19"
|
||||||
|
srcery_colors.red = "#EF2F27"
|
||||||
|
srcery_colors.green = "#519F50"
|
||||||
|
srcery_colors.yellow = "#FBB829"
|
||||||
|
srcery_colors.blue = "#2C78BF"
|
||||||
|
srcery_colors.magenta = "#E02C6D"
|
||||||
|
srcery_colors.cyan = "#0AAEB3"
|
||||||
|
srcery_colors.white = "#D0BFA1"
|
||||||
|
srcery_colors.brightblack = "#918175"
|
||||||
|
srcery_colors.brightred = "#F75341"
|
||||||
|
srcery_colors.brightgreen = "#98BC37"
|
||||||
|
srcery_colors.brightyellow = "#FED06E"
|
||||||
|
srcery_colors.brightblue = "#68A8E4"
|
||||||
|
srcery_colors.brightmagenta = "#FF5C8F"
|
||||||
|
srcery_colors.brightcyan = "#2BE4D0"
|
||||||
|
srcery_colors.brightwhite = "#FCE8C3"
|
||||||
|
|
||||||
|
-- Theme setting.
|
||||||
|
theme.bg_normal = srcery_colors.brightblack
|
||||||
|
theme.bg_focus = srcery_colors.white
|
||||||
|
theme.bg_urgent = srcery_colors.brightred
|
||||||
|
theme.bg_minimize = srcery_colors.black
|
||||||
|
theme.bg_systray = theme.bg_normal
|
||||||
|
|
||||||
|
theme.fg_normal = srcery_colors.black
|
||||||
|
theme.fg_focus = srcery_colors.blue
|
||||||
|
theme.fg_urgent = srcery_colors.magenta
|
||||||
|
theme.fg_minimize = srcery_colors.white
|
||||||
|
|
||||||
|
theme.useless_gap = dpi(1)
|
||||||
|
theme.border_width = dpi(1)
|
||||||
|
theme.border_normal = srcery_colors.brightblack
|
||||||
|
theme.border_focus = srcery_colors.white
|
||||||
|
theme.border_marked = srcery_colors.brightred
|
||||||
|
|
||||||
|
-- There are other variable sets
|
||||||
|
-- overriding the default one when
|
||||||
|
-- defined, the sets are:
|
||||||
|
-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
|
||||||
|
-- tasklist_[bg|fg]_[focus|urgent]
|
||||||
|
-- titlebar_[bg|fg]_[normal|focus]
|
||||||
|
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
|
||||||
|
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
|
||||||
|
-- prompt_[fg|bg|fg_cursor|bg_cursor|font]
|
||||||
|
-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
|
||||||
|
-- Example:
|
||||||
|
--theme.taglist_bg_focus = "#ff0000"
|
||||||
|
|
||||||
|
-- Generate taglist squares:
|
||||||
|
local taglist_square_size = dpi(4)
|
||||||
|
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
|
||||||
|
taglist_square_size, theme.fg_normal
|
||||||
|
)
|
||||||
|
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
|
||||||
|
taglist_square_size, theme.fg_normal
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Variables set for theming notifications:
|
||||||
|
-- notification_font
|
||||||
|
-- notification_[bg|fg]
|
||||||
|
-- notification_[width|height|margin]
|
||||||
|
-- notification_[border_color|border_width|shape|opacity]
|
||||||
|
|
||||||
|
-- Variables set for theming the menu:
|
||||||
|
-- menu_[bg|fg]_[normal|focus]
|
||||||
|
-- menu_[border_color|border_width]
|
||||||
|
theme.menu_submenu_icon = themes_path.."default/submenu.png"
|
||||||
|
theme.menu_height = dpi(20)
|
||||||
|
theme.menu_width = dpi(100)
|
||||||
|
|
||||||
|
-- You can add as many variables as
|
||||||
|
-- you wish and access them by using
|
||||||
|
-- beautiful.variable in your rc.lua
|
||||||
|
--theme.bg_widget = "#cc0000"
|
||||||
|
|
||||||
|
-- Define the image to load
|
||||||
|
theme.titlebar_close_button_normal = themes_path.."default/titlebar/close_normal.png"
|
||||||
|
theme.titlebar_close_button_focus = themes_path.."default/titlebar/close_focus.png"
|
||||||
|
|
||||||
|
theme.titlebar_minimize_button_normal = themes_path.."default/titlebar/minimize_normal.png"
|
||||||
|
theme.titlebar_minimize_button_focus = themes_path.."default/titlebar/minimize_focus.png"
|
||||||
|
|
||||||
|
theme.titlebar_ontop_button_normal_inactive = themes_path.."default/titlebar/ontop_normal_inactive.png"
|
||||||
|
theme.titlebar_ontop_button_focus_inactive = themes_path.."default/titlebar/ontop_focus_inactive.png"
|
||||||
|
theme.titlebar_ontop_button_normal_active = themes_path.."default/titlebar/ontop_normal_active.png"
|
||||||
|
theme.titlebar_ontop_button_focus_active = themes_path.."default/titlebar/ontop_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_sticky_button_normal_inactive = themes_path.."default/titlebar/sticky_normal_inactive.png"
|
||||||
|
theme.titlebar_sticky_button_focus_inactive = themes_path.."default/titlebar/sticky_focus_inactive.png"
|
||||||
|
theme.titlebar_sticky_button_normal_active = themes_path.."default/titlebar/sticky_normal_active.png"
|
||||||
|
theme.titlebar_sticky_button_focus_active = themes_path.."default/titlebar/sticky_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_floating_button_normal_inactive = themes_path.."default/titlebar/floating_normal_inactive.png"
|
||||||
|
theme.titlebar_floating_button_focus_inactive = themes_path.."default/titlebar/floating_focus_inactive.png"
|
||||||
|
theme.titlebar_floating_button_normal_active = themes_path.."default/titlebar/floating_normal_active.png"
|
||||||
|
theme.titlebar_floating_button_focus_active = themes_path.."default/titlebar/floating_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_maximized_button_normal_inactive = themes_path.."default/titlebar/maximized_normal_inactive.png"
|
||||||
|
theme.titlebar_maximized_button_focus_inactive = themes_path.."default/titlebar/maximized_focus_inactive.png"
|
||||||
|
theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/maximized_normal_active.png"
|
||||||
|
theme.titlebar_maximized_button_focus_active = themes_path.."default/titlebar/maximized_focus_active.png"
|
||||||
|
|
||||||
|
theme.wallpaper = themes_path.."default/background.jpg"
|
||||||
|
|
||||||
|
-- You can use your own layout icons like this:
|
||||||
|
theme.layout_fairh = themes_path.."default/layouts/fairhw.png"
|
||||||
|
theme.layout_fairv = themes_path.."default/layouts/fairvw.png"
|
||||||
|
theme.layout_floating = themes_path.."default/layouts/floatingw.png"
|
||||||
|
theme.layout_magnifier = themes_path.."default/layouts/magnifierw.png"
|
||||||
|
theme.layout_max = themes_path.."default/layouts/maxw.png"
|
||||||
|
theme.layout_fullscreen = themes_path.."default/layouts/fullscreenw.png"
|
||||||
|
theme.layout_tilebottom = themes_path.."default/layouts/tilebottomw.png"
|
||||||
|
theme.layout_tileleft = themes_path.."default/layouts/tileleftw.png"
|
||||||
|
theme.layout_tile = themes_path.."default/layouts/tilew.png"
|
||||||
|
theme.layout_tiletop = themes_path.."default/layouts/tiletopw.png"
|
||||||
|
theme.layout_spiral = themes_path.."default/layouts/spiralw.png"
|
||||||
|
theme.layout_dwindle = themes_path.."default/layouts/dwindlew.png"
|
||||||
|
theme.layout_cornernw = themes_path.."default/layouts/cornernww.png"
|
||||||
|
theme.layout_cornerne = themes_path.."default/layouts/cornernew.png"
|
||||||
|
theme.layout_cornersw = themes_path.."default/layouts/cornersww.png"
|
||||||
|
theme.layout_cornerse = themes_path.."default/layouts/cornersew.png"
|
||||||
|
|
||||||
|
-- Generate Awesome icon:
|
||||||
|
theme.awesome_icon = theme_assets.awesome_icon(
|
||||||
|
theme.menu_height, theme.bg_focus, theme.fg_focus
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Define the icon theme for application icons. If not set then the icons
|
||||||
|
-- from /usr/share/icons and /usr/share/icons/kicolor will be used.
|
||||||
|
theme.icon_theme = nil
|
||||||
|
|
||||||
|
return theme
|
||||||
|
|
||||||
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
@@ -7,12 +7,13 @@ 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 exa
|
if type -q lsd
|
||||||
alias lsl="exa -l -g --icons"
|
alias lsl="lsd -l"
|
||||||
alias ls="exa -g --icons"
|
alias ls="lsd"
|
||||||
alias lss="exa --sort=oldest"
|
alias lsa="lsd -a"
|
||||||
alias lst="exa -F -g --icons -T"
|
alias lss="lsd -ltr"
|
||||||
end
|
end
|
||||||
|
|
||||||
if type -q xcp
|
if type -q xcp
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
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/competions
|
set fish_complete_path $fish_complete_path /usr/share/fish/completions
|
||||||
set -x JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
|
set -x JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
|
||||||
set -x JIRA_API_TOKEN NDE2ODEyOTM5OTI2Ontw1zkanbJ8sAFMDUI1Y0QxOH7d
|
set -x JIRA_API_TOKEN NDE2ODEyOTM5OTI2Ontw1zkanbJ8sAFMDUI1Y0QxOH7d
|
||||||
|
set -x PATH $PATH /home/kmcr/.codon
|
||||||
|
|
||||||
# This file is run by all fish instances.
|
# This file is run by all fish instances.
|
||||||
# To include configuration only for login shells, use
|
# To include configuration only for login shells, use
|
||||||
@@ -20,4 +21,12 @@ set -x JIRA_API_TOKEN NDE2ODEyOTM5OTI2Ontw1zkanbJ8sAFMDUI1Y0QxOH7d
|
|||||||
#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
|
||||||
|
end
|
||||||
|
|
||||||
|
if status is-interactive
|
||||||
|
function list_dir --on-variable PWD
|
||||||
|
ls
|
||||||
|
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') "
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
vim.g.airline_theme = 'minimalist'
|
|
||||||
vim.g.airline_powerline_fonts = 1
|
|
||||||
vim.g.airline_stl_path_style = 'short'
|
|
||||||
vim.g.airline_highlighting_cache = 1
|
|
||||||
vim.g.airline#extensions#searchcount#enabled = 0
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
"noremap <silent> n <Cmd>execute('normal! ' . v:count1 . 'n')<CR>
|
|
||||||
" \<Cmd>lua require('hlslens').start()<CR>
|
|
||||||
"noremap <silent> N <Cmd>execute('normal! ' . v:count1 . 'N')<CR>
|
|
||||||
" \<Cmd>lua require('hlslens').start()<CR>
|
|
||||||
"noremap * *<Cmd>lua require('hlslens').start()<CR>
|
|
||||||
"noremap # #<Cmd>lua require('hlslens').start()<CR>
|
|
||||||
"noremap g* g*<Cmd>lua require('hlslens').start()<CR>
|
|
||||||
"noremap g# g#<Cmd>lua require('hlslens').start()<CR>
|
|
||||||
"
|
|
||||||
"" use : instead of <Cmd>
|
|
||||||
"nnoremap <silent> <leader>l :noh<CR>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
let g:mkdp_filetypes = ['markdown', 'plantuml']
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
require('neorg').setup {
|
|
||||||
load = {
|
|
||||||
["core.defaults"] = {},
|
|
||||||
["core.norg.dirman"] = {
|
|
||||||
config = {
|
|
||||||
workspaces = {
|
|
||||||
work = "~/notes/work",
|
|
||||||
home = "~/notes/home",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
["core.norg.concealer"] = {},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
-- Plug 'rgroli/other.nvim'
|
|
||||||
require("other-nvim").setup({
|
|
||||||
mappings = {
|
|
||||||
-- custom mapping
|
|
||||||
{
|
|
||||||
pattern = "/src/(.*).cpp$",
|
|
||||||
target = "/include/%1.hpp",
|
|
||||||
transformer = "lowercase",
|
|
||||||
context = "header"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern = "/src/(.*).cpp$",
|
|
||||||
target = "/include/%1.h",
|
|
||||||
transformer = "lowercase",
|
|
||||||
context = "header"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern = "/src/(.*).hpp$",
|
|
||||||
target = "/include/%1.cpp",
|
|
||||||
transformer = "lowercase",
|
|
||||||
context = "source"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern = "/include/(.*).hpp$",
|
|
||||||
target = "/src/%1.cpp",
|
|
||||||
transformer = "lowercase",
|
|
||||||
context = "source"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern = "/include/(.*).h$",
|
|
||||||
target = "/src/%1.cpp",
|
|
||||||
transformer = "lowercase",
|
|
||||||
context = "source"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
transformers = {
|
|
||||||
-- defining a custom transformer
|
|
||||||
lowercase = function (inputString)
|
|
||||||
return inputString:lower()
|
|
||||||
end
|
|
||||||
},
|
|
||||||
style = {
|
|
||||||
-- How the plugin paints its window borders
|
|
||||||
-- Allowed values are none, single, double, rounded, solid and shadow
|
|
||||||
border = "solid",
|
|
||||||
|
|
||||||
-- Column seperator for the window
|
|
||||||
seperator = "|",
|
|
||||||
|
|
||||||
-- width of the window in percent. e.g. 0.5 is 50%, is 100%
|
|
||||||
width = 0.7,
|
|
||||||
|
|
||||||
-- min height in rows.
|
|
||||||
-- when more columns are needed this value is extended automatically
|
|
||||||
minHeight = 2
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
--Plug 'nvim-lua/plenary.nvim'
|
|
||||||
--Plug 'narutoxy/silicon.lua'
|
|
||||||
|
|
||||||
-- Not working well
|
|
||||||
-- silicon = require('silicon')
|
|
||||||
-- silicon.setup(
|
|
||||||
-- {
|
|
||||||
-- theme = "auto",
|
|
||||||
-- output = "SILICON_${year}-${month}-${date}_${time}.png", -- auto generate file name based on time (absolute or relative to cwd)
|
|
||||||
-- bgColor = vim.g.terminal_color_5,
|
|
||||||
-- bgImage = "", -- path to image, must be png
|
|
||||||
-- roundCorner = true,
|
|
||||||
-- windowControls = true,
|
|
||||||
-- lineNumber = true,
|
|
||||||
-- font = "monospace",
|
|
||||||
-- lineOffset = 1, -- from where to start line number
|
|
||||||
-- linePad = 2, -- padding between lines
|
|
||||||
-- padHoriz = 80, -- Horizontal padding
|
|
||||||
-- padVert = 100, -- vertical padding
|
|
||||||
-- shadowBlurRadius = 10,
|
|
||||||
-- shadowColor = "#555555",
|
|
||||||
-- shadowOffsetX = 8,
|
|
||||||
-- shadowOffsetY = 8,
|
|
||||||
-- gobble = false, -- enable lsautogobble like feature
|
|
||||||
-- debug = true, -- enable debug output
|
|
||||||
-- }
|
|
||||||
-- )
|
|
||||||
--
|
|
||||||
-- -- Generate image of lines in a visual selection
|
|
||||||
-- vim.keymap.set('v', '<Leader>s', function() silicon.visualise_api({to_clip = false, show_buf = false}) end )
|
|
||||||
-- -- Generate image of a whole buffer, with lines in a visual selection highlighted
|
|
||||||
-- vim.keymap.set('v', '<Leader>bs', function() silicon.visualise_api({to_clip = false, show_buf = true}) end )
|
|
||||||
-- -- Generate visible portion of a buffer
|
|
||||||
-- --vim.keymap.set('n', '<Leader>s', function() silicon.visualise_api({to_clip = true, visible = true}) end )
|
|
||||||
-- -- Generate current buffer line in normal mode
|
|
||||||
-- --vim.keymap.set('n', '<Leader>s', function() silicon.visualise_api({to_clip = true}) end )
|
|
||||||
|
|
||||||
|
|
||||||
-- Time for silicon.nvim
|
|
||||||
require('silicon').setup({
|
|
||||||
font = 'FantasqueSansMono Nerd Font=16',
|
|
||||||
theme = 'Monokai Extended',
|
|
||||||
})
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
let g:vim_search_pulse_mode = 'pattern'
|
|
||||||
let g:vim_search_pulse_duration = 400
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
let g:startify_custom_header = ''
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
require('nvim-toggler').setup({
|
|
||||||
inverses = {
|
|
||||||
['vim'] = 'emacs'
|
|
||||||
},
|
|
||||||
-- removes the default <leader>i keymap
|
|
||||||
remove_default_keybinds = true,
|
|
||||||
})
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
"nmap <silent> <leader>tn :TestNearest<CR>
|
|
||||||
"nmap <silent> <leader>tf :TestFile<CR>
|
|
||||||
"nmap <silent> <leader>ts :TestSuite<CR>
|
|
||||||
"nmap <silent> <leader>tl :TestLast<CR>
|
|
||||||
"nmap <silent> <leader>tv :TestVisit<CR>
|
|
||||||
"
|
|
||||||
"let test#strategy = "floaterm"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
require('nvim-window').setup({
|
|
||||||
chars = {
|
|
||||||
'j', 'k', 'l', 'f', 'd', 's', 'g', 'h', 'i', 'e', 'a', 'b', 'm', 'n', 'o',
|
|
||||||
'p', 'q', 'r', 'c', 't', 'u', 'v', 'w', 'x', 'y', 'z'
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>j', '<cmd>lua require("nvim-window").pick()<cr>', {silent=true, noremap = true})
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../spell.vim
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
setlocal spell
|
|
||||||
" Undo changes when switching to different buffer
|
|
||||||
"let b:undo_ftplugin .= '|setlocal spell<'
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../spell.vim
|
|
||||||
@@ -1,23 +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'
|
|
||||||
"let g:gutentags_ctags_extra_args=['--fields=+l']
|
|
||||||
|
|
||||||
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,76 +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.builtin").find_files()<cr>', default_options)
|
|
||||||
map('n', '<leader>a', '<cmd>lua require("telescope.builtin").grep_string()<cr>', default_options)
|
|
||||||
map('n', '<leader>A', '<cmd>lua require("telescope.builtin").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)
|
|
||||||
|
|
||||||
-- 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>")
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
} }
|
||||||
7
.config/nvim/lua/plugins/block.lua
Normal file
7
.config/nvim/lua/plugins/block.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"HampusHauffman/block.nvim",
|
||||||
|
enabled = false,
|
||||||
|
config = function()
|
||||||
|
require("block").setup({})
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -8,8 +8,6 @@ return {
|
|||||||
},
|
},
|
||||||
-- User defined loops
|
-- User defined loops
|
||||||
additions = {
|
additions = {
|
||||||
{'Foo', 'Bar'},
|
|
||||||
{'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
|
||||||
|
}
|
||||||
53
.config/nvim/lua/plugins/colorschemes.lua
Normal file
53
.config/nvim/lua/plugins/colorschemes.lua
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
return {
|
||||||
|
'lmantw/themify.nvim',
|
||||||
|
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
dependencies = {
|
||||||
|
--'Iron-E/nvim-highlite'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('themify').setup({
|
||||||
|
activity = true,
|
||||||
|
"xero/miasma.nvim",
|
||||||
|
"wuelnerdotexe/vim-enfocado",
|
||||||
|
"fenetikm/falcon",
|
||||||
|
"casr/vim-colors-reference",
|
||||||
|
"blazkowolf/gruber-darker.nvim",
|
||||||
|
"rebelot/kanagawa.nvim",
|
||||||
|
"jaredgorski/spacecamp",
|
||||||
|
"lifepillar/vim-gruvbox8",
|
||||||
|
"marko-cerovac/material.nvim",
|
||||||
|
"srcery-colors/srcery-vim",
|
||||||
|
"tanvirtin/monokai.nvim",
|
||||||
|
"dasupradyumna/midnight.nvim",
|
||||||
|
"bluz71/vim-moonfly-colors",
|
||||||
|
"kepano/flexoki-neovim",
|
||||||
|
"nuvic/flexoki-nvim",
|
||||||
|
{
|
||||||
|
url = "https://gitlab.com/bartekjaszczak/distinct-nvim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url = "https://gitlab.com/bartekjaszczak/finale-nvim",
|
||||||
|
},
|
||||||
|
'kevinm6/kurayami.nvim',
|
||||||
|
'gerardbm/vim-atomic',
|
||||||
|
'fynnfluegge/monet.nvim',
|
||||||
|
'thesimonho/kanagawa-paper.nvim',
|
||||||
|
'qaptoR-nvim/chocolatier.nvim',
|
||||||
|
'aliqyan-21/darkvoid.nvim',
|
||||||
|
'paulo-granthon/hyper.nvim',
|
||||||
|
'diegoulloao/neofusion.nvim',
|
||||||
|
'aktersnurra/no-clown-fiesta.nvim',
|
||||||
|
'kdheepak/monochrome.nvim',
|
||||||
|
'ficcdaf/ashen.nvim',
|
||||||
|
-- 'm15a/nvim-srcerite', - requires buggy highlite
|
||||||
|
'nyoom-engineering/oxocarbon.nvim',
|
||||||
|
'rjshkhr/shadow.nvim',
|
||||||
|
'folke/tokyonight.nvim',
|
||||||
|
'nendix/zen.nvim',
|
||||||
|
'mcauley-penney/techbase.nvim',
|
||||||
|
'default'
|
||||||
|
})
|
||||||
|
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
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
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,
|
||||||
|
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,162 +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
|
|
||||||
anchor = "SW",
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- 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
|
|
||||||
anchor = "NW",
|
|
||||||
border = "rounded",
|
|
||||||
-- 'editor' and 'win' will default to being centered
|
|
||||||
relative = "editor",
|
|
||||||
|
|
||||||
buf_options = {},
|
|
||||||
win_options = {
|
|
||||||
-- Window transparency (0-100)
|
|
||||||
winblend = 10,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- 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,5 +1,9 @@
|
|||||||
return {
|
return {
|
||||||
--require('femaco').setup()
|
|
||||||
'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',
|
||||||
|
|
||||||
@@ -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
|
|
||||||
url = url .. ":" .. url_data.lend
|
|
||||||
end
|
|
||||||
|
|
||||||
return url
|
|
||||||
end
|
|
||||||
},
|
|
||||||
-- default mapping to call url generation with action_callback
|
|
||||||
mappings = "<leader>gl"
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
debug = true,
|
||||||
|
file_log = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
cmd = "GitLink"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 = 1000,
|
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',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,47 +1,55 @@
|
|||||||
return {
|
return {
|
||||||
'nyngwang/murmur.lua',
|
'nyngwang/murmur.lua',
|
||||||
config = function()
|
config = function()
|
||||||
--require('illuminate').configure({
|
|
||||||
-- large_file_cutoff = 3000
|
|
||||||
--})
|
|
||||||
|
|
||||||
HIGHLIGHT = 'highlight'
|
HIGHLIGHT = 'highlight'
|
||||||
vim.api.nvim_create_augroup(HIGHLIGHT, { clear = true })
|
vim.api.nvim_create_augroup(HIGHLIGHT, { clear = true })
|
||||||
|
|
||||||
require('murmur').setup {
|
require('murmur').setup {
|
||||||
cursor_rgb = 'darkgreen', -- default to '#393939'
|
cursor_rgb = {
|
||||||
|
--guibg = '#393939',
|
||||||
|
gui = "underdotted"
|
||||||
|
},
|
||||||
|
cursor_rgb_always_use_config = true,
|
||||||
max_len = 80, -- maximum word-length to highlight
|
max_len = 80, -- maximum word-length to highlight
|
||||||
-- disable_on_lines = 2000, -- to prevent lagging on large files. Default to 2000 lines.
|
disable_on_lines = 2000, -- to prevent lagging on large files. Default to 2000 lines.
|
||||||
|
yank_blink = {
|
||||||
|
enabled = true,
|
||||||
|
on_yank = nil
|
||||||
|
},
|
||||||
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.cmd('doautocmd InsertEnter')
|
vim.api.nvim_exec_autocmds("User", { pattern = "MurmurDiagnostics"})
|
||||||
vim.w.diag_shown = false
|
vim.w.diag_shown = false
|
||||||
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(nil, {
|
-- vim.diagnostic.open_float({
|
||||||
focusable = true,
|
-- scope = 'cursor',
|
||||||
close_events = { 'InsertEnter' },
|
-- close_events = { "InsertEnter", "User MurmurDiagnostics" },
|
||||||
border = 'rounded',
|
-- })
|
||||||
source = 'always',
|
-- vim.api.nvim_create_autocmd("WinClosed", {
|
||||||
prefix = ' ',
|
-- group = HIGHLIGHT,
|
||||||
scope = 'cursor',
|
-- buffer = buf,
|
||||||
})
|
-- once = true,
|
||||||
vim.w.diag_shown = true
|
-- callback = function() vim.w.diag_shown = false end,
|
||||||
end
|
-- })
|
||||||
end
|
-- vim.w.diag_shown = true
|
||||||
})
|
-- else
|
||||||
|
-- vim.w.diag_shown = false
|
||||||
|
-- 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 = {
|
||||||
|
enabled = 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
|
||||||
},
|
},
|
||||||
events = {
|
neorg = {
|
||||||
update_on_nvim_resize = true,
|
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,114 +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" },
|
|
||||||
"jubnzv/virtual-types.nvim",
|
|
||||||
'p00f/clangd_extensions.nvim',
|
|
||||||
'ray-x/lsp_signature.nvim',
|
|
||||||
"mrjones2014/nvim-ts-rainbow",
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- 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 {{{
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
"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
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- Other plugins (external tools, etc) {{{
|
|
||||||
--"JMcKiern/vim-shoot",
|
|
||||||
--"MortenStabenau/matlab-vim",
|
|
||||||
--"junegunn/goyo.vim",
|
|
||||||
"protex/better-digraphs.nvim",
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- Note taking {{{
|
|
||||||
"nvim-neorg/neorg",
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- Appearance {{{
|
|
||||||
--"jaredgorski/spacecamp",
|
|
||||||
--"lifepillar/vim-gruvbox8",
|
|
||||||
--"marko-cerovac/material.nvim",
|
|
||||||
--"srcery-colors/srcery-vim",
|
|
||||||
--"tanvirtin/monokai.nvim",
|
|
||||||
{
|
|
||||||
'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
|
|
||||||
},
|
|
||||||
"stevearc/dressing.nvim",
|
|
||||||
--"wuelnerdotexe/vim-enfocado",
|
|
||||||
{
|
|
||||||
"fenetikm/falcon",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
-- vim.cmd([[ colorscheme falcon]])
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rebelot/kanagawa.nvim",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
vim.cmd([[ colorscheme kanagawa]])
|
|
||||||
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",
|
|
||||||
--"narutoxy/silicon.lua",
|
|
||||||
--"nguyenvukhang/nvim-toggler",
|
|
||||||
--"rgroli/other.nvim", " Currently doesn't support C/C++
|
|
||||||
--"smolovk/projector.nvim",
|
|
||||||
"Pocco81/true-zen.nvim",
|
|
||||||
{'krivahtoo/silicon.nvim', build = './install.sh' },
|
|
||||||
"nullchilly/fsread.nvim",
|
|
||||||
"ziontee113/icon-picker.nvim",
|
|
||||||
"cbochs/grapple.nvim",
|
|
||||||
"shortcuts/no-neck-pain.nvim",
|
|
||||||
"edluffy/specs.nvim",
|
|
||||||
{ 'ruifm/gitlinker.nvim', dependencies = 'nvim-lua/plenary.nvim'},
|
|
||||||
--'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',
|
||||||
|
version = "*",
|
||||||
config = function()
|
config = function()
|
||||||
local leap = require('leap')
|
-- place this in one of your configuration file(s)
|
||||||
leap.add_default_mappings()
|
local hop = require('hop')
|
||||||
vim.cmd([[
|
hop.setup()
|
||||||
autocmd ColorScheme * lua require('leap').init_highlight(true)
|
-- local directions = require('hop.hint').HintDirection
|
||||||
]])
|
-- vim.keymap.set('', 'f', function()
|
||||||
end
|
-- 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,155 +1,198 @@
|
|||||||
return {
|
return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
|
dependencies = {
|
||||||
|
-- "SmiteshP/nvim-navbuddy",
|
||||||
|
-- "jubnzv/virtual-types.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')
|
ast = {
|
||||||
local lsp_signature = require('lsp_signature')
|
-- These are unicode, should be available in any font
|
||||||
|
role_icons = {
|
||||||
|
type = "🄣",
|
||||||
|
declaration = "🄓",
|
||||||
|
expression = "🄔",
|
||||||
|
statement = ";",
|
||||||
|
specifier = "🄢",
|
||||||
|
["template argument"] = "🆃",
|
||||||
|
},
|
||||||
|
kind_icons = {
|
||||||
|
Compound = "🄲",
|
||||||
|
Recovery = "🅁",
|
||||||
|
TranslationUnit = "🅄",
|
||||||
|
PackExpansion = "🄿",
|
||||||
|
TemplateTypeParm = "🅃",
|
||||||
|
TemplateTemplateParm = "🅃",
|
||||||
|
TemplateParamObject = "🅃",
|
||||||
|
},
|
||||||
|
highlights = {
|
||||||
|
detail = "Comment",
|
||||||
|
},
|
||||||
|
memory_usage = {
|
||||||
|
border = "none",
|
||||||
|
},
|
||||||
|
symbol_info = {
|
||||||
|
border = "none",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
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, {
|
||||||
end
|
-- ui = {
|
||||||
|
-- wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
|
||||||
local signs = {
|
-- 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
|
||||||
{ name = "DiagnosticSignError", text = "" },
|
-- 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
|
||||||
{ name = "DiagnosticSignWarn", text = "" },
|
-- arrow = " ",
|
||||||
{ name = "DiagnosticSignHint", text = "" },
|
-- up_arrow = " ",
|
||||||
{ name = "DiagnosticSignInfo", text = "" },
|
-- down_arrow = " ",
|
||||||
}
|
-- above = false, -- the virtual text will be displayed above the line
|
||||||
|
|
||||||
for _, sign in ipairs(signs) do
|
|
||||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
|
||||||
end
|
|
||||||
|
|
||||||
--vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
|
||||||
-- vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
-- signs = {
|
|
||||||
-- active = signs,
|
|
||||||
-- --severity_limit = 'info',
|
|
||||||
-- },
|
-- },
|
||||||
-- severity_sort = true,
|
-- priority = 2003, -- the priority of virtual text
|
||||||
-- underline = false,
|
-- inline = true
|
||||||
-- update_in_insert = false,
|
-- })
|
||||||
-- --virtual_text = {
|
|
||||||
-- -- spacing = 40,
|
vim.diagnostic.config({
|
||||||
-- -- severity_limit = 'Warning',
|
underline = false,
|
||||||
-- --},
|
signs = {
|
||||||
-- virtual_text = false,
|
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
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
})
|
||||||
|
|
||||||
nvim_lsp.groovyls.setup({
|
--local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
--local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
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.config('groovyls', {
|
||||||
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"},
|
||||||
-- },
|
capabilities = capabilities,
|
||||||
-- clang = {
|
filetypes = { "cpp" },
|
||||||
-- 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,
|
|
||||||
-- }}
|
|
||||||
-- )
|
|
||||||
-- )
|
|
||||||
|
|
||||||
clangd_extensions.setup({
|
|
||||||
server = {
|
|
||||||
on_attach = on_attach,
|
|
||||||
root_pattern = {
|
|
||||||
'.clangd',
|
|
||||||
'.clang-tidy',
|
|
||||||
'.clang-format',
|
|
||||||
'compile_commands.json',
|
|
||||||
'compile_flags.txt',
|
|
||||||
'configure.ac',
|
|
||||||
},
|
|
||||||
capabilities = capabilities
|
|
||||||
},
|
|
||||||
inlay_hints = {
|
|
||||||
max_len_align = true,
|
|
||||||
max_len_align_padding = 3,
|
|
||||||
right_align = true,
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
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,
|
})
|
||||||
|
|
||||||
|
vim.lsp.config('lua_ls', {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
diagnostics = { globals = { "vim" } },
|
||||||
|
completion = {
|
||||||
|
callSnippet = "Replace"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- 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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,227 +0,0 @@
|
|||||||
return {
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
config = function()
|
|
||||||
-- Eviline config for lualine
|
|
||||||
-- Author: shadmansaleh
|
|
||||||
-- Credit: glepnir
|
|
||||||
local lualine = require('lualine')
|
|
||||||
|
|
||||||
-- Color table for highlights
|
|
||||||
-- stylua: ignore
|
|
||||||
local colors = {
|
|
||||||
bg = '#202328',
|
|
||||||
fg = '#bbc2cf',
|
|
||||||
yellow = '#ECBE7B',
|
|
||||||
cyan = '#008080',
|
|
||||||
darkblue = '#081633',
|
|
||||||
green = '#98be65',
|
|
||||||
orange = '#FF8800',
|
|
||||||
violet = '#a9a1e1',
|
|
||||||
magenta = '#c678dd',
|
|
||||||
blue = '#51afef',
|
|
||||||
red = '#ec5f67',
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
local conditions = {
|
|
||||||
buffer_not_empty = function()
|
|
||||||
return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
|
|
||||||
end,
|
|
||||||
hide_in_width = function()
|
|
||||||
return vim.fn.winwidth(0) > 80
|
|
||||||
end,
|
|
||||||
check_git_workspace = function()
|
|
||||||
local filepath = vim.fn.expand('%:p:h')
|
|
||||||
local gitdir = vim.fn.finddir('.git', filepath .. ';')
|
|
||||||
return gitdir and #gitdir > 0 and #gitdir < #filepath
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Config
|
|
||||||
local config = {
|
|
||||||
options = {
|
|
||||||
-- Disable sections and component separators
|
|
||||||
component_separators = '',
|
|
||||||
section_separators = '',
|
|
||||||
theme = {
|
|
||||||
-- We are going to use lualine_c an lualine_x as left and
|
|
||||||
-- right section. Both are highlighted by c theme . So we
|
|
||||||
-- are just setting default looks o statusline
|
|
||||||
normal = { c = { fg = colors.fg, bg = colors.bg } },
|
|
||||||
inactive = { c = { fg = colors.fg, bg = colors.bg } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
-- these are to remove the defaults
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {},
|
|
||||||
-- These will be filled later
|
|
||||||
lualine_c = {},
|
|
||||||
lualine_x = {},
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
-- these are to remove the defaults
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {},
|
|
||||||
lualine_c = {},
|
|
||||||
lualine_x = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Inserts a component in lualine_c at left section
|
|
||||||
local function ins_left(component)
|
|
||||||
table.insert(config.sections.lualine_c, component)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Inserts a component in lualine_x ot right section
|
|
||||||
local function ins_right(component)
|
|
||||||
table.insert(config.sections.lualine_x, component)
|
|
||||||
end
|
|
||||||
|
|
||||||
ins_left {
|
|
||||||
function()
|
|
||||||
return '▊'
|
|
||||||
end,
|
|
||||||
color = { fg = colors.blue }, -- Sets highlighting of component
|
|
||||||
padding = { left = 0, right = 1 }, -- We don't need space before this
|
|
||||||
}
|
|
||||||
|
|
||||||
ins_left {
|
|
||||||
-- mode component
|
|
||||||
function()
|
|
||||||
return ''
|
|
||||||
end,
|
|
||||||
color = function()
|
|
||||||
-- auto change color according to neovims mode
|
|
||||||
local mode_color = {
|
|
||||||
n = colors.red,
|
|
||||||
i = colors.green,
|
|
||||||
v = colors.blue,
|
|
||||||
[''] = colors.blue,
|
|
||||||
V = colors.blue,
|
|
||||||
c = colors.magenta,
|
|
||||||
no = colors.red,
|
|
||||||
s = colors.orange,
|
|
||||||
S = colors.orange,
|
|
||||||
[''] = colors.orange,
|
|
||||||
ic = colors.yellow,
|
|
||||||
R = colors.violet,
|
|
||||||
Rv = colors.violet,
|
|
||||||
cv = colors.red,
|
|
||||||
ce = colors.red,
|
|
||||||
r = colors.cyan,
|
|
||||||
rm = colors.cyan,
|
|
||||||
['r?'] = colors.cyan,
|
|
||||||
['!'] = colors.red,
|
|
||||||
t = colors.red,
|
|
||||||
}
|
|
||||||
return { fg = mode_color[vim.fn.mode()] }
|
|
||||||
end,
|
|
||||||
padding = { right = 1 },
|
|
||||||
}
|
|
||||||
|
|
||||||
ins_left {
|
|
||||||
-- filesize component
|
|
||||||
'filesize',
|
|
||||||
cond = conditions.buffer_not_empty,
|
|
||||||
}
|
|
||||||
|
|
||||||
ins_left {
|
|
||||||
'filename',
|
|
||||||
cond = conditions.buffer_not_empty,
|
|
||||||
color = { fg = colors.magenta, gui = 'bold' },
|
|
||||||
}
|
|
||||||
|
|
||||||
ins_left { 'location' }
|
|
||||||
|
|
||||||
ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }
|
|
||||||
|
|
||||||
ins_left {
|
|
||||||
'diagnostics',
|
|
||||||
sources = { 'nvim_diagnostic' },
|
|
||||||
symbols = { error = ' ', warn = ' ', info = ' ' },
|
|
||||||
diagnostics_color = {
|
|
||||||
color_error = { fg = colors.red },
|
|
||||||
color_warn = { fg = colors.yellow },
|
|
||||||
color_info = { fg = colors.cyan },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Insert mid section. You can make any number of sections in neovim :)
|
|
||||||
-- for lualine it's any number greater then 2
|
|
||||||
ins_left {
|
|
||||||
function()
|
|
||||||
return '%='
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
ins_left {
|
|
||||||
-- Lsp server name .
|
|
||||||
function()
|
|
||||||
local msg = 'No Active Lsp'
|
|
||||||
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
|
||||||
local clients = vim.lsp.get_active_clients()
|
|
||||||
if next(clients) == nil then
|
|
||||||
return msg
|
|
||||||
end
|
|
||||||
for _, client in ipairs(clients) do
|
|
||||||
local filetypes = client.config.filetypes
|
|
||||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
|
||||||
return client.name
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return msg
|
|
||||||
end,
|
|
||||||
icon = ' LSP:',
|
|
||||||
color = { fg = '#ffffff', gui = 'bold' },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Add components to right sections
|
|
||||||
ins_right {
|
|
||||||
'o:encoding', -- option component same as &encoding in viml
|
|
||||||
fmt = string.upper, -- I'm not sure why it's upper case either ;)
|
|
||||||
cond = conditions.hide_in_width,
|
|
||||||
color = { fg = colors.green, gui = 'bold' },
|
|
||||||
}
|
|
||||||
|
|
||||||
ins_right {
|
|
||||||
'fileformat',
|
|
||||||
fmt = string.upper,
|
|
||||||
icons_enabled = true, -- I think icons are cool but Eviline doesn't have them. sigh
|
|
||||||
color = { fg = colors.green, gui = 'bold' },
|
|
||||||
}
|
|
||||||
|
|
||||||
ins_right {
|
|
||||||
'branch',
|
|
||||||
icon = '',
|
|
||||||
color = { fg = colors.violet, gui = 'bold' },
|
|
||||||
}
|
|
||||||
|
|
||||||
ins_right {
|
|
||||||
'diff',
|
|
||||||
-- Is it me or the symbol for modified us really weird
|
|
||||||
symbols = { added = ' ', modified = '柳 ', removed = ' ' },
|
|
||||||
diff_color = {
|
|
||||||
added = { fg = colors.green },
|
|
||||||
modified = { fg = colors.orange },
|
|
||||||
removed = { fg = colors.red },
|
|
||||||
},
|
|
||||||
cond = conditions.hide_in_width,
|
|
||||||
}
|
|
||||||
|
|
||||||
ins_right {
|
|
||||||
function()
|
|
||||||
return '▊'
|
|
||||||
end,
|
|
||||||
color = { fg = colors.blue },
|
|
||||||
padding = { left = 1 },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Now don't forget to initialize lualine
|
|
||||||
lualine.setup(config)
|
|
||||||
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
|
||||||
|
}
|
||||||
91
.config/nvim/lua/plugins/markdown.lua
Normal file
91
.config/nvim/lua/plugins/markdown.lua
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
return { {
|
||||||
|
'richardbizik/nvim-toc',
|
||||||
|
ft = { "md", "markdown" },
|
||||||
|
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,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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
'jakewvincent/mkdnflow.nvim',
|
'jakewvincent/mkdnflow.nvim',
|
||||||
|
ft = { "markdown" },
|
||||||
opts = {
|
opts = {
|
||||||
modules = {
|
modules = {
|
||||||
bib = true,
|
bib = true,
|
||||||
@@ -87,5 +88,6 @@ return {
|
|||||||
MkdnFoldSection = {'n', '<leader>f'},
|
MkdnFoldSection = {'n', '<leader>f'},
|
||||||
MkdnUnfoldSection = {'n', '<leader>F'}
|
MkdnUnfoldSection = {'n', '<leader>F'}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
14
.config/nvim/lua/plugins/navbuddy.lua
Normal file
14
.config/nvim/lua/plugins/navbuddy.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
return {
|
||||||
|
"SmiteshP/nvim-navbuddy",
|
||||||
|
dependencies = {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"SmiteshP/nvim-navic",
|
||||||
|
"MunifTanjim/nui.nvim"
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require'nvim-navic'.setup()
|
||||||
|
require'nvim-navbuddy'.setup()
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
}
|
||||||
20
.config/nvim/lua/plugins/null.lua
Normal file
20
.config/nvim/lua/plugins/null.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
'nvimtools/none-ls.nvim',
|
||||||
|
config = function()
|
||||||
|
local none_ls = require("null-ls")
|
||||||
|
none_ls.setup({
|
||||||
|
sources = {
|
||||||
|
none_ls.builtins.code_actions.gitsigns,
|
||||||
|
none_ls.builtins.diagnostics.gitlint,
|
||||||
|
none_ls.builtins.diagnostics.cmake_lint,
|
||||||
|
none_ls.builtins.diagnostics.codespell,
|
||||||
|
none_ls.builtins.diagnostics.fish,
|
||||||
|
none_ls.builtins.diagnostics.mypy,
|
||||||
|
--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
|
||||||
|
}
|
||||||
@@ -1,21 +1,120 @@
|
|||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"nomnivore/ollama.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- All the user commands added by the plugin
|
||||||
|
cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" },
|
||||||
|
|
||||||
|
keys = {
|
||||||
|
-- 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',
|
'hrsh7th/nvim-cmp',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'mstanciu552/cmp-matlab',
|
|
||||||
'petertriho/cmp-git',
|
|
||||||
'hrsh7th/cmp-buffer',
|
|
||||||
'hrsh7th/cmp-cmdline',
|
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-buffer',
|
||||||
'hrsh7th/cmp-path',
|
'hrsh7th/cmp-path',
|
||||||
|
'hrsh7th/cmp-cmdline',
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
'tzachar/cmp-ai',
|
||||||
},
|
},
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require'cmp'
|
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({
|
cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
|
-- REQUIRED - you must specify a snippet engine
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
require('snippy').expand_snippet(args.body)
|
--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,
|
end,
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
@@ -27,56 +126,60 @@ return {
|
|||||||
['<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' }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||||
cmp.setup.cmdline(':', {
|
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 }
|
||||||
})
|
})
|
||||||
})
|
end,
|
||||||
|
enabled = false
|
||||||
cmp.setup.filetype('gitcommit', {
|
}
|
||||||
sources = cmp.config.sources({
|
|
||||||
{name = 'cmp_git' },
|
|
||||||
}, {
|
|
||||||
{name = 'buffer' }
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
require("cmp_git").setup()
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user