Compare commits

...

5 Commits

Author SHA1 Message Date
Robert Kmieć
05e8624509 Gdb: ignore c++12 std 2024-02-26 12:58:15 +01:00
Robert Kmieć
fc417a90fd Git: moultiple improvements (mostly optimization) 2024-02-26 12:57:34 +01:00
Robert Kmieć
373581fd36 Vim: simplify config 2024-02-26 12:57:07 +01:00
Robert Kmieć
c55b301dc4 Nvim: update most of the plugins 2024-02-26 12:51:21 +01:00
Robert Kmieć
71f71cb3ce Alacritty: remove old yaml file 2024-02-26 12:49:40 +01:00
38 changed files with 463 additions and 1757 deletions

View File

@@ -1,995 +0,0 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
#import:
# - /path/to/alacritty.yml
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
#TERM: alacritty
window:
# Window dimensions (changes require restart)
#
# Number of lines/columns (not pixels) in the terminal. Both lines and columns
# must be non-zero for this to take effect. The number of columns must be at
# least `2`, while using a value of `0` for columns and lines will fall back
# to the window manager's recommended size
#dimensions:
# columns: 0
# lines: 0
# Window position (changes require restart)
#
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
#position:
# x: 0
# y: 0
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
padding:
x: 15
y: 15
# Spread additional padding evenly around the terminal content.
#dynamic_padding: false
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
#
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background and no title bar buttons
#decorations: full
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
#opacity: 1.0
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
#
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
#startup_mode: Windowed
# Window title
#title: Alacritty
# Allow terminal applications to change Alacritty's window title.
#dynamic_title: true
# Window class (Linux/BSD only):
#class:
# Application instance name
#instance: Alacritty
# General application class
#general: Alacritty
# Decorations theme variant
#
# Override the variant of the System theme/GTK theme/Wayland client side
# decorations. Commonly supported values are `Dark`, `Light`, and `None` for
# auto pick-up. Set this to `None` to use the default theme variant.
#decorations_theme_variant: None
# Resize increments
#
# Prefer resizing window by discrete steps equal to cell dimensions.
#resize_increments: false
# Make `Option` key behave as `Alt` (macOS only):
# - OnlyLeft
# - OnlyRight
# - Both
# - None (default)
#option_as_alt: None
#scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
#history: 10000
# Scrolling distance multiplier.
#multiplier: 3
# Font configuration
font:
# Normal (roman) font face
normal:
# Font family
#
# Default:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
family: iM WritingMonoS Nerd Font
# The `style` can be specified to pick a specific face.
#style: Text
# Bold font face
bold:
# Font family
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
style: Bold
# Italic font face
italic:
# Font family
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
#family: monospace
# The `style` can be specified to pick a specific face.
style: Italic
# Bold italic font face
bold_italic:
# Font family
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
#family:
# The `style` can be specified to pick a specific face.
style: Bold Italic
# Point size
size: 9.0
# Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter
# spacing.
#offset:
# x: 0
# y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the
# right, increasing `y` moves the glyph upward.
#glyph_offset:
# x: 0
# y: 0
# Use built-in font for box drawing characters.
#
# If `true`, Alacritty will use a custom built-in font for box drawing
# characters (Unicode points 2500 - 259f).
#
#builtin_box_drawing: true
# If `true`, bold text is drawn using the bright color variants.
#draw_bold_text_with_bright_colors: false
# Colors (Tomorrow Night)
#colors:
# Default colors
#primary:
# background: '#1d1f21'
# foreground: '#c5c8c6'
# Bright and dim foreground colors
#
# The dimmed foreground color is calculated automatically if it is not
# present. If the bright foreground color is not set, or
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
# color will be used.
#dim_foreground: '#828482'
#bright_foreground: '#eaeaea'
# Cursor colors
#
# Colors which should be used to draw the terminal cursor.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#cursor:
# text: CellBackground
# cursor: CellForeground
# Vi mode cursor colors
#
# Colors for the cursor when the vi mode is active.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#vi_mode_cursor:
# text: CellBackground
# cursor: CellForeground
# Search colors
#
# Colors used for the search bar and match highlighting.
#search:
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#matches:
# foreground: '#000000'
# background: '#ffffff'
#focused_match:
# foreground: '#ffffff'
# background: '#000000'
# Keyboard hints
#hints:
# First character in the hint label
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#start:
# foreground: '#1d1f21'
# background: '#e9ff5e'
# All characters after the first one in the hint label
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#end:
# foreground: '#e9ff5e'
# background: '#1d1f21'
# Line indicator
#
# Color used for the indicator displaying the position in history during
# search and vi mode.
#
# By default, these will use the opposing primary color.
#line_indicator:
# foreground: None
# background: None
# Footer bar
#
# Color used for the footer bar on the bottom, used by search regex input,
# hyperlink URI preview, etc.
#
#footer_bar:
# background: '#c5c8c6'
# foreground: '#1d1f21'
# Selection colors
#
# Colors which should be used to draw the selection area.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
#selection:
# text: CellBackground
# background: CellForeground
# Normal colors
#normal:
# black: '#1d1f21'
# red: '#cc6666'
# green: '#b5bd68'
# yellow: '#f0c674'
# blue: '#81a2be'
# magenta: '#b294bb'
# cyan: '#8abeb7'
# white: '#c5c8c6'
# Bright colors
#bright:
# black: '#666666'
# red: '#d54e53'
# green: '#b9ca4a'
# yellow: '#e7c547'
# blue: '#7aa6da'
# magenta: '#c397d8'
# cyan: '#70c0b1'
# white: '#eaeaea'
# Dim colors
#
# If the dim colors are not set, they will be calculated automatically based
# on the `normal` colors.
#dim:
# black: '#131415'
# red: '#864343'
# green: '#777c44'
# yellow: '#9e824c'
# blue: '#556a7d'
# magenta: '#75617b'
# cyan: '#5b7d78'
# white: '#828482'
# Indexed Colors
#
# The indexed colors include all colors from 16 to 256.
# When these are not set, they're filled with sensible defaults.
#
# Example:
# `- { index: 16, color: '#ff00ff' }`
#
#indexed_colors: []
# Transparent cell backgrounds
#
# Whether or not `window.opacity` applies to all cell backgrounds or only to
# the default background. When set to `true` all cells will be transparent
# regardless of their background color.
#transparent_background_colors: false
# Bell
#
# The bell is rung every time the BEL control character is received.
#bell:
# Visual Bell Animation
#
# Animation effect for flashing the screen when the visual bell is rung.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#animation: EaseOutExpo
# Duration of the visual bell flash in milliseconds. A `duration` of `0` will
# disable the visual bell animation.
#duration: 0
# Visual bell animation color.
#color: '#ffffff'
# Bell Command
#
# This program is executed whenever the bell is rung.
#
# When set to `command: None`, no command will be executed.
#
# Example:
# command:
# program: notify-send
# args: ["Hello, World!"]
#
#command: None
#selection:
# This string contains all characters that are used as separators for
# "semantic words" in Alacritty.
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
#save_to_clipboard: false
#cursor:
# Cursor style
#style:
# Cursor shape
#
# Values for `shape`:
# - ▇ Block
# - _ Underline
# - | Beam
#shape: Block
# Cursor blinking state
#
# Values for `blinking`:
# - Never: Prevent the cursor from ever blinking
# - Off: Disable blinking by default
# - On: Enable blinking by default
# - Always: Force the cursor to always blink
#blinking: Off
# Vi mode cursor style
#
# If the vi mode cursor style is `None` or not specified, it will fall back to
# the style of the active value of the normal cursor.
#
# See `cursor.style` for available options.
#vi_mode_style: None
# Cursor blinking interval in milliseconds.
#blink_interval: 750
# Time after which cursor stops blinking, in seconds.
#
# Specifying '0' will disable timeout for blinking.
#blink_timeout: 5
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
#unfocused_hollow: true
# Thickness of the cursor relative to the cell width as floating point number
# from `0.0` to `1.0`.
#thickness: 0.15
# Live config reload (changes require restart)
#live_config_reload: true
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g.
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
# shell.
#
# Default:
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
# - (Windows) powershell
#shell:
# program: /bin/bash
# args:
# - --login
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
#working_directory: None
# Offer IPC using `alacritty msg` (unix only)
#ipc_socket: true
#mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
#double_click: { threshold: 300 }
#triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
#hide_when_typing: false
# Hints
#
# Terminal hints can be used to find text or hyperlink in the visible part of
# the terminal and pipe it to other applications.
hints:
# Keys used for the hint labels.
#alphabet: "jfkdls;ahgurieowpq"
# List with all available hints
#
# Each hint must have any of `regex` or `hyperlinks` field and either an
# `action` or a `command` field. The fields `mouse`, `binding` and
# `post_processing` are optional.
#
# The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be
# highlighted.
#
# The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and
# `mouse.mods` accept the same values as they do in the `key_bindings` section.
#
# The `mouse.enabled` field controls if the hint should be underlined while
# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
#
# If the `post_processing` field is set to `true`, heuristics will be used to
# shorten the match if there are characters likely not to be part of the hint
# (e.g. a trailing `.`). This is most useful for URIs and applies only to
# `regex` matches.
#
# Values for `action`:
# - Copy
# Copy the hint's text to the clipboard.
# - Paste
# Paste the hint's text to the terminal or search.
# - Select
# Select the hint's text.
# - MoveViModeCursor
# Move the vi mode cursor to the beginning of the hint.
enabled:
- regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
hyperlinks: true
command: xdg-open
post_processing: true
mouse:
enabled: true
mods: Control
# binding:
# key: U
# mods: Control|Shift
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
# bindings further below.
#
# To trigger mouse bindings when an application running within Alacritty
# captures the mouse, the `Shift` modifier is automatically added as a
# requirement.
#
# Each mouse binding will specify a:
#
# - `mouse`:
#
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# - `action` (see key bindings for actions not exclusive to mouse mode)
#
# - Mouse exclusive actions:
#
# - ExpandSelection
# Expand the selection to the current mouse cursor location.
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Right, action: ExpandSelection }
# - { mouse: Right, mods: Control, action: ExpandSelection }
# - { mouse: Middle, mode: ~Vi, action: PasteSelection }
# Key bindings
#
# Key bindings are specified as a list of objects. For example, this is the
# default paste binding:
#
# `- { key: V, mods: Control|Shift, action: Paste }`
#
# Each key binding will specify a:
#
# - `key`: Identifier of the key pressed
#
# - A-Z
# - F1-F24
# - Key0-Key9
#
# A full list with available key codes can be found here:
# https://docs.rs/winit/*/winit/event/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number. This command will allow you to display the hex scancodes
# for certain keys:
#
# `showkey --scancodes`.
#
# Then exactly one of:
#
# - `chars`: Send a byte sequence to the running application
#
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences. To find escape codes for bindings
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
# of tmux. Note that applications use terminfo to map escape sequences back
# to keys. It is therefore required to update the terminfo when changing an
# escape sequence.
#
# - `action`: Execute a predefined action
#
# - ToggleViMode
# - SearchForward
# Start searching toward the right of the search origin.
# - SearchBackward
# Start searching toward the left of the search origin.
# - Copy
# - Paste
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollHalfPageUp
# - ScrollHalfPageDown
# - ScrollLineUp
# - ScrollLineDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# Remove the terminal's scrollback history.
# - Hide
# Hide the Alacritty window.
# - Minimize
# Minimize the Alacritty window.
# - Quit
# Quit Alacritty.
# - ToggleFullscreen
# - ToggleMaximized
# - SpawnNewInstance
# Spawn a new instance of Alacritty.
# - CreateNewWindow
# Create a new Alacritty window from the current process.
# - ClearLogNotice
# Clear Alacritty's UI warning and error notice.
# - ClearSelection
# Remove the active selection.
# - ReceiveChar
# - None
#
# - Vi mode exclusive actions:
#
# - Open
# Perform the action of the first matching hint under the vi mode cursor
# with `mouse.enabled` set to `true`.
# - ToggleNormalSelection
# - ToggleLineSelection
# - ToggleBlockSelection
# - ToggleSemanticSelection
# Toggle semantic selection based on `selection.semantic_escape_chars`.
# - CenterAroundViCursor
# Center view around vi mode cursor
#
# - Vi mode exclusive cursor motion actions:
#
# - Up
# One line up.
# - Down
# One line down.
# - Left
# One character left.
# - Right
# One character right.
# - First
# First column, or beginning of the line when already at the first column.
# - Last
# Last column, or beginning of the line when already at the last column.
# - FirstOccupied
# First non-empty cell in this terminal row, or first non-empty cell of
# the line when already at the first cell of the row.
# - High
# Top of the screen.
# - Middle
# Center of the screen.
# - Low
# Bottom of the screen.
# - SemanticLeft
# Start of the previous semantically separated word.
# - SemanticRight
# Start of the next semantically separated word.
# - SemanticLeftEnd
# End of the previous semantically separated word.
# - SemanticRightEnd
# End of the next semantically separated word.
# - WordLeft
# Start of the previous whitespace separated word.
# - WordRight
# Start of the next whitespace separated word.
# - WordLeftEnd
# End of the previous whitespace separated word.
# - WordRightEnd
# End of the next whitespace separated word.
# - Bracket
# Character matching the bracket at the cursor's location.
# - SearchNext
# Beginning of the next match.
# - SearchPrevious
# Beginning of the previous match.
# - SearchStart
# Start of the match to the left of the vi mode cursor.
# - SearchEnd
# End of the match to the right of the vi mode cursor.
#
# - Search mode exclusive actions:
# - SearchFocusNext
# Move the focus to the next search match.
# - SearchFocusPrevious
# Move the focus to the previous search match.
# - SearchConfirm
# - SearchCancel
# - SearchClear
# Reset the search regex.
# - SearchDeleteWord
# Delete the last word in the search regex.
# - SearchHistoryPrevious
# Go to the previous regex in the search history.
# - SearchHistoryNext
# Go to the next regex in the search history.
#
# - macOS exclusive actions:
# - ToggleSimpleFullscreen
# Enter fullscreen without occupying another space.
#
# - Linux/BSD exclusive actions:
#
# - CopySelection
# Copy from the selection buffer.
# - PasteSelection
# Paste from the selection buffer.
#
# - `command`: Fork and execute a specified command plus arguments
#
# The `command` field must be a map containing a `program` string and an
# `args` array of command line parameter strings. For example:
# `{ program: "alacritty", args: ["-e", "vttest"] }`
#
# And optionally:
#
# - `mods`: Key modifiers to filter binding actions
#
# - Command
# - Control
# - Option
# - Super
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this:
# `mods: Control|Shift`.
# Whitespace and capitalization are relevant and must match the example.
#
# - `mode`: Indicate a binding for only specific terminal reported modes
#
# This is mainly used to send applications the correct escape sequences
# when in different modes.
#
# - AppCursor
# - AppKeypad
# - Search
# - Alt
# - Vi
#
# A `~` operator can be used before a mode to apply the binding whenever
# the mode is *not* active, e.g. `~Alt`.
#
# Bindings are always filled by default, but will be replaced when a new
# binding with the same triggers is defined. To unset a default binding, it can
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
# a no-op if you do not wish to receive input characters for that binding.
#
# If the same trigger is assigned to multiple actions, all of them are executed
# in the order they were defined in.
key_bindings:
- { key: N, mods: Control|Shift, action: SpawnNewInstance }
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp }
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop }
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
# Vi Mode
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
#- { key: Y, mode: Vi|~Search, action: Copy }
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
#- { key: Return, mode: Vi|~Search, action: Open }
#- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor }
#- { key: K, mode: Vi|~Search, action: Up }
#- { key: J, mode: Vi|~Search, action: Down }
#- { key: H, mode: Vi|~Search, action: Left }
#- { key: L, mode: Vi|~Search, action: Right }
#- { key: Up, mode: Vi|~Search, action: Up }
#- { key: Down, mode: Vi|~Search, action: Down }
#- { key: Left, mode: Vi|~Search, action: Left }
#- { key: Right, mode: Vi|~Search, action: Right }
#- { key: Key0, mode: Vi|~Search, action: First }
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
#- { key: W, mode: Vi|~Search, action: SemanticRight }
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
#- { key: N, mode: Vi|~Search, action: SearchNext }
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
# Search Mode
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
#- { key: Escape, mode: Search, action: SearchCancel }
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
#- { key: U, mods: Control, mode: Search, action: SearchClear }
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
#- { key: Down, mode: Search, action: SearchHistoryNext }
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
# (Windows, Linux, and BSD only)
#- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward }
#- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward }
#- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection }
#- { key: Insert, mods: Shift, action: PasteSelection }
#- { key: Key0, mods: Control, action: ResetFontSize }
#- { key: Equals, mods: Control, action: IncreaseFontSize }
#- { key: Plus, mods: Control, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
#- { key: Minus, mods: Control, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
# (Windows only)
#- { key: Return, mods: Alt, action: ToggleFullscreen }
# (macOS only)
#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory }
#- { key: Key0, mods: Command, action: ResetFontSize }
#- { key: Equals, mods: Command, action: IncreaseFontSize }
#- { key: Plus, mods: Command, action: IncreaseFontSize }
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
#- { key: Minus, mods: Command, action: DecreaseFontSize }
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
#- { key: V, mods: Command, action: Paste }
#- { key: C, mods: Command, action: Copy }
#- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection }
#- { key: H, mods: Command, action: Hide }
#- { key: H, mods: Command|Alt, action: HideOtherApplications }
#- { key: M, mods: Command, action: Minimize }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
#- { key: N, mods: Command, action: CreateNewWindow }
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
#debug:
# Display the time it takes to redraw each frame.
#render_timer: false
# Keep the log file after quitting Alacritty.
#persistent_logging: false
# Log level
#
# Values for `log_level`:
# - Off
# - Error
# - Warn
# - Info
# - Debug
# - Trace
#log_level: Warn
# Renderer override.
# - glsl3
# - gles2
# - gles2_pure
#renderer: None
# Print all received window events.
#print_events: false
# Highlight window damage information.
#highlight_damage: false
import:
# - ~/various/alacritty-theme/themes/Cobalt2.yaml
# - ~/various/alacritty-theme/themes/afterglow.yaml
# - ~/various/alacritty-theme/themes/alabaster.yaml
# - ~/various/alacritty-theme/themes/alabaster_dark.yaml
# - ~/various/alacritty-theme/themes/argonaut.yaml
# - ~/various/alacritty-theme/themes/atom_one_light.yaml
# - ~/various/alacritty-theme/themes/ayu_dark.yaml
# - ~/various/alacritty-theme/themes/ayu_light.yaml
# - ~/various/alacritty-theme/themes/base16_default_dark.yaml
# - ~/various/alacritty-theme/themes/blood_moon.yaml
# - ~/various/alacritty-theme/themes/bluish.yaml
# - ~/various/alacritty-theme/themes/breeze.yaml
# - ~/various/alacritty-theme/themes/campbell.yaml
# - ~/various/alacritty-theme/themes/carbonfox.yaml
# - ~/various/alacritty-theme/themes/challenger_deep.yaml
# - ~/various/alacritty-theme/themes/citylights.yaml
# - ~/various/alacritty-theme/themes/cyber_punk_neon.yaml
# - ~/various/alacritty-theme/themes/darcula.yaml
# - ~/various/alacritty-theme/themes/dark_pastels.yaml
# - ~/various/alacritty-theme/themes/doom_one.yaml
# - ~/various/alacritty-theme/themes/dracula.yaml
# - ~/various/alacritty-theme/themes/everforest_dark.yaml
# - ~/various/alacritty-theme/themes/everforest_light.yaml
# - ~/various/alacritty-theme/themes/falcon.yaml
# - ~/various/alacritty-theme/themes/flat_remix.yaml
# - ~/various/alacritty-theme/themes/github_dark_colorblind.yaml
# - ~/various/alacritty-theme/themes/github_dark_default.yaml
# - ~/various/alacritty-theme/themes/github_dark.yaml
# - ~/various/alacritty-theme/themes/github_dimmed.yaml
# - ~/various/alacritty-theme/themes/github_light_colorblind.yaml
# - ~/various/alacritty-theme/themes/github_light_default.yaml
# - ~/various/alacritty-theme/themes/github_light.yaml
# - ~/various/alacritty-theme/themes/gnome_terminal.yaml
# - ~/various/alacritty-theme/themes/gotham.yaml
# - ~/various/alacritty-theme/themes/gruvbox_dark.yaml
# - ~/various/alacritty-theme/themes/gruvbox_light.yaml
- ~/various/alacritty-theme/themes/gruvbox_material.yaml
# - ~/various/alacritty-theme/themes/high_contrast.yaml
# - ~/various/alacritty-theme/themes/horizon-dark.yaml
# - ~/various/alacritty-theme/themes/hyper.yaml
# - ~/various/alacritty-theme/themes/iterm.yaml
# - ~/various/alacritty-theme/themes/konsole_linux.yaml
# - ~/various/alacritty-theme/themes/low_contrast.yaml
# - ~/various/alacritty-theme/themes/Mariana.yaml
# - ~/various/alacritty-theme/themes/material_theme_mod.yaml
# - ~/various/alacritty-theme/themes/material_theme.yaml
# - ~/various/alacritty-theme/themes/monokai_charcoal.yaml
# - ~/various/alacritty-theme/themes/monokai_pro.yaml
# - ~/various/alacritty-theme/themes/moonlight_ii_vscode.yaml
# - ~/various/alacritty-theme/themes/night_owlish_light.yaml
# - ~/various/alacritty-theme/themes/nord.yaml
# - ~/various/alacritty-theme/themes/oceanic_next.yaml
# - ~/various/alacritty-theme/themes/omni.yaml
# - ~/various/alacritty-theme/themes/one_dark.yaml
# - ~/various/alacritty-theme/themes/palenight.yaml
# - ~/various/alacritty-theme/themes/papercolor_dark.yaml
# - ~/various/alacritty-theme/themes/papercolor_light.yaml
# - ~/various/alacritty-theme/themes/papertheme.yaml
# - ~/various/alacritty-theme/themes/pencil_dark.yaml
# - ~/various/alacritty-theme/themes/pencil_light.yaml
# - ~/various/alacritty-theme/themes/rainbow.yaml
# - ~/various/alacritty-theme/themes/remedy_dark.yaml
# - ~/various/alacritty-theme/themes/rose-pine.yaml
# - ~/various/alacritty-theme/themes/seashells.yaml
# - ~/various/alacritty-theme/themes/smoooooth.yaml
# - ~/various/alacritty-theme/themes/snazzy.yaml
# - ~/various/alacritty-theme/themes/solarized_dark.yaml
# - ~/various/alacritty-theme/themes/solarized_light.yaml
# - ~/various/alacritty-theme/themes/srcery.yaml
# - ~/various/alacritty-theme/themes/taerminal.yaml
# - ~/various/alacritty-theme/themes/tango_dark.yaml
# - ~/various/alacritty-theme/themes/tender.yaml
# - ~/various/alacritty-theme/themes/terminal_app.yaml
# - ~/various/alacritty-theme/themes/thelovelace.yaml
# - ~/various/alacritty-theme/themes/tokyo-night-storm.yaml
# - ~/various/alacritty-theme/themes/tokyo-night.yaml
# - ~/various/alacritty-theme/themes/tomorrow_night_bright.yaml
# - ~/various/alacritty-theme/themes/tomorrow_night.yaml
# - ~/various/alacritty-theme/themes/ubuntu.yaml
# - ~/various/alacritty-theme/themes/wombat.yaml
# - ~/various/alacritty-theme/themes/xterm.yaml
# - ~/various/alacritty-theme/themes/zenburm.yaml

