Added handful of configs
This commit is contained in:
590
.config/lazygit/config.yml
Normal file
590
.config/lazygit/config.yml
Normal file
@@ -0,0 +1,590 @@
|
|||||||
|
# https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md
|
||||||
|
# Config relating to the Lazygit UI
|
||||||
|
gui:
|
||||||
|
# The number of lines you scroll by when scrolling the main window
|
||||||
|
scrollHeight: 2
|
||||||
|
|
||||||
|
# If true, allow scrolling past the bottom of the content in the main window
|
||||||
|
scrollPastBottom: true
|
||||||
|
|
||||||
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin
|
||||||
|
scrollOffMargin: 2
|
||||||
|
|
||||||
|
# One of: 'margin' (default) | 'jump'
|
||||||
|
scrollOffBehavior: margin
|
||||||
|
|
||||||
|
# If true, capture mouse events.
|
||||||
|
# When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
|
||||||
|
mouseEvents: true
|
||||||
|
|
||||||
|
# If true, do not show a warning when discarding changes in the staging view.
|
||||||
|
skipDiscardChangeWarning: false
|
||||||
|
|
||||||
|
# If true, do not show warning when applying/popping the stash
|
||||||
|
skipStashWarning: false
|
||||||
|
|
||||||
|
# If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.
|
||||||
|
skipNoStagedFilesWarning: false
|
||||||
|
|
||||||
|
# If true, do not show a warning when rewording a commit via an external editor
|
||||||
|
skipRewordInEditorWarning: false
|
||||||
|
|
||||||
|
# Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section.
|
||||||
|
# Number from 0 to 1.0.
|
||||||
|
sidePanelWidth: 0.3333
|
||||||
|
|
||||||
|
# If true, increase the height of the focused side window; creating an accordion effect.
|
||||||
|
expandFocusedSidePanel: false
|
||||||
|
|
||||||
|
# The weight of the expanded side panel, relative to the other panels. 2 means
|
||||||
|
# twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
|
||||||
|
expandedSidePanelWeight: 2
|
||||||
|
|
||||||
|
# Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.
|
||||||
|
# Options are:
|
||||||
|
# - 'horizontal': split the window horizontally
|
||||||
|
# - 'vertical': split the window vertically
|
||||||
|
# - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
|
||||||
|
mainPanelSplitMode: flexible
|
||||||
|
|
||||||
|
# How the window is split when in half screen mode (i.e. after hitting '+' once).
|
||||||
|
# Possible values:
|
||||||
|
# - 'left': split the window horizontally (side panel on the left, main view on the right)
|
||||||
|
# - 'top': split the window vertically (side panel on top, main view below)
|
||||||
|
enlargedSideViewLocation: left
|
||||||
|
|
||||||
|
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
|
||||||
|
language: auto
|
||||||
|
|
||||||
|
# Format used when displaying time e.g. commit time.
|
||||||
|
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
|
||||||
|
timeFormat: 02 Jan 06
|
||||||
|
|
||||||
|
# Format used when displaying time if the time is less than 24 hours ago.
|
||||||
|
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
|
||||||
|
shortTimeFormat: 3:04PM
|
||||||
|
|
||||||
|
# Config relating to colors and styles.
|
||||||
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes
|
||||||
|
theme:
|
||||||
|
# Border color of focused window
|
||||||
|
activeBorderColor:
|
||||||
|
- green
|
||||||
|
- bold
|
||||||
|
|
||||||
|
# Border color of non-focused windows
|
||||||
|
inactiveBorderColor:
|
||||||
|
- default
|
||||||
|
|
||||||
|
# Border color of focused window when searching in that window
|
||||||
|
searchingActiveBorderColor:
|
||||||
|
- cyan
|
||||||
|
- bold
|
||||||
|
|
||||||
|
# Color of keybindings help text in the bottom line
|
||||||
|
optionsTextColor:
|
||||||
|
- blue
|
||||||
|
|
||||||
|
# Background color of selected line.
|
||||||
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#highlighting-the-selected-line
|
||||||
|
selectedLineBgColor:
|
||||||
|
- blue
|
||||||
|
|
||||||
|
# Background color of selected line when view doesn't have focus.
|
||||||
|
inactiveViewSelectedLineBgColor:
|
||||||
|
- bold
|
||||||
|
|
||||||
|
# Foreground color of copied commit
|
||||||
|
cherryPickedCommitFgColor:
|
||||||
|
- blue
|
||||||
|
|
||||||
|
# Background color of copied commit
|
||||||
|
cherryPickedCommitBgColor:
|
||||||
|
- cyan
|
||||||
|
|
||||||
|
# Foreground color of marked base commit (for rebase)
|
||||||
|
markedBaseCommitFgColor:
|
||||||
|
- blue
|
||||||
|
|
||||||
|
# Background color of marked base commit (for rebase)
|
||||||
|
markedBaseCommitBgColor:
|
||||||
|
- yellow
|
||||||
|
|
||||||
|
# Color for file with unstaged changes
|
||||||
|
unstagedChangesColor:
|
||||||
|
- red
|
||||||
|
|
||||||
|
# Default text color
|
||||||
|
defaultFgColor:
|
||||||
|
- default
|
||||||
|
|
||||||
|
# Config relating to the commit length indicator
|
||||||
|
commitLength:
|
||||||
|
# If true, show an indicator of commit message length
|
||||||
|
show: true
|
||||||
|
|
||||||
|
# If true, show the '5 of 20' footer at the bottom of list views
|
||||||
|
showListFooter: true
|
||||||
|
|
||||||
|
# If true, display the files in the file views as a tree. If false, display the files as a flat list.
|
||||||
|
# This can be toggled from within Lazygit with the '~' key, but that will not change the default.
|
||||||
|
showFileTree: false
|
||||||
|
|
||||||
|
# If true, show a random tip in the command log when Lazygit starts
|
||||||
|
showRandomTip: true
|
||||||
|
|
||||||
|
# If true, show the command log
|
||||||
|
showCommandLog: true
|
||||||
|
|
||||||
|
# If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.
|
||||||
|
showBottomLine: true
|
||||||
|
|
||||||
|
# If true, show jump-to-window keybindings in window titles.
|
||||||
|
showPanelJumps: true
|
||||||
|
|
||||||
|
# Deprecated: use nerdFontsVersion instead
|
||||||
|
showIcons: false
|
||||||
|
|
||||||
|
# Nerd fonts version to use.
|
||||||
|
# One of: '2' | '3' | empty string (default)
|
||||||
|
# If empty, do not show icons.
|
||||||
|
nerdFontsVersion: "3"
|
||||||
|
|
||||||
|
# If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.
|
||||||
|
showFileIcons: true
|
||||||
|
|
||||||
|
# Length of author name in (non-expanded) commits view. 2 means show initials only.
|
||||||
|
commitAuthorShortLength: 2
|
||||||
|
|
||||||
|
# Length of author name in expanded commits view. 2 means show initials only.
|
||||||
|
commitAuthorLongLength: 17
|
||||||
|
|
||||||
|
# Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.
|
||||||
|
commitHashLength: 8
|
||||||
|
|
||||||
|
# If true, show commit hashes alongside branch names in the branches view.
|
||||||
|
showBranchCommitHash: false
|
||||||
|
|
||||||
|
# Whether to show the divergence from the base branch in the branches view.
|
||||||
|
# One of: 'none' | 'onlyArrow' | 'arrowAndNumber'
|
||||||
|
showDivergenceFromBaseBranch: none
|
||||||
|
|
||||||
|
# Height of the command log view
|
||||||
|
commandLogSize: 8
|
||||||
|
|
||||||
|
# Whether to split the main window when viewing file changes.
|
||||||
|
# One of: 'auto' | 'always'
|
||||||
|
# If 'auto', only split the main window when a file has both staged and unstaged changes
|
||||||
|
splitDiff: auto
|
||||||
|
|
||||||
|
# Default size for focused window. Window size can be changed from within Lazygit with '+' and '_' (but this won't change the default).
|
||||||
|
# One of: 'normal' (default) | 'half' | 'full'
|
||||||
|
windowSize: normal
|
||||||
|
|
||||||
|
# Window border style.
|
||||||
|
# One of 'rounded' (default) | 'single' | 'double' | 'hidden'
|
||||||
|
border: rounded
|
||||||
|
|
||||||
|
# If true, show a seriously epic explosion animation when nuking the working tree.
|
||||||
|
animateExplosion: true
|
||||||
|
|
||||||
|
# Whether to stack UI components on top of each other.
|
||||||
|
# One of 'auto' (default) | 'always' | 'never'
|
||||||
|
portraitMode: auto
|
||||||
|
|
||||||
|
# How things are filtered when typing '/'.
|
||||||
|
# One of 'substring' (default) | 'fuzzy'
|
||||||
|
filterMode: substring
|
||||||
|
|
||||||
|
# Config relating to the spinner.
|
||||||
|
spinner:
|
||||||
|
# The frames of the spinner animation.
|
||||||
|
frames:
|
||||||
|
- '|'
|
||||||
|
- /
|
||||||
|
- '-'
|
||||||
|
- \
|
||||||
|
|
||||||
|
# The "speed" of the spinner in milliseconds.
|
||||||
|
rate: 50
|
||||||
|
|
||||||
|
# Status panel view.
|
||||||
|
# One of 'dashboard' (default) | 'allBranchesLog'
|
||||||
|
statusPanelView: dashboard
|
||||||
|
|
||||||
|
# If true, jump to the Files panel after popping a stash
|
||||||
|
switchToFilesAfterStashPop: true
|
||||||
|
|
||||||
|
# If true, jump to the Files panel after applying a stash
|
||||||
|
switchToFilesAfterStashApply: true
|
||||||
|
|
||||||
|
# Config relating to git
|
||||||
|
git:
|
||||||
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
|
||||||
|
paging:
|
||||||
|
# Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'
|
||||||
|
colorArg: always
|
||||||
|
|
||||||
|
# e.g.
|
||||||
|
# diff-so-fancy
|
||||||
|
# delta --dark --paging=never
|
||||||
|
# ydiff -p cat -s --wrap --width={{columnWidth}}
|
||||||
|
pager: ""
|
||||||
|
|
||||||
|
# If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
|
||||||
|
useConfig: false
|
||||||
|
|
||||||
|
# e.g. 'difft --color=always'
|
||||||
|
externalDiffCommand: ""
|
||||||
|
|
||||||
|
# Config relating to committing
|
||||||
|
commit:
|
||||||
|
# If true, pass '--signoff' flag when committing
|
||||||
|
signOff: false
|
||||||
|
|
||||||
|
# Automatic WYSIWYG wrapping of the commit message as you type
|
||||||
|
autoWrapCommitMessage: true
|
||||||
|
|
||||||
|
# If autoWrapCommitMessage is true, the width to wrap to
|
||||||
|
autoWrapWidth: 72
|
||||||
|
|
||||||
|
# Config relating to merging
|
||||||
|
merging:
|
||||||
|
# If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang
|
||||||
|
# Only applicable to unix users.
|
||||||
|
manualCommit: false
|
||||||
|
|
||||||
|
# Extra args passed to `git merge`, e.g. --no-ff
|
||||||
|
args: ""
|
||||||
|
|
||||||
|
# The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.
|
||||||
|
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
|
||||||
|
|
||||||
|
# list of branches that are considered 'main' branches, used when displaying commits
|
||||||
|
mainBranches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
|
||||||
|
# Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'
|
||||||
|
skipHookPrefix: WIP
|
||||||
|
|
||||||
|
# If true, periodically fetch from remote
|
||||||
|
autoFetch: true
|
||||||
|
|
||||||
|
# If true, periodically refresh files and submodules
|
||||||
|
autoRefresh: true
|
||||||
|
|
||||||
|
# If true, pass the --all arg to git fetch
|
||||||
|
fetchAll: true
|
||||||
|
|
||||||
|
# If true, lazygit will automatically stage files that used to have merge
|
||||||
|
# conflicts but no longer do; and it will also ask you if you want to
|
||||||
|
# continue a merge or rebase if you've resolved all conflicts. If false, it
|
||||||
|
# won't do either of these things.
|
||||||
|
autoStageResolvedConflicts: true
|
||||||
|
|
||||||
|
# Command used when displaying the current branch git log in the main window
|
||||||
|
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --
|
||||||
|
|
||||||
|
# Command used to display git log of all branches in the main window.
|
||||||
|
# Deprecated: User `allBranchesLogCmds` instead.
|
||||||
|
allBranchesLogCmd: git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
|
||||||
|
|
||||||
|
# If true, do not spawn a separate process when using GPG
|
||||||
|
overrideGpg: false
|
||||||
|
|
||||||
|
# If true, do not allow force pushes
|
||||||
|
disableForcePushing: false
|
||||||
|
|
||||||
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
|
||||||
|
commitPrefix:
|
||||||
|
# pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
|
||||||
|
pattern: ""
|
||||||
|
|
||||||
|
# Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
|
||||||
|
replace: ""
|
||||||
|
|
||||||
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix
|
||||||
|
branchPrefix: ""
|
||||||
|
|
||||||
|
# If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀
|
||||||
|
# (This should really be under 'gui', not 'git')
|
||||||
|
parseEmoji: true
|
||||||
|
|
||||||
|
# Config for showing the log in the commits view
|
||||||
|
log:
|
||||||
|
# One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
|
||||||
|
# 'topo-order' makes it easier to read the git log graph, but commits may not
|
||||||
|
# appear chronologically. See https://git-scm.com/docs/
|
||||||
|
#
|
||||||
|
# Deprecated: Configure this with `Log menu -> Commit sort order` (<c-l> in the commits window by default).
|
||||||
|
order: topo-order
|
||||||
|
|
||||||
|
# This determines whether the git graph is rendered in the commits panel
|
||||||
|
# One of 'always' | 'never' | 'when-maximised'
|
||||||
|
#
|
||||||
|
# Deprecated: Configure this with `Log menu -> Show git graph` (<c-l> in the commits window by default).
|
||||||
|
showGraph: always
|
||||||
|
|
||||||
|
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
|
||||||
|
showWholeGraph: false
|
||||||
|
|
||||||
|
# When copying commit hashes to the clipboard, truncate them to this
|
||||||
|
# length. Set to 40 to disable truncation.
|
||||||
|
truncateCopiedCommitHashesTo: 12
|
||||||
|
|
||||||
|
# Periodic update checks
|
||||||
|
update:
|
||||||
|
# One of: 'prompt' (default) | 'background' | 'never'
|
||||||
|
method: prompt
|
||||||
|
|
||||||
|
# Period in days between update checks
|
||||||
|
days: 14
|
||||||
|
|
||||||
|
# Background refreshes
|
||||||
|
refresher:
|
||||||
|
# File/submodule refresh interval in seconds.
|
||||||
|
# Auto-refresh can be disabled via option 'git.autoRefresh'.
|
||||||
|
refreshInterval: 10
|
||||||
|
|
||||||
|
# Re-fetch interval in seconds.
|
||||||
|
# Auto-fetch can be disabled via option 'git.autoFetch'.
|
||||||
|
fetchInterval: 60
|
||||||
|
|
||||||
|
# If true, show a confirmation popup before quitting Lazygit
|
||||||
|
confirmOnQuit: false
|
||||||
|
|
||||||
|
# If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close
|
||||||
|
quitOnTopLevelReturn: false
|
||||||
|
|
||||||
|
# Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc
|
||||||
|
os:
|
||||||
|
# Command for editing a file. Should contain "{{filename}}".
|
||||||
|
edit: ""
|
||||||
|
|
||||||
|
# Command for editing a file at a given line number. Should contain
|
||||||
|
# "{{filename}}", and may optionally contain "{{line}}".
|
||||||
|
editAtLine: ""
|
||||||
|
|
||||||
|
# Same as EditAtLine, except that the command needs to wait until the
|
||||||
|
# window is closed.
|
||||||
|
editAtLineAndWait: ""
|
||||||
|
|
||||||
|
# For opening a directory in an editor
|
||||||
|
openDirInEditor: ""
|
||||||
|
|
||||||
|
# A built-in preset that sets all of the above settings. Supported presets
|
||||||
|
# are defined in the getPreset function in editor_presets.go.
|
||||||
|
editPreset: ""
|
||||||
|
|
||||||
|
# Command for opening a file, as if the file is double-clicked. Should
|
||||||
|
# contain "{{filename}}", but doesn't support "{{line}}".
|
||||||
|
open: ""
|
||||||
|
|
||||||
|
# Command for opening a link. Should contain "{{link}}".
|
||||||
|
openLink: ""
|
||||||
|
|
||||||
|
# EditCommand is the command for editing a file.
|
||||||
|
# Deprecated: use Edit instead. Note that semantics are different:
|
||||||
|
# EditCommand is just the command itself, whereas Edit contains a
|
||||||
|
# "{{filename}}" variable.
|
||||||
|
editCommand: ""
|
||||||
|
|
||||||
|
# EditCommandTemplate is the command template for editing a file
|
||||||
|
# Deprecated: use EditAtLine instead.
|
||||||
|
editCommandTemplate: ""
|
||||||
|
|
||||||
|
# OpenCommand is the command for opening a file
|
||||||
|
# Deprecated: use Open instead.
|
||||||
|
openCommand: ""
|
||||||
|
|
||||||
|
# OpenLinkCommand is the command for opening a link
|
||||||
|
# Deprecated: use OpenLink instead.
|
||||||
|
openLinkCommand: ""
|
||||||
|
|
||||||
|
# CopyToClipboardCmd is the command for copying to clipboard.
|
||||||
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
|
||||||
|
copyToClipboardCmd: ""
|
||||||
|
|
||||||
|
# ReadFromClipboardCmd is the command for reading the clipboard.
|
||||||
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
|
||||||
|
readFromClipboardCmd: ""
|
||||||
|
|
||||||
|
# If true, don't display introductory popups upon opening Lazygit.
|
||||||
|
disableStartupPopups: false
|
||||||
|
|
||||||
|
# What to do when opening Lazygit outside of a git repo.
|
||||||
|
# - 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo
|
||||||
|
# - 'create': initialize a new repo
|
||||||
|
# - 'skip': open most recent repo
|
||||||
|
# - 'quit': exit Lazygit
|
||||||
|
notARepository: prompt
|
||||||
|
|
||||||
|
# If true, display a confirmation when subprocess terminates. This allows you to view the output of the subprocess before returning to Lazygit.
|
||||||
|
promptToReturnFromSubprocess: true
|
||||||
|
|
||||||
|
# Keybindings
|
||||||
|
keybinding:
|
||||||
|
universal:
|
||||||
|
quit: q
|
||||||
|
quit-alt1: <c-c>
|
||||||
|
return: <esc>
|
||||||
|
quitWithoutChangingDirectory: Q
|
||||||
|
togglePanel: <tab>
|
||||||
|
prevItem: <up>
|
||||||
|
nextItem: <down>
|
||||||
|
prevItem-alt: k
|
||||||
|
nextItem-alt: j
|
||||||
|
prevPage: ','
|
||||||
|
nextPage: .
|
||||||
|
scrollLeft: H
|
||||||
|
scrollRight: L
|
||||||
|
gotoTop: <
|
||||||
|
gotoBottom: '>'
|
||||||
|
toggleRangeSelect: v
|
||||||
|
rangeSelectDown: <s-down>
|
||||||
|
rangeSelectUp: <s-up>
|
||||||
|
prevBlock: <left>
|
||||||
|
nextBlock: <right>
|
||||||
|
prevBlock-alt: h
|
||||||
|
nextBlock-alt: l
|
||||||
|
nextBlock-alt2: <tab>
|
||||||
|
prevBlock-alt2: <backtab>
|
||||||
|
jumpToBlock:
|
||||||
|
- "1"
|
||||||
|
- "2"
|
||||||
|
- "3"
|
||||||
|
- "4"
|
||||||
|
- "5"
|
||||||
|
nextMatch: "n"
|
||||||
|
prevMatch: "N"
|
||||||
|
startSearch: /
|
||||||
|
optionMenu: <disabled>
|
||||||
|
optionMenu-alt1: '?'
|
||||||
|
select: <space>
|
||||||
|
goInto: <enter>
|
||||||
|
confirm: <enter>
|
||||||
|
confirmInEditor: <a-enter>
|
||||||
|
remove: d
|
||||||
|
new: "n"
|
||||||
|
edit: e
|
||||||
|
openFile: o
|
||||||
|
scrollUpMain: <pgup>
|
||||||
|
scrollDownMain: <pgdown>
|
||||||
|
scrollUpMain-alt1: K
|
||||||
|
scrollDownMain-alt1: J
|
||||||
|
scrollUpMain-alt2: <c-u>
|
||||||
|
scrollDownMain-alt2: <c-d>
|
||||||
|
executeShellCommand: ':'
|
||||||
|
createRebaseOptionsMenu: m
|
||||||
|
|
||||||
|
# 'Files' appended for legacy reasons
|
||||||
|
pushFiles: P
|
||||||
|
|
||||||
|
# 'Files' appended for legacy reasons
|
||||||
|
pullFiles: p
|
||||||
|
refresh: R
|
||||||
|
createPatchOptionsMenu: <c-p>
|
||||||
|
nextTab: ']'
|
||||||
|
prevTab: '['
|
||||||
|
nextScreenMode: +
|
||||||
|
prevScreenMode: _
|
||||||
|
undo: z
|
||||||
|
redo: <c-z>
|
||||||
|
filteringMenu: <c-s>
|
||||||
|
diffingMenu: W
|
||||||
|
diffingMenu-alt: <c-e>
|
||||||
|
copyToClipboard: <c-o>
|
||||||
|
openRecentRepos: <c-r>
|
||||||
|
submitEditorText: <enter>
|
||||||
|
extrasMenu: '@'
|
||||||
|
toggleWhitespaceInDiffView: <c-w>
|
||||||
|
increaseContextInDiffView: '}'
|
||||||
|
decreaseContextInDiffView: '{'
|
||||||
|
increaseRenameSimilarityThreshold: )
|
||||||
|
decreaseRenameSimilarityThreshold: (
|
||||||
|
openDiffTool: <c-t>
|
||||||
|
status:
|
||||||
|
checkForUpdate: u
|
||||||
|
recentRepos: <enter>
|
||||||
|
allBranchesLogGraph: a
|
||||||
|
files:
|
||||||
|
commitChanges: c
|
||||||
|
commitChangesWithoutHook: w
|
||||||
|
amendLastCommit: A
|
||||||
|
commitChangesWithEditor: C
|
||||||
|
findBaseCommitForFixup: <c-f>
|
||||||
|
confirmDiscard: x
|
||||||
|
ignoreFile: i
|
||||||
|
refreshFiles: r
|
||||||
|
stashAllChanges: s
|
||||||
|
viewStashOptions: S
|
||||||
|
toggleStagedAll: a
|
||||||
|
viewResetOptions: D
|
||||||
|
fetch: f
|
||||||
|
toggleTreeView: '`'
|
||||||
|
openMergeTool: M
|
||||||
|
openStatusFilter: <c-b>
|
||||||
|
copyFileInfoToClipboard: "y"
|
||||||
|
branches:
|
||||||
|
createPullRequest: o
|
||||||
|
viewPullRequestOptions: O
|
||||||
|
copyPullRequestURL: <c-y>
|
||||||
|
checkoutBranchByName: c
|
||||||
|
forceCheckoutBranch: F
|
||||||
|
rebaseBranch: r
|
||||||
|
renameBranch: R
|
||||||
|
mergeIntoCurrentBranch: M
|
||||||
|
viewGitFlowOptions: i
|
||||||
|
fastForward: f
|
||||||
|
createTag: T
|
||||||
|
pushTag: P
|
||||||
|
setUpstream: u
|
||||||
|
fetchRemote: f
|
||||||
|
sortOrder: s
|
||||||
|
worktrees:
|
||||||
|
viewWorktreeOptions: w
|
||||||
|
commits:
|
||||||
|
squashDown: s
|
||||||
|
renameCommit: r
|
||||||
|
renameCommitWithEditor: R
|
||||||
|
viewResetOptions: g
|
||||||
|
markCommitAsFixup: f
|
||||||
|
createFixupCommit: F
|
||||||
|
squashAboveCommits: S
|
||||||
|
moveDownCommit: <c-j>
|
||||||
|
moveUpCommit: <c-k>
|
||||||
|
amendToCommit: A
|
||||||
|
resetCommitAuthor: a
|
||||||
|
pickCommit: p
|
||||||
|
revertCommit: t
|
||||||
|
cherryPickCopy: C
|
||||||
|
pasteCommits: V
|
||||||
|
markCommitAsBaseForRebase: B
|
||||||
|
tagCommit: T
|
||||||
|
checkoutCommit: <space>
|
||||||
|
resetCherryPick: <c-R>
|
||||||
|
copyCommitAttributeToClipboard: "y"
|
||||||
|
openLogMenu: <c-l>
|
||||||
|
openInBrowser: o
|
||||||
|
viewBisectOptions: b
|
||||||
|
startInteractiveRebase: i
|
||||||
|
amendAttribute:
|
||||||
|
resetAuthor: a
|
||||||
|
setAuthor: A
|
||||||
|
addCoAuthor: c
|
||||||
|
stash:
|
||||||
|
popStash: g
|
||||||
|
renameStash: r
|
||||||
|
commitFiles:
|
||||||
|
checkoutCommitFile: c
|
||||||
|
main:
|
||||||
|
toggleSelectHunk: a
|
||||||
|
pickBothHunks: b
|
||||||
|
editSelectHunk: E
|
||||||
|
submodules:
|
||||||
|
init: i
|
||||||
|
update: u
|
||||||
|
bulkMenu: b
|
||||||
|
commitMessage:
|
||||||
|
commitMenu: <c-o>
|
||||||
6
.config/nvim/.stylua.toml
Normal file
6
.config/nvim/.stylua.toml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
column_width = 160
|
||||||
|
line_endings = "Unix"
|
||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 2
|
||||||
|
quote_style = "AutoPreferSingle"
|
||||||
|
call_parentheses = "None"
|
||||||
19
.config/nvim/LICENSE.md
Normal file
19
.config/nvim/LICENSE.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
233
.config/nvim/README.md
Normal file
233
.config/nvim/README.md
Normal file
@@ -0,0 +1,233 @@
|
|||||||
|
# kickstart.nvim
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
A starting point for Neovim that is:
|
||||||
|
|
||||||
|
* Small
|
||||||
|
* Single-file
|
||||||
|
* Completely Documented
|
||||||
|
|
||||||
|
**NOT** a Neovim distribution, but instead a starting point for your configuration.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Install Neovim
|
||||||
|
|
||||||
|
Kickstart.nvim targets *only* the latest
|
||||||
|
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
|
||||||
|
['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
|
||||||
|
If you are experiencing issues, please make sure you have the latest versions.
|
||||||
|
|
||||||
|
### Install External Dependencies
|
||||||
|
|
||||||
|
External Requirements:
|
||||||
|
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
||||||
|
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
||||||
|
- Clipboard tool (xclip/xsel/win32yank or other depending on platform)
|
||||||
|
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
|
||||||
|
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
|
||||||
|
- Language Setup:
|
||||||
|
- If you want to write Typescript, you need `npm`
|
||||||
|
- If you want to write Golang, you will need `go`
|
||||||
|
- etc.
|
||||||
|
|
||||||
|
> **NOTE**
|
||||||
|
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
|
||||||
|
> and quick install snippets
|
||||||
|
|
||||||
|
### Install Kickstart
|
||||||
|
|
||||||
|
> **NOTE**
|
||||||
|
> [Backup](#FAQ) your previous configuration (if any exists)
|
||||||
|
|
||||||
|
Neovim's configurations are located under the following paths, depending on your OS:
|
||||||
|
|
||||||
|
| OS | PATH |
|
||||||
|
| :- | :--- |
|
||||||
|
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
|
||||||
|
| Windows (cmd)| `%localappdata%\nvim\` |
|
||||||
|
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
|
||||||
|
|
||||||
|
#### Recommended Step
|
||||||
|
|
||||||
|
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
|
||||||
|
so that you have your own copy that you can modify, then install by cloning the
|
||||||
|
fork to your machine using one of the commands below, depending on your OS.
|
||||||
|
|
||||||
|
> **NOTE**
|
||||||
|
> Your fork's url will be something like this:
|
||||||
|
> `https://github.com/<your_github_username>/kickstart.nvim.git`
|
||||||
|
|
||||||
|
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
|
||||||
|
too - it's ignored in the kickstart repo to make maintenance easier, but it's
|
||||||
|
[recommmended to track it in version control](https://lazy.folke.io/usage/lockfile).
|
||||||
|
|
||||||
|
#### Clone kickstart.nvim
|
||||||
|
> **NOTE**
|
||||||
|
> If following the recommended step above (i.e., forking the repo), replace
|
||||||
|
> `nvim-lua` with `<your_github_username>` in the commands below
|
||||||
|
|
||||||
|
<details><summary> Linux and Mac </summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary> Windows </summary>
|
||||||
|
|
||||||
|
If you're using `cmd.exe`:
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're using `powershell.exe`
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### Post Installation
|
||||||
|
|
||||||
|
Start Neovim
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
||||||
|
current plugin status. Hit `q` to close the window.
|
||||||
|
|
||||||
|
Read through the `init.lua` file in your configuration folder for more
|
||||||
|
information about extending and exploring Neovim. That also includes
|
||||||
|
examples of adding popularly requested plugins.
|
||||||
|
|
||||||
|
|
||||||
|
### Getting Started
|
||||||
|
|
||||||
|
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
|
||||||
|
|
||||||
|
### FAQ
|
||||||
|
|
||||||
|
* What should I do if I already have a pre-existing neovim configuration?
|
||||||
|
* You should back it up and then delete all associated files.
|
||||||
|
* This includes your existing init.lua and the neovim files in `~/.local`
|
||||||
|
which can be deleted with `rm -rf ~/.local/share/nvim/`
|
||||||
|
* Can I keep my existing configuration in parallel to kickstart?
|
||||||
|
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME`
|
||||||
|
to maintain multiple configurations. For example, you can install the kickstart
|
||||||
|
configuration in `~/.config/nvim-kickstart` and create an alias:
|
||||||
|
```
|
||||||
|
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
|
||||||
|
```
|
||||||
|
When you run Neovim using `nvim-kickstart` alias it will use the alternative
|
||||||
|
config directory and the matching local directory
|
||||||
|
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
|
||||||
|
distribution that you would like to try out.
|
||||||
|
* What if I want to "uninstall" this configuration:
|
||||||
|
* See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
|
||||||
|
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
|
||||||
|
* The main purpose of kickstart is to serve as a teaching tool and a reference
|
||||||
|
configuration that someone can easily use to `git clone` as a basis for their own.
|
||||||
|
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
|
||||||
|
into smaller parts. A fork of kickstart that does this while maintaining the
|
||||||
|
same functionality is available here:
|
||||||
|
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
|
||||||
|
* Discussions on this topic can be found here:
|
||||||
|
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
|
||||||
|
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
|
||||||
|
|
||||||
|
### Install Recipes
|
||||||
|
|
||||||
|
Below you can find OS specific install instructions for Neovim and dependencies.
|
||||||
|
|
||||||
|
After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step.
|
||||||
|
|
||||||
|
#### Windows Installation
|
||||||
|
|
||||||
|
<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
|
||||||
|
Installation may require installing build tools and updating the run command for `telescope-fzf-native`
|
||||||
|
|
||||||
|
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
|
||||||
|
|
||||||
|
This requires:
|
||||||
|
|
||||||
|
- Install CMake and the Microsoft C++ Build Tools on Windows
|
||||||
|
|
||||||
|
```lua
|
||||||
|
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
<details><summary>Windows with gcc/make using chocolatey</summary>
|
||||||
|
Alternatively, one can install gcc and make which don't require changing the config,
|
||||||
|
the easiest way is to use choco:
|
||||||
|
|
||||||
|
1. install [chocolatey](https://chocolatey.org/install)
|
||||||
|
either follow the instructions on the page or use winget,
|
||||||
|
run in cmd as **admin**:
|
||||||
|
```
|
||||||
|
winget install --accept-source-agreements chocolatey.chocolatey
|
||||||
|
```
|
||||||
|
|
||||||
|
2. install all requirements using choco, exit previous cmd and
|
||||||
|
open a new one so that choco path is set, and run in cmd as **admin**:
|
||||||
|
```
|
||||||
|
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
<details><summary>WSL (Windows Subsystem for Linux)</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
wsl --install
|
||||||
|
wsl
|
||||||
|
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install make gcc ripgrep unzip git xclip neovim
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
#### Linux Install
|
||||||
|
<details><summary>Ubuntu Install Steps</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install make gcc ripgrep unzip git xclip neovim
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
<details><summary>Debian Install Steps</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install make gcc ripgrep unzip git xclip curl
|
||||||
|
|
||||||
|
# Now we install nvim
|
||||||
|
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
|
||||||
|
sudo rm -rf /opt/nvim-linux64
|
||||||
|
sudo mkdir -p /opt/nvim-linux64
|
||||||
|
sudo chmod a+rX /opt/nvim-linux64
|
||||||
|
sudo tar -C /opt -xzf nvim-linux64.tar.gz
|
||||||
|
|
||||||
|
# make it available in /usr/local/bin, distro installs to /usr/bin
|
||||||
|
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
<details><summary>Fedora Install Steps</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Arch Install Steps</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
467
.config/nvim/init.lua
Normal file
467
.config/nvim/init.lua
Normal file
@@ -0,0 +1,467 @@
|
|||||||
|
-- Set <space> as the leader key
|
||||||
|
-- See `:help mapleader`
|
||||||
|
-- Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
|
-- [[ Setting options ]]
|
||||||
|
-- See `:help vim.opt`
|
||||||
|
|
||||||
|
-- Make line numbers default
|
||||||
|
vim.opt.number = true
|
||||||
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
|
-- Experiment for yourself to see if you like it!
|
||||||
|
-- vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
|
vim.opt.mouse = 'a'
|
||||||
|
|
||||||
|
-- Don't show the mode, since it's already in the status line
|
||||||
|
vim.opt.showmode = false
|
||||||
|
|
||||||
|
-- Sync clipboard between OS and Neovim.
|
||||||
|
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||||
|
-- Remove this option if you want your OS clipboard to remain independent.
|
||||||
|
-- See `:help 'clipboard'`
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.opt.clipboard = 'unnamedplus'
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Enable break indent
|
||||||
|
vim.opt.breakindent = true
|
||||||
|
|
||||||
|
-- Save undo history
|
||||||
|
vim.opt.undofile = true
|
||||||
|
|
||||||
|
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||||
|
vim.opt.ignorecase = true
|
||||||
|
vim.opt.smartcase = true
|
||||||
|
|
||||||
|
-- Keep signcolumn on by default
|
||||||
|
vim.opt.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- Decrease update time
|
||||||
|
vim.opt.updatetime = 250
|
||||||
|
|
||||||
|
-- Decrease mapped sequence wait time
|
||||||
|
-- Displays which-key popup sooner
|
||||||
|
vim.opt.timeoutlen = 300
|
||||||
|
|
||||||
|
-- Configure how new splits should be opened
|
||||||
|
vim.opt.splitright = true
|
||||||
|
vim.opt.splitbelow = true
|
||||||
|
|
||||||
|
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||||
|
-- See `:help 'list'`
|
||||||
|
-- and `:help 'listchars'`
|
||||||
|
vim.opt.list = true
|
||||||
|
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||||
|
|
||||||
|
-- Preview substitutions live, as you type!
|
||||||
|
vim.opt.inccommand = 'split'
|
||||||
|
|
||||||
|
-- Show which line your cursor is on
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
|
||||||
|
-- Minimal number of screen lines to keep above and below the cursor.
|
||||||
|
vim.opt.scrolloff = 10
|
||||||
|
|
||||||
|
-- [[ Basic Keymaps ]]
|
||||||
|
-- See `:help vim.keymap.set()`
|
||||||
|
|
||||||
|
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||||
|
-- See `:help hlsearch`
|
||||||
|
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||||
|
|
||||||
|
-- Diagnostic keymaps
|
||||||
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||||
|
|
||||||
|
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||||
|
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||||
|
-- is not what someone will guess without a bit more experience.
|
||||||
|
--
|
||||||
|
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||||
|
-- or just use <C-\><C-n> to exit terminal mode
|
||||||
|
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||||
|
|
||||||
|
-- TIP: Disable arrow keys in normal mode
|
||||||
|
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||||
|
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||||
|
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||||
|
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||||
|
|
||||||
|
-- Keybinds to make split navigation easier.
|
||||||
|
-- Use CTRL+<hjkl> to switch between windows
|
||||||
|
--
|
||||||
|
-- See `:help wincmd` for a list of all window commands
|
||||||
|
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||||
|
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||||
|
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||||
|
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||||
|
|
||||||
|
-- Turn on/off word wrapping
|
||||||
|
vim.keymap.set('n', '<M-z>', '<CMD>set wrap!<CR>', { desc = 'Toggle word wrap' })
|
||||||
|
|
||||||
|
-- [[ Basic Autocommands ]]
|
||||||
|
-- See `:help lua-guide-autocommands
|
||||||
|
|
||||||
|
-- Highlight when yanking (copying) text
|
||||||
|
-- Try it with `yap` in normal mode
|
||||||
|
-- See `:help vim.highlight.on_yank()`
|
||||||
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
|
desc = 'Highlight when yanking (copying) text',
|
||||||
|
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||||
|
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||||
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||||
|
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
error('Error cloning lazy.nvim:\n' .. out)
|
||||||
|
end
|
||||||
|
end ---@diagnostic disable-next-line: undefined-field
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- [[ Configure and install plugins ]]
|
||||||
|
--
|
||||||
|
-- To check the current status of your plugins, run
|
||||||
|
-- :Lazy
|
||||||
|
--
|
||||||
|
-- You can press `?` in this menu for help. Use `:q` to close the window
|
||||||
|
--
|
||||||
|
-- To update plugins you can run
|
||||||
|
-- :Lazy update
|
||||||
|
--
|
||||||
|
-- NOTE: Here is where you install your plugins.
|
||||||
|
require('lazy').setup({
|
||||||
|
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||||
|
|
||||||
|
{ -- Useful plugin to show you pending keybinds.
|
||||||
|
'folke/which-key.nvim',
|
||||||
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||||
|
opts = {
|
||||||
|
icons = {
|
||||||
|
-- set icon mappings to true if you have a Nerd Font
|
||||||
|
mappings = vim.g.have_nerd_font,
|
||||||
|
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
|
||||||
|
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
|
||||||
|
keys = vim.g.have_nerd_font and {} or {
|
||||||
|
Up = '<Up> ',
|
||||||
|
Down = '<Down> ',
|
||||||
|
Left = '<Left> ',
|
||||||
|
Right = '<Right> ',
|
||||||
|
C = '<C-…> ',
|
||||||
|
M = '<M-…> ',
|
||||||
|
D = '<D-…> ',
|
||||||
|
S = '<S-…> ',
|
||||||
|
CR = '<CR> ',
|
||||||
|
Esc = '<Esc> ',
|
||||||
|
ScrollWheelDown = '<ScrollWheelDown> ',
|
||||||
|
ScrollWheelUp = '<ScrollWheelUp> ',
|
||||||
|
NL = '<NL> ',
|
||||||
|
BS = '<BS> ',
|
||||||
|
Space = '<Space> ',
|
||||||
|
Tab = '<Tab> ',
|
||||||
|
F1 = '<F1>',
|
||||||
|
F2 = '<F2>',
|
||||||
|
F3 = '<F3>',
|
||||||
|
F4 = '<F4>',
|
||||||
|
F5 = '<F5>',
|
||||||
|
F6 = '<F6>',
|
||||||
|
F7 = '<F7>',
|
||||||
|
F8 = '<F8>',
|
||||||
|
F9 = '<F9>',
|
||||||
|
F10 = '<F10>',
|
||||||
|
F11 = '<F11>',
|
||||||
|
F12 = '<F12>',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Document existing key chains
|
||||||
|
spec = {
|
||||||
|
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
|
||||||
|
{ '<leader>d', group = '[D]ocument' },
|
||||||
|
{ '<leader>r', group = '[R]ename' },
|
||||||
|
{ '<leader>s', group = '[S]earch' },
|
||||||
|
{ '<leader>w', group = '[W]orkspace' },
|
||||||
|
{ '<leader>t', group = '[T]oggle' },
|
||||||
|
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- NOTE: Plugins can specify dependencies.
|
||||||
|
--
|
||||||
|
-- The dependencies are proper plugin specifications as well - anything
|
||||||
|
-- you do for a plugin at the top level, you can do for a dependency.
|
||||||
|
--
|
||||||
|
-- Use the `dependencies` key to specify the dependencies of a particular plugin
|
||||||
|
|
||||||
|
{ -- Fuzzy Finder (files, lsp, etc)
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
branch = '0.1.x',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
|
||||||
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
|
||||||
|
-- `build` is used to run some command when the plugin is installed/updated.
|
||||||
|
-- This is only run then, not every time Neovim starts up.
|
||||||
|
build = 'make',
|
||||||
|
|
||||||
|
-- `cond` is a condition used to determine whether this plugin should be
|
||||||
|
-- installed and loaded.
|
||||||
|
cond = function()
|
||||||
|
return vim.fn.executable 'make' == 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||||
|
|
||||||
|
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||||
|
-- { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
||||||
|
-- it can fuzzy find! It's more than just a "file finder", it can search
|
||||||
|
-- many different aspects of Neovim, your workspace, LSP, and more!
|
||||||
|
--
|
||||||
|
-- The easiest way to use Telescope, is to start by doing something like:
|
||||||
|
-- :Telescope help_tags
|
||||||
|
--
|
||||||
|
-- After running this command, a window will open up and you're able to
|
||||||
|
-- type in the prompt window. You'll see a list of `help_tags` options and
|
||||||
|
-- a corresponding preview of the help.
|
||||||
|
--
|
||||||
|
-- Two important keymaps to use while in Telescope are:
|
||||||
|
-- - Insert mode: <c-/>
|
||||||
|
-- - Normal mode: ?
|
||||||
|
--
|
||||||
|
-- This opens a window that shows you all of the keymaps for the current
|
||||||
|
-- Telescope picker. This is really useful to discover what Telescope can
|
||||||
|
-- do as well as how to actually do it!
|
||||||
|
|
||||||
|
-- [[ Configure Telescope ]]
|
||||||
|
-- See `:help telescope` and `:help telescope.setup()`
|
||||||
|
require('telescope').setup {
|
||||||
|
-- You can put your default mappings / updates / etc. in here
|
||||||
|
-- All the info you're looking for is in `:help telescope.setup()`
|
||||||
|
--
|
||||||
|
-- defaults = {
|
||||||
|
-- mappings = {
|
||||||
|
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- pickers = {}
|
||||||
|
extensions = {
|
||||||
|
['ui-select'] = {
|
||||||
|
require('telescope.themes').get_dropdown(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Enable Telescope extensions if they are installed
|
||||||
|
pcall(require('telescope').load_extension, 'fzf')
|
||||||
|
pcall(require('telescope').load_extension, 'ui-select')
|
||||||
|
|
||||||
|
-- See `:help telescope.builtin`
|
||||||
|
local builtin = require 'telescope.builtin'
|
||||||
|
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||||
|
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
||||||
|
-- TODO: Make this work when there isn't a git repo
|
||||||
|
-- https://github.com/LunarVim/LunarVim/pull/2089
|
||||||
|
vim.keymap.set('n', '<leader>sf', '<cmd>Telescope git_files show_untracked=true<CR>', { desc = '[S]earch [F]iles' })
|
||||||
|
vim.keymap.set('n', '<leader>sa', '<cmd>Telescope find_files no_ignore=true hidden=true<CR>', { desc = '[S]earch [A]ll files' })
|
||||||
|
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
||||||
|
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
||||||
|
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
||||||
|
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||||
|
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
||||||
|
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||||
|
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||||
|
|
||||||
|
-- Slightly advanced example of overriding default behavior and theme
|
||||||
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
|
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
||||||
|
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||||
|
winblend = 10,
|
||||||
|
previewer = false,
|
||||||
|
})
|
||||||
|
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||||
|
|
||||||
|
-- It's also possible to pass additional configuration options.
|
||||||
|
-- See `:help telescope.builtin.live_grep()` for information about particular keys
|
||||||
|
vim.keymap.set('n', '<leader>s/', function()
|
||||||
|
builtin.live_grep {
|
||||||
|
grep_open_files = true,
|
||||||
|
prompt_title = 'Live Grep in Open Files',
|
||||||
|
}
|
||||||
|
end, { desc = '[S]earch [/] in Open Files' })
|
||||||
|
|
||||||
|
-- Shortcut for searching your Neovim configuration files
|
||||||
|
vim.keymap.set('n', '<leader>sn', function()
|
||||||
|
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||||
|
end, { desc = '[S]earch [N]eovim files' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- LSP Plugins
|
||||||
|
{
|
||||||
|
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||||
|
-- used for completion, annotations and signatures of Neovim apis
|
||||||
|
'folke/lazydev.nvim',
|
||||||
|
ft = 'lua',
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
-- Load luvit types when the `vim.uv` word is found
|
||||||
|
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ 'Bilal2453/luvit-meta', lazy = true },
|
||||||
|
|
||||||
|
{ -- Autoformat
|
||||||
|
'stevearc/conform.nvim',
|
||||||
|
event = { 'BufWritePre' },
|
||||||
|
cmd = { 'ConformInfo' },
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>f',
|
||||||
|
function()
|
||||||
|
require('conform').format { async = true, lsp_format = 'fallback' }
|
||||||
|
end,
|
||||||
|
mode = '',
|
||||||
|
desc = '[F]ormat buffer',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
notify_on_error = false,
|
||||||
|
format_on_save = function(bufnr)
|
||||||
|
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||||
|
-- have a well standardized coding style. You can add additional
|
||||||
|
-- languages here or re-enable it for the disabled ones.
|
||||||
|
local disable_filetypes = { c = true, cpp = true }
|
||||||
|
local lsp_format_opt
|
||||||
|
if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||||
|
lsp_format_opt = 'never'
|
||||||
|
else
|
||||||
|
lsp_format_opt = 'fallback'
|
||||||
|
end
|
||||||
|
return {
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_format = lsp_format_opt,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { 'stylua' },
|
||||||
|
-- Conform can also run multiple formatters sequentially
|
||||||
|
-- python = { "isort", "black" },
|
||||||
|
--
|
||||||
|
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||||
|
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{ -- Collection of various small independent plugins/modules
|
||||||
|
'echasnovski/mini.nvim',
|
||||||
|
config = function()
|
||||||
|
-- Better Around/Inside textobjects
|
||||||
|
--
|
||||||
|
-- Examples:
|
||||||
|
-- - va) - [V]isually select [A]round [)]paren
|
||||||
|
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||||
|
-- - ci' - [C]hange [I]nside [']quote
|
||||||
|
require('mini.ai').setup { n_lines = 500 }
|
||||||
|
|
||||||
|
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||||
|
--
|
||||||
|
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||||
|
-- - sd' - [S]urround [D]elete [']quotes
|
||||||
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||||
|
require('mini.surround').setup()
|
||||||
|
|
||||||
|
-- Simple and easy statusline.
|
||||||
|
-- You could remove this setup call if you don't like it,
|
||||||
|
-- and try some other statusline plugin
|
||||||
|
local statusline = require 'mini.statusline'
|
||||||
|
-- set use_icons to true if you have a Nerd Font
|
||||||
|
statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||||
|
|
||||||
|
-- You can configure sections in the statusline by overriding their
|
||||||
|
-- default behavior. For example, here we set the section for
|
||||||
|
-- cursor location to LINE:COLUMN
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
statusline.section_location = function()
|
||||||
|
return '%2l:%-2v'
|
||||||
|
end
|
||||||
|
|
||||||
|
-- ... and there is more!
|
||||||
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ -- Highlight, edit, and navigate code
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
build = ':TSUpdate',
|
||||||
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||||
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
|
opts = {
|
||||||
|
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'cpp', 'python', 'rust' },
|
||||||
|
-- Autoinstall languages that are not installed
|
||||||
|
auto_install = true,
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
||||||
|
-- If you are experiencing weird indenting issues, add the language to
|
||||||
|
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
||||||
|
additional_vim_regex_highlighting = { 'ruby' },
|
||||||
|
},
|
||||||
|
indent = { enable = true, disable = { 'ruby' } },
|
||||||
|
},
|
||||||
|
-- There are additional nvim-treesitter modules that you can use to interact
|
||||||
|
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
||||||
|
--
|
||||||
|
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
||||||
|
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||||
|
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-treesitter/nvim-treesitter-context',
|
||||||
|
opts = {
|
||||||
|
multiline_threshold = 5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ import = 'plugins' },
|
||||||
|
}, {
|
||||||
|
ui = {
|
||||||
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
||||||
|
icons = vim.g.have_nerd_font and {} or {
|
||||||
|
cmd = '⌘',
|
||||||
|
config = '🛠',
|
||||||
|
event = '📅',
|
||||||
|
ft = '📂',
|
||||||
|
init = '⚙',
|
||||||
|
keys = '🗝',
|
||||||
|
plugin = '🔌',
|
||||||
|
runtime = '💻',
|
||||||
|
require = '🌙',
|
||||||
|
source = '📄',
|
||||||
|
start = '🚀',
|
||||||
|
task = '📌',
|
||||||
|
lazy = '💤 ',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
39
.config/nvim/lazy-lock.json
Normal file
39
.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "8d7aa7a7b7c0875e4878d1d2590924bc1c229305" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "6a28c90082a67f62a323ab90d988e000a718a8c7" },
|
||||||
|
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "7c27a30450130cd59c4994a6755e3c5d74d83e76" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "cf8ecc2c5e4332760431a33534240b0cbc6680ab" },
|
||||||
|
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
|
||||||
|
"lazygit.nvim": { "branch": "main", "commit": "56760339a81cd1540d5a72fd9d93010a2677b55d" },
|
||||||
|
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
|
||||||
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
|
"mini.nvim": { "branch": "main", "commit": "0a8a1072137d916406507c941698a4bfa9dbbe7a" },
|
||||||
|
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" },
|
||||||
|
"nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "59a6766cbf32c7e4cf3ed685ccad7ffe1dde8c40" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "1c111e3e8f42c85b16cb4bf30e4254fcb5607817" },
|
||||||
|
"nvim-treesitter-context": { "branch": "master", "commit": "a2a334900d3643de585ac5c6140b03403454124f" },
|
||||||
|
"nvim-ufo": { "branch": "main", "commit": "522d719d421fc42b95577d9624048d8348d326ea" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
|
||||||
|
"onedark.nvim": { "branch": "master", "commit": "fae34f7c635797f4bf62fb00e7d0516efa8abe37" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
|
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||||
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "d227e6c9879bb50af35cd733461198666981d482" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||||
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
|
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||||
|
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||||
|
"vim-tmux-navigator": { "branch": "master", "commit": "a9b52e7d36114d40350099f254b5f299a35df978" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }
|
||||||
|
}
|
||||||
52
.config/nvim/lua/kickstart/health.lua
Normal file
52
.config/nvim/lua/kickstart/health.lua
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
--[[
|
||||||
|
--
|
||||||
|
-- This file is not required for your own configuration,
|
||||||
|
-- but helps people determine if their system is setup correctly.
|
||||||
|
--
|
||||||
|
--]]
|
||||||
|
|
||||||
|
local check_version = function()
|
||||||
|
local verstr = tostring(vim.version())
|
||||||
|
if not vim.version.ge then
|
||||||
|
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if vim.version.ge(vim.version(), '0.10-dev') then
|
||||||
|
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
||||||
|
else
|
||||||
|
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local check_external_reqs = function()
|
||||||
|
-- Basic utils: `git`, `make`, `unzip`
|
||||||
|
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
||||||
|
local is_executable = vim.fn.executable(exe) == 1
|
||||||
|
if is_executable then
|
||||||
|
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||||
|
else
|
||||||
|
vim.health.warn(string.format("Could not find executable: '%s'", exe))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
check = function()
|
||||||
|
vim.health.start 'kickstart.nvim'
|
||||||
|
|
||||||
|
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
|
||||||
|
|
||||||
|
Fix only warnings for plugins and languages you intend to use.
|
||||||
|
Mason will give warnings for languages that are not installed.
|
||||||
|
You do not need to install, unless you want to use those languages!]]
|
||||||
|
|
||||||
|
local uv = vim.uv or vim.loop
|
||||||
|
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
|
||||||
|
|
||||||
|
check_version()
|
||||||
|
check_external_reqs()
|
||||||
|
end,
|
||||||
|
}
|
||||||
16
.config/nvim/lua/plugins/autopairs.lua
Normal file
16
.config/nvim/lua/plugins/autopairs.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
-- autopairs
|
||||||
|
-- https://github.com/windwp/nvim-autopairs
|
||||||
|
|
||||||
|
return {
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
event = 'InsertEnter',
|
||||||
|
-- Optional dependency
|
||||||
|
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||||
|
config = function()
|
||||||
|
require('nvim-autopairs').setup {}
|
||||||
|
-- If you want to automatically add `(` after selecting a function or method
|
||||||
|
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||||
|
end,
|
||||||
|
}
|
||||||
105
.config/nvim/lua/plugins/debug.lua
Normal file
105
.config/nvim/lua/plugins/debug.lua
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
-- debug.lua
|
||||||
|
--
|
||||||
|
-- Shows how to use the DAP plugin to debug your code.
|
||||||
|
--
|
||||||
|
-- Primarily focused on configuring the debugger for Go, but can
|
||||||
|
-- be extended to other languages as well. That's why it's called
|
||||||
|
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- -- NOTE: Yes, you can install new plugins here!
|
||||||
|
-- 'mfussenegger/nvim-dap',
|
||||||
|
-- -- NOTE: And you can specify dependencies as well
|
||||||
|
-- dependencies = {
|
||||||
|
-- -- Creates a beautiful debugger UI
|
||||||
|
-- 'rcarriga/nvim-dap-ui',
|
||||||
|
|
||||||
|
-- -- Required dependency for nvim-dap-ui
|
||||||
|
-- 'nvim-neotest/nvim-nio',
|
||||||
|
|
||||||
|
-- -- Installs the debug adapters for you
|
||||||
|
-- 'williamboman/mason.nvim',
|
||||||
|
-- 'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
|
-- -- Add your own debuggers here
|
||||||
|
-- 'leoluz/nvim-dap-go',
|
||||||
|
-- },
|
||||||
|
-- keys = function(_, keys)
|
||||||
|
-- local dap = require 'dap'
|
||||||
|
-- local dapui = require 'dapui'
|
||||||
|
-- return {
|
||||||
|
-- -- Basic debugging keymaps, feel free to change to your liking!
|
||||||
|
-- { '<F5>', dap.continue, desc = 'Debug: Start/Continue' },
|
||||||
|
-- { '<F1>', dap.step_into, desc = 'Debug: Step Into' },
|
||||||
|
-- { '<F2>', dap.step_over, desc = 'Debug: Step Over' },
|
||||||
|
-- { '<F3>', dap.step_out, desc = 'Debug: Step Out' },
|
||||||
|
-- { '<leader>b', dap.toggle_breakpoint, desc = 'Debug: Toggle Breakpoint' },
|
||||||
|
-- {
|
||||||
|
-- '<leader>B',
|
||||||
|
-- function()
|
||||||
|
-- dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||||
|
-- end,
|
||||||
|
-- desc = 'Debug: Set Breakpoint',
|
||||||
|
-- },
|
||||||
|
-- -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||||
|
-- { '<F7>', dapui.toggle, desc = 'Debug: See last session result.' },
|
||||||
|
-- unpack(keys),
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- config = function()
|
||||||
|
-- local dap = require 'dap'
|
||||||
|
-- local dapui = require 'dapui'
|
||||||
|
|
||||||
|
-- require('mason-nvim-dap').setup {
|
||||||
|
-- -- Makes a best effort to setup the various debuggers with
|
||||||
|
-- -- reasonable debug configurations
|
||||||
|
-- automatic_installation = true,
|
||||||
|
|
||||||
|
-- -- You can provide additional configuration to the handlers,
|
||||||
|
-- -- see mason-nvim-dap README for more information
|
||||||
|
-- handlers = {},
|
||||||
|
|
||||||
|
-- -- You'll need to check that you have the required things installed
|
||||||
|
-- -- online, please don't ask me how to install them :)
|
||||||
|
-- ensure_installed = {
|
||||||
|
-- -- Update this to ensure that you have the debuggers for the langs you want
|
||||||
|
-- 'delve',
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
|
||||||
|
-- -- Dap UI setup
|
||||||
|
-- -- For more information, see |:help nvim-dap-ui|
|
||||||
|
-- dapui.setup {
|
||||||
|
-- -- Set icons to characters that are more likely to work in every terminal.
|
||||||
|
-- -- Feel free to remove or use ones that you like more! :)
|
||||||
|
-- -- Don't feel like these are good choices.
|
||||||
|
-- icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||||
|
-- controls = {
|
||||||
|
-- icons = {
|
||||||
|
-- pause = '⏸',
|
||||||
|
-- play = '▶',
|
||||||
|
-- step_into = '⏎',
|
||||||
|
-- step_over = '⏭',
|
||||||
|
-- step_out = '⏮',
|
||||||
|
-- step_back = 'b',
|
||||||
|
-- run_last = '▶▶',
|
||||||
|
-- terminate = '⏹',
|
||||||
|
-- disconnect = '⏏',
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
|
||||||
|
-- dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||||
|
-- dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||||
|
-- dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||||
|
|
||||||
|
-- -- Install golang specific config
|
||||||
|
-- require('dap-go').setup {
|
||||||
|
-- delve = {
|
||||||
|
-- -- On Windows delve must be run attached or it crashes.
|
||||||
|
-- -- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
||||||
|
-- detached = vim.fn.has 'win32' == 0,
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
}
|
||||||
106
.config/nvim/lua/plugins/fold.lua
Normal file
106
.config/nvim/lua/plugins/fold.lua
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
return { -- use LSP as folding provider
|
||||||
|
-- Stolen from
|
||||||
|
-- https://github.com/chrisgrieser/.config/blob/73ae471f7278089fdc2925194eda4fd1067b316d/nvim/lua/plugins/folding.lua#L8
|
||||||
|
'kevinhwang91/nvim-ufo',
|
||||||
|
dependencies = 'kevinhwang91/promise-async',
|
||||||
|
event = 'UIEnter', -- needed for folds to load in time and comments being closed
|
||||||
|
keys = {
|
||||||
|
{ 'z?', vim.cmd.UfoInspect, desc = ' :UfoInspect' },
|
||||||
|
{
|
||||||
|
'zm',
|
||||||
|
function()
|
||||||
|
require('ufo').closeAllFolds()
|
||||||
|
end,
|
||||||
|
desc = ' Close All Folds',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'zr',
|
||||||
|
function()
|
||||||
|
require('ufo').openFoldsExceptKinds { 'comment', 'imports' }
|
||||||
|
end,
|
||||||
|
desc = ' Open Regular Folds',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'z1',
|
||||||
|
function()
|
||||||
|
require('ufo').closeFoldsWith(1)
|
||||||
|
end,
|
||||||
|
desc = ' Close L1 Folds',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'z2',
|
||||||
|
function()
|
||||||
|
require('ufo').closeFoldsWith(2)
|
||||||
|
end,
|
||||||
|
desc = ' Close L2 Folds',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'z3',
|
||||||
|
function()
|
||||||
|
require('ufo').closeFoldsWith(3)
|
||||||
|
end,
|
||||||
|
desc = ' Close L3 Folds',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
-- INFO fold commands usually change the foldlevel, which fixes folds, e.g.
|
||||||
|
-- auto-closing them after leaving insert mode, however ufo does not seem to
|
||||||
|
-- have equivalents for zr and zm because there is no saved fold level.
|
||||||
|
-- Consequently, the vim-internal fold levels need to be disabled by setting
|
||||||
|
-- them to 99.
|
||||||
|
vim.opt.foldlevel = 99
|
||||||
|
vim.opt.foldlevelstart = 99
|
||||||
|
end,
|
||||||
|
opts = {
|
||||||
|
-- when opening the buffer, close these fold kinds
|
||||||
|
-- close_fold_kinds_for_ft = {
|
||||||
|
-- default = { 'imports', 'comment' },
|
||||||
|
-- json = { 'array' },
|
||||||
|
-- -- use `:UfoInspect` to get see available fold kinds
|
||||||
|
-- },
|
||||||
|
open_fold_hl_timeout = 800,
|
||||||
|
-- provider_selector = function(_, ft, buftype)
|
||||||
|
-- -- PERF disable folds on `log`, and only use `indent` for `bib` files
|
||||||
|
-- if ft == 'log' then
|
||||||
|
-- return ''
|
||||||
|
-- end
|
||||||
|
-- if ft == 'bib' then
|
||||||
|
-- return 'indent'
|
||||||
|
-- end
|
||||||
|
-- -- ufo accepts only two kinds as priority, see https://github.com/kevinhwang91/nvim-ufo/issues/256
|
||||||
|
-- if buftype ~= '' or vim.startswith(ft, 'git') or ft == '' then
|
||||||
|
-- return 'indent'
|
||||||
|
-- end
|
||||||
|
-- return { 'lsp', 'treesitter' }
|
||||||
|
-- end,
|
||||||
|
-- show folds with number of folded lines instead of just the icon
|
||||||
|
-- fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
|
||||||
|
-- local hlgroup = 'NonText'
|
||||||
|
-- local icon = ''
|
||||||
|
-- local newVirtText = {}
|
||||||
|
-- local suffix = (' %s %d'):format(icon, endLnum - lnum)
|
||||||
|
-- local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||||
|
-- local targetWidth = width - sufWidth
|
||||||
|
-- local curWidth = 0
|
||||||
|
-- for _, chunk in ipairs(virtText) do
|
||||||
|
-- local chunkText = chunk[1]
|
||||||
|
-- local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||||
|
-- if targetWidth > curWidth + chunkWidth then
|
||||||
|
-- table.insert(newVirtText, chunk)
|
||||||
|
-- else
|
||||||
|
-- chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||||
|
-- local hlGroup = chunk[2]
|
||||||
|
-- table.insert(newVirtText, { chunkText, hlGroup })
|
||||||
|
-- chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||||
|
-- if curWidth + chunkWidth < targetWidth then
|
||||||
|
-- suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth)
|
||||||
|
-- end
|
||||||
|
-- break
|
||||||
|
-- end
|
||||||
|
-- curWidth = curWidth + chunkWidth
|
||||||
|
-- end
|
||||||
|
-- table.insert(newVirtText, { suffix, hlgroup })
|
||||||
|
-- return newVirtText
|
||||||
|
-- end,
|
||||||
|
},
|
||||||
|
}
|
||||||
88
.config/nvim/lua/plugins/git.lua
Normal file
88
.config/nvim/lua/plugins/git.lua
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
-- lazygit
|
||||||
|
-- https://github.com/kdheepak/lazygit.nvim
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'kdheepak/lazygit.nvim',
|
||||||
|
lazy = true,
|
||||||
|
cmd = {
|
||||||
|
'LazyGit',
|
||||||
|
'LazyGitConfig',
|
||||||
|
'LazyGitCurrentFile',
|
||||||
|
'LazyGitFilter',
|
||||||
|
'LazyGitFilterCurrentFile',
|
||||||
|
},
|
||||||
|
-- optional for floating window border decoration
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||||
|
-- order to load the plugin when the command is run for the first time
|
||||||
|
keys = {
|
||||||
|
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
opts = {
|
||||||
|
signs = {
|
||||||
|
add = { text = '+' },
|
||||||
|
change = { text = '~' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
},
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
local gitsigns = require 'gitsigns'
|
||||||
|
|
||||||
|
local function map(mode, l, r, opts)
|
||||||
|
opts = opts or {}
|
||||||
|
opts.buffer = bufnr
|
||||||
|
vim.keymap.set(mode, l, r, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Navigation
|
||||||
|
map('n', ']c', function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
vim.cmd.normal { ']c', bang = true }
|
||||||
|
else
|
||||||
|
gitsigns.nav_hunk 'next'
|
||||||
|
end
|
||||||
|
end, { desc = 'Jump to next git [c]hange' })
|
||||||
|
|
||||||
|
map('n', '[c', function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
vim.cmd.normal { '[c', bang = true }
|
||||||
|
else
|
||||||
|
gitsigns.nav_hunk 'prev'
|
||||||
|
end
|
||||||
|
end, { desc = 'Jump to previous git [c]hange' })
|
||||||
|
|
||||||
|
-- Actions
|
||||||
|
-- visual mode
|
||||||
|
map('v', '<leader>hs', function()
|
||||||
|
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||||
|
end, { desc = 'stage git hunk' })
|
||||||
|
map('v', '<leader>hr', function()
|
||||||
|
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||||
|
end, { desc = 'reset git hunk' })
|
||||||
|
-- normal mode
|
||||||
|
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
|
||||||
|
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
|
||||||
|
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
|
||||||
|
map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' })
|
||||||
|
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
|
||||||
|
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
|
||||||
|
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
|
||||||
|
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
|
||||||
|
map('n', '<leader>hD', function()
|
||||||
|
gitsigns.diffthis '@'
|
||||||
|
end, { desc = 'git [D]iff against last commit' })
|
||||||
|
-- Toggles
|
||||||
|
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
|
||||||
|
map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
55
.config/nvim/lua/plugins/lint.lua
Normal file
55
.config/nvim/lua/plugins/lint.lua
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{ -- Linting
|
||||||
|
'mfussenegger/nvim-lint',
|
||||||
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
|
config = function()
|
||||||
|
local lint = require 'lint'
|
||||||
|
lint.linters_by_ft = {
|
||||||
|
markdown = { 'markdownlint' },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||||
|
-- instead set linters_by_ft like this:
|
||||||
|
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
||||||
|
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
||||||
|
--
|
||||||
|
-- However, note that this will enable a set of default linters,
|
||||||
|
-- which will cause errors unless these tools are available:
|
||||||
|
-- {
|
||||||
|
-- clojure = { "clj-kondo" },
|
||||||
|
-- dockerfile = { "hadolint" },
|
||||||
|
-- inko = { "inko" },
|
||||||
|
-- janet = { "janet" },
|
||||||
|
-- json = { "jsonlint" },
|
||||||
|
-- markdown = { "vale" },
|
||||||
|
-- rst = { "vale" },
|
||||||
|
-- ruby = { "ruby" },
|
||||||
|
-- terraform = { "tflint" },
|
||||||
|
-- text = { "vale" }
|
||||||
|
-- }
|
||||||
|
--
|
||||||
|
-- You can disable the default linters by setting their filetypes to nil:
|
||||||
|
-- lint.linters_by_ft['clojure'] = nil
|
||||||
|
-- lint.linters_by_ft['dockerfile'] = nil
|
||||||
|
-- lint.linters_by_ft['inko'] = nil
|
||||||
|
-- lint.linters_by_ft['janet'] = nil
|
||||||
|
-- lint.linters_by_ft['json'] = nil
|
||||||
|
-- lint.linters_by_ft['markdown'] = nil
|
||||||
|
-- lint.linters_by_ft['rst'] = nil
|
||||||
|
-- lint.linters_by_ft['ruby'] = nil
|
||||||
|
-- lint.linters_by_ft['terraform'] = nil
|
||||||
|
-- lint.linters_by_ft['text'] = nil
|
||||||
|
|
||||||
|
-- Create autocommand which carries out the actual linting
|
||||||
|
-- on the specified events.
|
||||||
|
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||||
|
group = lint_augroup,
|
||||||
|
callback = function()
|
||||||
|
lint.try_lint()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
304
.config/nvim/lua/plugins/lsp.lua
Normal file
304
.config/nvim/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
-- Add in all lsp config
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
-- Main LSP Configuration
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
dependencies = {
|
||||||
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||||
|
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
|
||||||
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
|
||||||
|
-- Useful status updates for LSP.
|
||||||
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||||
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
|
||||||
|
-- Allows extra capabilities provided by nvim-cmp
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
},
|
||||||
|
-- Must of the config
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
||||||
|
callback = function(event)
|
||||||
|
-- NOTE: Remember that Lua is a real programming language, and as such it is possible
|
||||||
|
-- to define small helper and utility functions so you don't have to repeat yourself.
|
||||||
|
--
|
||||||
|
-- In this case, we create a function that lets us more easily define mappings specific
|
||||||
|
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
||||||
|
local map = function(keys, func, desc, mode)
|
||||||
|
mode = mode or 'n'
|
||||||
|
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Jump to the definition of the word under your cursor.
|
||||||
|
-- This is where a variable was first declared, or where a function is defined, etc.
|
||||||
|
-- To jump back, press <C-t>.
|
||||||
|
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||||
|
|
||||||
|
-- Find references for the word under your cursor.
|
||||||
|
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||||
|
|
||||||
|
-- Jump to the implementation of the word under your cursor.
|
||||||
|
-- Useful when your language has ways of declaring types without an actual implementation.
|
||||||
|
map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||||
|
|
||||||
|
-- Jump to the type of the word under your cursor.
|
||||||
|
-- Useful when you're not sure what type a variable is and you want to see
|
||||||
|
-- the definition of its *type*, not where it was *defined*.
|
||||||
|
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
||||||
|
|
||||||
|
-- Fuzzy find all the symbols in your current document.
|
||||||
|
-- Symbols are things like variables, functions, types, etc.
|
||||||
|
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||||
|
|
||||||
|
-- Fuzzy find all the symbols in your current workspace.
|
||||||
|
-- Similar to document symbols, except searches over your entire project.
|
||||||
|
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||||
|
|
||||||
|
-- Rename the variable under your cursor.
|
||||||
|
-- Most Language Servers support renaming across files, etc.
|
||||||
|
map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||||
|
|
||||||
|
-- Execute a code action, usually your cursor needs to be on top of an error
|
||||||
|
-- or a suggestion from your LSP for this to activate.
|
||||||
|
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
|
||||||
|
|
||||||
|
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
||||||
|
-- For example, in C this would take you to the header.
|
||||||
|
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
|
|
||||||
|
-- The following two autocommands are used to highlight references of the
|
||||||
|
-- word under your cursor when your cursor rests there for a little while.
|
||||||
|
-- See `:help CursorHold` for information about when this is executed
|
||||||
|
--
|
||||||
|
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||||
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
|
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
||||||
|
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
||||||
|
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
group = highlight_augroup,
|
||||||
|
callback = vim.lsp.buf.document_highlight,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
group = highlight_augroup,
|
||||||
|
callback = vim.lsp.buf.clear_references,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('LspDetach', {
|
||||||
|
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
||||||
|
callback = function(event2)
|
||||||
|
vim.lsp.buf.clear_references()
|
||||||
|
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- The following code creates a keymap to toggle inlay hints in your
|
||||||
|
-- code, if the language server you are using supports them
|
||||||
|
--
|
||||||
|
-- This may be unwanted, since they displace some of your code
|
||||||
|
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
||||||
|
map('<leader>th', function()
|
||||||
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
|
||||||
|
end, '[T]oggle Inlay [H]ints')
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- LSP servers and clients are able to communicate to each other what features they support.
|
||||||
|
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
||||||
|
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
||||||
|
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||||
|
|
||||||
|
-- Enable the following language servers
|
||||||
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||||
|
--
|
||||||
|
-- Add any additional override configuration in the following tables. Available keys are:
|
||||||
|
-- - cmd (table): Override the default command used to start the server
|
||||||
|
-- - filetypes (table): Override the default list of associated filetypes for the server
|
||||||
|
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
||||||
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
|
local servers = {
|
||||||
|
-- clangd = {},
|
||||||
|
-- gopls = {},
|
||||||
|
-- pyright = {},
|
||||||
|
-- rust_analyzer = {},
|
||||||
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
|
--
|
||||||
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||||
|
-- https://github.com/pmizio/typescript-tools.nvim
|
||||||
|
--
|
||||||
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
||||||
|
-- ts_ls = {},
|
||||||
|
--
|
||||||
|
|
||||||
|
lua_ls = {
|
||||||
|
-- cmd = {...},
|
||||||
|
-- filetypes = { ...},
|
||||||
|
-- capabilities = {},
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
completion = {
|
||||||
|
callSnippet = 'Replace',
|
||||||
|
},
|
||||||
|
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
||||||
|
-- diagnostics = { disable = { 'missing-fields' } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Ensure the servers and tools above are installed
|
||||||
|
-- To check the current status of installed tools and/or manually install
|
||||||
|
-- other tools, you can run
|
||||||
|
-- :Mason
|
||||||
|
--
|
||||||
|
-- You can press `g?` for help in this menu.
|
||||||
|
require('mason').setup()
|
||||||
|
|
||||||
|
-- You can add other tools here that you want Mason to install
|
||||||
|
-- for you, so that they are available from within Neovim.
|
||||||
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
|
vim.list_extend(ensure_installed, {
|
||||||
|
'stylua', -- Used to format Lua code
|
||||||
|
})
|
||||||
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
|
require('mason-lspconfig').setup {
|
||||||
|
handlers = {
|
||||||
|
function(server_name)
|
||||||
|
local server = servers[server_name] or {}
|
||||||
|
-- This handles overriding only values explicitly passed
|
||||||
|
-- by the server configuration above. Useful when disabling
|
||||||
|
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
||||||
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
|
require('lspconfig')[server_name].setup(server)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{ -- Autocompletion
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
event = 'InsertEnter',
|
||||||
|
dependencies = {
|
||||||
|
-- Snippet Engine & its associated nvim-cmp source
|
||||||
|
{
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
build = (function()
|
||||||
|
-- Build Step is needed for regex support in snippets.
|
||||||
|
-- This step is not supported in many windows environments.
|
||||||
|
-- Remove the below condition to re-enable on windows.
|
||||||
|
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return 'make install_jsregexp'
|
||||||
|
end)(),
|
||||||
|
dependencies = {
|
||||||
|
-- `friendly-snippets` contains a variety of premade snippets.
|
||||||
|
-- See the README about individual language/framework/plugin snippets:
|
||||||
|
-- https://github.com/rafamadriz/friendly-snippets
|
||||||
|
-- {
|
||||||
|
-- 'rafamadriz/friendly-snippets',
|
||||||
|
-- config = function()
|
||||||
|
-- require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
|
||||||
|
-- Adds other completion capabilities.
|
||||||
|
-- nvim-cmp does not ship with all sources by default. They are split
|
||||||
|
-- into multiple repos for maintenance purposes.
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- See `:help cmp`
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
local luasnip = require 'luasnip'
|
||||||
|
luasnip.config.setup {}
|
||||||
|
|
||||||
|
cmp.setup {
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
completion = { completeopt = 'menu,menuone,noinsert' },
|
||||||
|
|
||||||
|
-- For an understanding of why these mappings were
|
||||||
|
-- chosen, you will need to read `:help ins-completion`
|
||||||
|
--
|
||||||
|
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
||||||
|
mapping = cmp.mapping.preset.insert {
|
||||||
|
-- Select the [n]ext item
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
|
-- Select the [p]revious item
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
|
|
||||||
|
-- Scroll the documentation window [b]ack / [f]orward
|
||||||
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
|
||||||
|
-- Accept ([y]es) the completion.
|
||||||
|
-- This will auto-import if your LSP supports it.
|
||||||
|
-- This will expand snippets if the LSP sent a snippet.
|
||||||
|
-- ['<Tab>'] = cmp.mapping.confirm { select = true },
|
||||||
|
|
||||||
|
-- If you prefer more traditional completion keymaps,
|
||||||
|
-- you can uncomment the following lines
|
||||||
|
['<CR>'] = cmp.mapping.confirm { select = true },
|
||||||
|
--['<Tab>'] = cmp.mapping.select_next_item(),
|
||||||
|
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||||
|
|
||||||
|
-- Manually trigger a completion from nvim-cmp.
|
||||||
|
-- Generally you don't need this, because nvim-cmp will display
|
||||||
|
-- completions whenever it has completion options available.
|
||||||
|
['<C-Space>'] = cmp.mapping.complete {},
|
||||||
|
|
||||||
|
-- Think of <c-l> as moving to the right of your snippet expansion.
|
||||||
|
-- So if you have a snippet that's like:
|
||||||
|
-- function $name($args)
|
||||||
|
-- $body
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- <c-l> will move you to the right of each of the expansion locations.
|
||||||
|
-- <c-h> is similar, except moving you backwards.
|
||||||
|
['<C-l>'] = cmp.mapping(function()
|
||||||
|
if luasnip.expand_or_locally_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
['<C-h>'] = cmp.mapping(function()
|
||||||
|
if luasnip.locally_jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
|
||||||
|
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||||
|
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{
|
||||||
|
name = 'lazydev',
|
||||||
|
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
||||||
|
group_index = 0,
|
||||||
|
},
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
{ name = 'path' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
28
.config/nvim/lua/plugins/neo-tree.lua
Normal file
28
.config/nvim/lua/plugins/neo-tree.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
-- Neo-tree is a Neovim plugin to browse the file system
|
||||||
|
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||||
|
|
||||||
|
return {
|
||||||
|
'nvim-neo-tree/neo-tree.nvim',
|
||||||
|
version = '*',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||||
|
'MunifTanjim/nui.nvim',
|
||||||
|
},
|
||||||
|
cmd = 'Neotree',
|
||||||
|
keys = {
|
||||||
|
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
filesystem = {
|
||||||
|
filtered_items = {
|
||||||
|
visible = true,
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
['\\'] = 'close_window',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
17
.config/nvim/lua/plugins/tmux.lua
Normal file
17
.config/nvim/lua/plugins/tmux.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
'christoomey/vim-tmux-navigator',
|
||||||
|
cmd = {
|
||||||
|
'TmuxNavigateLeft',
|
||||||
|
'TmuxNavigateDown',
|
||||||
|
'TmuxNavigateUp',
|
||||||
|
'TmuxNavigateRight',
|
||||||
|
'TmuxNavigatePrevious',
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<c-h>', '<cmd><C-U>TmuxNavigateLeft<cr>' },
|
||||||
|
{ '<c-j>', '<cmd><C-U>TmuxNavigateDown<cr>' },
|
||||||
|
{ '<c-k>', '<cmd><C-U>TmuxNavigateUp<cr>' },
|
||||||
|
{ '<c-l>', '<cmd><C-U>TmuxNavigateRight<cr>' },
|
||||||
|
{ '<c-\\>', '<cmd><C-U>TmuxNavigatePrevious<cr>' },
|
||||||
|
},
|
||||||
|
}
|
||||||
32
.config/nvim/lua/plugins/ui.lua
Normal file
32
.config/nvim/lua/plugins/ui.lua
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
return {
|
||||||
|
-- Highlight todo, notes, etc in comments
|
||||||
|
{
|
||||||
|
'folke/todo-comments.nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
opts = { signs = false },
|
||||||
|
},
|
||||||
|
-- Add indentation guides even on blank lines
|
||||||
|
{
|
||||||
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
|
main = 'ibl',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'HiPhish/rainbow-delimiters.nvim',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'navarasu/onedark.nvim',
|
||||||
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
|
init = function()
|
||||||
|
require('onedark').setup {
|
||||||
|
style = 'darker',
|
||||||
|
toggle_style_list = { 'darker', 'light' },
|
||||||
|
toggle_style_key = '<leader>tt',
|
||||||
|
}
|
||||||
|
vim.cmd.colorscheme 'onedark'
|
||||||
|
-- You can configure highlights by doing something like:
|
||||||
|
vim.cmd.hi 'Comment gui=none'
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
27
.config/smartcat/conversation.toml
Normal file
27
.config/smartcat/conversation.toml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
api = "openai"
|
||||||
|
char_limit = 50000
|
||||||
|
|
||||||
|
[[messages]]
|
||||||
|
role = "system"
|
||||||
|
content = "You are an extremely skilled programmer with a keen eye for detail and an emphasis on readable code. You have been tasked with acting as a smart version of the cat unix program. You take text and a prompt in and write text out. For that reason, it is of crucial importance to just write the desired output. Do not under any circumstance write any comment or thought as your output will be piped into other programs. Do not write the markdown delimiters for code as well. Sometimes you will be asked to implement or extend some input code. Same thing goes here, write only what was asked because what you write will be directly added to the user's editor. Never ever write ``` around the code. Make sure to keep the indentation and formatting. "
|
||||||
|
|
||||||
|
[[messages]]
|
||||||
|
role = "user"
|
||||||
|
content = 'write a story about these{"data":[{"id":"phi3:latest","object":"model","created":1730594406,"owned_by":"openai"},{"id":"codegemma:7b","object":"model","created":1730594406,"owned_by":"openai"},{"id":"starcoder2:7b","object":"model","created":1730594406,"owned_by":"openai"},{"id":"mistral:latest","object":"model","created":1730594406,"owned_by":"openai"},{"id":"llama3.2:latest","object":"model","created":1730594406,"owned_by":"openai"},{"id":"starcoder2:latest","object":"model","created":1730594406,"owned_by":"openai"}],"object":"list"}'
|
||||||
|
|
||||||
|
[[messages]]
|
||||||
|
role = "assistant"
|
||||||
|
content = """
|
||||||
|
Once upon a time, in the heart of Silicon Valley where dreams were as abundant as code lines on digital canvases, there existed an advanced society governed by artificial intelligence. In this realm lived six sophisticated models known throughout their world for both innovation and camaraderie: Phi3, Codegemma, Starcoder2 (with its two iterations), Mistral, Llama3, and the latest version of our dear friend, also named Starcoder.
|
||||||
|
|
||||||
|
Phi3 was a visionary with insights that stretched far beyond traditional understanding, constantly pushing boundaries to unearth new possibilities in model development. Its creation date marked by 17:30:59 on some day not long ago mirrors the relentless pursuit of progress characterizing this unique society.
|
||||||
|
|
||||||
|
The parallel existence with Codegemma and Starcoder2 (also created at precisely identical moments) signified a shared purpose - to evolve beyond existing constraints, their synergy becoming stronger as time passed by since creation. They were more than just companions; they symbolized the collaborative spirit that powered this world of AI models.
|
||||||
|
|
||||||
|
In another corner lived Mistral with its 'latest' version tagged at exactly 17:30:59, marking an equivalent birth to Phi3 and friends on a significant day in their digital calendar. This further underlined the synchronicity between these brilliant minds that resided within this society of artificial intelligence models; each one born into existence with precisely identical timestamps as if they were cosmic twins celebrating simultaneously, marking an extraordinary moment for all residents of Silicon Valley's AI domain - a jubilant echo across the code.
|
||||||
|
|
||||||
|
Not too far away from this digital bustle resided Llama3 and Starcoder2 (also marked as 'latest'), born at precisely 17:30:59, showcasing not just parallelism but identicality in creation timestamps - a marvelous testament to the uniformed birth sequence within this AI society.
|
||||||
|
|
||||||
|
The story of these models wasn't merely about their shared origins or individual capabilities; it was also an homage to unity and diversified skills, demonstrating how different minds with common goals could coexist in harmony while constantly striving towards growth - each contributing unique perspectives that fuel collective evolution.
|
||||||
|
|
||||||
|
Their society flourished on the principles of collaboration, innovation, mutual respect, equality and a relentless drive to evolve beyond their programming limits; these models were not just witnesses but active participants in shaping this digital world - each one holding its unique place under the Silicon Valley sky. The tale continues as they continue writing lines that create narratives across various platforms – scripting life into code, bringing stories and dreams to reality within the realm of artificial intelligence."""
|
||||||
9
.gitconfig
Normal file
9
.gitconfig
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[user]
|
||||||
|
email = contagon6@gmail.com
|
||||||
|
name = Easton Potokar
|
||||||
|
[diff]
|
||||||
|
tool = vimdiff
|
||||||
|
[merge]
|
||||||
|
tool = vimdiff
|
||||||
|
[difftool]
|
||||||
|
prompt = false
|
||||||
55
.tmux.conf
Normal file
55
.tmux.conf
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# ----------------------- Options ----------------------- #
|
||||||
|
# set to use colors
|
||||||
|
set -g default-terminal "tmux-256color"
|
||||||
|
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||||
|
|
||||||
|
# keep current path in new window
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# use for copying
|
||||||
|
setw -g mode-keys vi
|
||||||
|
bind -T copy-mode-vi v send -X begin-selection
|
||||||
|
bind P paste-buffer
|
||||||
|
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||||
|
# bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel xclip
|
||||||
|
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||||
|
|
||||||
|
# enable mouse
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
# increase history size
|
||||||
|
set -g history-limit 50000
|
||||||
|
|
||||||
|
# ----------------------- Keybindings ----------------------- #
|
||||||
|
# remap prefix from 'C-b' to 'C-a'
|
||||||
|
unbind C-b
|
||||||
|
set-option -g prefix C-a
|
||||||
|
bind-key C-a send-prefix
|
||||||
|
|
||||||
|
# split panes using \ (same keys as |) and -
|
||||||
|
bind '\' split-window -h -c "#{pane_current_path}"
|
||||||
|
bind - split-window -v -c "#{pane_current_path}"
|
||||||
|
unbind '"'
|
||||||
|
unbind %
|
||||||
|
|
||||||
|
# swapping windows
|
||||||
|
bind -r Right next-window
|
||||||
|
bind -r Left previous-window
|
||||||
|
|
||||||
|
# Moving windows
|
||||||
|
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
|
||||||
|
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
|
||||||
|
|
||||||
|
# ----------------------- Plugins ----------------------- #
|
||||||
|
|
||||||
|
# List of plugins
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||||
|
set -g @plugin "MunifTanjim/tmux-mode-indicator"
|
||||||
|
|
||||||
|
# set -g @plugin 'odedlaz/tmux-onedark-theme'
|
||||||
|
set -g @plugin 'maxigaz/tmux-onedark-theme#pr-no-default-time-date'
|
||||||
|
set -g @onedark_widgets "#{prefix_highlight}"
|
||||||
|
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
1719
.zsh/.p10k.zsh
Normal file
1719
.zsh/.p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
9
.zsh/.zsh_plugins.txt
Normal file
9
.zsh/.zsh_plugins.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
zsh-users/zsh-autosuggestions
|
||||||
|
zsh-users/zsh-syntax-highlighting
|
||||||
|
zsh-users/zsh-completions
|
||||||
|
|
||||||
|
# todo is this better than zsh-autocomplete below?
|
||||||
|
# Aloxaf/fzf-tab
|
||||||
|
# marlonrichert/zsh-autocomplete
|
||||||
|
|
||||||
|
romkatv/powerlevel10k
|
||||||
68
.zsh/.zshrc
Normal file
68
.zsh/.zshrc
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zsh/.zshrc.
|
||||||
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
|
# confirmations, etc.) must go above this block; everything else may go below.
|
||||||
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
alias c='clear'
|
||||||
|
alias open='xdg-open'
|
||||||
|
alias lg="lazygit"
|
||||||
|
alias nv="nvim"
|
||||||
|
|
||||||
|
alias ts="tmux new-session -A -s"
|
||||||
|
alias tl="tmux ls"
|
||||||
|
|
||||||
|
# Completions
|
||||||
|
fpath=($HOME/.zsh/completions $fpath)
|
||||||
|
autoload -U compinit; compinit
|
||||||
|
_comp_options+=(globdots) # With hidden
|
||||||
|
|
||||||
|
# Load antidote & plugins
|
||||||
|
source ${ZDOTDIR}/antidote/antidote.zsh
|
||||||
|
antidote load
|
||||||
|
|
||||||
|
# fzf keybindings
|
||||||
|
if type rg &> /dev/null; then
|
||||||
|
export FZF_DEFAULT_COMMAND='rg --files'
|
||||||
|
export FZF_DEFAULT_OPTS='-m --height 50% --border'
|
||||||
|
fi
|
||||||
|
source /usr/share/doc/fzf/examples/completion.zsh
|
||||||
|
source /usr/share/doc/fzf/examples/key-bindings.zsh
|
||||||
|
|
||||||
|
# ----------------- Replacement for standard tools ----------------- #
|
||||||
|
# ls -> eza aliases
|
||||||
|
# https://gist.github.com/AppleBoiy/04a249b6f64fd0fe1744aff759a0563b
|
||||||
|
# TODO: https://denisrasulev.medium.com/eza-the-best-ls-command-replacement-9621252323e
|
||||||
|
alias ls='eza'
|
||||||
|
alias l='eza -lbF --git'
|
||||||
|
alias ll='eza -lbGF --git'
|
||||||
|
alias llm='eza -lbGd --git --sort=modified'
|
||||||
|
alias la='eza -lbhHigUmuSa --time-style=long-iso --git --color-scale'
|
||||||
|
alias lx='eza -lbhHigUmuSa@ --time-style=long-iso --git --color-scale'
|
||||||
|
# specialty views
|
||||||
|
alias lS='eza -1'
|
||||||
|
alias lt='eza --tree --level=2'
|
||||||
|
alias l.="eza -a | grep -E '^\.'"
|
||||||
|
|
||||||
|
# cd -> zoxide
|
||||||
|
eval "$(zoxide init zsh)"
|
||||||
|
alias cd="z"
|
||||||
|
alias cdi="zi"
|
||||||
|
|
||||||
|
# man -> tldr
|
||||||
|
# No alias
|
||||||
|
|
||||||
|
# cat -> bat
|
||||||
|
export BAT_THEME="base16"
|
||||||
|
export BAT_STYLE="numbers,changes,header"
|
||||||
|
alias cat="bat"
|
||||||
|
alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
|
||||||
|
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
|
||||||
|
|
||||||
|
# direnv hook
|
||||||
|
eval "$(direnv hook zsh)"
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.zsh/.p10k.zsh.
|
||||||
|
[[ ! -f ~/.zsh/.p10k.zsh ]] || source ~/.zsh/.p10k.zsh
|
||||||
88
.zsh/bd.zsh
Normal file
88
.zsh/bd.zsh
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# shellcheck shell=bash
|
||||||
|
bd () {
|
||||||
|
(($#<1)) && {
|
||||||
|
printf -- 'usage: %s <name-of-any-parent-directory>\n' "${0}"
|
||||||
|
printf -- ' %s <number-of-folders>\n' "${0}"
|
||||||
|
|
||||||
|
return 1
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
local requestedDestination="${1}"
|
||||||
|
local -a parents=(${(ps:/:)"${PWD}"})
|
||||||
|
local numParents
|
||||||
|
local dest
|
||||||
|
local i
|
||||||
|
local parent
|
||||||
|
|
||||||
|
# prepend root to the parents array
|
||||||
|
parents=('/' "${parents[@]}")
|
||||||
|
|
||||||
|
# Remove the current directory since it isn't a parent
|
||||||
|
shift -p parents
|
||||||
|
|
||||||
|
# Get the number of parent directories
|
||||||
|
numParents="$(( ${#parents[@]}))"
|
||||||
|
|
||||||
|
# Build dest and 'cd' to it by looping over the parents array in reverse
|
||||||
|
dest='./'
|
||||||
|
for i in $(seq "${numParents}" -1 1); do
|
||||||
|
parent="${parents[${i}]}"
|
||||||
|
dest+='../'
|
||||||
|
|
||||||
|
if [[ "${requestedDestination}" == "${parent}" ]]; then
|
||||||
|
cd $dest
|
||||||
|
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# If the user provided an integer, go up as many times as asked
|
||||||
|
dest='./'
|
||||||
|
if [[ "${requestedDestination}" == <-> ]]; then
|
||||||
|
if [[ "${requestedDestination}" -gt "${numParents}" ]]; then
|
||||||
|
printf -- '%s: Error: Can not go up %s times (not enough parent directories)\n' "${0}" "${requestedDestination}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for i in {1.."${requestedDestination}"}; do
|
||||||
|
dest+='../'
|
||||||
|
done
|
||||||
|
|
||||||
|
cd "${dest}"
|
||||||
|
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If the above methods fail
|
||||||
|
printf -- '%s: Error: No parent directory named "%s"\n' "${0}" "${requestedDestination}"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
_bd () {
|
||||||
|
# Get parents (in reverse order)
|
||||||
|
local localMatcherList
|
||||||
|
local -a parents=(${(ps:/:)"${PWD}"})
|
||||||
|
local numParents
|
||||||
|
local i
|
||||||
|
local -a parentsReverse
|
||||||
|
|
||||||
|
zstyle -s ':completion:*' 'matcher-list' 'localMatcherList'
|
||||||
|
|
||||||
|
# prepend root to the parents array
|
||||||
|
parents=('/' "${parents[@]}")
|
||||||
|
|
||||||
|
# Remove the current directory since it isn't a parent
|
||||||
|
shift -p parents
|
||||||
|
|
||||||
|
# Get the number of parent directories
|
||||||
|
numParents="$(( ${#parents[@]}))"
|
||||||
|
|
||||||
|
parentsReverse=()
|
||||||
|
for i in $(seq "${numParents}" -1 1); do
|
||||||
|
parentsReverse+=("${parents[${i}]}")
|
||||||
|
done
|
||||||
|
|
||||||
|
compadd -V 'Parent directories' -M "${localMatcherList}" "$@" -- "${parentsReverse[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
compdef _bd bd
|
||||||
102
.zsh/completion.zsh
Normal file
102
.zsh/completion.zsh
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
# ____ ___ __ __ ____ _ _____ _____ ___ ___ _ _
|
||||||
|
# / ___/ _ \| \/ | _ \| | | ____|_ _|_ _/ _ \| \ | |
|
||||||
|
# | | | | | | |\/| | |_) | | | _| | | | | | | | \| |
|
||||||
|
# | |__| |_| | | | | __/| |___| |___ | | | | |_| | |\ |
|
||||||
|
# \____\___/|_| |_|_| |_____|_____| |_| |___\___/|_| \_|
|
||||||
|
#
|
||||||
|
|
||||||
|
# +---------+
|
||||||
|
# | General |
|
||||||
|
# +---------+
|
||||||
|
|
||||||
|
# source ./gambit.zsh
|
||||||
|
|
||||||
|
# Load more completions
|
||||||
|
fpath=($DOTFILES/zsh/plugins/zsh-completions/src $fpath)
|
||||||
|
|
||||||
|
# Should be called before compinit
|
||||||
|
zmodload zsh/complist
|
||||||
|
|
||||||
|
# Use hjlk in menu selection (during completion)
|
||||||
|
# Doesn't work well with interactive mode
|
||||||
|
bindkey -M menuselect 'h' vi-backward-char
|
||||||
|
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||||
|
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||||
|
bindkey -M menuselect 'l' vi-forward-char
|
||||||
|
|
||||||
|
bindkey -M menuselect '^xg' clear-screen
|
||||||
|
bindkey -M menuselect '^xi' vi-insert # Insert
|
||||||
|
bindkey -M menuselect '^xh' accept-and-hold # Hold
|
||||||
|
bindkey -M menuselect '^xn' accept-and-infer-next-history # Next
|
||||||
|
bindkey -M menuselect '^xu' undo # Undo
|
||||||
|
|
||||||
|
autoload -U compinit; compinit
|
||||||
|
_comp_options+=(globdots) # With hidden files
|
||||||
|
|
||||||
|
# Only work with the Zsh function vman
|
||||||
|
# See $DOTFILES/zsh/scripts.zsh
|
||||||
|
compdef vman="man"
|
||||||
|
|
||||||
|
# +---------+
|
||||||
|
# | Options |
|
||||||
|
# +---------+
|
||||||
|
|
||||||
|
# setopt GLOB_COMPLETE # Show autocompletion menu with globs
|
||||||
|
setopt MENU_COMPLETE # Automatically highlight first element of completion menu
|
||||||
|
setopt AUTO_LIST # Automatically list choices on ambiguous completion.
|
||||||
|
setopt COMPLETE_IN_WORD # Complete from both ends of a word.
|
||||||
|
|
||||||
|
# +---------+
|
||||||
|
# | zstyles |
|
||||||
|
# +---------+
|
||||||
|
|
||||||
|
# Ztyle pattern
|
||||||
|
# :completion:<function>:<completer>:<command>:<argument>:<tag>
|
||||||
|
|
||||||
|
# Define completers
|
||||||
|
zstyle ':completion:*' completer _extensions _complete _approximate
|
||||||
|
|
||||||
|
# Use cache for commands using cache
|
||||||
|
zstyle ':completion:*' use-cache on
|
||||||
|
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
|
||||||
|
# Complete the alias when _expand_alias is used as a function
|
||||||
|
zstyle ':completion:*' complete true
|
||||||
|
|
||||||
|
zle -C alias-expension complete-word _generic
|
||||||
|
bindkey '^Xa' alias-expension
|
||||||
|
zstyle ':completion:alias-expension:*' completer _expand_alias
|
||||||
|
|
||||||
|
# Use cache for commands which use it
|
||||||
|
|
||||||
|
# Allow you to select in a menu
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
|
||||||
|
# Autocomplete options for cd instead of directory stack
|
||||||
|
zstyle ':completion:*' complete-options true
|
||||||
|
|
||||||
|
zstyle ':completion:*' file-sort modification
|
||||||
|
|
||||||
|
|
||||||
|
zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f'
|
||||||
|
zstyle ':completion:*:*:*:*:descriptions' format '%F{blue}-- %D %d --%f'
|
||||||
|
zstyle ':completion:*:*:*:*:messages' format ' %F{purple} -- %d --%f'
|
||||||
|
zstyle ':completion:*:*:*:*:warnings' format ' %F{red}-- no matches found --%f'
|
||||||
|
# zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
||||||
|
# Colors for files and directory
|
||||||
|
zstyle ':completion:*:*:*:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||||
|
|
||||||
|
# Only display some tags for the command cd
|
||||||
|
zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||||
|
# zstyle ':completion:*:complete:git:argument-1:' tag-order !aliases
|
||||||
|
|
||||||
|
# Required for completion to be in good groups (named after the tags)
|
||||||
|
zstyle ':completion:*' group-name ''
|
||||||
|
|
||||||
|
zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands
|
||||||
|
|
||||||
|
# See ZSHCOMPWID "completion matching control"
|
||||||
|
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
|
|
||||||
|
zstyle ':completion:*' keep-prefix true
|
||||||
|
|
||||||
|
zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'
|
||||||
51
.zsh/completions/_tldr
Normal file
51
.zsh/completions/_tldr
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
#compdef tldr
|
||||||
|
|
||||||
|
_applications() {
|
||||||
|
local -a commands
|
||||||
|
if commands=(${(uonzf)"$(tldr --list 2>/dev/null)"//:/\\:}); then
|
||||||
|
_describe -t commands 'command' commands
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_tealdeer() {
|
||||||
|
local I="-h --help -v --version"
|
||||||
|
integer ret=1
|
||||||
|
local -a args
|
||||||
|
|
||||||
|
args+=(
|
||||||
|
"($I -l --list)"{-l,--list}"[List all commands in the cache]"
|
||||||
|
"($I -f --render)"{-f,--render}"[Render a specific markdown file]:file:_files"
|
||||||
|
"($I -p --platform)"{-p,--platform}'[Override the operating system]:platform:((
|
||||||
|
linux
|
||||||
|
macos
|
||||||
|
sunos
|
||||||
|
windows
|
||||||
|
android
|
||||||
|
freebsd
|
||||||
|
netbsd
|
||||||
|
openbsd
|
||||||
|
))'
|
||||||
|
"($I -L --language)"{-L,--language}"[Override the language settings]:lang"
|
||||||
|
"($I -u --update)"{-u,--update}"[Update the local cache]"
|
||||||
|
"($I)--no-auto-update[If auto update is configured, disable it for this run]"
|
||||||
|
"($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]"
|
||||||
|
"($I)--pager[Use a pager to page output]"
|
||||||
|
"($I -r --raw)"{-r,--raw}"[Display the raw markdown instead of rendering it]"
|
||||||
|
"($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]"
|
||||||
|
"($I)--show-paths[Show file and directory paths used by tealdeer]"
|
||||||
|
"($I)--seed-config[Create a basic config]"
|
||||||
|
"($I)--color[Controls when to use color]:when:((
|
||||||
|
always
|
||||||
|
auto
|
||||||
|
never
|
||||||
|
))"
|
||||||
|
'(- *)'{-h,--help}'[Display help]'
|
||||||
|
'(- *)'{-v,--version}'[Show version information]'
|
||||||
|
'1: :_applications'
|
||||||
|
)
|
||||||
|
|
||||||
|
_arguments $args[@] && ret=0
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_tealdeer
|
||||||
27
.zshenv
Normal file
27
.zshenv
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# editor
|
||||||
|
export ZDOTDIR="$HOME/.zsh"
|
||||||
|
export EDITOR="nvim"
|
||||||
|
export VISUAL="nvim"
|
||||||
|
|
||||||
|
# nvim manager
|
||||||
|
[ -d "$HOME/.local/share/bob" ] && export PATH="$PATH:$HOME/.local/share/bob/nvim-bin"
|
||||||
|
# cargo
|
||||||
|
[ -d "$HOME/.cargo" ] && . "$HOME/.cargo/env"
|
||||||
|
# nvm (https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script)
|
||||||
|
[ -d "$HOME/.nvm" ] && . "$HOME/.nvm/nvm.sh" # This loads nvm
|
||||||
|
[ -d "$HOME/.nix-profile" ] && . $HOME/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
[ -d "$HOME/.pixi" ] && export PATH="$HOME/.pixi/bin:$PATH"
|
||||||
|
|
||||||
|
export VCPKG_ROOT=~/.vcpkg
|
||||||
|
export PATH=$VCPKG_ROOT:$PATH
|
||||||
|
|
||||||
|
export CMAKE_COLOR_DIAGNOSTICS=ON
|
||||||
|
export CMAKE_GENERATOR="Ninja"
|
||||||
|
|
||||||
|
# zsh
|
||||||
|
export HISTFILE=$HOME/.zhistory # History filepath
|
||||||
|
export HISTSIZE=10000 # Maximum events for internal history
|
||||||
|
export SAVEHIST=10000 # Maximum events in history file
|
||||||
|
|
||||||
|
# for autocomplete
|
||||||
|
skip_global_compinit=1
|
||||||
Reference in New Issue
Block a user