feat: initial commit
This commit is contained in:
8
.config/alacritty/alacritty.toml
Normal file
8
.config/alacritty/alacritty.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
[font]
|
||||
# size = 8.0
|
||||
size = 12.0
|
||||
[general]
|
||||
|
||||
# import = [
|
||||
# "~/.config/alacritty/color.toml"
|
||||
# ]
|
||||
896
.config/alacritty/alacritty.yml
Normal file
896
.config/alacritty/alacritty.yml
Normal file
@@ -0,0 +1,896 @@
|
||||
# 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: 0
|
||||
# y: 0
|
||||
|
||||
# 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: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Regular
|
||||
|
||||
# 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: monospace
|
||||
|
||||
# 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: None
|
||||
# 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/glutin/*/glutin/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: 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
|
||||
|
||||
# Print all received window events.
|
||||
#print_events: false
|
||||
|
||||
# Highlight window damage information.
|
||||
#highlight_damage: false
|
||||
|
||||
36
.config/alacritty/color.toml
Normal file
36
.config/alacritty/color.toml
Normal file
@@ -0,0 +1,36 @@
|
||||
# github Alacritty Colors
|
||||
|
||||
# Default colors
|
||||
[colors.primary]
|
||||
background = '#ffffff'
|
||||
foreground = '#24292f'
|
||||
|
||||
# Normal colors
|
||||
[colors.normal]
|
||||
black = '#24292e'
|
||||
red = '#d73a49'
|
||||
green = '#28a745'
|
||||
yellow = '#dbab09'
|
||||
blue = '#0366d6'
|
||||
magenta = '#5a32a3'
|
||||
cyan = '#0598bc'
|
||||
white = '#6a737d'
|
||||
|
||||
# Bright colors
|
||||
[colors.bright]
|
||||
black = '#959da5'
|
||||
red = '#cb2431'
|
||||
green = '#22863a'
|
||||
yellow = '#b08800'
|
||||
blue = '#005cc5'
|
||||
magenta = '#5a32a3'
|
||||
cyan = '#3192aa'
|
||||
white = '#d1d5da'
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 16
|
||||
color = '#d18616'
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 17
|
||||
color = '#cb2431'
|
||||
292
.config/sway/config
Normal file
292
.config/sway/config
Normal file
@@ -0,0 +1,292 @@
|
||||
# Default config for sway
|
||||
#
|
||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
### Variables
|
||||
|
||||
#
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod4
|
||||
set $primary_monitor eDP-1
|
||||
set $secondary_monitor DP-3
|
||||
# Home row direction keys, like vim
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
# Your preferred terminal emulator
|
||||
set $term alacritty
|
||||
# Your preferred application launcher
|
||||
set $menu wmenu-run
|
||||
set $menu rofi -show run
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/)
|
||||
# output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
output eDP-1 resolution 2256x1504 position 0,0 scale 1.2
|
||||
#
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
|
||||
### Idle configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# exec swayidle -w \
|
||||
# timeout 300 'swaylock -f -c 000000' \
|
||||
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||
# before-sleep 'swaylock -f -c 000000'
|
||||
#
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
# your displays after another 300 seconds, and turn your screens back on when
|
||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||
|
||||
### Input configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# input "2:14:SynPS/2_Synaptics_TouchPad" {
|
||||
# dwt enabled
|
||||
# tap enabled
|
||||
# natural_scroll enabled
|
||||
# middle_emulation enabled
|
||||
# }
|
||||
input type:keyboard {
|
||||
repeat_delay 200
|
||||
repeat_rate 30
|
||||
xkb_layout us,fr
|
||||
}
|
||||
|
||||
input type:touchpad {
|
||||
dwt enabled
|
||||
tap enabled
|
||||
middle_emulation enabled
|
||||
pointer_accel 0.155
|
||||
}
|
||||
#
|
||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
||||
# Read `man 5 sway-input` for more information about this section.
|
||||
|
||||
### Key bindings
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
# Lock
|
||||
bindsym Ctrl+Mod1+l exec ~/.config/swaylock/lock.sh
|
||||
|
||||
# Keyboard layout
|
||||
bindsym $mod+space input type:keyboard xkb_switch_layout next
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
# Change normal to inverse to use left mouse button for resizing and right
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
# Move focus back and forth
|
||||
bindsym Mod1+Tab workspace back_and_forth
|
||||
|
||||
# Or use $mod+[up|down|left|right]
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
# Ditto, with arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
workspace 1 output eDP-1
|
||||
workspace 2 output eDP-1
|
||||
workspace 3 output eDP-1
|
||||
workspace 4 output eDP-1
|
||||
workspace 5 output eDP-1
|
||||
workspace 11 output eDP-1
|
||||
workspace 6 output $secondary_monitor
|
||||
workspace 7 output $secondary_monitor
|
||||
workspace 8 output $secondary_monitor
|
||||
workspace 9 output $secondary_monitor
|
||||
workspace 10 output $secondary_monitor
|
||||
|
||||
# Switch to workspace
|
||||
bindcode --to-code $mod+10 workspace number 1
|
||||
bindcode --to-code $mod+11 workspace number 2
|
||||
bindcode --to-code $mod+12 workspace number 3
|
||||
bindcode --to-code $mod+13 workspace number 4
|
||||
bindcode --to-code $mod+14 workspace number 5
|
||||
bindcode --to-code $mod+15 workspace number 6
|
||||
bindcode --to-code $mod+16 workspace number 7
|
||||
bindcode --to-code $mod+17 workspace number 8
|
||||
bindcode --to-code $mod+18 workspace number 9
|
||||
bindcode --to-code $mod+19 workspace number 10
|
||||
bindcode --to-code $mod+25 workspace number 11
|
||||
|
||||
# Move focused container to workspace
|
||||
bindcode --to-code $mod+Shift+10 move container to workspace number 1
|
||||
bindcode --to-code $mod+Shift+11 move container to workspace number 2
|
||||
bindcode --to-code $mod+Shift+12 move container to workspace number 3
|
||||
bindcode --to-code $mod+Shift+13 move container to workspace number 4
|
||||
bindcode --to-code $mod+Shift+14 move container to workspace number 5
|
||||
bindcode --to-code $mod+Shift+15 move container to workspace number 6
|
||||
bindcode --to-code $mod+Shift+16 move container to workspace number 7
|
||||
bindcode --to-code $mod+Shift+17 move container to workspace number 8
|
||||
bindcode --to-code $mod+Shift+18 move container to workspace number 9
|
||||
bindcode --to-code $mod+Shift+19 move container to workspace number 10
|
||||
bindcode --to-code $mod+Shift+25 move container to workspace number 11
|
||||
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
exec_always autotiling
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
# bindsym $mod+b splith
|
||||
# bindsym $mod+v splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
# bindsym $mod+s layout stacking
|
||||
# bindsym $mod+w layout tabbed
|
||||
# bindsym $mod+e layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
# bindsym $mod+space focus mode_toggle
|
||||
|
||||
# Move focus to the parent container
|
||||
bindsym $mod+a focus parent
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||
# You can send windows there and get them back later.
|
||||
|
||||
# Move the currently focused window to the scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||
# If there are multiple scratchpad windows, this command cycles through them.
|
||||
bindsym $mod+minus scratchpad show
|
||||
#
|
||||
# Resizing containers:
|
||||
#
|
||||
mode "resize" {
|
||||
# left will shrink the containers width
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $up resize grow height 10px
|
||||
bindsym $down resize shrink height 10px
|
||||
bindsym $right resize grow width 10px
|
||||
|
||||
# Ditto, with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Up resize grow height 10px
|
||||
bindsym Down resize shrink height 10px
|
||||
bindsym Right resize grow width 10px
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
#
|
||||
# Utilities:
|
||||
#
|
||||
# Special keys to adjust volume
|
||||
bindsym --locked XF86AudioMute exec pamixer --toggle-mute
|
||||
bindsym --locked XF86AudioLowerVolume exec pamixer -d 5
|
||||
bindsym --locked XF86AudioRaiseVolume exec pamixer -i 5
|
||||
# Special keys to adjust brightness via brightnessctl
|
||||
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||
# Special key to take a screenshot with grim
|
||||
bindsym --locked XF86PowerOff exec ~/.config/swaylock/lock.sh & systemctl hibernate
|
||||
bindsym $mod+Shift+s exec QT_SCREEN_SCALE_FACTORS="1;1" QT_QPA_PLATFORM=wayland flameshot gui --accept-on-select --raw | wl-copy
|
||||
bindsym --locked Print exec flameshot gui --raw | wl-copy
|
||||
bindsym $mod+Shift+Alt+s exec grim -g "$(slurp)" - | wl-copy
|
||||
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
position top
|
||||
swaybar_command waybar
|
||||
|
||||
# When the status_command prints a new line to stdout, swaybar updates.
|
||||
# The default just shows the current date and time.
|
||||
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
|
||||
|
||||
# colors {
|
||||
# statusline #ffffff
|
||||
# background #323232
|
||||
# inactive_workspace #32323200 #32323200 #5c5c5c
|
||||
# }
|
||||
}
|
||||
|
||||
#
|
||||
# Notifications
|
||||
#
|
||||
exec swaync
|
||||
bindsym $mod+Shift+n exec swaync-client -t -sw
|
||||
|
||||
#
|
||||
# Windows
|
||||
#
|
||||
font none 10
|
||||
titlebar_padding 1
|
||||
# exec seat seat0 xcursor_theme phinger-cursors-light 36
|
||||
# exec_always {
|
||||
# gsettings set $gnome-schema gtk-cursor-theme-name Adwaita
|
||||
# gsettings set $gnome-schema gtk-cursor-theme-size 24
|
||||
# }
|
||||
# seat * xcursor_theme Vimix-White 32
|
||||
|
||||
exec systemctl --user import-environment
|
||||
include @sysconfdir@/sway/config.d/*
|
||||
11
.config/sway/outputs
Normal file
11
.config/sway/outputs
Normal file
@@ -0,0 +1,11 @@
|
||||
# Generated by nwg-displays on 2025-01-05 at 22:39:56. Do not edit manually.
|
||||
|
||||
output "eDP-1" {
|
||||
mode 2256x1504@59.999Hz
|
||||
pos 0 0
|
||||
transform normal
|
||||
scale 1.2000000476837158
|
||||
scale_filter linear
|
||||
adaptive_sync off
|
||||
dpms on
|
||||
}
|
||||
58
.config/swaylock/lock.sh
Executable file
58
.config/swaylock/lock.sh
Executable file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Background (--color=rrggbb or --image=path)
|
||||
#BACKGROUND="--image=${HOME}/wallpaper-lock.jpg"
|
||||
|
||||
# Foreground color (rrggbbaa)
|
||||
COLOR_FG="ffffffff"
|
||||
COLOR_SCREEN="000000ff";
|
||||
|
||||
# Ring color during incorrect password flash (rrggbbaa)
|
||||
COLOR_RINGWRONG="ff0000ff";
|
||||
|
||||
COLOR_TEXT="ffffffff";
|
||||
# Date string format (see `man strftime.3`)
|
||||
FORMAT_DATE="%A, %B %e"
|
||||
FORMAT_TIME="%H:%M"
|
||||
|
||||
# Main font (for time and greeter)
|
||||
FONT="sans-serif:light"
|
||||
# Alternative font (for date)
|
||||
FONT_ALT="sans-serif:thin"
|
||||
|
||||
# Time font size
|
||||
SIZE_TIME=144
|
||||
# Date font size
|
||||
SIZE_DATE=48
|
||||
|
||||
# "${BACKGROUND}" \
|
||||
swaylock \
|
||||
--ignore-empty-password \
|
||||
--show-keyboard-layout \
|
||||
--color="${COLOR_SCREEN}" \
|
||||
--indicator-radius=105 \
|
||||
--font="${FONT}" \
|
||||
--font-size=30 \
|
||||
--text-color="${COLOR_TEXT}" \
|
||||
--text-clear-color="${COLOR_TEXT}" \
|
||||
-f
|
||||
# \
|
||||
# --clock \
|
||||
# --datestr="${FORMAT_DATE}" \
|
||||
# --timestr="${FORMAT_TIME}"
|
||||
# --screen=0 \
|
||||
# --show-failed-attempts \
|
||||
# --inside-color="${COLOR_SCREEN}" \
|
||||
# --ring-color="${COLOR_SCREEN}" \
|
||||
# --insidever-color="${COLOR_SCREEN}" \
|
||||
# --ringver-color="${COLOR_SCREEN}" \
|
||||
# --insidewrong-color="${COLOR_SCREEN}" \
|
||||
# --ringwrong-color="${COLOR_RINGWRONG}" \
|
||||
# --layout-color="${COLOR_TEXT}" \
|
||||
# --time-color="${COLOR_TEXT}" \
|
||||
# --date-color="${COLOR_TEXT}" \
|
||||
# --greeter-color="${COLOR_TEXT}" \
|
||||
# --noinput-text="clear" \
|
||||
# --pass-screen-keys \
|
||||
# --pass-power-keys \
|
||||
# --pass-volume-keys \
|
||||
74
.config/swaync/config.json
Normal file
74
.config/swaync/config.json
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"$schema": "/etc/xdg/swaync/configSchema.json",
|
||||
"positionX": "right",
|
||||
"positionY": "top",
|
||||
"layer": "overlay",
|
||||
"control-center-layer": "top",
|
||||
"layer-shell": true,
|
||||
"cssPriority": "application",
|
||||
"control-center-margin-top": 0,
|
||||
"control-center-margin-bottom": 0,
|
||||
"control-center-margin-right": 0,
|
||||
"control-center-margin-left": 0,
|
||||
"notification-2fa-action": true,
|
||||
"notification-inline-replies": false,
|
||||
"notification-icon-size": 64,
|
||||
"notification-body-image-height": 100,
|
||||
"notification-body-image-width": 200,
|
||||
"timeout": 4,
|
||||
"timeout-low": 5,
|
||||
"timeout-critical": 0,
|
||||
"fit-to-screen": false,
|
||||
"relative-timestamps": true,
|
||||
"control-center-width": 500,
|
||||
"control-center-height": 809,
|
||||
"notification-window-width": 500,
|
||||
"keyboard-shortcuts": true,
|
||||
"image-visibility": "when-available",
|
||||
"transition-time": 200,
|
||||
"hide-on-clear": false,
|
||||
"hide-on-action": true,
|
||||
"script-fail-notify": true,
|
||||
"scripts": {
|
||||
"open-screenshot-folder": {
|
||||
"exec": "sh -c 'dolphin ~/Documents/Screenshots'",
|
||||
"summary": "Screenshot",
|
||||
"run-on": "action"
|
||||
}
|
||||
},
|
||||
"notification-visibility": {
|
||||
"example-name": {
|
||||
"state": "normal",
|
||||
"app-name": "Spotify"
|
||||
}
|
||||
},
|
||||
"widgets": [
|
||||
"inhibitors",
|
||||
"title",
|
||||
"dnd",
|
||||
"notifications",
|
||||
],
|
||||
"widget-config": {
|
||||
"inhibitors": {
|
||||
"text": "Inhibitors",
|
||||
"button-text": "Clear All",
|
||||
"clear-all-button": true
|
||||
},
|
||||
"title": {
|
||||
"text": "Notifications",
|
||||
"clear-all-button": true,
|
||||
"button-text": ""
|
||||
},
|
||||
"dnd": {
|
||||
"text": "Do Not Disturb"
|
||||
},
|
||||
"label": {
|
||||
"max-lines": 5,
|
||||
"text": "Label Text"
|
||||
},
|
||||
"mpris": {
|
||||
"image-size": 96,
|
||||
"image-radius": 12
|
||||
}
|
||||
}
|
||||
}
|
||||
198
.config/swaync/style.css
Normal file
198
.config/swaync/style.css
Normal file
@@ -0,0 +1,198 @@
|
||||
@define-color switch_checked #f38ba8; /* red */
|
||||
@define-color green #a6e3a1;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext1 #bac2de;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color surface2 #585b70;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface0 #313244;
|
||||
|
||||
* {
|
||||
font-family: "IBM Plex Sans";
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.control-center {
|
||||
background: alpha(@overlay0, 0.95);
|
||||
margin: 5px 10px 0 0;
|
||||
border: 2px solid @text;
|
||||
border-radius: 15px;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
.widget-title {
|
||||
padding: 10px 10px 0px 10px;
|
||||
font-size: 22px;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
.widget-title>button {
|
||||
font-family: JetBrains Mono Nerd;
|
||||
border: 2px solid @text;
|
||||
background: transparent;
|
||||
font-size: inherit;
|
||||
padding: 0 35px 0 30px;
|
||||
}
|
||||
|
||||
.widget-title>button:hover {
|
||||
background: @surface2;
|
||||
}
|
||||
|
||||
.widget-title>button:active {
|
||||
background: @surface1;
|
||||
}
|
||||
|
||||
.widget-dnd {
|
||||
padding: 0px 10px 5px 10px;
|
||||
background-color: transparent;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.widget-dnd>label {
|
||||
color: @subtext1;
|
||||
}
|
||||
|
||||
.widget-dnd>switch {
|
||||
background-color: @surface2;
|
||||
}
|
||||
|
||||
.widget-dnd>switch:checked {
|
||||
background-color: @switch_checked;
|
||||
}
|
||||
|
||||
.widget-dnd>switch slider {
|
||||
background-color: @surface2;
|
||||
border: 2px solid @text;
|
||||
border-radius: 99px;
|
||||
}
|
||||
|
||||
.notification-row {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background-color: @surface2;
|
||||
box-shadow: none;
|
||||
margin: 0px;
|
||||
border: 2px solid @lavender;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
.notification-content {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.notification-group {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.notification-group-icon {
|
||||
color: @lavender;
|
||||
}
|
||||
|
||||
.notification-group-collapse-button,
|
||||
.notification-group-close-all-button {
|
||||
background-color: @lavender;
|
||||
border: 2px solid @lavender;
|
||||
}
|
||||
|
||||
.notification-group.collapsed:hover .notification {
|
||||
background-color: @surface1;
|
||||
}
|
||||
|
||||
.notification-default-action:hover {
|
||||
background-color: @surface1;
|
||||
}
|
||||
|
||||
.notification-action:hover {
|
||||
background-color: @surface0;
|
||||
}
|
||||
|
||||
.notification-default-action:active,
|
||||
.notification-action:active {
|
||||
background-color: @surface1;
|
||||
}
|
||||
|
||||
.notification-content .text-box {
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
background-color: @lavender;
|
||||
}
|
||||
|
||||
.widget-volume {
|
||||
background-color: @surface2;
|
||||
border-radius: 20px;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
trough highlight {
|
||||
background-color: @text;
|
||||
}
|
||||
|
||||
scale trough {
|
||||
background-color: transparent;
|
||||
border: transparent;
|
||||
padding: 0px;
|
||||
min-height: 5px;
|
||||
margin: 0 0 0 10px;
|
||||
font-family: JetBrains Mono Nerd Font;
|
||||
}
|
||||
|
||||
slider {
|
||||
background-color: @overlay0;
|
||||
border: 2px solid @text;
|
||||
}
|
||||
|
||||
.widget-volume label {
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.widget-volume trough highlight {
|
||||
background: @lavender;
|
||||
border: unset;
|
||||
}
|
||||
|
||||
.widget-volume button {
|
||||
background-color: inherit;
|
||||
box-shadow: unset;
|
||||
font-size: 20px;
|
||||
padding: 0 20px 0 0;
|
||||
border-radius: 20px;
|
||||
color: @lavender;
|
||||
font-family: "JetBrains Mono NerdFont";
|
||||
}
|
||||
|
||||
.widget-buttons-grid {
|
||||
background-color: transparent;
|
||||
margin: 0 0 0 278px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid>flowbox>flowboxchild>button {
|
||||
background-color: transparent;
|
||||
border-radius: 99px;
|
||||
border: unset;
|
||||
box-shadow: unset;
|
||||
min-width: 30px;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid>flowbox>flowboxchild>button:hover {
|
||||
background-color: @surface2;
|
||||
}
|
||||
|
||||
.widget-buttons-grid>flowbox>flowboxchild>button:active {
|
||||
background-color: @surface1;
|
||||
}
|
||||
|
||||
.widget-buttons-grid>flowbox>flowboxchild>button label {
|
||||
color: @green;
|
||||
font-family: "JetBrains Mono NerdFont";
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
82
.config/waybar/config
Normal file
82
.config/waybar/config
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"modules-left": ["sway/workspaces", "sway/window", "sway/mode"],
|
||||
"modules-center": [],
|
||||
"modules-right": ["pulseaudio", "network", "tray", "custom/keyboard", "backlight", "cpu", "memory", "battery", "clock"],
|
||||
"sway/window": {
|
||||
"max-length": 50
|
||||
},
|
||||
"battery": {
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-alt": "{time}",
|
||||
"format-icons": ["", "", "", "", ""],
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%a, %b %e %H:%M}",
|
||||
"format-alt": "{:%a, %d. %b %H:%M:%S}"
|
||||
},
|
||||
"cpu": {
|
||||
"format": "{usage}% ",
|
||||
"tooltip": true
|
||||
},
|
||||
"memory": {
|
||||
"format": "{avail} GiB"
|
||||
},
|
||||
"temperature": {
|
||||
// "thermal-zone": 2,
|
||||
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
||||
"critical-threshold": 80,
|
||||
// "format-critical": "{temperatureC}°C {icon}",
|
||||
"format": "{temperatureC}°C {icon}",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
"backlight": {
|
||||
// "device": "acpi_video1",
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": ["", ""]
|
||||
},
|
||||
//"battery": {
|
||||
// "states": {
|
||||
// "good": 95,
|
||||
// "warning": 30,
|
||||
// "critical": 15
|
||||
// },
|
||||
// "format": "{capacity}% ",
|
||||
// "format-charging": "{capacity}%",
|
||||
// "format-plugged": "{capacity}%",
|
||||
// "format-alt": "{time} ",
|
||||
// // "format-good": "", // An empty format will hide the module
|
||||
// // "format-full": "",
|
||||
// // "format-icons": ["", "", "", "", ""]
|
||||
//},
|
||||
"network": {
|
||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
|
||||
"format-linked": "{ifname} (No IP) ",
|
||||
"format-disconnected": "Disconnected ",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}",
|
||||
"on-click": "nm-connection-editor"
|
||||
},
|
||||
"pulseaudio": {
|
||||
// "scroll-step": 1, // %, can be a float
|
||||
"format": "{volume}% | {format_source}",
|
||||
"format-bluetooth": "{volume}% {format_source}",
|
||||
"format-bluetooth-muted": " {format_source}",
|
||||
"format-muted": "0% | {format_source}",
|
||||
"format-source": "{volume}% ",
|
||||
"format-source-muted": "",
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
//"custom/keyboard": {
|
||||
// "exec": "swaymsg -t get_inputs | grep active_layout_name | grep -v En | awk 'END{if(NR == 0){print \"EN\"}else{print toupper(substr($2,2,2))}}'",
|
||||
// "format": " {} ",
|
||||
// "interval": 1
|
||||
//},
|
||||
"tray": {
|
||||
"icon-size": 21,
|
||||
"spacing": 10
|
||||
}
|
||||
}
|
||||
8
nvim/README.md
Normal file
8
nvim/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
nodejs
|
||||
|
||||
clang
|
||||
|
||||
|
||||
:CocInstall coc-clangd
|
||||
|
||||
:CocCommand clangd.install
|
||||
28
nvim/init.lua
Executable file
28
nvim/init.lua
Executable file
@@ -0,0 +1,28 @@
|
||||
vim.g.mapleader = " "
|
||||
|
||||
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system {
|
||||
'git',
|
||||
'clone',
|
||||
'--filter=blob:none',
|
||||
'https://github.com/folke/lazy.nvim.git',
|
||||
'--branch=stable', -- latest stable release
|
||||
lazypath,
|
||||
}
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup("plugins", {
|
||||
dev = {
|
||||
-- directory where you store your local plugin projects
|
||||
path = "~/lua/nvim-plugins",
|
||||
fallback = true, -- Fallback to git when local plugin doesn't exist
|
||||
},
|
||||
})
|
||||
|
||||
require("settings")
|
||||
require("mappings")
|
||||
require("setup")
|
||||
|
||||
37
nvim/lazy-lock.json
Normal file
37
nvim/lazy-lock.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"gitlinker.nvim": { "branch": "master", "commit": "bbe2a1254fc8fce21f3bbf9a020266a1c49799f7" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"linediff.vim": { "branch": "main", "commit": "29fa617fc10307a1e0ae82a8761114e465d17b06" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"mini.files": { "branch": "main", "commit": "57eb96a828f80efb8095a611e3aafcfa43548f8b" },
|
||||
"neogen": { "branch": "main", "commit": "23e7e9f883d01289ebd90e98025acc860ea26366" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "dc2f86d2b66a6e01a98c37cdadd3be3e90f8ab9a" },
|
||||
"nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "9a8e39993e3b895601bf8227124a48ea8268149e" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "213c23ae45a04797572242568d5d51937181792d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
|
||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "8ad632f793fd437865f99af5684f78300dac93fb" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
|
||||
"vim-rhubarb": { "branch": "master", "commit": "5496d7c94581c4c9ad7430357449bb57fc59f501" },
|
||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||
"vimtex": { "branch": "master", "commit": "82d2305ff71dfb3bd91602534cc9bb9a195bcb38" }
|
||||
}
|
||||
69
nvim/lua/mappings.lua
Normal file
69
nvim/lua/mappings.lua
Normal file
@@ -0,0 +1,69 @@
|
||||
local u = require("utils")
|
||||
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
vim.keymap.set("n", "<leader>h", ":noh<CR>")
|
||||
|
||||
--move line shortcut
|
||||
vim.keymap.set("n", "<M-j>", ":m +1<CR>==", {noremap = true})
|
||||
vim.keymap.set("n", "<M-k>", ":m -2<CR>==", {noremap = true})
|
||||
|
||||
vim.keymap.set("v", "<M-j>", ":m '>+1<CR>gv=gv", {noremap = true})
|
||||
vim.keymap.set("v", "<M-k>", ":m '<-2<CR>gv=gv", {noremap = true})
|
||||
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz", {noremap = true})
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz", {noremap = true})
|
||||
|
||||
vim.keymap.set("x", "<leader>p", "\"_dP")
|
||||
|
||||
--tab buffer
|
||||
vim.keymap.set("n", "<leader>fn", ":bnext<CR>", {noremap = true})
|
||||
vim.keymap.set("n", "<leader>fp", ":bprev<CR>", {noremap = true})
|
||||
|
||||
-- wrap toggle
|
||||
vim.keymap.set("n", "<leader>w", function() vim.o.wrap = not vim.o.wrap end, {noremap = true})
|
||||
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
|
||||
-- Diff mappings put/get then move to next change
|
||||
-- u.nmap("<leader>dg", "<CMD>diffget<CR>]c")
|
||||
-- u.nmap("<leader>dp", "<CMD>diffput<CR>]c")
|
||||
--
|
||||
-- u.nmap("<leader>dp", "<CMD>diffput<CR>]c")
|
||||
--
|
||||
-- -- Remap movement to move by column layout
|
||||
-- u.nvmap("j", "gj")
|
||||
-- u.nvmap("k", "gk")
|
||||
--
|
||||
-- u.nvmap(";", ":")
|
||||
|
||||
-- Window splitting remap"
|
||||
u.nmap("<C-h>", "<C-w>h")
|
||||
u.nmap("<C-k>", "<C-w>k")
|
||||
u.nmap("<C-l>", "<C-w>l")
|
||||
u.nmap("<C-j>", "<C-w>j")
|
||||
-- u.nmap("<C-w>z", ":cclose<CR>")
|
||||
--
|
||||
-- -- Exit terminal insert mode
|
||||
-- u.tmap("<Esc>", "<C-\\><C-n>")
|
||||
--
|
||||
-- -- Delete buffer without closing the window
|
||||
-- u.nmap("<leader>q", ":bp<bar>sp<bar>bn<bar>bd<CR>")
|
||||
--
|
||||
-- Fugitive
|
||||
-- u.nmap("<leader>gw", ":Gwrite<CR>")
|
||||
-- u.nmap("<leader>gr", ":Gread<CR>")
|
||||
-- u.nmap("<leader>gc", ":Git commit -v<CR>")
|
||||
-- u.nmap("<leader>gC", ":Git commit -v --amend<CR>")
|
||||
-- u.nmap("<leader>gs", ":Git<CR>")
|
||||
-- u.nmap("<leader>gd", ":Gdiff<CR>")
|
||||
u.nmap("<leader>gb", ":Git blame<CR>")
|
||||
|
||||
u.nmap("<leader>rl", ":RustFmt<CR>")
|
||||
|
||||
vim.keymap.set("n", "<leader>ri", function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({0}), {0}) end)
|
||||
u.nmap("<leader>d", ":lua vim.lsp.buf.hover()<CR>")
|
||||
|
||||
|
||||
require("telescope-config")
|
||||
require("minifiles-config")
|
||||
require("vimtex-config")
|
||||
52
nvim/lua/minifiles-config.lua
Normal file
52
nvim/lua/minifiles-config.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
require('mini.files').setup({
|
||||
-- Customization of shown content
|
||||
content = {
|
||||
-- Predicate for which file system entries to show
|
||||
filter = nil,
|
||||
-- What prefix to show to the left of file system entry
|
||||
prefix = nil,
|
||||
-- In which order to show file system entries
|
||||
sort = nil,
|
||||
},
|
||||
|
||||
-- Module mappings created only inside explorer.
|
||||
-- Use `''` (empty string) to not create one.
|
||||
mappings = {
|
||||
close = 'q',
|
||||
go_in = 'l',
|
||||
go_in_plus = 'L',
|
||||
go_out = 'h',
|
||||
go_out_plus = 'H',
|
||||
reset = '<BS>',
|
||||
reveal_cwd = '@',
|
||||
show_help = 'g?',
|
||||
synchronize = '=',
|
||||
trim_left = '<',
|
||||
trim_right = '>',
|
||||
},
|
||||
|
||||
-- General options
|
||||
options = {
|
||||
-- Whether to delete permanently or move into module-specific trash
|
||||
permanent_delete = true,
|
||||
-- Whether to use for editing directories
|
||||
use_as_default_explorer = true,
|
||||
},
|
||||
|
||||
-- Customization of explorer windows
|
||||
windows = {
|
||||
-- Maximum number of windows to show side by side
|
||||
max_number = math.huge,
|
||||
-- Whether to show preview of file/directory under cursor
|
||||
preview = false,
|
||||
-- Width of focused window
|
||||
width_focus = 50,
|
||||
-- Width of non-focused window
|
||||
width_nofocus = 15,
|
||||
-- Width of preview window
|
||||
width_preview = 25,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "-", '<CMD>lua MiniFiles.open(vim.api.nvim_buf_get_name(0)); MiniFiles.reveal_cwd()<CR>', { desc = 'Open MiniFiles' })
|
||||
vim.keymap.set("n", "<ESC>", '<CMD>lua MiniFiles.close()<CR>', { desc = 'Close MiniFiles' })
|
||||
93
nvim/lua/packer-plugins.lua
Normal file
93
nvim/lua/packer-plugins.lua
Normal file
@@ -0,0 +1,93 @@
|
||||
return require('packer').startup(function()
|
||||
use 'wbthomason/packer.nvim'
|
||||
use 'sonph/onehalf'
|
||||
use 'navarasu/onedark.nvim'
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.4',
|
||||
-- or , branch = '0.1.x',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
|
||||
require('onedark').setup {
|
||||
style = 'darker'
|
||||
}
|
||||
require('onedark').load()
|
||||
-- use({
|
||||
-- 'rose-pine/neovim',
|
||||
-- as = 'rose-pine',
|
||||
-- config = function()
|
||||
-- vim.cmd('colorscheme rose-pine')
|
||||
-- end
|
||||
-- })
|
||||
|
||||
use {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
'neovim/nvim-lspconfig'
|
||||
}
|
||||
use 'hrsh7th/nvim-cmp' -- Autocompletion plugin
|
||||
use 'hrsh7th/cmp-nvim-lsp' -- Autocompletion with LSPs
|
||||
use 'hrsh7th/cmp-buffer'
|
||||
use 'hrsh7th/cmp-path'
|
||||
|
||||
use {'neoclide/coc.nvim', branch = 'release'}
|
||||
|
||||
use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
|
||||
|
||||
--use {
|
||||
-- 'VonHeikemen/lsp-zero.nvim',
|
||||
-- branch = 'v2.x',
|
||||
-- requires = {
|
||||
-- -- LSP Support
|
||||
-- {'neovim/nvim-lspconfig'},
|
||||
-- {'williamboman/mason.nvim', run = function()
|
||||
-- pcall(vim.cmd, 'MasonUpdate')
|
||||
-- end,},
|
||||
-- {'williamboman/mason-lspconfig.nvim'}, -- Optional
|
||||
|
||||
-- -- Autocompletion
|
||||
-- {'hrsh7th/nvim-cmp'}, -- Required
|
||||
-- {'hrsh7th/cmp-nvim-lsp'}, -- Required
|
||||
-- {'L3MON4D3/LuaSnip'}, -- Required
|
||||
-- }
|
||||
--}
|
||||
|
||||
-- Auto pairs
|
||||
use {
|
||||
"windwp/nvim-autopairs",
|
||||
config = function() require("nvim-autopairs").setup {} end
|
||||
}
|
||||
|
||||
--harpoon
|
||||
use("theprimeagen/harpoon")
|
||||
|
||||
---- neogen
|
||||
--local i = require("neogen.types.template").item
|
||||
--local annotation = {
|
||||
-- { nil, "/**", { no_results = true, type = { "func", "file", "class" } } },
|
||||
-- { nil, "** \\file", { no_results = true, type = { "file" } } },
|
||||
-- { nil, "** \\brief $1", { no_results = true, type = { "func", "file", "class" } } },
|
||||
-- { nil, "*/", { no_results = true, type = { "func", "file", "class" } } },
|
||||
-- { nil, "", { no_results = true, type = { "file" } } },
|
||||
|
||||
-- { nil, "/**", { type = { "func", "class", "type" } } },
|
||||
-- { i.ClassName, "** @class %s", { type = { "class" } } },
|
||||
-- { i.Type, "** @typedef %s", { type = { "type" } } },
|
||||
-- { nil, "** \\brief $1", { type = { "func", "class", "type" } } },
|
||||
-- { nil, "**", { type = { "func", "class", "type" } } },
|
||||
-- { i.Tparam, "** \\tparam %s $1" },
|
||||
-- { i.Parameter, "** \\param %s $1" },
|
||||
-- { i.Return, "** \\return $1" },
|
||||
-- { nil, "*/", { type = { "func", "class", "type" } } },
|
||||
--}
|
||||
--require("neogen").setup({
|
||||
-- languages = {
|
||||
-- c = {
|
||||
-- template = {
|
||||
-- annotation_convention = "my_annotation",
|
||||
-- my_annotation = annotation
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
--})
|
||||
end)
|
||||
6
nvim/lua/plugins/navic.lua
Normal file
6
nvim/lua/plugins/navic.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
{
|
||||
"SmiteshP/nvim-navic",
|
||||
requires = "neovim/nvim-lspconfig"
|
||||
}
|
||||
}
|
||||
246
nvim/lua/plugins/plugins.lua
Normal file
246
nvim/lua/plugins/plugins.lua
Normal file
@@ -0,0 +1,246 @@
|
||||
return {
|
||||
-- Theme
|
||||
{
|
||||
-- Theme inspired by Atom
|
||||
'navarasu/onedark.nvim',
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('onedark').setup {
|
||||
-- Set a style preset. 'dark' is default.
|
||||
style = 'dark', -- dark, darker, cool, deep, warm, warmer, light
|
||||
hightlights = {
|
||||
Comment = { fg = '#5c6370', bg = 'NONE', fmt = 'italic' }, -- gray foreground
|
||||
["@comment"] = { fg = '#5c6370', bg = 'NONE', fmt = 'italic' }, -- gray foreground
|
||||
["@comment.go"] = { fg = '#5c6370', fmt = 'italic' },
|
||||
}
|
||||
}
|
||||
require('onedark').load()
|
||||
|
||||
-- Force override after theme loads
|
||||
vim.schedule(function()
|
||||
local comment_gray = '#5c6370'
|
||||
vim.api.nvim_set_hl(0, 'Comment', { fg = comment_gray, italic = true })
|
||||
vim.api.nvim_set_hl(0, '@comment', { fg = comment_gray, italic = true })
|
||||
vim.api.nvim_set_hl(0, '@comment.go', { fg = comment_gray, italic = true })
|
||||
vim.api.nvim_set_hl(0, '@comment.documentation', { fg = comment_gray, italic = true })
|
||||
vim.api.nvim_set_hl(0, 'SpecialComment', { fg = comment_gray, italic = true })
|
||||
vim.api.nvim_set_hl(0, '@lsp.type.comment', { fg = comment_gray, italic = true })
|
||||
end)
|
||||
|
||||
end,
|
||||
},
|
||||
|
||||
-- Icons (used by telescope, mini.files, etc.)
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
|
||||
-- Vim plugins
|
||||
"windwp/nvim-autopairs",
|
||||
|
||||
-- Git
|
||||
"tpope/vim-fugitive",
|
||||
"tpope/vim-rhubarb",
|
||||
{
|
||||
"linrongbin16/gitlinker.nvim",
|
||||
cmd = "GitLink",
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<leader>gy", "<cmd>GitLink<cr>", mode = { "n", "v" }, desc = "Yank git link" },
|
||||
{ "<leader>gY", "<cmd>GitLink!<cr>", mode = { "n", "v" }, desc = "Open git link" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Vim
|
||||
{
|
||||
"lervag/vimtex",
|
||||
lazy = false, -- we don't want to lazy load VimTeX
|
||||
-- tag = "v2.15", -- uncomment to pin to a specific release
|
||||
init = function()
|
||||
-- VimTeX configuration goes here, e.g.
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
end
|
||||
},
|
||||
|
||||
|
||||
"tpope/vim-commentary",
|
||||
"tpope/vim-surround",
|
||||
-- "christoomey/vim-tmux-navigator",
|
||||
"AndrewRadev/linediff.vim",
|
||||
{ "echasnovski/mini.files", version = false },
|
||||
|
||||
|
||||
-- Nvim plugins
|
||||
{"nvim-treesitter/nvim-treesitter", branch = 'master', lazy = false, build = ":TSUpdate"},
|
||||
{ "nvim-treesitter/nvim-treesitter-context" },
|
||||
'danymat/neogen',
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip"
|
||||
},
|
||||
config = function()
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
completion = {
|
||||
autocomplete = { require('cmp.types').cmp.TriggerEvent.TextChanged },
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert ({
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<s-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<c-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select=true }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-path",
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim"
|
||||
},
|
||||
config = function()
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
require('mason').setup()
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = { "pyright", "gopls" },
|
||||
handlers = {
|
||||
-- Default handler for all servers
|
||||
function(server_name)
|
||||
require('lspconfig')[server_name].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
-- gopls with Go-specific settings
|
||||
["gopls"] = function()
|
||||
require('lspconfig').gopls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
staticcheck = true,
|
||||
gofumpt = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
"nvim-lua/plenary.nvim",
|
||||
-- "jose-elias-alvarez/null-ls.nvim",
|
||||
-- "jose-elias-alvarez/typescript.nvim",
|
||||
-- "iamcco/markdown-preview.nvim", -- { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
|
||||
-- { "olimorris/persisted.nvim", dev = true },
|
||||
-- "folke/tokyonight.nvim", -- { 'branch': 'main' }
|
||||
"lewis6991/gitsigns.nvim",
|
||||
"williamboman/mason.nvim", -- { 'do': ':MasonUpdate' }
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
{
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
opts = {
|
||||
menu = {
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>q',
|
||||
function()
|
||||
require('harpoon'):list():add()
|
||||
end,
|
||||
desc = 'Harpoon File',
|
||||
},
|
||||
{
|
||||
'<C-e>',
|
||||
function()
|
||||
local harpoon = require('harpoon')
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end,
|
||||
desc = 'Harpoon Quick Menu',
|
||||
},
|
||||
{
|
||||
'<M-q>',
|
||||
function()
|
||||
require('harpoon'):list():select(1)
|
||||
end,
|
||||
desc = 'Harpoon to File 1',
|
||||
},
|
||||
{
|
||||
'<M-w>',
|
||||
function()
|
||||
require('harpoon'):list():select(2)
|
||||
end,
|
||||
desc = 'Harpoon to File 2',
|
||||
},
|
||||
{
|
||||
'<M-e>',
|
||||
function()
|
||||
require('harpoon'):list():select(3)
|
||||
end,
|
||||
desc = 'Harpoon to File 3',
|
||||
},
|
||||
{
|
||||
'<M-r>',
|
||||
function()
|
||||
require('harpoon'):list():select(4)
|
||||
end,
|
||||
desc = 'Harpoon to File 4',
|
||||
},
|
||||
{
|
||||
'<M-t>',
|
||||
function()
|
||||
require('harpoon'):list():select(5)
|
||||
end,
|
||||
desc = 'Harpoon to File 5',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
122
nvim/lua/plugins/rust-tools.lua
Normal file
122
nvim/lua/plugins/rust-tools.lua
Normal file
@@ -0,0 +1,122 @@
|
||||
local opts = {
|
||||
tools = { -- rust-tools options
|
||||
|
||||
-- how to execute terminal commands
|
||||
-- options right now: termopen / quickfix / toggleterm / vimux
|
||||
-- executor = require("rust-tools.executors").termopen,
|
||||
|
||||
-- callback to execute once rust-analyzer is done initializing the workspace
|
||||
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"
|
||||
on_initialized = nil,
|
||||
|
||||
-- automatically call RustReloadWorkspace when writing to a Cargo.toml file.
|
||||
reload_workspace_from_cargo_toml = true,
|
||||
|
||||
-- These apply to the default RustSetInlayHints command
|
||||
inlay_hints = {
|
||||
-- automatically set inlay hints (type hints)
|
||||
-- default: true
|
||||
auto = false,
|
||||
|
||||
-- Only show inlay hints for the current line
|
||||
only_current_line = false,
|
||||
|
||||
-- whether to show parameter hints with the inlay hints or not
|
||||
-- default: true
|
||||
show_parameter_hints = true,
|
||||
|
||||
-- prefix for parameter hints
|
||||
-- default: "<-"
|
||||
parameter_hints_prefix = "<- ",
|
||||
|
||||
-- prefix for all the other hints (type, chaining)
|
||||
-- default: "=>"
|
||||
other_hints_prefix = "=> ",
|
||||
|
||||
-- whether to align to the length of the longest line in the file
|
||||
max_len_align = false,
|
||||
|
||||
-- padding from the left if max_len_align is true
|
||||
max_len_align_padding = 1,
|
||||
|
||||
-- whether to align to the extreme right or not
|
||||
right_align = false,
|
||||
|
||||
-- padding from the right if right_align is true
|
||||
right_align_padding = 7,
|
||||
|
||||
-- The color of the hints
|
||||
highlight = "Comment",
|
||||
},
|
||||
|
||||
-- options same as lsp hover / vim.lsp.util.open_floating_preview()
|
||||
hover_actions = {
|
||||
|
||||
-- the border that is used for the hover window
|
||||
-- see vim.api.nvim_open_win()
|
||||
border = {
|
||||
{ "╭", "FloatBorder" },
|
||||
{ "─", "FloatBorder" },
|
||||
{ "╮", "FloatBorder" },
|
||||
{ "│", "FloatBorder" },
|
||||
{ "╯", "FloatBorder" },
|
||||
{ "─", "FloatBorder" },
|
||||
{ "╰", "FloatBorder" },
|
||||
{ "│", "FloatBorder" },
|
||||
},
|
||||
|
||||
-- Maximal width of the hover window. Nil means no max.
|
||||
max_width = nil,
|
||||
|
||||
-- Maximal height of the hover window. Nil means no max.
|
||||
max_height = nil,
|
||||
|
||||
-- whether the hover action window gets automatically focused
|
||||
-- default: false
|
||||
auto_focus = false,
|
||||
},
|
||||
},
|
||||
|
||||
-- all the opts to send to nvim-lspconfig
|
||||
-- these override the defaults set by rust-tools.nvim
|
||||
-- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer
|
||||
server = {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
-- cargo = {
|
||||
-- features = "all",
|
||||
-- check = {
|
||||
-- overrideCommand = {
|
||||
-- "cargo check --quiet --message-format=json --all-targets",
|
||||
-- },
|
||||
-- },
|
||||
-- buildScripts = {
|
||||
-- overideCommand = {
|
||||
-- "cargo check --quiet --message-format=json --all-targets",
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
},
|
||||
},
|
||||
|
||||
on_attach = function(client, bufnr)
|
||||
if client.server_capabilities.inlayHintProvider then
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
|
||||
-- vim.api.nvim_set_keymap("n", "<leader>ri", "<CMD>lua vim.lsp.inlay_hint(0)<CR>", { noremap = true })
|
||||
end
|
||||
end,
|
||||
}, -- rust-analyzer options
|
||||
|
||||
-- debugging stuff
|
||||
-- dap = {
|
||||
-- adapter = {
|
||||
-- type = "executable",
|
||||
-- command = "lldb-vscode",
|
||||
-- name = "rt_lldb",
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
|
||||
return {
|
||||
{ "simrat39/rust-tools.nvim" },
|
||||
}
|
||||
34
nvim/lua/plugins/telescope.lua
Normal file
34
nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{
|
||||
|
||||
"nvim-telescope/telescope-live-grep-args.nvim" ,
|
||||
-- This will not install any breaking changes.
|
||||
-- For major updates, this must be adjusted manually.
|
||||
version = "^1.0.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
{
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
|
||||
-- first setup telescope
|
||||
telescope.setup({
|
||||
-- your config
|
||||
})
|
||||
|
||||
-- then load the extension
|
||||
telescope.load_extension("live_grep_args")
|
||||
end
|
||||
-- "debugloop/telescope-undo.nvim",
|
||||
-- "nvim-telescope/telescope-ui-select.nvim",
|
||||
}
|
||||
48
nvim/lua/settings.lua
Normal file
48
nvim/lua/settings.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
local opt = vim.o-- global options
|
||||
|
||||
vim.lsp.log.set_level("off")
|
||||
|
||||
-- Theme
|
||||
-- Options
|
||||
opt.relativenumber = true
|
||||
opt.colorcolumn = "80"
|
||||
opt.number = true
|
||||
opt.tabstop = 2
|
||||
opt.softtabstop = 2
|
||||
opt.shiftwidth = 2
|
||||
opt.expandtab = true
|
||||
opt.smartindent = true
|
||||
|
||||
-- Make line numbers default
|
||||
vim.wo.number = true
|
||||
|
||||
-- Enable mouse mode
|
||||
opt.mouse = 'a'
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
opt.clipboard = 'unnamedplus'
|
||||
|
||||
-- Enable break indent
|
||||
opt.breakindent = true
|
||||
|
||||
-- Save undo history
|
||||
opt.undofile = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.wo.signcolumn = 'yes'
|
||||
|
||||
-- Decrease update time
|
||||
opt.updatetime = 250
|
||||
opt.timeoutlen = 300
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
opt.completeopt = 'menuone,noselect'
|
||||
|
||||
--ignore case if pattern doesn't contain upper case
|
||||
opt.ignorecase = true
|
||||
opt.smartcase = true
|
||||
|
||||
--number of line to show around the cursor
|
||||
opt.scrolloff = 8
|
||||
|
||||
-- vim.g.rustfmt_autosave = 1
|
||||
90
nvim/lua/setup.lua
Normal file
90
nvim/lua/setup.lua
Normal file
@@ -0,0 +1,90 @@
|
||||
-- nvim-autopairs
|
||||
require("nvim-autopairs").setup()
|
||||
|
||||
-- gitsigns
|
||||
require("gitsigns").setup()
|
||||
|
||||
require'treesitter-context'.setup{
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
multiwindow = false, -- Enable multiwindow support.
|
||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||
line_numbers = true,
|
||||
multiline_threshold = 20, -- Maximum number of lines to show for a single context
|
||||
trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||
separator = nil,
|
||||
zindex = 20, -- The Z-index of the context window
|
||||
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
|
||||
}
|
||||
|
||||
-- Tree sitter
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"c", "cpp", "go", "lua", "markdown", "python", "rust", "tsx", "typescript", "vim"
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
context_commentstring = { enable = true },
|
||||
playground = { enable = true },
|
||||
query_linter = { enable = true },
|
||||
locals = { enable = true },
|
||||
})
|
||||
|
||||
-- Telescope
|
||||
local actions = require("telescope.actions")
|
||||
local previewers = require("telescope.previewers")
|
||||
local builtin = require("telescope.builtin")
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("telescope").load_extension("fzf")
|
||||
|
||||
-- Disable underline
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
underline = false,
|
||||
})
|
||||
|
||||
require('neogen').setup {}
|
||||
vim.keymap.set('n', '<leader>ne', ':lua require("neogen").generate()<CR>', { desc = '[G]enerate [D]ocumentation' })
|
||||
|
||||
-- Key bindings
|
||||
|
||||
-- common lsp
|
||||
vim.api.nvim_set_keymap("n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", { silent = true })
|
||||
vim.keymap.set("n", "gr", "<cmd>Telescope lsp_references<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<space>k", "<cmd>lua vim.lsp.buf.signature_help()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<space>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<space>t", "<cmd>lua vim.lsp.buf.format()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<space>wl",
|
||||
"<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>",
|
||||
{ silent = true }
|
||||
)
|
||||
vim.api.nvim_set_keymap("n", "<space>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<space>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<space>e", "<cmd>lua vim.diagnostic.open_float()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<CR>", { silent = true })
|
||||
vim.api.nvim_set_keymap("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<CR>", { silent = true })
|
||||
24
nvim/lua/telescope-config.lua
Normal file
24
nvim/lua/telescope-config.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
local telescope = require('telescope')
|
||||
local lga_actions = require("telescope-live-grep-args.actions")
|
||||
local builtin = require('telescope.builtin')
|
||||
local live_grep_args_shortcuts = require("telescope-live-grep-args.shortcuts")
|
||||
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
['<C-u>'] = false,
|
||||
['<C-d>'] = false,
|
||||
["<C-k>"] = lga_actions.quote_prompt(),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
telescope.load_extension("live_grep_args")
|
||||
|
||||
vim.keymap.set('n', '<leader>pf', builtin.find_files, {noremap = true})
|
||||
vim.keymap.set("n", "<leader>pg", telescope.extensions.live_grep_args.live_grep_args)
|
||||
-- vim.keymap.set('n', '<leader>lg', builtin.live_grep, {noremap = true})
|
||||
vim.keymap.set('n', '<leader>gs', builtin.grep_string, {noremap = true})
|
||||
|
||||
vim.keymap.set("n", "<leader>pw", live_grep_args_shortcuts.grep_word_under_cursor)
|
||||
27
nvim/lua/utils.lua
Normal file
27
nvim/lua/utils.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
local M = {}
|
||||
|
||||
M.map = function(mode, shortcut, command)
|
||||
vim.keymap.set(mode, shortcut, command, { noremap = true, silent = true })
|
||||
end
|
||||
|
||||
M.nmap = function(shortcut, command)
|
||||
M.map("n", shortcut, command)
|
||||
end
|
||||
|
||||
M.imap = function(shortcut, command)
|
||||
M.map("i", shortcut, command)
|
||||
end
|
||||
|
||||
M.vmap = function(shortcut, command)
|
||||
M.map("v", shortcut, command)
|
||||
end
|
||||
|
||||
M.nvmap = function(shortcut, command)
|
||||
M.map({ "n", "v" }, shortcut, command)
|
||||
end
|
||||
|
||||
M.tmap = function(shortcut, command)
|
||||
M.map("t", shortcut, command)
|
||||
end
|
||||
|
||||
return M
|
||||
46
nvim/lua/vimtex-config.lua
Normal file
46
nvim/lua/vimtex-config.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
-- " This is necessary for VimTeX to load properly. The "indent" is optional.
|
||||
-- " Note: Most plugin managers will do this automatically!
|
||||
-- filetype plugin indent on
|
||||
|
||||
-- " This enables Vim's and neovim's syntax-related features. Without this, some
|
||||
-- " VimTeX features will not work (see ":help vimtex-requirements" for more
|
||||
-- " info).
|
||||
-- " Note: Most plugin managers will do this automatically!
|
||||
-- syntax enable
|
||||
|
||||
-- " Viewer options: One may configure the viewer either by specifying a built-in
|
||||
-- " viewer method:
|
||||
-- let g:vimtex_view_method = 'zathura'
|
||||
|
||||
-- " Or with a generic interface:
|
||||
-- let g:vimtex_view_general_viewer = 'okular'
|
||||
-- let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
|
||||
|
||||
-- " VimTeX uses latexmk as the default compiler backend. If you use it, which is
|
||||
-- " strongly recommended, you probably don't need to configure anything. If you
|
||||
-- " want another compiler backend, you can change it as follows. The list of
|
||||
-- " supported backends and further explanation is provided in the documentation,
|
||||
-- " see ":help vimtex-compiler".
|
||||
-- let g:vimtex_compiler_method = 'latexrun'
|
||||
|
||||
-- " Most VimTeX mappings rely on localleader and this can be changed with the
|
||||
-- " following line. The default is usually fine and is the symbol "\".
|
||||
vim.cmd("filetype plugin indent on")
|
||||
vim.cmd("syntax enable")
|
||||
vim.g.vimtex_view_method = 'zathura'
|
||||
vim.g.vimtex_compiler_method = 'latexrun'
|
||||
vim.g.vimtex_toc_config = {
|
||||
name = 'TOC',
|
||||
layers = { 'content', 'todo', 'include' },
|
||||
resize = 1,
|
||||
split_width = 50,
|
||||
todo_sorted = 0,
|
||||
show_help = 1,
|
||||
show_numbers = 1,
|
||||
mode = 2,
|
||||
}
|
||||
-- Key mappings
|
||||
vim.api.nvim_set_keymap('n', '<leader>m', ':VimtexTocOpen<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>v', ':VimtexView<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>c', ':VimtexCompile<CR>', { noremap = true, silent = true })
|
||||
|
||||
11
nvim/plugin/harpoon.lua
Normal file
11
nvim/plugin/harpoon.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup()
|
||||
--
|
||||
-- vim.keymap.set("n", "<leader>q", function() harpoon:list().append() end)
|
||||
-- vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
--
|
||||
-- vim.keymap.set("n", "<M-q>", function() harpoon:list():select(1) end)
|
||||
-- vim.keymap.set("n", "<M-w>", function() harpoon:list():select(2) end)
|
||||
-- vim.keymap.set("n", "<M-e>", function() harpoon:list():select(3) end)
|
||||
-- vim.keymap.set("n", "<M-r>", function() harpoon:list():select(4) end)
|
||||
-- vim.keymap.set("n", "<M-t>", function() harpoon:list():select(5) end)
|
||||
52
nvim/plugin/minifiles.lua
Normal file
52
nvim/plugin/minifiles.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
require('mini.files').setup({
|
||||
-- Customization of shown content
|
||||
content = {
|
||||
-- Predicate for which file system entries to show
|
||||
filter = nil,
|
||||
-- What prefix to show to the left of file system entry
|
||||
prefix = nil,
|
||||
-- In which order to show file system entries
|
||||
sort = nil,
|
||||
},
|
||||
|
||||
-- Module mappings created only inside explorer.
|
||||
-- Use `''` (empty string) to not create one.
|
||||
mappings = {
|
||||
close = 'q',
|
||||
go_in = 'l',
|
||||
go_in_plus = 'L',
|
||||
go_out = 'h',
|
||||
go_out_plus = 'H',
|
||||
reset = '<BS>',
|
||||
reveal_cwd = '@',
|
||||
show_help = 'g?',
|
||||
synchronize = '=',
|
||||
trim_left = '<',
|
||||
trim_right = '>',
|
||||
},
|
||||
|
||||
-- General options
|
||||
options = {
|
||||
-- Whether to delete permanently or move into module-specific trash
|
||||
permanent_delete = true,
|
||||
-- Whether to use for editing directories
|
||||
use_as_default_explorer = true,
|
||||
},
|
||||
|
||||
-- Customization of explorer windows
|
||||
windows = {
|
||||
-- Maximum number of windows to show side by side
|
||||
max_number = math.huge,
|
||||
-- Whether to show preview of file/directory under cursor
|
||||
preview = false,
|
||||
-- Width of focused window
|
||||
width_focus = 50,
|
||||
-- Width of non-focused window
|
||||
width_nofocus = 15,
|
||||
-- Width of preview window
|
||||
width_preview = 25,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "-", '<CMD>lua MiniFiles.open(vim.api.nvim_buf_get_name(0)); MiniFiles.reveal_cwd()<CR>', { desc = 'Open MiniFiles' })
|
||||
vim.keymap.set("n", "<ESC>", '<CMD>lua MiniFiles.close()<CR>', { desc = 'Close MiniFiles' })
|
||||
50
nvim/plugin/rustaceanvim.lua
Normal file
50
nvim/plugin/rustaceanvim.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
-- vim.g.auto_ra_attach = true
|
||||
--
|
||||
-- vim.g.rustaceanvim = {
|
||||
-- -- Plugin configuration
|
||||
-- tools = {},
|
||||
-- -- LSP configuration
|
||||
-- ---@type RustaceanLspClientOpts
|
||||
-- server = {
|
||||
-- load_vscode_settings = true,
|
||||
-- auto_attach = function(bufnr)
|
||||
-- return vim.g.auto_ra_attach
|
||||
-- end,
|
||||
-- on_attach = function(client, _)
|
||||
-- client.server_capabilities.workspace.didChangeWatchedFiles = {
|
||||
-- dynamicRegistration = false,
|
||||
-- relativePatternSupport = false,
|
||||
-- }
|
||||
--
|
||||
-- vim.api.nvim_create_autocmd({ 'BufEnter' }, {
|
||||
-- desc = 'Resize splits when resizing the window',
|
||||
-- pattern = { '*.rs' },
|
||||
-- callback = function()
|
||||
-- vim.cmd('RustAnalyzer reloadSettings')
|
||||
-- end,
|
||||
-- })
|
||||
-- end,
|
||||
-- default_settings = {
|
||||
-- ['rust-analyzer'] = {
|
||||
-- cachePriming = false,
|
||||
-- rustfmt = {
|
||||
-- extraArgs = {
|
||||
-- '--config',
|
||||
-- 'comment_width=120,condense_wildcard_suffixes=false,format_code_in_doc_comments=true,format_macro_bodies=true,hex_literal_case=Upper,imports_granularity=One,normalize_doc_attributes=true,wrap_comments=true',
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- -- DAP configuration
|
||||
-- dap = {},
|
||||
-- }
|
||||
--
|
||||
-- return {
|
||||
-- {
|
||||
-- 'mrcjkb/rustaceanvim',
|
||||
-- version = '^4', -- Recommended
|
||||
-- ft = { 'rust' },
|
||||
-- dev = true,
|
||||
-- },
|
||||
-- }
|
||||
18
nvim/plugin/telescope.lua
Normal file
18
nvim/plugin/telescope.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
-- [[ Configure Telescope ]]
|
||||
-- See `:help telescope` and `:help telescope.setup()`
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
['<C-u>'] = false,
|
||||
['<C-d>'] = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
vim.keymap.set('n', '<leader>pf', builtin.find_files, {noremap = true})
|
||||
vim.keymap.set('n', '<leader>pg', builtin.live_grep, {noremap = true})
|
||||
vim.keymap.set('n', '<C-p>', builtin.git_files, {noremap = true})
|
||||
Reference in New Issue
Block a user