View File

@@ -1,14 +1,20 @@
vim.g.loaded = 1 vim.g.loaded = 1
vim.g.loaded_netrwPlugin = 1 -- uncomment to disable netrw, but nvim scp://xx will not work:
-- vim.g.loaded_netrwPlugin = 1
vim.g.plug_install = 0 vim.g.plug_install = 0
vim.opt.termguicolors = true vim.opt.termguicolors = true
vim.opt.startofline = true vim.opt.startofline = true
vim.g.loaded_ruby_provider = 0
vim.g.loaded_perl_provider = 0
vim.opt.conceallevel = 1
vim.opt.shell = '/bin/bash' vim.opt.shell = '/bin/bash'
vim.opt.number = true vim.opt.number = true
--vim.o.relativenumber = 1 --vim.o.relativenumber = 1
vim.opt.numberwidth = 1 vim.opt.numberwidth = 2
vim.opt.clipboard = "unnamedplus" vim.opt.clipboard = "unnamedplus"
vim.opt.showmode = true vim.opt.showmode = true
@@ -68,14 +74,14 @@ vim.opt.cmdheight = 1
vim.opt.shortmess:append('c') vim.opt.shortmess:append('c')
vim.opt.shortmess:remove('F') vim.opt.shortmess:remove('F')
vim.opt.signcolumn = "auto" vim.opt.signcolumn = "yes"
vim.opt.wildmode = { "longest", "list", "full" } vim.opt.wildmode = { "longest", "list", "full" }
vim.opt.completeopt = { "menu", "menuone", "noselect" } vim.opt.completeopt = { "menu", "menuone", "noselect" }
vim.opt.mouse = "" vim.opt.mouse = ""
--match Error /\s\+$\|DU\cPA/ vim.cmd.match([[Error /\s\+$\|DU\cPA/]])
vim.opt.virtualedit = "block" vim.opt.virtualedit = "block"
vim.opt.shiftround = true vim.opt.shiftround = true
@@ -96,3 +102,30 @@ vim.opt.wildignore = [[
*/tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**" */tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**"
]] ]]
-- Only setup gnvim when it attaches.
vim.api.nvim_create_autocmd({'UIEnter'}, {
callback = function(event)
local chanid = vim.v.event['chan']
local chan = vim.api.nvim_get_chan_info(chanid)
if chan.client and chan.client.name ~= 'gnvim' then
return
end
-- Gnvim brings its own runtime files.
local gnvim = require('gnvim')
-- Set the font
vim.opt.guifont = 'iM WritingMonoS Nerd Font'
-- Increase/decrease font.
vim.keymap.set('n', '<c-+>', function() gnvim.font_size(1) end)
vim.keymap.set('n', '<c-->', function() gnvim.font_size(-1) end)
gnvim.setup({
cursor = {
blink_transition = 300
}
})
end
})

View File

@@ -1,6 +1,6 @@
local map = vim.keymap.set local map = vim.keymap.set
local default_options = { noremap = true, silent = true } local default_options = { noremap = true, silent = true }
local expr_options = { noremap = true, expr = true, silent = true } --local expr_options = { noremap = true, expr = true, silent = true }
-- space one line, home,end globally increase/decrease -- space one line, home,end globally increase/decrease
map('n', '<Home>', 'zc', default_options) map('n', '<Home>', 'zc', default_options)
@@ -26,94 +26,3 @@ map('v', 'P', '"_dP', default_options)
map('n', '<leader>2', '<cmd>set tabstop=2 softtabstop=2 shiftwidth=2<cr>', default_options) map('n', '<leader>2', '<cmd>set tabstop=2 softtabstop=2 shiftwidth=2<cr>', default_options)
map('n', '<leader>4', '<cmd>set tabstop=4 softtabstop=4 shiftwidth=4<cr>', default_options) map('n', '<leader>4', '<cmd>set tabstop=4 softtabstop=4 shiftwidth=4<cr>', default_options)
map('n', '<leader>8', '<cmd>set tabstop=8 softtabstop=8 shiftwidth=8<cr>', default_options) map('n', '<leader>8', '<cmd>set tabstop=8 softtabstop=8 shiftwidth=8<cr>', default_options)
-- digraphs
map('i', '<C-k>d', '<cmd>lua require("better-digraphs").digraphs("i")<cr>', default_options)
-- femaco
--map('n', '<leader>fe'. '<cmd>FeMaCo<cr>', expr_options)
-- fterm
map('n', '<leader>i', '<cmd>lua require("FTerm").toggle()<CR>', default_options)
map('t', '<leader>i', '<cmd>lua require("FTerm").toggle()<CR>', default_options)
-- icon picker
-- map('n', '<C-k>i', '<cmd>IconPickerNormal<cr>', default_options)
-- map('n', '<C-k>y', '<cmd>IconPickerYank<cr>', default_options)
-- map('i', '<C-k>i', '<cmd>IconPickerInsert<cr>', default_options)
-- iswap
map('n', '<leader>sw', '<cmd>ISwapWith<cr>', default_options)
map('n', '<leader>ss', '<cmd>ISwap<cr>', default_options)
-- code window
require('codewindow').apply_default_keybinds()
-- nvim tree
map('n', '<leader>tt', '<cmd>NvimTreeToggle<cr>', default_options)
map('n', '<leader>tf', '<cmd>NvimTreeFindFile<cr>', default_options)
-- other
-- map('n', '<leader>oo', '<cmd>Other<cr>', default_options)
-- map('n', '<leader>os', '<cmd>OtherSplit<cr>', default_options)
-- map('n', '<leader>ov', '<cmd>OtherVSplit<cr>', default_options)
-- map('n', '<leader>oc', '<cmd>OtherClear<cr>', default_options)
-- Context specific bindings
-- map('n', '<leader>ot', '<cmd>Other test<cr>', default_options)
-- map('n', '<leader>os', '<cmd>Other scss<cr>', default_options)
-- quicknote
map('n', '<leader>qn', '<cmd>lua require("quicknote").NewNoteAtCurrentLine()<cr>', default_options)
map('n', '<leader>qs', '<cmd>lua require("quicknote").ShowNoteSigns()<cr>', default_options)
map('n', '<leader>qe', '<cmd>lua require("quicknote").OpenNoteAtCurrentLine()<cr>', default_options)
map('n', '<leader>qd', '<cmd>lua require("quicknote").DeleteNoteAtCurrentLine()<cr>', default_options)
-- telescope
map('n', '<leader>f', '<cmd>lua require("telescope").extensions.menufacture.find_files()<cr>', default_options)
map('n', '<leader>a', '<cmd>lua require("telescope").extensions.menufacture.grep_string()<cr>', default_options)
map('n', '<leader>A', '<cmd>lua require("telescope").extensions.menufacture.live_grep()<cr>', default_options)
map('n', '<leader>b', '<cmd>lua require("telescope.builtin").buffers()<cr>', default_options)
map('n', '<leader>r', '<cmd>lua require("telescope.builtin").resume()<cr>', default_options)
-- map('n', '<leader>fh', '<cmd>lua require('telescope.builtin').help_tags()<cr>, default_options)
map('n', '<leader>tc', '<cmd>lua require("telescope.builtin").commands()<cr>', default_options)
map('n', '<leader>t:', '<cmd>lua require("telescope.builtin").command_history()<cr>', default_options)
map('n', '<leader>t/', '<cmd>lua require("telescope.builtin").search_history()<cr>', default_options)
map('n', '<leader>tr', '<cmd>lua require("telescope.builtin").registers()<cr>', default_options)
-- Neovim lsp pickers
map('n', '<leader>tr', '<cmd>lua require("telescope.builtin").lsp_references()<cr>', default_options)
map('n', '<leader>td', '<cmd>lua require("telescope.builtin").lsp_definitions()<cr>', default_options)
-- git pickers
map('n', '<leader>gc', '<cmd>lua require("telescope.builtin").git_commits()<cr>', default_options)
map('n', '<leader>gC', '<cmd>lua require("telescope.builtin").git_bcommits()<cr>', default_options)
map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', default_options)
-- map('n', '<leader>s', '<cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>, default_options)
map('n', '<leader>u', '<cmd>lua require("telescope").extensions.undo.undo()<cr>', default_options)
-- toggler not active
--vim.keymap.set({'n', 'v'}, 'gt', require('nvim-toggler').toggle)
-- windows
map('n', '<C-w>z', "<cmd>WindowsMaximize<cr>", default_options)
map('n', '<C-w>_', "<cmd>WindowsMaximizeVertically<cr>", default_options)
map('n', '<C-w>|', "<cmd>WindowsMaximizeHorizontally<cr>", default_options)
map('n', '<C-w>=', "<cmd>WindowsEqualize<cr>", default_options)
-- specs
map('n', 'n', 'n:lua require("specs").show_specs()<CR>', default_options)
map('n', 'N', 'N:lua require("specs").show_specs()<CR>', default_options)
map('n', '<leader><space>', function()
vim.cmd.noh()
require("specs").show_specs({width = 97, winhl = "Search", delay_ms = 610, inc_ms = 21})
end, default_options)
vim.api.nvim_set_keymap('n', '<leader>cb', ':lua require("nvim-navbuddy").open()<cr>', default_options)
-- dap
map('v', 'K', '<cmd>lua require("dapui").eval()<cr>', default_options)
map('n', '<leader>dc', ':lua require("dap").continue()<cr>', default_options);
map('n', '<leader>db', ':lua require("dap").toggle_breakpoint()<cr>', default_options);
map('n', '<leader>dB', ':lua require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: "))<cr>', default_options);
map('n', '<leader>dn', ':lua require("dap").step_over()<cr>', default_options);
map('n', '<leader>di', ':lua require("dap").step_into()<cr>', default_options);
map('n', '<leader>do', ':lua require("dap").step_out()<cr>', default_options);
map('n', '<leader>dl', ':lua require("dap").run_last()<cr>', default_options);

View File

@@ -9,10 +9,14 @@ if not vim.loop.fs_stat(lazypath) then
lazypath, lazypath,
}) })
end end
--vim.opt.rtp:append(lazypath)
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
vim.opt.rtp:append(lazypath) vim.opt.rtp:prepend(lazypath)
require'lazy'.setup('plugins') require'lazy'.setup('plugins', {
change_detection = {
enabled = true,
notify = false
}
})

View File

@@ -8,7 +8,6 @@ return {
}, },
-- User defined loops -- User defined loops
additions = { additions = {
{'tic', 'tac', 'toe'},
{'light', 'dark'}, {'light', 'dark'},
{'phaseOne', 'phaseTwo', 'phaseThree'}, {'phaseOne', 'phaseTwo', 'phaseThree'},
{'PhaseOne', 'PhaseTwo', 'PhaseThree'}, {'PhaseOne', 'PhaseTwo', 'PhaseThree'},

View File

@@ -87,7 +87,35 @@ return {{
"bluz71/vim-moonfly-colors", "bluz71/vim-moonfly-colors",
lazy = false, lazy = false,
config = function() config = function()
vim.cmd.colorscheme('moonfly') --vim.cmd.colorscheme('moonfly')
end
},
{
"kuznetsss/meadow.nvim",
lazy = false,
config = function()
--require('meadow').setup()
--vim.cmd.colorscheme('meadow')
--vim.cmd [[ hi! Conceal guibg=black ]]
end
},
{
"kepano/flexoki-neovim",
lazy = false,
config = function()
--vim.cmd.colorscheme('flexoki-dark')
end
},
{
"https://gitlab.com/bartekjaszczak/distinct-nvim",
priority = 1000,
config = function()
require("distinct").setup({
doc_comments_different_color = true, -- Use different colour for documentation comments
})
vim.cmd.colorscheme('distinct')
end end
} }
} }

View File

@@ -1,4 +1,4 @@
return { return {{
-- :DataViewer -- :DataViewer
-- :DataViewer [filepath] [filetype] -- :DataViewer [filepath] [filetype]
-- :DataViewerNextTable -- :DataViewerNextTable
@@ -8,5 +8,10 @@ return {
opts = {}, opts = {},
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
} },
} ft = { "csv" }
},
{
"chrisbra/csv.vim",
ft = { "csv" }
}}

View File

@@ -1,4 +0,0 @@
return {
'rcarriga/nvim-dap-ui',
config = true
}

View File

@@ -1,37 +0,0 @@
return {
'theHamsta/nvim-dap-virtual-text',
config = function()
require("nvim-dap-virtual-text").setup{
enabled = true, -- enable this plugin (the default)
enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination)
highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText
highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables)
show_stop_reason = true, -- show stop reason when stopped for exceptions
commented = false, -- prefix virtual text with comment string
only_first_definition = true, -- only show virtual text at first definition (if there are multiple)
all_references = false, -- show virtual text on all all references of the variable (not only definitions)
clear_on_continue = false, -- clear virtual text on "continue" (might cause flickering when stepping)
--- A callback that determines how a variable is displayed or whether it should be omitted
--- @param variable Variable https://microsoft.github.io/debug-adapter-protocol/specification#Types_Variable
--- @param buf number
--- @param stackframe dap.StackFrame https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame
--- @param node userdata tree-sitter node identified as variable definition of reference (see `:h tsnode`)
--- @param options nvim_dap_virtual_text_options Current options for nvim-dap-virtual-text
--- @return string|nil A text how the virtual text should be displayed or nil, if this variable shouldn't be displayed
display_callback = function(variable, buf, stackframe, node, options)
if options.virt_text_pos == 'inline' then
return ' = ' .. variable.value
else
return variable.name .. ' = ' .. variable.value
end
end,
-- position of virtual text, see `:h nvim_buf_set_extmark()`, default tries to inline the virtual text. Use 'eol' to set to end of line
virt_text_pos = vim.fn.has 'nvim-0.10' == 1 and 'inline' or 'eol',
-- experimental features:
all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
virt_text_win_col = nil -- position the virtual text at a fixed window column (starting from the first text column) ,
}
end
}

View File

@@ -1,4 +1,5 @@
return { return {
{
'mfussenegger/nvim-dap', 'mfussenegger/nvim-dap',
config = function() config = function()
local dap = require("dap") local dap = require("dap")
@@ -29,5 +30,119 @@ return {
cwd = "${workspaceFolder}", cwd = "${workspaceFolder}",
}, },
} }
dap.configurations.python = {
{
-- The first three options are required by nvim-dap
type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python`
request = 'launch';
name = "Launch file";
-- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
program = "${file}"; -- This configuration will launch the current file if used.
pythonPath = function()
-- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
-- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
-- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
local cwd = vim.fn.getcwd()
if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then
return cwd .. '/venv/bin/python'
elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
return cwd .. '/.venv/bin/python'
else
return '/usr/bin/python3'
end
end;
}
}
dap.adapters.python = function(cb, config)
if config.request == 'attach' then
---@diagnostic disable-next-line: undefined-field
local port = (config.connect or config).port
---@diagnostic disable-next-line: undefined-field
local host = (config.connect or config).host or '127.0.0.1'
cb({
type = 'server',
port = assert(port, '`connect.port` is required for a python `attach` configuration'),
host = host,
options = {
source_filetype = 'python',
},
})
else
cb({
type = 'executable',
command = '/home/kmcr/.virtualenvs/debugpy/bin/python',
args = { '-m', 'debugpy.adapter' },
options = {
source_filetype = 'python',
},
})
end
end
local def = { noremap = true, silent = true }
vim.keymap.set('n', '\\c', function() require("dap").continue() end, def);
vim.keymap.set('n', '\\b', function() require("dap").toggle_breakpoint() end, def);
vim.keymap.set('n', '\\B', function() require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) end, def);
vim.keymap.set('n', '\\n', function() require("dap").step_over() end, def);
vim.keymap.set('n', '\\s', function() require("dap").step_into() end, def);
vim.keymap.set('n', '\\u', function() require("dap").step_out() end, def);
vim.keymap.set('n', '\\l', function() require("dap").run_last() end, def);
end
},
{
'rcarriga/nvim-dap-ui',
dependencies = {
'mfussenegger/nvim-dap'
},
config = function()
local ui = require('dapui')
local dap = require('dap')
local def = { noremap = true, silent = true }
vim.keymap.set('n', '\\d', function()
dap.continue()
ui.toggle({})
end, def)
vim.keymap.set('v', 'K', function() require("dapui").eval() end, def)
ui.setup()
end
},
{
'theHamsta/nvim-dap-virtual-text',
config = function()
require("nvim-dap-virtual-text").setup{
enabled = true, -- enable this plugin (the default)
enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination)
highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText
highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables)
show_stop_reason = true, -- show stop reason when stopped for exceptions
commented = false, -- prefix virtual text with comment string
only_first_definition = true, -- only show virtual text at first definition (if there are multiple)
all_references = false, -- show virtual text on all all references of the variable (not only definitions)
clear_on_continue = false, -- clear virtual text on "continue" (might cause flickering when stepping)
--- A callback that determines how a variable is displayed or whether it should be omitted
--- @param variable Variable https://microsoft.github.io/debug-adapter-protocol/specification#Types_Variable
--- @param buf number
--- @param stackframe dap.StackFrame https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame
--- @param node userdata tree-sitter node identified as variable definition of reference (see `:h tsnode`)
--- @param options nvim_dap_virtual_text_options Current options for nvim-dap-virtual-text
--- @return string|nil A text how the virtual text should be displayed or nil, if this variable shouldn't be displayed
display_callback = function(variable, buf, stackframe, node, options)
if options.virt_text_pos == 'inline' then
return ' = ' .. variable.value
else
return variable.name .. ' = ' .. variable.value
end
end,
-- position of virtual text, see `:h nvim_buf_set_extmark()`, default tries to inline the virtual text. Use 'eol' to set to end of line
virt_text_pos = vim.fn.has 'nvim-0.10' == 1 and 'inline' or 'eol',
-- experimental features:
all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
virt_text_win_col = nil -- position the virtual text at a fixed window column (starting from the first text column) ,
}
end end
} }
}

View File

@@ -14,13 +14,14 @@ return {
width = 100, width = 100,
border = "rounded", border = "rounded",
}, },
wrap = false, -- text wrap, only applies to floating window wrap = true, -- text wrap, only applies to floating window
previewer_cmd = nil, -- for example: "glow" previewer_cmd = nil, -- for example: "glow"
cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "80" } cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "80" }
cmd_ignore = {}, -- ignore cmd rendering for the listed docs cmd_ignore = {}, -- ignore cmd rendering for the listed docs
picker_cmd = false, -- use cmd previewer in picker preview picker_cmd = false, -- use cmd previewer in picker preview
picker_cmd_args = {}, -- example using glow: { "-p" } picker_cmd_args = {}, -- example using glow: { "-p" }
ensure_installed = {}, -- get automatically installed ensure_installed = nil, -- get automatically installed
after_open = function(bufnr) end, -- callback that runs after the Devdocs window is opened. Devdocs buffer ID will be passed in after_open = function(bufnr) end, -- callback that runs after the Devdocs window is opened. Devdocs buffer ID will be passed in
} },
event = "VeryLazy"
} }

View File

@@ -1,167 +1,6 @@
return { return {
'stevearc/dressing.nvim', 'stevearc/dressing.nvim',
enabled = false, enabled = true,
opts = { opts = {
input = {
-- Set to false to disable the vim.ui.input implementation
enabled = true,
-- Default prompt string
default_prompt = "Input:",
-- Can be 'left', 'right', or 'center'
prompt_align = "left",
-- When true, <Esc> will close the modal
insert_only = true,
-- When true, input will start in insert mode.
start_in_insert = true,
-- These are passed to nvim_open_win
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "cursor",
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
prefer_width = 40,
width = nil,
-- min_width and max_width can be a list of mixed types.
-- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
max_width = { 140, 0.9 },
min_width = { 20, 0.2 },
buf_options = {},
win_options = {
-- Window transparency (0-100)
winblend = 10,
-- Disable line wrapping
wrap = false,
list = true,
listchars = "precedes:…,extends:…",
-- Increase this for more context when text scrolls off the window
sidescrolloff = 0,
},
-- Set to `false` to disable
mappings = {
n = {
["<Esc>"] = "Close",
["<CR>"] = "Confirm",
},
i = {
["<C-c>"] = "Close",
["<CR>"] = "Confirm",
["<Up>"] = "HistoryPrev",
["<Down>"] = "HistoryNext",
},
},
override = function(conf)
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
return conf
end,
-- see :help dressing_get_config
get_config = nil,
},
select = {
-- Set to false to disable the vim.ui.select implementation
enabled = true,
-- Priority list of preferred vim.select implementations
backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" },
-- Trim trailing `:` from prompt
trim_prompt = true,
-- Options for telescope selector
-- These are passed into the telescope picker directly. Can be used like:
-- telescope = require('telescope.themes').get_ivy({...})
telescope = nil,
-- Options for fzf selector
fzf = {
window = {
width = 0.5,
height = 0.4,
},
},
-- Options for fzf_lua selector
fzf_lua = {
winopts = {
width = 0.5,
height = 0.4,
},
},
-- Options for nui Menu
nui = {
position = "50%",
size = nil,
relative = "editor",
border = {
style = "rounded",
},
buf_options = {
swapfile = false,
filetype = "DressingSelect",
},
win_options = {
winblend = 10,
},
max_width = 80,
max_height = 40,
min_width = 40,
min_height = 10,
},
-- Options for built-in selector
builtin = {
-- These are passed to nvim_open_win
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "editor",
buf_options = {},
win_options = {
-- Window transparency (0-100)
winblend = 10,
cursorline = true,
cursorlineopt = "both",
},
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- the min_ and max_ options can be a list of mixed types.
-- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
width = nil,
max_width = { 140, 0.8 },
min_width = { 40, 0.2 },
height = nil,
max_height = 0.9,
min_height = { 10, 0.2 },
-- Set to `false` to disable
mappings = {
["<Esc>"] = "Close",
["<C-c>"] = "Close",
["<CR>"] = "Confirm",
},
override = function(conf)
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
return conf
end,
},
-- Used to override format_item. See :help dressing-format
format_item_override = {},
-- see :help dressing_get_config
get_config = nil,
},
} }
} }

View File

@@ -1,4 +1,7 @@
return { return {
'AckslD/nvim-FeMaco.lua', 'AckslD/nvim-FeMaco.lua',
config = true config = function()
require('femaco').setup()
vim.keymap.set('n', '<leader>!', '<cmd>FeMaCo<cr>', { noremap = true, silent = true })
end,
} }

View File

@@ -1,6 +1,7 @@
return { return {
'numToStr/FTerm.nvim', 'numToStr/FTerm.nvim',
opts = { config = function()
require('FTerm').setup({
-- Filetype of the terminal buffer -- Filetype of the terminal buffer
ft = 'FTerm', ft = 'FTerm',
@@ -40,5 +41,10 @@ return {
-- Callback invoked when the terminal emits stderr data. -- Callback invoked when the terminal emits stderr data.
-- See `:h jobstart-options` -- See `:h jobstart-options`
on_stderr = nil, on_stderr = nil,
} })
vim.keymap.set('n', '<leader>i', '<cmd>lua require("FTerm").toggle()<CR>', { noremap = true, silent = true })
vim.keymap.set('t', '<leader>i', '<cmd>lua require("FTerm").toggle()<CR>', { noremap = true, silent = true })
end,
enabled = false
} }

View File

@@ -1,7 +1,20 @@
return { return {{
'ziontee113/icon-picker.nvim', 'ziontee113/icon-picker.nvim',
config = function() config = function()
require("icon-picker").setup({disable_legacy_commands = true }) require("icon-picker").setup({disable_legacy_commands = true })
end, end,
enabled = false -- icon picker
-- map('n', '<C-k>i', '<cmd>IconPickerNormal<cr>', default_options)
-- map('n', '<C-k>y', '<cmd>IconPickerYank<cr>', default_options)
-- map('i', '<C-k>i', '<cmd>IconPickerInsert<cr>', default_options)
enabled = false,
},
{
'2kabhishek/nerdy.nvim',
dependencies = {
'stevearc/dressing.nvim',
'nvim-telescope/telescope.nvim',
},
cmd = 'Nerdy',
}
} }

View File

@@ -1,33 +1,10 @@
return {{ return {{
--"inside/vim-search-pulse", -- "MunifTanjim/nui.nvim",
"MunifTanjim/nui.nvim", -- "nvim-lua/plenary.nvim",
"nvim-lua/plenary.nvim",
"wellle/targets.vim",
"tpope/vim-fugitive",
"chrisbra/csv.vim",
--"iamcco/markdown-preview.nvim",, { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} --"iamcco/markdown-preview.nvim",, { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
--"euclio/vim-markdown-composer",, {'do': ':!cargo build --release --locked'}
--"vim-pandoc/vim-pandoc", --"vim-pandoc/vim-pandoc",
--"junegunn/goyo.vim",
"protex/better-digraphs.nvim",
--"RRethy/vim-hexokinase",, { 'do': 'make hexokinase' } --"RRethy/vim-hexokinase",, { 'do': 'make hexokinase' }
--"euclio/vim-markdown-composer",, {'do': ':!cargo build --release --locked'}
--"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
--require('lsp_lines').setup()
--"rgroli/other.nvim", " Currently doesn't support C/C++
"Pocco81/true-zen.nvim",
"nullchilly/fsread.nvim",
{
"cbochs/grapple.nvim",
enabled = false
},
{
"shortcuts/no-neck-pain.nvim",
enabled = false,
},
}} }}

View File

@@ -17,6 +17,7 @@ return {
vim.keymap.set("v", "<localleader>r", ":<C-u>MoltenEvaluateVisual<CR>gv", vim.keymap.set("v", "<localleader>r", ":<C-u>MoltenEvaluateVisual<CR>gv",
{ silent = true, noremap = true, desc = "evaluate visual selection" }) { silent = true, noremap = true, desc = "evaluate visual selection" })
end, end,
ft = { 'markdown', 'jupyter' }
}, },
{ {
-- see the image.nvim readme for more information about configuring this plugin -- see the image.nvim readme for more information about configuring this plugin

View File

@@ -19,4 +19,5 @@ return {
-- hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = false, hint_offset = 1 }) -- hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = false, hint_offset = 1 })
-- end, {remap=true}) -- end, {remap=true})
end, end,
enabled = false
} }

View File

@@ -1,10 +1,11 @@
return { return {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
dependencies = { dependencies = {
"SmiteshP/nvim-navbuddy", -- "SmiteshP/nvim-navbuddy",
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"}, {url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
"jubnzv/virtual-types.nvim", "jubnzv/virtual-types.nvim",
"ray-x/lsp_signature.nvim", --"ray-x/lsp_signature.nvim",
"folke/neodev.nvim" "folke/neodev.nvim"
}, },
config = function() config = function()
@@ -93,50 +94,47 @@ return {
} }
} }
}) })
local lsp_signature = require('lsp_signature') --local lsp_signature = require('lsp_signature')
-- Mappings. -- Mappings.
local opts = { noremap=true, silent=true } vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
vim.api.nvim_set_keymap('n', '<leader>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts) vim.keymap.set('n', '<leader>E', vim.diagnostic.setloclist)
vim.api.nvim_set_keymap('n', '<leader>E', '<cmd>lua vim.diagnostic.set_loclist()<CR>', opts)
vim.api.nvim_set_keymap("n", "<leader>q", "<cmd>lua vim.lsp.buf.format{ async = true }<CR>", opts)
-- Use an on_attach function to only map the following keys -- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer -- after the language server attaches to the current buffer
local on_attach = function(client, bufnr) vim.api.nvim_create_autocmd('LspAttach', {
--Enable completion triggered by <c-x><c-o> group = vim.api.nvim_create_augroup('UserLspConfig', {}),
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') callback = function(ev)
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
---- See `:help vim.lsp.*` for documentation on any of the below functions -- See `:help vim.lsp.*` for documentation on any of the below functions
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts) local opts = { buffer = ev.buf }
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts) vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts) --vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts) --vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts) --vim.keymap.set('n', '<space>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts) vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts) vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) --vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<F6>', '<cmd>ClangdSwitchSourceHeader<cr>', opts) vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<F6>', '<cmd>ClangdSwitchSourceHeader<CR>', opts)
vim.keymap.set("n", "<leader>q", function() vim.lsp.buf.format{ async = true } end, opts)
-- require'illuminate'.on_attach(client)
require'virtualtypes'.on_attach() require'virtualtypes'.on_attach()
require'lsp_signature'.on_attach({ -- require'lsp_signature'.on_attach({
floating_window = true, -- floating_window = true,
floating_window_above_cur_line = false, -- floating_window_above_cur_line = true,
floating_window_off_x = 500, -- floating_window_off_x = 10,
floating_window_off_y = -5, -- floating_window_off_y = 0,
}) -- })
require'nvim-navbuddy'.attach(client, bufnr)
require'nvim-navic'.attach(client, bufnr)
require("clangd_extensions.inlay_hints").setup_autocmd() require("clangd_extensions.inlay_hints").setup_autocmd()
require("clangd_extensions.inlay_hints").set_inlay_hints() require("clangd_extensions.inlay_hints").set_inlay_hints()
end
local signs = { local signs = {
{ name = "DiagnosticSignError", text = "" }, { name = "DiagnosticSignError", text = "" },
@@ -151,60 +149,29 @@ return {
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, { vim.lsp.diagnostic.on_publish_diagnostics, {
signs = { signs = false,
active = signs,
--severity_limit = 'info',
},
severity_sort = true, severity_sort = true,
underline = false, underline = true,
update_in_insert = false, update_in_insert = false,
--virtual_text = { virtual_text = {
-- spacing = 40, spacing = 30,
-- severity_limit = 'Warning', },
--}, float = true
virtual_text = false,
} }
) )
end
})
local capabilities = require('cmp_nvim_lsp').default_capabilities() local capabilities = require('cmp_nvim_lsp').default_capabilities()
capabilities.offsetEncoding = { "utf-16" } capabilities.offsetEncoding = { "utf-16" }
nvim_lsp.groovyls.setup({ nvim_lsp.groovyls.setup({
cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" }, cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" },
on_attach = on_attach,
--on_publish_diagnostics = diagnostic_handler,
capabilities = capabilities capabilities = capabilities
}) })
-- nvim_lsp.ccls.setup(
-- coq.lsp_ensure_capabilities({
-- init_options = {
-- compilationDatabaseDirectory = ".";
-- index = {
-- threads = 0;
-- },
-- clang = {
-- excludeArgs = { "-frounding-math"} ;
-- },
-- },
-- root_dir = nvim_lsp.util.root_pattern("compile_commands.json"),
-- on_attach = on_attach,
-- on_publish_diagnostics = diagnostic_handler,
-- flags = {
-- debounce_text_changes = 150,
-- }}
-- )
-- )
nvim_lsp.clangd.setup({ nvim_lsp.clangd.setup({
settings = {
},
on_attach = on_attach,
--on_publish_diagnostics = diagnostic_handler,
capabilities = capabilities, capabilities = capabilities,
-- flags = {
-- debounce_text_changes = 150,
-- }
}) })
nvim_lsp.pylsp.setup({ nvim_lsp.pylsp.setup({
@@ -216,12 +183,7 @@ return {
enabled = false, enabled = false,
}, },
}, },
-- flags = {
-- debounce_text_changes = 150,
-- },
on_attach = on_attach,
capabilities = capabilities capabilities = capabilities
--on_publish_diagnostics = diagnostic_handler,
}) })
nvim_lsp.lua_ls.setup({ nvim_lsp.lua_ls.setup({
@@ -237,23 +199,29 @@ return {
nvim_lsp.matlab_ls.setup({ nvim_lsp.matlab_ls.setup({
cmd = { "matlab-language-server", "--stdio"}, cmd = { "matlab-language-server", "--stdio"},
filetypes = { "matlab" }, filetypes = { "matlab" },
handlers = { [ "workspace/configuration"] = function(_, _, ctx) -- handlers = { [ "workspace/configuration"] = function(_, _, ctx)
local client = vim.lsp.get_client_by_id(ctx.client_id) -- local client = vim.lsp.get_client_by_id(ctx.client_id)
return {client.config.settings.matlab} -- return {client.config.settings.matlab}
end -- end
}, -- },
root_dir = nvim_lsp.util.find_git_ancestor, root_dir = nvim_lsp.util.find_git_ancestor,
single_file_support = false, single_file_support = true,
settings = { settings = {
matlab = { matlab = {
indexWorkspace = true, indexWorkspace = false,
installPath = "/usr/local/MATLAB/R2022b", installPath = "/usr/local/MATLAB/R2022b",
matlabConnectionTiming = "onStart", matlabConnectionTiming = "onStart",
telemetry = true, telemetry = true,
}, },
}, }
on_attach = on_attach, })
capabilities = capabilities
nvim_lsp.typos_lsp.setup({
cmd = { 'typos-lsp' },
filetypes = { '*' },
root_dir = nvim_lsp.util.root_pattern('typos.toml', '_typos.toml', '.typos.toml'),
single_file_support = true,
settings = {},
}) })
-- Use a loop to conveniently call 'setup' on multiple servers and -- Use a loop to conveniently call 'setup' on multiple servers and
@@ -261,12 +229,7 @@ return {
local servers = { "cmake", "rust_analyzer", "bashls", "marksman" } local servers = { "cmake", "rust_analyzer", "bashls", "marksman" }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup({ nvim_lsp[lsp].setup({
on_attach = on_attach,
--on_publish_diagnostics = diagnostic_handler,
capabilities = capabilities, capabilities = capabilities,
-- flags = {
-- debounce_text_changes = 150,
-- }
}) })
end end
end end

View File

@@ -1,19 +0,0 @@
return {
"echasnovski/mini.nvim",
version = false,
config = function()
local hipatterns = require('mini.hipatterns')
hipatterns.setup({
highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
-- fixme = { pattern = '%f[%w]()EFMC 0()%f[%W]', group = 'MiniHipatternsFixme' },
-- hack = { pattern = '%f[%w]()Vehicle 0()%f[%W]', group = 'MiniHipatternsHack' },
-- todo = { pattern = '%f[%w]()CoCo 0()%f[%W]', group = 'MiniHipatternsTodo' },
-- note = { pattern = '%f[%w]()EneM 0()%f[%W]', group = 'MiniHipatternsNote' },
-- Highlight hex color strings (`#rrggbb`) using that color
hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
end
}

View File

@@ -1,5 +1,7 @@
return { return {
-- <leader>mm -- <leader>mm
'gorbit99/codewindow.nvim', 'gorbit99/codewindow.nvim',
config = true, config = function()
require('codewindow').apply_default_keybinds()
end,
} }

View File

@@ -88,5 +88,6 @@ return {
MkdnFoldSection = {'n', '<leader>f'}, MkdnFoldSection = {'n', '<leader>f'},
MkdnUnfoldSection = {'n', '<leader>F'} MkdnUnfoldSection = {'n', '<leader>F'}
} }
} },
enabled = false
} }

View File

@@ -8,5 +8,7 @@ return {
config = function() config = function()
require'nvim-navic'.setup() require'nvim-navic'.setup()
require'nvim-navbuddy'.setup() require'nvim-navbuddy'.setup()
end vim.keymap.set('n', '<leader>cb', ':lua require("nvim-navbuddy").open()<cr>', {noremap = true, silent = true})
end,
enabled = false
} }

View File

@@ -13,7 +13,6 @@ return {
--null_ls.builtins.diagnostics.misspell, --null_ls.builtins.diagnostics.misspell,
null_ls.builtins.diagnostics.hadolint, null_ls.builtins.diagnostics.hadolint,
null_ls.builtins.diagnostics.buf, null_ls.builtins.diagnostics.buf,
null_ls.builtins.diagnostics.typos,
--null_ls.builtins.code_actions.proselint, --null_ls.builtins.code_actions.proselint,
--null_ls.builtins.diagnostics.proselint, --null_ls.builtins.diagnostics.proselint,
null_ls.builtins.hover.dictionary, null_ls.builtins.hover.dictionary,

View File

@@ -7,6 +7,7 @@ return {
'hrsh7th/cmp-buffer', 'hrsh7th/cmp-buffer',
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-cmdline',
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-nvim-lsp-signature-help',
'hrsh7th/cmp-path', 'hrsh7th/cmp-path',
'hrsh7th/cmp-calc', 'hrsh7th/cmp-calc',
}, },
@@ -15,15 +16,18 @@ return {
local cmp = require'cmp' local cmp = require'cmp'
cmp.setup({ cmp.setup({
-- snippet = { snippet = {
-- expand = function(args) expand = function(args)
-- require('snippy').expand_snippet(args.body) require('snippy').expand_snippet(args.body)
-- end, end,
-- }, },
window = { window = {
completion = cmp.config.window.bordered(), completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(),
}, },
experimental = {
ghost_text = true,
},
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4), ['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-f>'] = cmp.mapping.scroll_docs(4),
@@ -33,6 +37,7 @@ return {
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'path' }, { name = 'path' },
{ name = 'snippy' }, { name = 'snippy' },
{ name = 'calc' }, { name = 'calc' },

View File

@@ -9,7 +9,7 @@ return {
-- following options are the default -- following options are the default
-- each of these are documented in `:help nvim-tree.OPTION_NAME` -- each of these are documented in `:help nvim-tree.OPTION_NAME`
require'nvim-tree'.setup { require'nvim-tree'.setup {
disable_netrw = true, disable_netrw = false,
hijack_netrw = true, hijack_netrw = true,
open_on_tab = false, open_on_tab = false,
hijack_cursor = true, hijack_cursor = true,
@@ -141,5 +141,7 @@ return {
}, },
}, },
} }
vim.keymap.set('n', '<leader>tt', '<cmd>NvimTreeToggle<cr>', { noremap = true, silent = true})
vim.keymap.set('n', '<leader>tf', '<cmd>NvimTreeFindFile<cr>', { noremap = true, silent = true})
end end
} }

View File

@@ -1,31 +0,0 @@
return {
"IlyasYOY/obs.nvim",
dependencies = {
"IlyasYOY/coredor.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
--dev = true,
config = function()
local obs = require("obs")
obs.setup({
vault_home = "~/notes",
journal = {
template_name = "daily",
},
})
vim.keymap.set("n", "<leader>nn", "<cmd>ObsNvimFollowLink<cr>")
vim.keymap.set("n", "<leader>nr", "<cmd>ObsNvimRandomNote<cr>")
vim.keymap.set("n", "<leader>nN", "<cmd>ObsNvimNewNote<cr>")
vim.keymap.set("n", "<leader>nd", "<cmd>ObsNvimDailyNote<cr>")
vim.keymap.set("n", "<leader>nrn", "<cmd>ObsNvimRename<cr>")
vim.keymap.set("n", "<leader>nT", "<cmd>ObsNvimTemplate<cr>")
vim.keymap.set("n", "<leader>nM", "<cmd>ObsNvimMove<cr>")
vim.keymap.set("n", "<leader>nb", "<cmd>ObsNvimBacklinks<cr>")
vim.keymap.set("n", "<leader>nfj", "<cmd>ObsNvimFindInJournal<cr>")
vim.keymap.set("n", "<leader>nff", "<cmd>ObsNvimFindNote<cr>")
vim.keymap.set("n", "<leader>nfg", "<cmd>ObsNvimFindInNotes<cr>")
end,
}

View File

@@ -4,5 +4,12 @@ return {
'nvim-lua/plenary.nvim' 'nvim-lua/plenary.nvim'
}, },
config = true, config = true,
-- -- quicknote
-- map('n', '<leader>qn', '<cmd>lua require("quicknote").NewNoteAtCurrentLine()<cr>', default_options)
-- map('n', '<leader>qs', '<cmd>lua require("quicknote").ShowNoteSigns()<cr>', default_options)
-- map('n', '<leader>qe', '<cmd>lua require("quicknote").OpenNoteAtCurrentLine()<cr>', default_options)
-- map('n', '<leader>qd', '<cmd>lua require("quicknote").DeleteNoteAtCurrentLine()<cr>', default_options)
enabled = false enabled = false
} }

View File

@@ -1,5 +1,6 @@
return { return {
'nvimdev/hlsearch.nvim', 'nvimdev/hlsearch.nvim',
event = 'BufRead', event = 'BufRead',
config = true config = true,
enabled = false,
} }

View File

@@ -18,5 +18,14 @@ return {
nofile = true, nofile = true,
}, },
} }
end local map = vim.keymap.set
local def = { noremap = true, silent = true }
map('n', 'n', 'n<cmd>lua require("specs").show_specs()<CR>', def)
map('n', 'N', 'N<cmd>lua require("specs").show_specs()<CR>', def)
map('n', '<leader><space>', function()
vim.cmd.noh()
require("specs").show_specs({width = 97, winhl = "Search", delay_ms = 100, inc_ms = 21})
end, def)
end,
enabled = false
} }

View File

@@ -2,8 +2,58 @@ return {
'Wansmer/symbol-usage.nvim', 'Wansmer/symbol-usage.nvim',
event = 'BufReadPre', -- need run before LspAttach if you use nvim 0.9. On 0.10 use 'LspAttach' event = 'BufReadPre', -- need run before LspAttach if you use nvim 0.9. On 0.10 use 'LspAttach'
config = function() config = function()
local function h(name) return vim.api.nvim_get_hl(0, { name = name }) end
-- hl-groups can have any name
vim.api.nvim_set_hl(0, 'SymbolUsageRounding', { fg = h('CursorLine').bg, italic = true })
vim.api.nvim_set_hl(0, 'SymbolUsageContent', { bg = h('CursorLine').bg, fg = h('Comment').fg, italic = true })
vim.api.nvim_set_hl(0, 'SymbolUsageRef', { fg = h('Function').fg, bg = h('CursorLine').bg, italic = true })
vim.api.nvim_set_hl(0, 'SymbolUsageDef', { fg = h('Type').fg, bg = h('CursorLine').bg, italic = true })
vim.api.nvim_set_hl(0, 'SymbolUsageImpl', { fg = h('@keyword').fg, bg = h('CursorLine').bg, italic = true })
local function text_format(symbol)
local res = {}
-- local round_start = { '', 'SymbolUsageRounding' }
-- local round_end = { '', 'SymbolUsageRounding' }
if symbol.references then
local usage = symbol.references <= 1 and 'usage' or 'usages'
local num = symbol.references == 0 and 'no' or symbol.references
--table.insert(res, round_start)
table.insert(res, { '󰌹 ', 'SymbolUsageRef' })
table.insert(res, { ('%s %s'):format(num, usage), 'SymbolUsageContent' })
--table.insert(res, round_end)
end
if symbol.definition then
if #res > 0 then
table.insert(res, { ' ', 'NonText' })
end
--table.insert(res, round_start)
table.insert(res, { '󰳽 ', 'SymbolUsageDef' })
table.insert(res, { symbol.definition .. ' defs', 'SymbolUsageContent' })
--table.insert(res, round_end)
end
if symbol.implementation then
if #res > 0 then
table.insert(res, { ' ', 'NonText' })
end
--table.insert(res, round_start)
table.insert(res, { '󰡱 ', 'SymbolUsageImpl' })
table.insert(res, { symbol.implementation .. ' impls', 'SymbolUsageContent' })
--table.insert(res, round_end)
end
return res
end
require('symbol-usage').setup({ require('symbol-usage').setup({
vt_position = "textwidth" vt_position = "above",
references = { enabled = true, include_declaration = true },
definition = { enabled = true },
implementation = { enabled = true },
text_format = text_format,
}) })
end end
} }

View File

@@ -1,4 +1,5 @@
return { return {
'hedyhli/outline.nvim', 'hedyhli/outline.nvim',
config = true config = true,
cmd = { 'OutlineOpen' }
} }

View File

@@ -32,5 +32,28 @@ return {
require('telescope').load_extension('undo') require('telescope').load_extension('undo')
require('telescope').load_extension('menufacture') require('telescope').load_extension('menufacture')
require("telescope").load_extension("emoji") require("telescope").load_extension("emoji")
local def = { noremap = true, silent = true }
local map = vim.keymap.set
map('n', '<leader>r', '<cmd>lua require("telescope.builtin").resume()<cr>', def)
map('n', '<leader>f', '<cmd>lua require("telescope").extensions.menufacture.find_files()<cr>', def)
map('n', '<leader>a', '<cmd>lua require("telescope").extensions.menufacture.grep_string()<cr>', def)
map('n', '<leader>s', '<cmd>lua require("telescope").extensions.menufacture.live_grep()<cr>', def)
map('n', '<leader>b', '<cmd>lua require("telescope.builtin").buffers()<cr>', def)
-- map('n', '<leader>fh', '<cmd>lua require('telescope.builtin').help_tags()<cr>, def)
map('n', '<leader>tc', '<cmd>lua require("telescope.builtin").commands()<cr>', def)
map('n', '<leader>t:', '<cmd>lua require("telescope.builtin").command_history()<cr>', def)
map('n', '<leader>t/', '<cmd>lua require("telescope.builtin").search_history()<cr>', def)
map('n', '<leader>tr', '<cmd>lua require("telescope.builtin").registers()<cr>', def)
-- Neovim lsp pickers
map('n', 'gr', '<cmd>lua require("telescope.builtin").lsp_references()<cr>', def)
map('n', 'gd', '<cmd>lua require("telescope.builtin").lsp_definitions()<cr>', def)
-- git pickers
-- map('n', '<leader>gc', '<cmd>lua require("telescope.builtin").git_commits()<cr>', def)
-- map('n', '<leader>gC', '<cmd>lua require("telescope.builtin").git_bcommits()<cr>', def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def)
-- other
-- map('n', '<leader>s', '<cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>, def)
map('n', '<leader>u', '<cmd>lua require("telescope").extensions.undo.undo()<cr>', def)
end end
} }

View File

@@ -3,7 +3,6 @@ return {
dependencies = { dependencies = {
'mizlan/iswap.nvim', 'mizlan/iswap.nvim',
'romgrk/nvim-treesitter-context', 'romgrk/nvim-treesitter-context',
'Wansmer/sibling-swap.nvim',
--"nvim-treesitter/nvim-treesitter-textobjects", --"nvim-treesitter/nvim-treesitter-textobjects",
--"nvim-treesitter/playground", --"nvim-treesitter/playground",
}, },
@@ -17,11 +16,7 @@ return {
highlight = { highlight = {
enable = true, enable = true,
disable = function(lang, buf) disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB return vim.api.nvim_buf_line_count(buf) > 5000
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end, end,
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = false,
}, },
@@ -86,6 +81,5 @@ return {
} }
-- vim.opt.foldmethod = "expr" -- vim.opt.foldmethod = "expr"
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()" -- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
require('sibling-swap').setup({})
end end
} }

View File

@@ -8,5 +8,11 @@ return {
vim.o.winwidth = 10 vim.o.winwidth = 10
vim.o.winminwidth = 10 vim.o.winminwidth = 10
require("windows").setup() require("windows").setup()
local map = vim.keymap.set
local default_options = { noremap = true, silent = true }
map('n', '<C-w>z', "<cmd>WindowsMaximize<cr>", default_options)
map('n', '<C-w>_', "<cmd>WindowsMaximizeVertically<cr>", default_options)
map('n', '<C-w>|', "<cmd>WindowsMaximizeHorizontally<cr>", default_options)
map('n', '<C-w>=', "<cmd>WindowsEqualize<cr>", default_options)
end end
} }

View File

@@ -2,6 +2,7 @@ set history save on
set print pretty on set print pretty on
set pagination off set pagination off
set confirm off set confirm off
skip -gfi /usr/include/c++/12/*
skip -gfi /usr/include/c++/11/* skip -gfi /usr/include/c++/11/*
skip -gfi /usr/include/c++/10/* skip -gfi /usr/include/c++/10/*
skip -gfi /usr/include/c++/9/* skip -gfi /usr/include/c++/9/*

View File

@@ -9,6 +9,8 @@
autocrlf = false autocrlf = false
excludesfile = /home/rkmiec/.config/git/ignore excludesfile = /home/rkmiec/.config/git/ignore
symlinks = true symlinks = true
attributesfile = ~/.gitattributes
fsmonitor = true
#attributesfile = ~/.gitattributes #attributesfile = ~/.gitattributes
[help] [help]
autocorrect = 1 autocorrect = 1
@@ -60,13 +62,28 @@
rebase = true rebase = true
[commit] [commit]
template = .gitmessage template = .gitmessage
verbose = true verbose = false
[mergetool "vimdiff"] [mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J' cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[init] [init]
defaultBranch = master defaultBranch = master
#[diff "image"] [diff "image"]
# command = /home/kmcr/tools/git-diff-image/git_diff_image command = /home/kmcr/tools/git-diff-image/git_diff_image
# textconv = imgcat textconv = imgcat
[diff "model"]
command = /home/kmcr/tools/git-diff-image/git_diff_image
textconv = imgcat
[advice] [advice]
detachedHead = false detachedHead = false
[submodule]
recurse = false
[rerere]
enabled = true
[column]
ui = auto
[branch]
sort = -commiterdate
[fetch]
writeCommitGraph = true
[maintenance]
repo = /home/kmcr/repos/hems/hemsmilsimulation

View File

@@ -1,121 +1,21 @@
" vim:foldmethod=marker:foldlevel=0
"set viminfo+=n~/.vim/viminfo
" Basic configuration {{{
if &compatible if &compatible
set nocompatible set nocompatible
set modelines=1 set modelines=1
endif endif
" }}}
" Plugins {{{
"
call plug#begin('~/.vim/bundle') call plug#begin('~/.vim/bundle')
" Completion engines {{{
"Plug 'Valloric/YouCompleteMe'
"Plug 'zxqfl/tabnine-vim'
"Plug 'lifepillar/vim-mucomplete'
"Plug 'Shougo/neocomplete.vim'
"Plug 'lyuts/vim-rtags'
"Plug 'JBakamovic/cxxd-vim'
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
"Plug 'jackguo380/vim-lsp-cxx-highlight'
" }}}
" Mappings {{{
"Plug 'milkypostman/vim-togglelist' " Map of quickfix toggles
" }}}
" Code development helpers {{{
"Plug 'rhysd/vim-clang-format'
Plug 'tpope/vim-commentary' " Toggle C style comments with gc
"Plug 'KabbAmine/zeavim.vim' " gz to open zeal
Plug 'mbbill/undotree'
"Plug 'kkoomen/vim-doge'
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
Plug 'wellle/context.vim'
Plug 'svermeulen/vim-yoink' Plug 'svermeulen/vim-yoink'
Plug 'will133/vim-dirdiff' Plug 'will133/vim-dirdiff'
"Plug 'n0v1c3/vira'
Plug 'dbeniamine/cheat.sh-vim'
Plug 'puremourning/vimspector'
" }}}
" Files switch, jump and grep-like tools {{{
"Plug 'ericcurtin/CurtineIncSw.vim' "Toggle .c .h files
Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
"Plug 'mileszs/ack.vim' " Ack integration
Plug 'junegunn/fzf.vim'
"Plug 'fholgado/minibufexpl.vim'
Plug 'ludovicchabant/vim-gutentags' "Auto generate tags
Plug 'liuchengxu/vista.vim'
Plug 'wellle/targets.vim'
Plug 'inside/vim-search-pulse'
Plug 'mattboehm/vim-accordion'
" }}}
" Git integration {{{
Plug 'mhinz/vim-signify' " Mark edited lines - faster gitgutter
"Plug 'rhysd/git-messenger.vim' " show git history
"Plug 'tpope/vim-fugitive' " Git integration
" }}}
" Syntax for random filetypes {{{
Plug 'plasticboy/vim-markdown'
Plug 'kergoth/vim-bitbake' " Bitbake templates and syntax
"Plug 'vim-scripts/DoxygenToolkit.vim' " Doxygen support
Plug 'pboettch/vim-cmake-syntax'
Plug 'aklt/plantuml-syntax'
" }}}
" Colorschemes {{{
"Plug 'flazz/vim-colorschemes' " lots of colorschemes
"Plug 'jeaye/color_coded'
"Plug 'thiagoalessio/rainbow_levels.vim'
"Plug 'fielding/vice'
"Plug 'whatyouhide/vim-gotham'
"Plug 'chuling/ci_dark'
"Plug 'adrian5/oceanic-next-vim'
Plug 'jaredgorski/spacecamp' Plug 'jaredgorski/spacecamp'
"Black and white:
"Plug 'ewilazarus/preto'
"Plug 'andreasvc/vim-256noir'
" }}}
" Other plugins (external tools, etc) {{{
Plug 'junegunn/goyo.vim'
"Plug 'jez/vim-superman' "vman application
"Plug 'vimwiki/vimwiki'
"Plug 'metakirby5/codi.vim' " live coding
Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes'
Plug 'mhinz/vim-startify'
Plug 'vim-pandoc/vim-pandoc' | Plug 'vim-pandoc/vim-pandoc-syntax'
Plug 'JMcKiern/vim-shoot'
" }}}
call plug#end() " required call plug#end() " required
" Packages {{{
"packadd termdebug
" }}}
" }}}
" TAB settings {{{
set tabstop=4 set tabstop=4
set shiftwidth=4 set shiftwidth=4
set softtabstop=4 set softtabstop=4
set expandtab set expandtab
" }}}
" More Common Settings {{{
set encoding=utf-8 set encoding=utf-8
set scrolloff=10 set scrolloff=10
set autoindent set autoindent
@@ -135,14 +35,8 @@ set backspace=eol,indent,start
" statusline {{{ " statusline {{{
set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
set laststatus=2 set laststatus=2
" Vista configuration
function! NearestMethodOrFunction() abort
return get(b:, 'vista_nearest_method_or_function', '')
endfunction
set statusline+=\ "comment to remove trailing space set statusline+=\ "comment to remove trailing space
set statusline+=%{NearestMethodOrFunction()}
" }}}
set number set number
set relativenumber set relativenumber
" Make Vim to handle long lines nicely. " Make Vim to handle long lines nicely.
@@ -166,17 +60,12 @@ set shell=/bin/bash
set path+=** set path+=**
set updatetime=100 set updatetime=100
set nospell set nospell
set runtimepath+=/usr/share/vim/vimfiles
set spelllang=en set spelllang=en
" Dictionary path, from which the words are being looked up. " Dictionary path, from which the words are being looked up.
set dictionary+=/usr/share/dict/words set dictionary+=/usr/share/dict/words
set clipboard=unnamed set clipboard=unnamed
set exrc "set exrc
" }}}
" Undofile {{{
if exists("+undofile") if exists("+undofile")
if isdirectory($HOME . '/.vim/undo') == 0 if isdirectory($HOME . '/.vim/undo') == 0
@@ -186,19 +75,6 @@ if exists("+undofile")
set undofile set undofile
endif endif
" }}}
" Ctags {{{
if isdirectory($HOME . '/.vim/tags') == 0
:silent !mkdir -p ~/.vim/tags > /dev/null 2>&1
endif
let g:gutentags_cache_dir='~/.vim/tags'
"let g:gutentags_ctags_extra_args=['--fields=+l']
" }}}
" Mappings {{{
" Editing {{{
"Changing Leader Key
let mapleader = "\\" let mapleader = "\\"
"nnoremap j gj "nnoremap j gj
@@ -243,78 +119,14 @@ set pastetoggle=<F3>
" This causes issues with FZF " This causes issues with FZF
"tnoremap <Esc> <C-W><C-W> "tnoremap <Esc> <C-W><C-W>
nnoremap S :%s//g<LEFT><LEFT>
xnoremap S :s//g<LEFT><LEFT>
xmap <BS> x
nnoremap <leader><space> :nohlsearch<cr> nnoremap <leader><space> :nohlsearch<cr>
" }}}
" Plugins {{{
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
nnoremap <silent> <space>k :call <SID>show_documentation()<CR>
"xmap <leader>f <Plug>(coc-format-selected)
"nmap <leader>f <Plug>(coc-format-selected)
" Show all diagnostics
nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions
nnoremap <silent> <space>e :<C-u>CocList extensions<cr>
" Show commands
nnoremap <silent> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document
nnoremap <silent> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list
nnoremap <silent> <space>p :<C-u>CocListResume<CR>
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<CR>"
let g:UltiSnipsJumpBackwardTrigger="<leader>p"
" yoink configuration " yoink configuration
nmap <leader>yp <plug>(YoinkPostPasteSwapBack) nmap <leader>yp <plug>(YoinkPostPasteSwapBack)
nmap <leader>yn <plug>(YoinkPostPasteSwapForward) nmap <leader>yn <plug>(YoinkPostPasteSwapForward)
nmap p <plug>(YoinkPaste_p) nmap p <plug>(YoinkPaste_p)
nmap P <plug>(YoinkPaste_P) nmap P <plug>(YoinkPaste_P)
" Mapping to NERDTree
nnoremap <leader>t :NERDTreeToggle<CR>
let NERDTreeIgnore=['\.vim$', '\~$', '\.pyc$']
"nnoremap <C-n> :e .<CR>
"let g:netrw_banner=0
"let g:netrw_wisize=20
"let g:netrw_liststyle=3
"let g:netrw_lolcalrmdir='rm -r'
"nnoremap <leader>n :Lexplore<CR>
" Tagbar key bindings."
"nmap <leader>t :TlistToggle<cr>
nnoremap <leader>ff :FZF!<CR>
nnoremap <leader>fl :Lines!<CR>
nnoremap <leader>fb :Buffers<CR>
inoremap <leader>fs <ESC>:Snippets!<CR>
nnoremap <leader>fa :Rg! <C-R><C-W><CR>
" Disable context.vim on json files
let g:context_filetype_blacklist = ["json"]
" }}}
" }}}
" Wildmenu completion {{{ " Wildmenu completion {{{
set wildmenu set wildmenu
set wildmode=list:longest set wildmode=list:longest
@@ -351,18 +163,6 @@ if &term =~ '256color'
" set t_ut= " set t_ut=
endif endif
" Mini Buffer some settigns."
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let g:miniBufExplStatusLineText = ''
"Full line:
"set colorcolumn=120
"call matchadd('ColorColumn', '\%80v', 100)
" autocmd {{{
if has("autocmd") if has("autocmd")
"restore cursor position "restore cursor position
autocmd BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif autocmd BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
@@ -376,17 +176,8 @@ if has("autocmd")
" Resize Split When the window is resized " Resize Split When the window is resized
au VimResized * :wincmd = au VimResized * :wincmd =
" If you want to show the nearest function in your statusline automatically
autocmd VimEnter * call vista#RunForNearestMethodOrFunction()
endif endif
"}}}
" Folding {{{
function! FoldFormat()
let foldsize = (v:foldend - v:foldstart)
return getline(v:foldstart)."\t\t\t(".foldsize."\tmore lines)"
endfunction
set foldenable set foldenable
set foldlevelstart=999 set foldlevelstart=999
set foldnestmax=5 set foldnestmax=5
@@ -397,8 +188,6 @@ if has('folding')
setglobal foldopen+=jump setglobal foldopen+=jump
endif endif
" }}}
function! FindAlternate() function! FindAlternate()
let l:ext = 'h' let l:ext = 'h'
let l:curr_ext = expand('%:e') let l:curr_ext = expand('%:e')
@@ -416,10 +205,6 @@ function! FindAlternate()
endfunction endfunction
nnoremap <F6> :call FindAlternate()<CR> nnoremap <F6> :call FindAlternate()<CR>
"let g:alternateSearchPath="sfr:../source,sfr:../src,sfr:../include,sfr:../inc,sfr:./Source,sfr:.."
"map <F6> :call CurtineIncSw()<CR>
let g:startify_custom_header = ''
setglobal complete-=i setglobal complete-=i
setglobal virtualedit=block setglobal virtualedit=block
@@ -428,11 +213,6 @@ setglobal shiftround
set shortmess+=c set shortmess+=c
set signcolumn=yes set signcolumn=yes
set cmdheight=2 set cmdheight=2
"inoremap <silent><expr> <TAB>
" \ pumvisible() ? "\<C-n>" :
" \ <SID>check_back_space() ? "\<TAB>" :
" \ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort function! s:check_back_space() abort
let col = col('.') - 1 let col = col('.') - 1
@@ -449,8 +229,3 @@ set cursorline
highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212 highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212
autocmd InsertEnter * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=234 guifg=NONE guibg=#1c1c1c autocmd InsertEnter * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=234 guifg=NONE guibg=#1c1c1c
autocmd InsertLeave * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212 autocmd InsertLeave * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212
let g:airline_theme = 'minimalist'
let g:airline_powerline_fonts = 1
let g:airline_stl_path_style = 'short'
let g:airline_highlighting_cache = 1