Compare commits
2 Commits
master
..
1f17082b04
| Author | SHA1 | Date | |
|---|---|---|---|
|
1f17082b04
|
|||
|
2b19c01d6b
|
-15
@@ -10,18 +10,3 @@
|
|||||||
[submodule "zsh/custom/plugins/zsh-autopair"]
|
[submodule "zsh/custom/plugins/zsh-autopair"]
|
||||||
path = zsh/custom/plugins/zsh-autopair
|
path = zsh/custom/plugins/zsh-autopair
|
||||||
url = https://github.com/hlissner/zsh-autopair
|
url = https://github.com/hlissner/zsh-autopair
|
||||||
[submodule "zsh/custom/plugins/fast-syntax-highlighting"]
|
|
||||||
path = zsh/custom/plugins/fast-syntax-highlighting
|
|
||||||
url = https://github.com/zdharma-continuum/fast-syntax-highlighting.git
|
|
||||||
[submodule "zsh/custom/plugins/zsh-completions"]
|
|
||||||
path = zsh/custom/plugins/zsh-completions
|
|
||||||
url = https://github.com/zsh-users/zsh-completions.git
|
|
||||||
[submodule "zsh/custom/plugins/zsh-vi-mode"]
|
|
||||||
path = zsh/custom/plugins/zsh-vi-mode
|
|
||||||
url = https://github.com/jeffreytse/zsh-vi-mode
|
|
||||||
[submodule "zsh/custom/plugins/evalcache"]
|
|
||||||
path = zsh/custom/plugins/evalcache
|
|
||||||
url = https://github.com/mroth/evalcache/
|
|
||||||
[submodule "zsh/custom/plugins/zsh-defer"]
|
|
||||||
path = zsh/custom/plugins/zsh-defer
|
|
||||||
url = https://github.com/romkatv/zsh-defer
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
## Tools
|
|
||||||
|
|
||||||
### Core tools
|
|
||||||
|
|
||||||
```
|
|
||||||
bat
|
|
||||||
fd
|
|
||||||
fzf
|
|
||||||
git-delta
|
|
||||||
paru
|
|
||||||
rg
|
|
||||||
zoxide
|
|
||||||
```
|
|
||||||
|
|
||||||
### Useful
|
|
||||||
|
|
||||||
```
|
|
||||||
jq
|
|
||||||
git-cliff
|
|
||||||
```
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
TERM = "xterm-256color"
|
TERM = "xterm-256color"
|
||||||
|
|
||||||
[font]
|
[font]
|
||||||
size = 10
|
size = 9.8
|
||||||
|
|
||||||
[font.normal]
|
[font.normal]
|
||||||
family = "Hack Nerd Font"
|
family = "Hack Nerd Font"
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
[include]
|
|
||||||
path = ~/.dotfiles/git/configs/common.gitconfig
|
|
||||||
|
|
||||||
path = ~/.dotfiles/git/profiles/aim-robotics.gitconfig
|
|
||||||
|
|
||||||
[includeIf "gitdir:~/.dotfiles/"]
|
|
||||||
path = ~/.dotfiles/git/profiles/Dreaded_X.gitconfig
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../git/dot-local
|
|
||||||
@@ -1,7 +1,3 @@
|
|||||||
[include]
|
[include]
|
||||||
path = ~/.dotfiles/git/configs/common.gitconfig
|
path = ~/.dotfiles/git/profiles/common
|
||||||
|
path = ~/.dotfiles/git/profiles/ALTEN
|
||||||
path = ~/.dotfiles/git/profiles/ALTEN.gitconfig
|
|
||||||
|
|
||||||
[includeIf "gitdir:~/.dotfiles"]
|
|
||||||
path = ~/.dotfiles/git/profiles/Dreaded_X.gitconfig
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../git/dot-local
|
|
||||||
@@ -1,3 +1,2 @@
|
|||||||
gitignore
|
gitignore
|
||||||
profiles
|
profiles
|
||||||
configs
|
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
[delta "gruvmax-fang"]
|
|
||||||
# author: https://github.com/maxfangx
|
|
||||||
# Modified by: Dreaded_X
|
|
||||||
# General appearance
|
|
||||||
dark = true
|
|
||||||
syntax-theme = gruvbox-dark
|
|
||||||
# File
|
|
||||||
file-style = "#FFFFFF" bold
|
|
||||||
file-added-label = [+]
|
|
||||||
file-copied-label = [==]
|
|
||||||
file-modified-label = [*]
|
|
||||||
file-removed-label = [-]
|
|
||||||
file-renamed-label = [->]
|
|
||||||
file-decoration-style = "#434C5E" ul
|
|
||||||
file-decoration-style = "#84786A" ul
|
|
||||||
# No hunk headers
|
|
||||||
hunk-header-style = omit
|
|
||||||
# Line numbers
|
|
||||||
line-numbers = true
|
|
||||||
line-numbers-left-style = "#84786A"
|
|
||||||
line-numbers-right-style = "#84786A"
|
|
||||||
line-numbers-minus-style = "#A02A11"
|
|
||||||
line-numbers-plus-style = "#479B36"
|
|
||||||
line-numbers-zero-style = "#84786A"
|
|
||||||
line-numbers-left-format = " {nm:>3} │"
|
|
||||||
line-numbers-right-format = " {np:>3} │"
|
|
||||||
# Diff contents
|
|
||||||
inline-hint-style = syntax
|
|
||||||
minus-non-emph-style = syntax auto
|
|
||||||
plus-non-emph-style = syntax auto
|
|
||||||
whitespace-error-style = "#FB4934" reverse
|
|
||||||
# Blame
|
|
||||||
blame-code-style = syntax
|
|
||||||
# Merge conflicts
|
|
||||||
merge-conflict-begin-symbol = ⌃
|
|
||||||
merge-conflict-end-symbol = ⌄
|
|
||||||
merge-conflict-ours-diff-header-style = "#FABD2F" bold
|
|
||||||
merge-conflict-theirs-diff-header-style = "#FABD2F" bold overline
|
|
||||||
merge-conflict-ours-diff-header-decoration-style = ''
|
|
||||||
merge-conflict-theirs-diff-header-decoration-style = ''
|
|
||||||
|
|
||||||
[core]
|
|
||||||
pager = delta
|
|
||||||
|
|
||||||
[interactive]
|
|
||||||
diffFilter = delta --color-only
|
|
||||||
|
|
||||||
[delta]
|
|
||||||
features = gruvmax-fang
|
|
||||||
navigate = true
|
|
||||||
side-by-side = true
|
|
||||||
|
|
||||||
[merge]
|
|
||||||
conflictstyle = zdiff3
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
[filter "lfs"]
|
|
||||||
process = git-lfs filter-process
|
|
||||||
required = true
|
|
||||||
clean = git-lfs clean -- %f
|
|
||||||
smudge = git-lfs smudge -- %f
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
[user]
|
|
||||||
signingkey = CD17A34CBFB21DE9A73D47EB76BDEC4E165D8AD9
|
|
||||||
|
|
||||||
[commit]
|
|
||||||
gpgsign = true
|
|
||||||
+8
-7
@@ -1,10 +1,11 @@
|
|||||||
[include]
|
[include]
|
||||||
path = ~/.dotfiles/git/configs/common.gitconfig
|
path = ~/.dotfiles/git/profiles/common
|
||||||
|
path = ~/.dotfiles/git/profiles/Dreaded_X
|
||||||
path = ~/.dotfiles/git/profiles/Dreaded_X.gitconfig
|
|
||||||
|
|
||||||
[includeIf "gitdir:~/Projects/ALTEN/"]
|
[includeIf "gitdir:~/Projects/ALTEN/"]
|
||||||
path = ~/.dotfiles/git/profiles/ALTEN.gitconfig
|
path = ~/.dotfiles/git/profiles/ALTEN
|
||||||
|
[filter "lfs"]
|
||||||
[includeIf "gitdir:~/Projects/aim-robotics/"]
|
process = git-lfs filter-process
|
||||||
path = ~/.dotfiles/git/profiles/aim-robotics.gitconfig
|
required = true
|
||||||
|
clean = git-lfs clean -- %f
|
||||||
|
smudge = git-lfs smudge -- %f
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
TARGET=$1
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$TARGET" ]; then
|
|
||||||
if hash fzf 2>/dev/null; then
|
|
||||||
TARGET=$(git log -n 50 --pretty=format:'%h %s' --no-merges | fzf --border-label=' Select commit ' | cut -c -7 )
|
|
||||||
else
|
|
||||||
echo "Not installed: fzf"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$TARGET" ]; then
|
|
||||||
echo "No target specified"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
git commit --fixup=$TARGET ${@:2} && GIT_SEQUENCE_EDITOR=true git rebase -i --autostash --autosquash $TARGET^
|
|
||||||
@@ -9,6 +9,8 @@ Session.vim
|
|||||||
# temporary
|
# temporary
|
||||||
.netrwhist
|
.netrwhist
|
||||||
*~
|
*~
|
||||||
|
# auto-generated tag files
|
||||||
|
tags
|
||||||
|
|
||||||
# End of https://www.gitignore.io/api/vim
|
# End of https://www.gitignore.io/api/vim
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
[user]
|
[user]
|
||||||
name = Tim Huizinga
|
name = Tim Huizinga
|
||||||
email = tim.huizinga@alten.nl
|
email = tim.huizinga@alten.nl
|
||||||
|
|
||||||
|
[commit]
|
||||||
|
gpgsign = false
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[user]
|
||||||
|
name = Dreaded_X
|
||||||
|
email = tim@huizinga.dev
|
||||||
|
signingkey = CD17A34CBFB21DE9A73D47EB76BDEC4E165D8AD9
|
||||||
|
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[user]
|
|
||||||
name = Dreaded_X
|
|
||||||
email = tim@huizinga.dev
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[user]
|
|
||||||
name = Tim Huizinga
|
|
||||||
email = th@aimrobotics.nl
|
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
[include]
|
|
||||||
path = ~/.dotfiles/git/configs/lfs.gitconfig
|
|
||||||
path = ~/.dotfiles/git/configs/delta.gitconfig
|
|
||||||
path = ~/.dotfiles/git/configs/sign.gitconfig
|
|
||||||
|
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple
|
||||||
autoSetupRemote = true
|
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.dotfiles/git/gitignore
|
excludesfile = ~/.dotfiles/git/gitignore
|
||||||
@@ -26,9 +20,4 @@
|
|||||||
tool = nvimdiff
|
tool = nvimdiff
|
||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = master
|
||||||
|
|
||||||
[rebase]
|
|
||||||
autosquash = true
|
|
||||||
autostash = true
|
|
||||||
updateRefs = true
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
enable-ssh-support
|
|
||||||
|
|
||||||
default-cache-ttl 180800
|
|
||||||
max-cache-ttl 180800
|
|
||||||
default-cache-ttl-ssh 180800
|
|
||||||
max-cache-ttl-ssh 180800
|
|
||||||
|
|
||||||
pinentry-program /usr/bin/pinentry-tty
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Install additional dependencies
|
|
||||||
sudo apt-get install fuse libfuse2 unzip ripgrep python3-venv xclip -y --no-install-recommends
|
|
||||||
|
|
||||||
# Install new version of node
|
|
||||||
curl -fsSL https://deb.nodesource.com/setup_23.x -o /tmp/nodesource_setup.sh
|
|
||||||
sudo -E bash /tmp/nodesource_setup.sh
|
|
||||||
sudo apt-get install -y nodejs
|
|
||||||
|
|
||||||
# Install new version of neovim
|
|
||||||
sudo rm -rf /usr/local/bin/nvim
|
|
||||||
sudo wget https://github.com/neovim/neovim-releases/releases/download/v0.11.1/nvim-linux-x86_64.appimage -O /usr/local/bin/nvim
|
|
||||||
sudo chmod +x /usr/local/bin/nvim
|
|
||||||
|
|
||||||
# Get latest version of dotfiles
|
|
||||||
rm -rf ~/.dotfiles
|
|
||||||
git clone https://git.huizinga.dev/Dreaded_X/dotfiles ~/.dotfiles
|
|
||||||
mkdir -p ~/.config
|
|
||||||
ln -s ~/.dotfiles/nvim/dot-config/nvim ~/.config/nvim
|
|
||||||
@@ -1,54 +1,45 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"actions-preview.nvim": { "branch": "master", "commit": "2b604b2e8e662c03b716436f6ffebcb19663e66a" },
|
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"bufresize.nvim": { "branch": "master", "commit": "3b19527ab936d6910484dcc20fb59bdb12322d8b" },
|
"conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||||
"crates.nvim": { "branch": "main", "commit": "afcd1cc3eeceb5783676fc8464389b9216a29d05" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
"gitsigns.nvim": { "branch": "main", "commit": "8bdaccdb897945a3c99c1ad8df94db0ddf5c8790" },
|
||||||
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
|
"gruvbox.nvim": { "branch": "main", "commit": "00e38a379bab3389e187b3953566d67d494dfddd" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
|
||||||
"gitlab.nvim": { "branch": "develop", "commit": "0f007fcf7934426338fcb5f2f17a8d6e9f3bc514" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "8d82c240f190fc33723d48c308ccc1ed8baad69d" },
|
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
|
|
||||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||||
"inc-rename.nvim": { "branch": "main", "commit": "0074b551a17338ccdcd299bd86687cc651bcb33d" },
|
"inc-rename.nvim": { "branch": "main", "commit": "2eaff20526ff6101337b84f4b0d238c11f47d7f4" },
|
||||||
"kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
|
"kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "f5d2a8570f8b736ddb9bb4be504355bcd6e15ec8" },
|
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "67da97f8c2fd12d05427bb485ce07ee6418e0a51" },
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" },
|
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||||
"multicolumn.nvim": { "branch": "master", "commit": "a363bdfd422abf26256f343dac4df183031f8e94" },
|
"neo-tree.nvim": { "branch": "main", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" },
|
"nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "5cfe7fffbd01e17b3c1e14af85d5febdef88bd8c" },
|
|
||||||
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
|
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "cb5bc0b2b35a6d513e3298d285db81453e791f4f" },
|
"nvim-lspconfig": { "branch": "master", "commit": "03bc581e05e81d33808b42b2d7e76d70adb3b595" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "9291040de8cd8a4439eb64c441e8d5d2bf884a5a" },
|
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"ros-nvim": { "branch": "main", "commit": "1ad64cd3a1e144dfea67890845f9da2e82d96900" },
|
"ros-nvim": { "branch": "main", "commit": "f0e16eebe68546025784593fa2355ca6749014a0" },
|
||||||
"schema-companion.nvim": { "branch": "main", "commit": "bcccfe46a1796f86b81dc3be6ab80ece3664d3b2" },
|
"schema-companion.nvim": { "branch": "main", "commit": "7d662b6c1497fdd82e3e8836eb122f5c4b0d8277" },
|
||||||
"schemastore.nvim": { "branch": "main", "commit": "f5df9e70403b5d4c0642702a64534f04f3d71d03" },
|
"schemastore.nvim": { "branch": "main", "commit": "59d6bfa8c109675065f68a81664c17557cc19a9c" },
|
||||||
"scrollEOF.nvim": { "branch": "master", "commit": "e462b9a07b8166c3e8011f1dcbc6bf68b67cd8d7" },
|
"scrollEOF.nvim": { "branch": "master", "commit": "2575109749b4bf3a0bf979a17947b3c1e8c5137e" },
|
||||||
"smart-open.nvim": { "branch": "0.3.x", "commit": "918c97cac0c33f7a116a822df144bc5bbefa4490" },
|
"smart-splits.nvim": { "branch": "master", "commit": "5aa2dd82d56cde2f01aef4e902c961e2f7a5453e" },
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "09796a7ad0776c92518e0afae8688ef8d7f720e6" },
|
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
|
||||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "f7c673b8e46e8f233ff581d3624a517d33a7e264" },
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "6b58234de921437836efe27714b2026ed2ee235a" },
|
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "b24b97c538b71b6de0ce9d84e47df27b6ecafd76" },
|
||||||
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
|
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||||
"which-key.nvim": { "branch": "winborder-support", "commit": "ab1a3b0d3005a95507ba6c18b96531d430370885" }
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
local function uv_script_interpreter(script_path)
|
|
||||||
local result = vim.system({ "uv", "python", "find", "--script", script_path }, { text = true }):wait()
|
|
||||||
if result.code == 0 then
|
|
||||||
return vim.fn.trim(result.stdout)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function uv_interpreter()
|
|
||||||
local result = vim.system({ "uv", "python", "find" }, { text = true }):wait()
|
|
||||||
if result.code == 0 then
|
|
||||||
return vim.fn.trim(result.stdout)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
settings = {
|
|
||||||
basedpyright = {
|
|
||||||
analysis = {
|
|
||||||
typeCheckingMode = "standard",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
python = {},
|
|
||||||
},
|
|
||||||
before_init = function(_, config)
|
|
||||||
local script = vim.api.nvim_buf_get_name(0)
|
|
||||||
local python = uv_script_interpreter(script)
|
|
||||||
if not python then
|
|
||||||
python = uv_interpreter()
|
|
||||||
end
|
|
||||||
config.settings.python.pythonPath = python
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,4 @@
|
|||||||
return require("schema-companion").setup_client(
|
return {
|
||||||
require("schema-companion").adapters.jsonls.setup({
|
|
||||||
sources = {
|
|
||||||
require("schema-companion").sources.lsp.setup(),
|
|
||||||
require("schema-companion").sources.none.setup(),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
settings = {
|
settings = {
|
||||||
json = {
|
json = {
|
||||||
validate = { enable = true },
|
validate = { enable = true },
|
||||||
@@ -13,4 +6,3 @@ return require("schema-companion").setup_client(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,23 +1,8 @@
|
|||||||
return {
|
return {
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = {
|
workspace = { checkThirdParty = false },
|
||||||
checkThirdParty = false,
|
|
||||||
library = {
|
|
||||||
"./definitions",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
telemetry = { enable = false },
|
telemetry = { enable = false },
|
||||||
type = {
|
|
||||||
checkTableShape = true,
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
neededFileStatus = {
|
|
||||||
-- ["no-unknown"] = "Opened",
|
|
||||||
-- ["incomplete-signature-doc"] = "Opened",
|
|
||||||
-- ["await-in-sync"] = "Opened",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
return require("schema-companion").setup_client(
|
|
||||||
require("schema-companion").adapters.taplo.setup({
|
|
||||||
sources = {
|
|
||||||
require("schema-companion").sources.lsp.setup(),
|
|
||||||
require("schema-companion").sources.none.setup(),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
{}
|
|
||||||
)
|
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
return require("schema-companion").setup_client(
|
return require("schema-companion").setup_client({
|
||||||
require("schema-companion").adapters.yamlls.setup({
|
settings = {
|
||||||
sources = {
|
yaml = {},
|
||||||
require("matchers.kubernetes").setup({}),
|
|
||||||
require("schema-companion").sources.lsp.setup(),
|
|
||||||
require("schema-companion").sources.none.setup(),
|
|
||||||
},
|
},
|
||||||
}),
|
})
|
||||||
{}
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -15,16 +15,3 @@ vim.keymap.set("n", "N", "Nzz")
|
|||||||
|
|
||||||
-- Clear search highlight by pressing esc
|
-- Clear search highlight by pressing esc
|
||||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = { "rust" },
|
|
||||||
callback = function(args)
|
|
||||||
local command = {
|
|
||||||
rust = "cargo run",
|
|
||||||
}
|
|
||||||
vim.keymap.set("n", "<F5>", function()
|
|
||||||
vim.system({ "tmux", "send-keys", "-t", ":shell", "c-u", command[args.match], "Enter" })
|
|
||||||
vim.system({ "tmux", "select-window", "-t", ":shell" })
|
|
||||||
end, { buffer = true })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -27,9 +27,7 @@ map("<leader>th", function()
|
|||||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||||
end, "Toggle inlay hints")
|
end, "Toggle inlay hints")
|
||||||
|
|
||||||
map("gra", function()
|
map("gra", vim.lsp.buf.code_action, "Code actions", { "n", "x" })
|
||||||
require("actions-preview").code_actions()
|
|
||||||
end, "Code actions", { "n", "x" })
|
|
||||||
map("grD", vim.lsp.buf.declaration, "Goto declaration")
|
map("grD", vim.lsp.buf.declaration, "Goto declaration")
|
||||||
map("grd", function()
|
map("grd", function()
|
||||||
require("telescope.builtin").lsp_definitions({ jump_type = "never" })
|
require("telescope.builtin").lsp_definitions({ jump_type = "never" })
|
||||||
@@ -75,20 +73,20 @@ local function on_attach(client, bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Highlight references under cursor
|
-- Highlight references under cursor
|
||||||
-- if client:supports_method(methods.textDocument_documentHighlight) then
|
if client:supports_method(methods.textDocument_documentHighlight) then
|
||||||
-- local lsp_hover_hl = vim.api.nvim_create_augroup("LspHoverHighlight", { clear = false })
|
local lsp_hover_hl = vim.api.nvim_create_augroup("LspHoverHighlight", { clear = false })
|
||||||
-- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||||
-- buffer = bufnr,
|
buffer = bufnr,
|
||||||
-- group = lsp_hover_hl,
|
group = lsp_hover_hl,
|
||||||
-- callback = vim.lsp.buf.document_highlight,
|
callback = vim.lsp.buf.document_highlight,
|
||||||
-- })
|
})
|
||||||
--
|
|
||||||
-- vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||||
-- buffer = bufnr,
|
buffer = bufnr,
|
||||||
-- group = lsp_hover_hl,
|
group = lsp_hover_hl,
|
||||||
-- callback = vim.lsp.buf.clear_references,
|
callback = vim.lsp.buf.clear_references,
|
||||||
-- })
|
})
|
||||||
-- end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
@@ -148,10 +146,5 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Manually enable lsps, if installed
|
-- Manually enable rust analyzer
|
||||||
if vim.fn.executable("rust_analyzer") then
|
|
||||||
vim.lsp.enable("rust_analyzer")
|
vim.lsp.enable("rust_analyzer")
|
||||||
end
|
|
||||||
if vim.fn.executable("vtsls") then
|
|
||||||
vim.lsp.enable("vtsls")
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
---@class schema_companion.Source
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.name = "Kubernetes"
|
|
||||||
|
|
||||||
M.config = {}
|
|
||||||
|
|
||||||
---@param config {}
|
|
||||||
---@return schema_companion.Source
|
|
||||||
function M.setup(config)
|
|
||||||
setmetatable(M, {})
|
|
||||||
M.config = vim.tbl_deep_extend("force", {}, M.config, config)
|
|
||||||
|
|
||||||
return M
|
|
||||||
end
|
|
||||||
|
|
||||||
function M:match(_, bufnr)
|
|
||||||
local resources = {}
|
|
||||||
|
|
||||||
local current = {}
|
|
||||||
for _, line in pairs(vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)) do
|
|
||||||
local _, _, group, version = line:find([[^apiVersion:%s*["']?([^%s"'/]*)/?([^%s"']*)]])
|
|
||||||
local _, _, kind = line:find([[^kind:%s*["']?([^%s"'/]*)]])
|
|
||||||
|
|
||||||
if group and group ~= "" then
|
|
||||||
current.group = group
|
|
||||||
end
|
|
||||||
if version and version ~= "" then
|
|
||||||
current.version = version
|
|
||||||
end
|
|
||||||
if kind and kind ~= "" then
|
|
||||||
current.kind = kind
|
|
||||||
end
|
|
||||||
|
|
||||||
if current.group and current.kind then
|
|
||||||
table.insert(resources, current)
|
|
||||||
current = {}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local schemas = {}
|
|
||||||
for _, resource in pairs(resources) do
|
|
||||||
local api = resource.version and ("%s/%s"):format(resource.group, resource.version) or resource.group
|
|
||||||
local schema = {
|
|
||||||
name = ("%s@%s"):format(resource.kind, api),
|
|
||||||
source = M.name,
|
|
||||||
uri = require("kubernetes").yamlls_schema(),
|
|
||||||
}
|
|
||||||
if schema then
|
|
||||||
table.insert(schemas, schema)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return schemas
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
-- https://github.com/aznhe21/actions-preview.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"aznhe21/actions-preview.nvim",
|
|
||||||
opts = function()
|
|
||||||
local hl = require("actions-preview.highlight")
|
|
||||||
return {
|
|
||||||
backend = { "telescope" },
|
|
||||||
highlight_command = {
|
|
||||||
hl.delta(),
|
|
||||||
},
|
|
||||||
telescope = {
|
|
||||||
sorting_strategy = "ascending",
|
|
||||||
layout_strategy = "vertical",
|
|
||||||
layout_config = {
|
|
||||||
width = 0.8,
|
|
||||||
height = 0.9,
|
|
||||||
prompt_position = "top",
|
|
||||||
preview_cutoff = 20,
|
|
||||||
preview_height = function(_, _, max_lines)
|
|
||||||
return max_lines - 15
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
-- https://github.com/kwkarlwang/bufresize.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"kwkarlwang/bufresize.nvim",
|
|
||||||
opts = {},
|
|
||||||
}
|
|
||||||
@@ -15,12 +15,8 @@ return {
|
|||||||
"!popup",
|
"!popup",
|
||||||
},
|
},
|
||||||
always_update = true,
|
always_update = true,
|
||||||
options = {
|
user_default_options = {
|
||||||
parsers = {
|
names = false,
|
||||||
names = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ local formatters_by_ft = {
|
|||||||
go = { "goimports" },
|
go = { "goimports" },
|
||||||
python = { "ruff_organize_imports", "ruff_format" },
|
python = { "ruff_organize_imports", "ruff_format" },
|
||||||
rust = { "rustfmt" },
|
rust = { "rustfmt" },
|
||||||
javascript = { "prettier" },
|
javascript = { "prettierd" },
|
||||||
javascriptreact = { "prettier" },
|
javascriptreact = { "prettierd" },
|
||||||
typescript = { "prettier" },
|
typescript = { "prettierd" },
|
||||||
typescriptreact = { "prettier" },
|
typescriptreact = { "prettierd" },
|
||||||
css = { "prettier" },
|
css = { "prettierd" },
|
||||||
markdown = { "prettier" },
|
markdown = { "prettierd" },
|
||||||
yaml = { "prettier" },
|
yaml = { "prettierd" },
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
json = { "prettier" },
|
json = { "jq" },
|
||||||
toml = { "taplo" },
|
toml = { "taplo" },
|
||||||
-- ["*"] = { "injected" },
|
-- ["*"] = { "injected" },
|
||||||
["_"] = { "trim_whitespace", "trim_newlines" },
|
["_"] = { "trim_whitespace", "trim_newlines" },
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
-- https://github.com/Saecki/crates.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"Saecki/crates.nvim",
|
|
||||||
event = { "BufRead Cargo.toml" },
|
|
||||||
tag = "stable",
|
|
||||||
--- @type crates.UserConfig
|
|
||||||
opts = {
|
|
||||||
popup = {
|
|
||||||
hide_on_select = true,
|
|
||||||
border = require("symbols.window").border,
|
|
||||||
},
|
|
||||||
lsp = {
|
|
||||||
enabled = true,
|
|
||||||
actions = true,
|
|
||||||
completion = true,
|
|
||||||
hover = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,412 +0,0 @@
|
|||||||
-- https://github.com/sindrets/diffview.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"sindrets/diffview.nvim",
|
|
||||||
opts = function()
|
|
||||||
local actions = require("diffview.actions")
|
|
||||||
|
|
||||||
return {
|
|
||||||
use_icons = false,
|
|
||||||
-- Disable default keymaps just so we can change <leader>e -> <leader>f
|
|
||||||
keymaps = {
|
|
||||||
disable_defaults = true,
|
|
||||||
view = {
|
|
||||||
-- The `view` bindings are active in the diff buffers, only when the current
|
|
||||||
-- tabpage is a Diffview.
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<tab>",
|
|
||||||
actions.select_next_entry,
|
|
||||||
{ desc = "Open the diff for the next file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<s-tab>",
|
|
||||||
actions.select_prev_entry,
|
|
||||||
{ desc = "Open the diff for the previous file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"[F",
|
|
||||||
actions.select_first_entry,
|
|
||||||
{ desc = "Open the diff for the first file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"]F",
|
|
||||||
actions.select_last_entry,
|
|
||||||
{ desc = "Open the diff for the last file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"gf",
|
|
||||||
actions.goto_file_edit,
|
|
||||||
{ desc = "Open the file in the previous tabpage" },
|
|
||||||
},
|
|
||||||
{ "n", "<C-w><C-f>", actions.goto_file_split, { desc = "Open the file in a new split" } },
|
|
||||||
{ "n", "<C-w>gf", actions.goto_file_tab, { desc = "Open the file in a new tabpage" } },
|
|
||||||
{ "n", "<leader>f", actions.focus_files, { desc = "Bring focus to the file panel" } },
|
|
||||||
{ "n", "<leader>b", actions.toggle_files, { desc = "Toggle the file panel." } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"g<C-x>",
|
|
||||||
actions.cycle_layout,
|
|
||||||
{ desc = "Cycle through available layouts." },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"[x",
|
|
||||||
actions.prev_conflict,
|
|
||||||
{ desc = "In the merge-tool: jump to the previous conflict" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"]x",
|
|
||||||
actions.next_conflict,
|
|
||||||
{ desc = "In the merge-tool: jump to the next conflict" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>co",
|
|
||||||
actions.conflict_choose("ours"),
|
|
||||||
{ desc = "Choose the OURS version of a conflict" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>ct",
|
|
||||||
actions.conflict_choose("theirs"),
|
|
||||||
{ desc = "Choose the THEIRS version of a conflict" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>cb",
|
|
||||||
actions.conflict_choose("base"),
|
|
||||||
{ desc = "Choose the BASE version of a conflict" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>ca",
|
|
||||||
actions.conflict_choose("all"),
|
|
||||||
{ desc = "Choose all the versions of a conflict" },
|
|
||||||
},
|
|
||||||
{ "n", "dx", actions.conflict_choose("none"), { desc = "Delete the conflict region" } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>cO",
|
|
||||||
actions.conflict_choose_all("ours"),
|
|
||||||
{ desc = "Choose the OURS version of a conflict for the whole file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>cT",
|
|
||||||
actions.conflict_choose_all("theirs"),
|
|
||||||
{ desc = "Choose the THEIRS version of a conflict for the whole file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>cB",
|
|
||||||
actions.conflict_choose_all("base"),
|
|
||||||
{ desc = "Choose the BASE version of a conflict for the whole file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>cA",
|
|
||||||
actions.conflict_choose_all("all"),
|
|
||||||
{ desc = "Choose all the versions of a conflict for the whole file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"dX",
|
|
||||||
actions.conflict_choose_all("none"),
|
|
||||||
{ desc = "Delete the conflict region for the whole file" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
file_panel = {
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"j",
|
|
||||||
actions.next_entry,
|
|
||||||
{ desc = "Bring the cursor to the next file entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<down>",
|
|
||||||
actions.next_entry,
|
|
||||||
{ desc = "Bring the cursor to the next file entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"k",
|
|
||||||
actions.prev_entry,
|
|
||||||
{ desc = "Bring the cursor to the previous file entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<up>",
|
|
||||||
actions.prev_entry,
|
|
||||||
{ desc = "Bring the cursor to the previous file entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<cr>",
|
|
||||||
actions.select_entry,
|
|
||||||
{ desc = "Open the diff for the selected entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"o",
|
|
||||||
actions.select_entry,
|
|
||||||
{ desc = "Open the diff for the selected entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"l",
|
|
||||||
actions.select_entry,
|
|
||||||
{ desc = "Open the diff for the selected entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<2-LeftMouse>",
|
|
||||||
actions.select_entry,
|
|
||||||
{ desc = "Open the diff for the selected entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"-",
|
|
||||||
actions.toggle_stage_entry,
|
|
||||||
{ desc = "Stage / unstage the selected entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"s",
|
|
||||||
actions.toggle_stage_entry,
|
|
||||||
{ desc = "Stage / unstage the selected entry" },
|
|
||||||
},
|
|
||||||
{ "n", "S", actions.stage_all, { desc = "Stage all entries" } },
|
|
||||||
{ "n", "U", actions.unstage_all, { desc = "Unstage all entries" } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"X",
|
|
||||||
actions.restore_entry,
|
|
||||||
{ desc = "Restore entry to the state on the left side" },
|
|
||||||
},
|
|
||||||
{ "n", "L", actions.open_commit_log, { desc = "Open the commit log panel" } },
|
|
||||||
{ "n", "zo", actions.open_fold, { desc = "Expand fold" } },
|
|
||||||
{ "n", "h", actions.close_fold, { desc = "Collapse fold" } },
|
|
||||||
{ "n", "zc", actions.close_fold, { desc = "Collapse fold" } },
|
|
||||||
{ "n", "za", actions.toggle_fold, { desc = "Toggle fold" } },
|
|
||||||
{ "n", "zR", actions.open_all_folds, { desc = "Expand all folds" } },
|
|
||||||
{ "n", "zM", actions.close_all_folds, { desc = "Collapse all folds" } },
|
|
||||||
{ "n", "<c-b>", actions.scroll_view(-0.25), { desc = "Scroll the view up" } },
|
|
||||||
{ "n", "<c-f>", actions.scroll_view(0.25), { desc = "Scroll the view down" } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<tab>",
|
|
||||||
actions.select_next_entry,
|
|
||||||
{ desc = "Open the diff for the next file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<s-tab>",
|
|
||||||
actions.select_prev_entry,
|
|
||||||
{ desc = "Open the diff for the previous file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"[F",
|
|
||||||
actions.select_first_entry,
|
|
||||||
{ desc = "Open the diff for the first file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"]F",
|
|
||||||
actions.select_last_entry,
|
|
||||||
{ desc = "Open the diff for the last file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"gf",
|
|
||||||
actions.goto_file_edit,
|
|
||||||
{ desc = "Open the file in the previous tabpage" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<C-w><C-f>",
|
|
||||||
actions.goto_file_split,
|
|
||||||
{ desc = "Open the file in a new split" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<C-w>gf",
|
|
||||||
actions.goto_file_tab,
|
|
||||||
{ desc = "Open the file in a new tabpage" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"i",
|
|
||||||
actions.listing_style,
|
|
||||||
{ desc = "Toggle between 'list' and 'tree' views" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"f",
|
|
||||||
actions.toggle_flatten_dirs,
|
|
||||||
{ desc = "Flatten empty subdirectories in tree listing style" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"R",
|
|
||||||
actions.refresh_files,
|
|
||||||
{ desc = "Update stats and entries in the file list" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>f",
|
|
||||||
actions.focus_files,
|
|
||||||
{ desc = "Bring focus to the file panel" },
|
|
||||||
},
|
|
||||||
{ "n", "<leader>b", actions.toggle_files, { desc = "Toggle the file panel" } },
|
|
||||||
{ "n", "g<C-x>", actions.cycle_layout, { desc = "Cycle available layouts" } },
|
|
||||||
{ "n", "[x", actions.prev_conflict, { desc = "Go to the previous conflict" } },
|
|
||||||
{ "n", "]x", actions.next_conflict, { desc = "Go to the next conflict" } },
|
|
||||||
{ "n", "g?", actions.help("file_panel"), { desc = "Open the help panel" } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>cO",
|
|
||||||
actions.conflict_choose_all("ours"),
|
|
||||||
{ desc = "Choose the OURS version of a conflict for the whole file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>cT",
|
|
||||||
actions.conflict_choose_all("theirs"),
|
|
||||||
{ desc = "Choose the THEIRS version of a conflict for the whole file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>cB",
|
|
||||||
actions.conflict_choose_all("base"),
|
|
||||||
{ desc = "Choose the BASE version of a conflict for the whole file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<leader>cA",
|
|
||||||
actions.conflict_choose_all("all"),
|
|
||||||
{ desc = "Choose all the versions of a conflict for the whole file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"dX",
|
|
||||||
actions.conflict_choose_all("none"),
|
|
||||||
{ desc = "Delete the conflict region for the whole file" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
file_history_panel = {
|
|
||||||
{ "n", "g!", actions.options, { desc = "Open the option panel" } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<C-A-d>",
|
|
||||||
actions.open_in_diffview,
|
|
||||||
{ desc = "Open the entry under the cursor in a diffview" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"y",
|
|
||||||
actions.copy_hash,
|
|
||||||
{ desc = "Copy the commit hash of the entry under the cursor" },
|
|
||||||
},
|
|
||||||
{ "n", "L", actions.open_commit_log, { desc = "Show commit details" } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"X",
|
|
||||||
actions.restore_entry,
|
|
||||||
{ desc = "Restore file to the state from the selected entry" },
|
|
||||||
},
|
|
||||||
{ "n", "zo", actions.open_fold, { desc = "Expand fold" } },
|
|
||||||
{ "n", "zc", actions.close_fold, { desc = "Collapse fold" } },
|
|
||||||
{ "n", "h", actions.close_fold, { desc = "Collapse fold" } },
|
|
||||||
{ "n", "za", actions.toggle_fold, { desc = "Toggle fold" } },
|
|
||||||
{ "n", "zR", actions.open_all_folds, { desc = "Expand all folds" } },
|
|
||||||
{ "n", "zM", actions.close_all_folds, { desc = "Collapse all folds" } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"j",
|
|
||||||
actions.next_entry,
|
|
||||||
{ desc = "Bring the cursor to the next file entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<down>",
|
|
||||||
actions.next_entry,
|
|
||||||
{ desc = "Bring the cursor to the next file entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"k",
|
|
||||||
actions.prev_entry,
|
|
||||||
{ desc = "Bring the cursor to the previous file entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<up>",
|
|
||||||
actions.prev_entry,
|
|
||||||
{ desc = "Bring the cursor to the previous file entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<cr>",
|
|
||||||
actions.select_entry,
|
|
||||||
{ desc = "Open the diff for the selected entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"o",
|
|
||||||
actions.select_entry,
|
|
||||||
{ desc = "Open the diff for the selected entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"l",
|
|
||||||
actions.select_entry,
|
|
||||||
{ desc = "Open the diff for the selected entry" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<2-LeftMouse>",
|
|
||||||
actions.select_entry,
|
|
||||||
{ desc = "Open the diff for the selected entry" },
|
|
||||||
},
|
|
||||||
{ "n", "<c-b>", actions.scroll_view(-0.25), { desc = "Scroll the view up" } },
|
|
||||||
{ "n", "<c-f>", actions.scroll_view(0.25), { desc = "Scroll the view down" } },
|
|
||||||
{ "n", "<tab>", actions.select_next_entry, { desc = "Open the diff for the next file" } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"<s-tab>",
|
|
||||||
actions.select_prev_entry,
|
|
||||||
{ desc = "Open the diff for the previous file" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"[F",
|
|
||||||
actions.select_first_entry,
|
|
||||||
{ desc = "Open the diff for the first file" },
|
|
||||||
},
|
|
||||||
{ "n", "]F", actions.select_last_entry, { desc = "Open the diff for the last file" } },
|
|
||||||
{
|
|
||||||
"n",
|
|
||||||
"gf",
|
|
||||||
actions.goto_file_edit,
|
|
||||||
{ desc = "Open the file in the previous tabpage" },
|
|
||||||
},
|
|
||||||
{ "n", "<C-w><C-f>", actions.goto_file_split, { desc = "Open the file in a new split" } },
|
|
||||||
{ "n", "<C-w>gf", actions.goto_file_tab, { desc = "Open the file in a new tabpage" } },
|
|
||||||
{ "n", "<leader>f", actions.focus_files, { desc = "Bring focus to the file panel" } },
|
|
||||||
{ "n", "<leader>b", actions.toggle_files, { desc = "Toggle the file panel" } },
|
|
||||||
{ "n", "g<C-x>", actions.cycle_layout, { desc = "Cycle available layouts" } },
|
|
||||||
{ "n", "g?", actions.help("file_history_panel"), { desc = "Open the help panel" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
-- https://github.com/jinh0/eyeliner.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"jinh0/eyeliner.nvim",
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"ellisonleao/gruvbox.nvim",
|
|
||||||
opts = {
|
|
||||||
overrides = {
|
|
||||||
EyelinerPrimary = { bold = true, underline = true },
|
|
||||||
EyelinerSecondary = { underline = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
highlight_on_key = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
local window = require("symbols.window")
|
|
||||||
-- https://github.com/harrisoncramer/gitlab.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"harrisoncramer/gitlab.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"sindrets/diffview.nvim",
|
|
||||||
},
|
|
||||||
cond = function()
|
|
||||||
return vim.fn.executable("go") > 0
|
|
||||||
end,
|
|
||||||
build = function()
|
|
||||||
require("gitlab.server").build(true)
|
|
||||||
end, -- Builds the Go binary
|
|
||||||
opts = {
|
|
||||||
discussion_tree = {
|
|
||||||
draft_mode = true,
|
|
||||||
},
|
|
||||||
popup = {
|
|
||||||
border = window.border,
|
|
||||||
},
|
|
||||||
discussion_signs = {
|
|
||||||
virtual_text = true,
|
|
||||||
},
|
|
||||||
keymaps = {
|
|
||||||
discussion_tree = {
|
|
||||||
toggle_node = "za",
|
|
||||||
toggle_all_discussions = "zA",
|
|
||||||
},
|
|
||||||
popup = {
|
|
||||||
perform_action = "w",
|
|
||||||
discard_changes = "<esc>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,24 +1,15 @@
|
|||||||
-- https://github.com/nvim-lualine/lualine.nvim
|
-- https://github.com/nvim-lualine/lualine.nvim
|
||||||
|
|
||||||
local function get_schema()
|
local function get_schema()
|
||||||
if not (vim.bo.filetype == "yaml" or vim.bo.filetype == "json" or vim.bo.filetype == "toml") then
|
if vim.bo.filetype ~= "yaml" then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
-- The provided get_current_schema function returns nonenil when no schema is known.
|
local schema = require("schema-companion.context").get_buffer_schema()
|
||||||
-- Instead we use a custom implemention that does not do that.
|
|
||||||
-- Also has the added benefit of giving more control over formatting
|
|
||||||
local schemas = require("schema-companion").get_matching_schemas()
|
|
||||||
if schemas == nil or #schemas == 0 then
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
|
|
||||||
schema = schemas[1]
|
|
||||||
if schema.name == "none" then
|
if schema.name == "none" then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
return schema.name
|
||||||
return ("%s%s"):format(schema.name, #schemas > 1 and (" (+%d)"):format(#schemas - 1) or "")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @module "lazy"
|
--- @module "lazy"
|
||||||
@@ -52,11 +43,9 @@ return {
|
|||||||
"encoding",
|
"encoding",
|
||||||
{ "fileformat", icons_enabled = false },
|
{ "fileformat", icons_enabled = false },
|
||||||
"filetype",
|
"filetype",
|
||||||
{
|
|
||||||
get_schema,
|
get_schema,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{ "filename", path = 1 },
|
{ "filename", path = 1 },
|
||||||
|
|||||||
@@ -17,34 +17,24 @@ local ensure_installed = {
|
|||||||
"neocmake",
|
"neocmake",
|
||||||
-- Formatter
|
-- Formatter
|
||||||
"clang-format",
|
"clang-format",
|
||||||
{
|
|
||||||
"goimports",
|
"goimports",
|
||||||
condition = function()
|
|
||||||
return vim.fn.executable("go") > 0
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
"ruff",
|
"ruff",
|
||||||
"prettier",
|
"prettierd",
|
||||||
"stylua",
|
"stylua",
|
||||||
"eslint",
|
"jq",
|
||||||
}
|
}
|
||||||
|
|
||||||
--- @module "lazy"
|
--- @module "lazy"
|
||||||
--- @type LazySpec
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mason-org/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
},
|
},
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = ensure_installed,
|
ensure_installed = ensure_installed,
|
||||||
auto_update = true,
|
auto_update = true,
|
||||||
|
debounde_hours = 24,
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
|
||||||
require("mason-tool-installer").setup(opts)
|
|
||||||
|
|
||||||
-- VeryLazy happens _after_ VimEnter, so we have to manually call this
|
|
||||||
require("mason-tool-installer").run_on_start()
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
-- https://github.com/aznhe21/fmbarina/multicolumn.nvim
|
|
||||||
local function enforced(rulers, scope)
|
|
||||||
return {
|
|
||||||
rulers = rulers,
|
|
||||||
scope = scope or "window",
|
|
||||||
full_column = false,
|
|
||||||
to_line_end = true,
|
|
||||||
bg_color = "#691b1b",
|
|
||||||
fg_color = "#ffd8ad",
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"fmbarina/multicolumn.nvim",
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
opts = {
|
|
||||||
base_set = {
|
|
||||||
full_column = true,
|
|
||||||
},
|
|
||||||
sets = {
|
|
||||||
python = enforced({ 89 }),
|
|
||||||
rust = enforced({ 101 }),
|
|
||||||
gitcommit = function(_, win)
|
|
||||||
local T = function(c, x, y)
|
|
||||||
if c then
|
|
||||||
return x
|
|
||||||
else
|
|
||||||
return y
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return enforced(
|
|
||||||
{ T(vim.fn.line(".", win) == 1, 51, 73) },
|
|
||||||
T(vim.fn.line(".", win) == 1, "line", "window")
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@ local file = require("symbols.file")
|
|||||||
--- @type LazySpec
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v3.x",
|
version = "v3.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
-- https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
branch = "main",
|
|
||||||
opts = {
|
|
||||||
select = {
|
|
||||||
lookahead = true,
|
|
||||||
include_surrounding_whitespace = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.keymap.set({ "x", "o" }, "aa", function()
|
|
||||||
require("nvim-treesitter-textobjects.select").select_textobject("@parameter.outer", "textobjects")
|
|
||||||
end)
|
|
||||||
vim.keymap.set({ "x", "o" }, "ia", function()
|
|
||||||
require("nvim-treesitter-textobjects.select").select_textobject("@parameter.inner", "textobjects")
|
|
||||||
end)
|
|
||||||
vim.keymap.set({ "x", "o" }, "af", function()
|
|
||||||
require("nvim-treesitter-textobjects.select").select_textobject("@function.outer", "textobjects")
|
|
||||||
end)
|
|
||||||
vim.keymap.set({ "x", "o" }, "if", function()
|
|
||||||
require("nvim-treesitter-textobjects.select").select_textobject("@function.inner", "textobjects")
|
|
||||||
end)
|
|
||||||
-- vim.keymap.set({ "x", "o" }, "ac", function()
|
|
||||||
-- require("nvim-treesitter-textobjects.select").select_textobject("@class.outer", "textobjects")
|
|
||||||
-- end)
|
|
||||||
-- vim.keymap.set({ "x", "o" }, "ic", function()
|
|
||||||
-- require("nvim-treesitter-textobjects.select").select_textobject("@class.inner", "textobjects")
|
|
||||||
-- end)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>a", function()
|
|
||||||
require("nvim-treesitter-textobjects.swap").swap_next("@parameter.inner")
|
|
||||||
end)
|
|
||||||
vim.keymap.set("n", "<leader>A", function()
|
|
||||||
require("nvim-treesitter-textobjects.swap").swap_previous("@parameter.inner")
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
-- https://github.com/windwp/nvim-ts-autotag
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"windwp/nvim-ts-autotag",
|
|
||||||
}
|
|
||||||
@@ -2,9 +2,8 @@
|
|||||||
--- @module "lazy"
|
--- @module "lazy"
|
||||||
--- @type LazySpec
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
-- Issues with nvim 0.12
|
-- "tadachs/ros-nvim",
|
||||||
enabled = false,
|
"DreadedX/ros-nvim",
|
||||||
"tadachs/ros-nvim",
|
|
||||||
event = { "BufRead", "BufNewFile" },
|
event = { "BufRead", "BufNewFile" },
|
||||||
opts = {
|
opts = {
|
||||||
commands = {
|
commands = {
|
||||||
|
|||||||
@@ -1,6 +1,33 @@
|
|||||||
-- https://github.com/cenk1cenk2/schema-companion.nvim
|
-- https://github.com/cenk1cenk2/schema-companion.nvim
|
||||||
--- @module "schema-companion"
|
--- @module "schema-companion"
|
||||||
--- @type schema_companion.Matcher
|
--- @type schema_companion.Matcher
|
||||||
|
local kubernetes = {
|
||||||
|
name = "Kubernetes",
|
||||||
|
match = function(bufnr)
|
||||||
|
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
|
||||||
|
local kind = false
|
||||||
|
local api_version = false
|
||||||
|
|
||||||
|
for _, line in ipairs(lines) do
|
||||||
|
if kind or vim.regex("^kind: .*$"):match_str(line) then
|
||||||
|
kind = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if api_version or vim.regex("^apiVersion: .*$"):match_str(line) then
|
||||||
|
api_version = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if kind and api_version then
|
||||||
|
return {
|
||||||
|
name = "Kubernetes",
|
||||||
|
uri = require("kubernetes").yamlls_schema(),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
--- @module "lazy"
|
--- @module "lazy"
|
||||||
--- @type LazySpec
|
--- @type LazySpec
|
||||||
@@ -8,23 +35,26 @@ return {
|
|||||||
"cenk1cenk2/schema-companion.nvim",
|
"cenk1cenk2/schema-companion.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
"diogo464/kubernetes.nvim",
|
"diogo464/kubernetes.nvim",
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>ys",
|
"<leader>ys",
|
||||||
function()
|
function()
|
||||||
local schemas = require("schema-companion").get_matching_schemas()
|
require("telescope").extensions.schema_companion.select_schema()
|
||||||
if schemas == nil or #schemas == 0 or (#schemas == 1 and schemas[1].name == "none") then
|
|
||||||
print("No matching schemas")
|
|
||||||
else
|
|
||||||
require("schema-companion").select_matching_schema()
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
desc = "Select schema",
|
desc = "Yaml schema",
|
||||||
|
ft = "yaml",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
--- @module "schema-companion"
|
--- @module "schema-companion"
|
||||||
--- @type schema_companion.Config
|
--- @type schema_companion.Config
|
||||||
opts = {},
|
opts = {
|
||||||
|
enable_telescope = true,
|
||||||
|
matchers = {
|
||||||
|
kubernetes,
|
||||||
|
},
|
||||||
|
schemas = {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ return {
|
|||||||
["ui-select"] = {
|
["ui-select"] = {
|
||||||
require("telescope.themes").get_dropdown(),
|
require("telescope.themes").get_dropdown(),
|
||||||
},
|
},
|
||||||
smart_open = {
|
|
||||||
match_algorithm = "fzf",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
config = function(plugin, opts)
|
||||||
|
require("telescope").setup(opts)
|
||||||
|
end,
|
||||||
init = function()
|
init = function()
|
||||||
vim.keymap.set("n", "<leader>.", function()
|
vim.keymap.set("n", "<leader>.", function()
|
||||||
require("telescope.builtin").oldfiles()
|
require("telescope.builtin").oldfiles()
|
||||||
@@ -65,7 +65,7 @@ return {
|
|||||||
end, { desc = "Grep in open files" })
|
end, { desc = "Grep in open files" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader><space>", function()
|
vim.keymap.set("n", "<leader><space>", function()
|
||||||
require("telescope").extensions.smart_open.smart_open()
|
require("telescope.builtin").find_files()
|
||||||
end, { desc = "Find files" })
|
end, { desc = "Find files" })
|
||||||
vim.keymap.set("n", "<leader>sh", function()
|
vim.keymap.set("n", "<leader>sh", function()
|
||||||
require("telescope.builtin").help_tags()
|
require("telescope.builtin").help_tags()
|
||||||
@@ -118,32 +118,15 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
build = "make",
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
},
|
},
|
||||||
|
build = "make",
|
||||||
|
cond = function()
|
||||||
|
return vim.fn.executable("make") == 1
|
||||||
|
end,
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").load_extension("fzf")
|
require("telescope").load_extension("fzf")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"danielfalk/smart-open.nvim",
|
|
||||||
branch = "0.3.x",
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("smart_open")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"kkharji/sqlite.lua",
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
{
|
|
||||||
"ellisonleao/gruvbox.nvim",
|
|
||||||
opts = function(_, opts)
|
|
||||||
local palette = require("gruvbox").palette
|
|
||||||
|
|
||||||
opts.overrides.Directory = { fg = palette.neutral_blue, bold = false }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ return {
|
|||||||
},
|
},
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
signs = false,
|
|
||||||
keywords = {
|
keywords = {
|
||||||
-- FIX: Fix
|
-- FIX: Fix
|
||||||
FIX = { icon = diagnostic.bug },
|
FIX = { icon = diagnostic.bug },
|
||||||
|
|||||||
@@ -4,13 +4,22 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
dependencies = {
|
||||||
|
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "master" },
|
||||||
|
{ "windwp/nvim-ts-autotag", opts = {} },
|
||||||
|
},
|
||||||
lazy = false,
|
lazy = false,
|
||||||
branch = "main",
|
branch = "master",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
-- Taken from kickstart.nvim
|
main = "nvim-treesitter.configs",
|
||||||
config = function()
|
init = function()
|
||||||
-- ensure basic parser are installed
|
vim.wo.foldmethod = "expr"
|
||||||
local parsers = {
|
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||||
|
end,
|
||||||
|
--- @module "nvim-treesitter"
|
||||||
|
--- @type TSConfig
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
"c",
|
"c",
|
||||||
"cpp",
|
"cpp",
|
||||||
"go",
|
"go",
|
||||||
@@ -25,61 +34,65 @@ return {
|
|||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
"bash",
|
"bash",
|
||||||
"sql",
|
"sql",
|
||||||
"xml",
|
},
|
||||||
"cmake",
|
|
||||||
"json",
|
|
||||||
"yaml",
|
|
||||||
}
|
|
||||||
require("nvim-treesitter").install(parsers)
|
|
||||||
|
|
||||||
---@param buf integer
|
highlight = { enable = true },
|
||||||
---@param language string
|
indent = { enable = true },
|
||||||
local function treesitter_try_attach(buf, language)
|
incremental_selection = {
|
||||||
-- Check if the parser exists
|
enable = true,
|
||||||
if not vim.treesitter.language.add(language) then
|
keymaps = {
|
||||||
return
|
init_selection = "<M-o>",
|
||||||
end
|
node_incremental = "<M-o>",
|
||||||
vim.treesitter.start(buf, language)
|
node_decremental = "<M-i>",
|
||||||
|
},
|
||||||
-- TODO: Does this work properly?
|
},
|
||||||
local has_fold_query = vim.treesitter.query.get(language, "folds") ~= nil
|
textobjects = {
|
||||||
if has_fold_query then
|
select = {
|
||||||
vim.wo.foldmethod = "expr"
|
enable = true,
|
||||||
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
lookahead = true,
|
||||||
end
|
keymaps = {
|
||||||
|
["aa"] = "@parameter.outer",
|
||||||
local has_indent_query = vim.treesitter.query.get(language, "indents") ~= nil
|
["ia"] = "@parameter.inner",
|
||||||
if has_indent_query then
|
["af"] = "@function.outer",
|
||||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
["if"] = "@function.inner",
|
||||||
end
|
-- ["ac"] = "@class.outer",
|
||||||
end
|
-- ["ic"] = "@class.inner",
|
||||||
|
},
|
||||||
local available_parsers = require("nvim-treesitter").get_available()
|
},
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
move = {
|
||||||
callback = function(args)
|
enable = true,
|
||||||
local buf, filetype = args.buf, args.match
|
set_jumps = true,
|
||||||
|
goto_next_start = {
|
||||||
local language = vim.treesitter.language.get_lang(filetype)
|
["]a"] = "@parameter.inner",
|
||||||
if not language then
|
["]f"] = "@function.outer",
|
||||||
return
|
["]c"] = "@class.outer",
|
||||||
end
|
},
|
||||||
|
goto_next_end = {
|
||||||
local installed_parsers = require("nvim-treesitter").get_installed("parsers")
|
["]A"] = "@parameter.inner",
|
||||||
|
["]F"] = "@function.outer",
|
||||||
if vim.tbl_contains(installed_parsers, language) then
|
["]c"] = "@class.outer",
|
||||||
-- enable the parser if it is installed
|
},
|
||||||
treesitter_try_attach(buf, language)
|
goto_previous_start = {
|
||||||
elseif vim.tbl_contains(available_parsers, language) then
|
["[a"] = "@parameter.inner",
|
||||||
-- if a parser is available in `nvim-treesitter` auto install it, and enable it after the installation is done
|
["[f"] = "@function.outer",
|
||||||
require("nvim-treesitter").install(language):await(function()
|
["[c"] = "@class.outer",
|
||||||
treesitter_try_attach(buf, language)
|
},
|
||||||
end)
|
goto_previous_end = {
|
||||||
else
|
["[A"] = "@parameter.inner",
|
||||||
-- try to enable treesitter features in case the parser exists but is not available from `nvim-treesitter`
|
["[F"] = "@function.outer",
|
||||||
treesitter_try_attach(buf, language)
|
["[c"] = "@class.outer",
|
||||||
end
|
},
|
||||||
end,
|
},
|
||||||
})
|
swap = {
|
||||||
end,
|
enable = true,
|
||||||
|
swap_next = {
|
||||||
|
["<leader>a"] = "@parameter.inner",
|
||||||
|
},
|
||||||
|
swap_previous = {
|
||||||
|
["<leader>A"] = "@parameter.inner",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ local window = require("symbols.window")
|
|||||||
--- @module "lazy"
|
--- @module "lazy"
|
||||||
--- @type LazySpec
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
-- "folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
"cameronr/which-key.nvim",
|
|
||||||
branch = "winborder-support",
|
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
--- @module "which-key"
|
--- @module "which-key"
|
||||||
--- @type wk.Opts
|
--- @type wk.Opts
|
||||||
|
|||||||
@@ -4,16 +4,10 @@
|
|||||||
return {
|
return {
|
||||||
"ellisonleao/gruvbox.nvim",
|
"ellisonleao/gruvbox.nvim",
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function(_, opts)
|
config = function()
|
||||||
require("gruvbox").setup(opts)
|
|
||||||
|
|
||||||
-- Load the colorscheme
|
|
||||||
vim.cmd.colorscheme("gruvbox")
|
|
||||||
end,
|
|
||||||
opts = function()
|
|
||||||
local palette = require("gruvbox").palette
|
local palette = require("gruvbox").palette
|
||||||
|
|
||||||
return {
|
require("gruvbox").setup({
|
||||||
background = "dark",
|
background = "dark",
|
||||||
italic = {
|
italic = {
|
||||||
strings = false,
|
strings = false,
|
||||||
@@ -83,6 +77,9 @@ return {
|
|||||||
DiagnosticNumInfo = { fg = palette.dark0, bg = palette.bright_blue, bold = true },
|
DiagnosticNumInfo = { fg = palette.dark0, bg = palette.bright_blue, bold = true },
|
||||||
SnacksIndentScope = { fg = palette.light4 },
|
SnacksIndentScope = { fg = palette.light4 },
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
|
|
||||||
|
-- Load the colorscheme
|
||||||
|
vim.cmd.colorscheme("gruvbox")
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
; extends
|
|
||||||
; Dockerfile snippets for AIM pipeline
|
|
||||||
(block_mapping_pair
|
|
||||||
key: (flow_node) @_template
|
|
||||||
(#eq? @_template "template")
|
|
||||||
value: (block_node
|
|
||||||
(block_scalar) @injection.content
|
|
||||||
(#set! injection.language "dockerfile")
|
|
||||||
(#offset! @injection.content 0 1 0 0)))
|
|
||||||
|
|
||||||
(block_mapping_pair
|
|
||||||
key: (flow_node) @_template
|
|
||||||
(#eq? @_template "entrypoint")
|
|
||||||
value: (block_node
|
|
||||||
(block_scalar) @injection.content
|
|
||||||
(#set! injection.language "bash")
|
|
||||||
(#offset! @injection.content 0 1 0 0)))
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
setup
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# Scratch sessions rename themselves to something unique
|
|
||||||
[[session]]
|
|
||||||
name = "scratch"
|
|
||||||
startup_command = "tmux rename-session scratch-$(echo -n $(date) | sha256sum | cut -c1-4) && clear"
|
|
||||||
|
|
||||||
[[session]]
|
|
||||||
name = "automation_rs"
|
|
||||||
path = "~/Projects/rust/automation_rs/"
|
|
||||||
startup_command = "nvim"
|
|
||||||
windows = ["shell"]
|
|
||||||
|
|
||||||
[[session]]
|
|
||||||
name = "olympus"
|
|
||||||
startup_command = "ssh olympus && exit"
|
|
||||||
|
|
||||||
[[session]]
|
|
||||||
name = "niestern_sander"
|
|
||||||
path = "~/Projects/ALTEN/niestern_sander/"
|
|
||||||
startup_command = "$DOTFILES/sesh/setup/niestern_sander.sh"
|
|
||||||
|
|
||||||
[[window]]
|
|
||||||
name = "shell"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
|
|
||||||
exec </dev/tty
|
|
||||||
exec <&1
|
|
||||||
local session
|
|
||||||
session=$(sesh list -i | fzf-tmux -p 70%,60% \
|
|
||||||
--no-sort --ansi --border-label ' Select session ' --prompt '⚡ ' \
|
|
||||||
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
|
|
||||||
--bind 'btab:down,tab:up' \
|
|
||||||
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list -i)' \
|
|
||||||
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t -i)' \
|
|
||||||
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c -i)' \
|
|
||||||
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z -i)' \
|
|
||||||
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
|
|
||||||
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list -i)')
|
|
||||||
[[ -z "$session" ]] && return
|
|
||||||
sesh connect $session
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if ! systemctl is-active --quiet docker; then
|
|
||||||
echo "Starting docker..."
|
|
||||||
systemctl start docker
|
|
||||||
fi
|
|
||||||
|
|
||||||
devcontainer up --workspace-folder .
|
|
||||||
|
|
||||||
tmux rename-window nvim
|
|
||||||
tmux new-window -n "ros" "devcontainer exec --workspace-folder . bash"
|
|
||||||
tmux new-window -n "shell"
|
|
||||||
tmux select-window -t :-2
|
|
||||||
|
|
||||||
devcontainer exec --workspace-folder . nvim
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
gruvbox.conf
|
gruvbox.conf
|
||||||
tpm
|
tpm/
|
||||||
|
|||||||
@@ -1,20 +1,12 @@
|
|||||||
# Plugins
|
# Plugins
|
||||||
set -g @plugin 'mrjones2014/smart-splits.nvim'
|
set -g @plugin 'mrjones2014/smart-splits.nvim'
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
set -g @plugin 'wfxr/tmux-fzf-url'
|
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||||
setw -g monitor-activity on
|
setw -g monitor-activity on
|
||||||
setw -g automatic-rename on
|
setw -g automatic-rename on
|
||||||
set-window-option -g xterm-keys on
|
set-window-option -g xterm-keys on
|
||||||
set -sg escape-time 0
|
|
||||||
|
|
||||||
set -g history-limit 5000
|
|
||||||
|
|
||||||
set -g detach-on-destroy off # don't exit from tmux when closing a session
|
|
||||||
|
|
||||||
set -g @fzf-url-fzf-options '-p'
|
|
||||||
|
|
||||||
# Setup vi-mode with better keybindings
|
# Setup vi-mode with better keybindings
|
||||||
# TODO: Escape does not work properly for leaving
|
# TODO: Escape does not work properly for leaving
|
||||||
@@ -66,20 +58,3 @@ wg_is_keys_off="#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'TRUE' )
|
|||||||
source-file "$DOTFILES/tmux/gruvbox.conf"
|
source-file "$DOTFILES/tmux/gruvbox.conf"
|
||||||
|
|
||||||
run "$DOTFILES/tmux/tpm/tpm"
|
run "$DOTFILES/tmux/tpm/tpm"
|
||||||
|
|
||||||
set -g base-index 1
|
|
||||||
bind-key -n M-1 select-window -t 1
|
|
||||||
bind-key -n M-2 select-window -t 2
|
|
||||||
bind-key -n M-3 select-window -t 3
|
|
||||||
bind-key -n M-4 select-window -t 4
|
|
||||||
bind-key -n M-5 select-window -t 5
|
|
||||||
bind-key -n M-6 select-window -t 6
|
|
||||||
bind-key -n M-7 select-window -t 7
|
|
||||||
bind-key -n M-8 select-window -t 8
|
|
||||||
bind-key -n M-9 select-window -t 9
|
|
||||||
bind-key -n M-0 select-window -t 10
|
|
||||||
|
|
||||||
bind-key "a" run-shell "sesh-select"
|
|
||||||
|
|
||||||
bind-key x kill-pane
|
|
||||||
bind-key X kill-session
|
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
ohmyzsh
|
ohmyzsh
|
||||||
custom
|
custom
|
||||||
fzf-git.sh
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#compdef tula
|
|
||||||
|
|
||||||
_tula_completion() {
|
|
||||||
eval $(env _TYPER_COMPLETE_ARGS="${words[1,$CURRENT]}" _TULA_COMPLETE=complete_zsh tula)
|
|
||||||
}
|
|
||||||
|
|
||||||
compdef _tula_completion tula
|
|
||||||
Submodule zsh/custom/plugins/evalcache deleted from d6973f8c3e
Submodule zsh/custom/plugins/fast-syntax-highlighting deleted from 3d574ccf48
@@ -1,32 +0,0 @@
|
|||||||
# mise
|
|
||||||
|
|
||||||
Adds integration with [mise](https://github.com/jdx/mise) (formerly `rtx`), a runtime executor compatible with
|
|
||||||
npm, nodenv, pyenv, etc. mise is written in rust and is very fast. 20x-200x faster than asdf. With that being
|
|
||||||
said, mise is compatible with asdf plugins and .tool-versions files. It can be used as a drop-in replacement.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
1. [Download & install mise](https://github.com/jdx/mise#installation) by running the following:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl https://mise.jdx.dev/install.sh | sh
|
|
||||||
```
|
|
||||||
|
|
||||||
2. [Enable mise](https://github.com/jdx/mise#quickstart) by adding it to your `plugins` definition in
|
|
||||||
`~/.zshrc`.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
plugins=(mise)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
See the [mise readme](https://github.com/jdx/mise#table-of-contents) for information on how to use mise. Here
|
|
||||||
are a few examples:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mise install node Install the current version specified in .tool-versions/.mise.toml
|
|
||||||
mise use -g node@system Use system node as global default
|
|
||||||
mise install node@20.0.0 Install a specific version number
|
|
||||||
mise use -g node@20 Use node-20.x as global default
|
|
||||||
```
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
if (( ! $+commands[mise] )); then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Load mise hooks
|
|
||||||
zsh-defer -a _evalcache mise activate zsh
|
|
||||||
|
|
||||||
# If the completion file doesn't exist yet, we need to autoload it and
|
|
||||||
# bind it to `mise`. Otherwise, compinit will have already done that.
|
|
||||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_mise" ]]; then
|
|
||||||
typeset -g -A _comps
|
|
||||||
autoload -Uz _mise
|
|
||||||
_comps[mise]=_mise
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Generate and load mise completion
|
|
||||||
mise completion zsh >| "$ZSH_CACHE_DIR/completions/_mise" &|
|
|
||||||
Submodule zsh/custom/plugins/zsh-autosuggestions updated: 85919cd1ff...0e810e5afa
Submodule zsh/custom/plugins/zsh-completions deleted from 47e40c923c
Submodule zsh/custom/plugins/zsh-defer deleted from 53a26e287f
Submodule zsh/custom/plugins/zsh-vi-mode deleted from 08bd1c0452
@@ -156,32 +156,72 @@ prompt_git() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
git_toplevel() {
|
prompt_bzr() {
|
||||||
local repo_root=$(git rev-parse --show-toplevel)
|
(( $+commands[bzr] )) || return
|
||||||
if [[ $repo_root = '' ]]; then
|
|
||||||
# We are in a bare repo. Use git dir as root
|
# Test if bzr repository in directory hierarchy
|
||||||
repo_root=$(git rev-parse --git-dir)
|
local dir="$PWD"
|
||||||
if [[ $repo_root = '.' ]]; then
|
while [[ ! -d "$dir/.bzr" ]]; do
|
||||||
repo_root=$PWD
|
[[ "$dir" = "/" ]] && return
|
||||||
|
dir="${dir:h}"
|
||||||
|
done
|
||||||
|
|
||||||
|
local bzr_status status_mod status_all revision
|
||||||
|
if bzr_status=$(bzr status 2>&1); then
|
||||||
|
status_mod=$(echo -n "$bzr_status" | head -n1 | grep "modified" | wc -m)
|
||||||
|
status_all=$(echo -n "$bzr_status" | head -n1 | wc -m)
|
||||||
|
revision=${$(bzr log -r-1 --log-format line | cut -d: -f1):gs/%/%%}
|
||||||
|
if [[ $status_mod -gt 0 ]] ; then
|
||||||
|
prompt_segment yellow black "bzr@$revision ✚"
|
||||||
|
else
|
||||||
|
if [[ $status_all -gt 0 ]] ; then
|
||||||
|
prompt_segment yellow black "bzr@$revision"
|
||||||
|
else
|
||||||
|
prompt_segment 10 black "bzr@$revision"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_hg() {
|
||||||
|
(( $+commands[hg] )) || return
|
||||||
|
local rev st branch
|
||||||
|
if $(hg id >/dev/null 2>&1); then
|
||||||
|
if $(hg prompt >/dev/null 2>&1); then
|
||||||
|
if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
|
||||||
|
# if files are not added
|
||||||
|
prompt_segment red white
|
||||||
|
st='±'
|
||||||
|
elif [[ -n $(hg prompt "{status|modified}") ]]; then
|
||||||
|
# if any modification
|
||||||
|
prompt_segment yellow black
|
||||||
|
st='±'
|
||||||
|
else
|
||||||
|
# if working copy is clean
|
||||||
|
prompt_segment 10 $CURRENT_FG
|
||||||
|
fi
|
||||||
|
echo -n ${$(hg prompt "☿ {rev}@{branch}"):gs/%/%%} $st
|
||||||
|
else
|
||||||
|
st=""
|
||||||
|
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
|
||||||
|
branch=$(hg id -b 2>/dev/null)
|
||||||
|
if `hg st | grep -q "^\?"`; then
|
||||||
|
prompt_segment red black
|
||||||
|
st='±'
|
||||||
|
elif `hg st | grep -q "^[MA]"`; then
|
||||||
|
prompt_segment yellow black
|
||||||
|
st='±'
|
||||||
|
else
|
||||||
|
prompt_segment 10 $CURRENT_FG
|
||||||
|
fi
|
||||||
|
echo -n "☿ ${rev:gs/%/%%}@${branch:gs/%/%%}" $st
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo -n $repo_root
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Dir: current working directory
|
# Dir: current working directory
|
||||||
prompt_dir() {
|
prompt_dir() {
|
||||||
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
|
||||||
# Git repo and inline path enabled, hence only show the git root
|
|
||||||
local repo_root=$(git_toplevel)
|
|
||||||
local path_in_repo=$(pwd | sed "s/^$(echo "$repo_root" | sed 's:/:\\/:g;s/\$/\\$/g')//;s:^/::;s:/$::;")
|
|
||||||
if [[ -z "$path_in_repo" ]]; then
|
|
||||||
prompt_segment 12 $CURRENT_FG "$(git_toplevel | sed "s:^$HOME:~:")"
|
|
||||||
else
|
|
||||||
prompt_segment 12 $CURRENT_FG "$(git_toplevel | sed "s:^$HOME:~:")/%B$path_in_repo%b"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
prompt_segment 12 $CURRENT_FG '%~'
|
prompt_segment 12 $CURRENT_FG '%~'
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Virtualenv: current working virtualenv
|
# Virtualenv: current working virtualenv
|
||||||
@@ -192,6 +232,27 @@ prompt_virtualenv() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# nix-shell: currently running nix-shell
|
||||||
|
prompt_nix_shell() {
|
||||||
|
if [[ -n "$IN_NIX_SHELL" ]]; then
|
||||||
|
if [[ -n $NIX_SHELL_PACKAGES ]]; then
|
||||||
|
local package_names=""
|
||||||
|
local packages=($NIX_SHELL_PACKAGES)
|
||||||
|
for package in $packages; do
|
||||||
|
package_names+=" ${package##*.}"
|
||||||
|
done
|
||||||
|
prompt_segment magenta black "$package_names"
|
||||||
|
elif [[ -n $name ]]; then
|
||||||
|
local cleanName=${name#interactive-}
|
||||||
|
cleanName=${cleanName#lorri-keep-env-hack-}
|
||||||
|
cleanName=${cleanName%-environment}
|
||||||
|
prompt_segment magenta black "$cleanName"
|
||||||
|
else # This case is only reached if the nix-shell plugin isn't installed or failed in some way
|
||||||
|
prompt_segment magenta black "nix-shell"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Status:
|
# Status:
|
||||||
# - was there an error
|
# - was there an error
|
||||||
# - am I root
|
# - am I root
|
||||||
@@ -203,14 +264,31 @@ prompt_status() {
|
|||||||
[[ $UID -eq 0 ]] && prompt_segment 11 black ""
|
[[ $UID -eq 0 ]] && prompt_segment 11 black ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#AWS Profile:
|
||||||
|
# - display current AWS_PROFILE name
|
||||||
|
# - displays yellow on red if profile name contains 'production' or
|
||||||
|
# ends in '-prod'
|
||||||
|
# - displays black on green otherwise
|
||||||
|
prompt_aws() {
|
||||||
|
[[ -z "$AWS_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return
|
||||||
|
case "$AWS_PROFILE" in
|
||||||
|
*-prod|*production*) prompt_segment red 11 "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
|
||||||
|
*) prompt_segment cyan black "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
## Main prompt
|
## Main prompt
|
||||||
build_prompt() {
|
build_prompt() {
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
prompt_status
|
prompt_status
|
||||||
prompt_context
|
prompt_context
|
||||||
prompt_virtualenv
|
prompt_virtualenv
|
||||||
|
prompt_nix_shell
|
||||||
|
prompt_aws
|
||||||
prompt_dir
|
prompt_dir
|
||||||
prompt_git
|
prompt_git
|
||||||
|
prompt_bzr
|
||||||
|
prompt_hg
|
||||||
prompt_end
|
prompt_end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-105
@@ -1,4 +1,3 @@
|
|||||||
# vim: set ft=zsh:
|
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export DOTFILES=${DOTFILES:-"$HOME/.dotfiles"}
|
export DOTFILES=${DOTFILES:-"$HOME/.dotfiles"}
|
||||||
export ZSH="$DOTFILES/zsh/ohmyzsh"
|
export ZSH="$DOTFILES/zsh/ohmyzsh"
|
||||||
@@ -6,18 +5,8 @@ export ZSH_CUSTOM="$DOTFILES/zsh/custom"
|
|||||||
|
|
||||||
ZSH_THEME="agnoster_dx"
|
ZSH_THEME="agnoster_dx"
|
||||||
|
|
||||||
zstyle -s ':omz:update' mode "disabled"
|
zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||||
|
# zstyle ':omz:update' frequency 13
|
||||||
# Fix slow pasting due to zsh-autosuggestions
|
|
||||||
pasteinit() {
|
|
||||||
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
|
|
||||||
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
|
|
||||||
}
|
|
||||||
pastefinish() {
|
|
||||||
zle -N self-insert $OLD_SELF_INSERT
|
|
||||||
}
|
|
||||||
zstyle :bracketed-paste-magic paste-init pasteinit
|
|
||||||
zstyle :bracketed-paste-magic paste-finish pastefinish
|
|
||||||
|
|
||||||
# CASE_SENSITIVE="true"
|
# CASE_SENSITIVE="true"
|
||||||
# HYPHEN_INSENSITIVE="true"
|
# HYPHEN_INSENSITIVE="true"
|
||||||
@@ -26,24 +15,18 @@ zstyle :bracketed-paste-magic paste-finish pastefinish
|
|||||||
# ENABLE_CORRECTION="true"
|
# ENABLE_CORRECTION="true"
|
||||||
COMPLETION_WAITING_DOTS="true"
|
COMPLETION_WAITING_DOTS="true"
|
||||||
ZSH_DISABLE_COMPFIX="true"
|
ZSH_DISABLE_COMPFIX="true"
|
||||||
ZOXIDE_CMD_OVERRIDE="cd"
|
|
||||||
|
|
||||||
plugins=(
|
plugins=(
|
||||||
evalcache
|
|
||||||
zsh-defer
|
|
||||||
git
|
git
|
||||||
zsh-autosuggestions
|
zsh-autosuggestions
|
||||||
# Disabled because the highlighting conflicts with autosuggestions
|
# Disabled because the highlighting conflicts with autosuggestions
|
||||||
# history-substring-search
|
# history-substring-search
|
||||||
zsh-vi-mode
|
vi-mode
|
||||||
|
tmux
|
||||||
colored-man-pages
|
colored-man-pages
|
||||||
command-not-found
|
command-not-found
|
||||||
|
dirhistory
|
||||||
zsh-autopair
|
zsh-autopair
|
||||||
fast-syntax-highlighting
|
|
||||||
zoxide
|
|
||||||
mise
|
|
||||||
gpg-agent
|
|
||||||
vagrant
|
|
||||||
)
|
)
|
||||||
|
|
||||||
bindkey -M vicmd "k" up-line-or-beginning-search
|
bindkey -M vicmd "k" up-line-or-beginning-search
|
||||||
@@ -53,34 +36,18 @@ HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="fg=yellow"
|
|||||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND="fg=red"
|
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND="fg=red"
|
||||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_TIMEOUT=3
|
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_TIMEOUT=3
|
||||||
|
|
||||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
VI_MODE_RESET_PROMPT_ON_MODE_CHANGE=true
|
||||||
|
VI_MODE_SET_CURSOR=true
|
||||||
# Default to insert mode
|
|
||||||
ZVM_LINE_INIT_MODE=i
|
|
||||||
# Enable system clipboard
|
|
||||||
ZVM_SYSTEM_CLIPBOARD_ENABLED=true
|
|
||||||
# Make p and P use the system clipboard, instead of CUTBUFFER,
|
|
||||||
# without this you need gp and gP
|
|
||||||
function zvm_after_lazy_keybindings() {
|
|
||||||
bindkey -M vicmd 'p' zvm_paste_clipboard_after
|
|
||||||
bindkey -M vicmd 'P' zvm_paste_clipboard_before
|
|
||||||
bindkey -M visual 'p' zvm_visual_paste_clipboard
|
|
||||||
bindkey -M visual 'P' zvm_visual_paste_clipboard
|
|
||||||
}
|
|
||||||
|
|
||||||
# Fix autopair and zsh-vi-mode compatibility
|
|
||||||
AUTOPAIR_INHIBIT_INIT=1
|
|
||||||
zvm_after_init_commands+=('autopair-init')
|
|
||||||
|
|
||||||
# Might cause issues?
|
# Might cause issues?
|
||||||
KEYTIMEOUT=1
|
KEYTIMEOUT=1
|
||||||
|
|
||||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/completions
|
ZSH_TMUX_AUTOSTART=true
|
||||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
ZSH_TMUX_AUTOCONNECT=false
|
||||||
source "$ZSH/oh-my-zsh.sh"
|
ZSH_TMUX_FIXTERM=true
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
less_termcap[so]="${fg_bold[black]}${bg[white]}"
|
less_termcap[so]="${fg_bold[black]}${bg[white]}"
|
||||||
export LESS="-F -R -i --incsearch -M"
|
|
||||||
|
|
||||||
export PATH="${HOME}/.local/bin:${HOME}/.cargo/bin:$PATH"
|
export PATH="${HOME}/.local/bin:${HOME}/.cargo/bin:$PATH"
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
@@ -88,27 +55,14 @@ export EDITOR=nvim
|
|||||||
|
|
||||||
alias cl="clear"
|
alias cl="clear"
|
||||||
|
|
||||||
if (( $+commands[bat] )); then
|
if hash devcontainer 2>/dev/null; then
|
||||||
export BAT_THEME="gruvbox-dark"
|
|
||||||
alias cat=bat
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (( $+commands[devcontainer] )); then
|
|
||||||
dc() {
|
dc() {
|
||||||
ORIG_DIR="$PWD"
|
ORIG_DIR="$PWD"
|
||||||
while [[ "$PWD" != / ]] ; do
|
while [[ "$PWD" != / ]] ; do
|
||||||
if find "$PWD"/ -maxdepth 1 -type d -name ".devcontainer" | grep -q ".devcontainer"; then
|
if find "$PWD"/ -maxdepth 1 -type d -name ".devcontainer" | grep -q ".devcontainer"; then
|
||||||
WORKSPACE_FOLDER="$PWD"
|
WORKSPACE_FOLDER="$PWD"
|
||||||
builtin cd "$ORIG_DIR"
|
builtin cd "$ORIG_DIR"
|
||||||
|
|
||||||
if [[ "$1" == "nvim" ]]; then
|
|
||||||
tmux set-option -pt 0 @pane-is-vim 1
|
|
||||||
devcontainer exec --workspace-folder "$WORKSPACE_FOLDER" bash -c "$@"
|
|
||||||
tmux set-option -pt 0 @pane-is-vim 0
|
|
||||||
else
|
|
||||||
devcontainer exec --workspace-folder "$WORKSPACE_FOLDER" $@
|
devcontainer exec --workspace-folder "$WORKSPACE_FOLDER" $@
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
builtin cd ..
|
builtin cd ..
|
||||||
@@ -120,55 +74,10 @@ if (( $+commands[devcontainer] )); then
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if hash pnpm 2>/dev/null; then
|
||||||
export PNPM_HOME="/home/tim/.local/share/pnpm"
|
export PNPM_HOME="/home/tim/.local/share/pnpm"
|
||||||
if [ -d "$PNPM_HOME" ]; then
|
|
||||||
case ":$PATH:" in
|
case ":$PATH:" in
|
||||||
*":$PNPM_HOME:"*) ;;
|
*":$PNPM_HOME:"*) ;;
|
||||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||||
esac
|
esac
|
||||||
else
|
|
||||||
unset PNPM_HOME
|
|
||||||
fi
|
|
||||||
if (( $+commands[pnpm] )); then
|
|
||||||
# Without evalcache it more than doubles startup time
|
|
||||||
_evalcache pnpm completion zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
export FZF_DEFAULT_OPTS='--tmux'
|
|
||||||
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
|
|
||||||
--color=fg:-1,fg+:#83a598,bg:-1,bg+:#262626
|
|
||||||
--color=hl:bold:#8ec07c,hl+:#8ec07c,marker:#cc241d
|
|
||||||
--color=prompt:#fb4934,spinner:#af5fff,pointer:#83a598,header:#87afaf
|
|
||||||
--color=border:#7c6f64,label:#7c6f64
|
|
||||||
--border="sharp" --border-label-pos="0" --preview-window="border-sharp"
|
|
||||||
--prompt="> " --marker="◆" --pointer=">" --separator="─"
|
|
||||||
--scrollbar="│" --info="right"
|
|
||||||
--layout="default"'
|
|
||||||
|
|
||||||
if (( $+commands[fd] )); then
|
|
||||||
export FZF_DEFAULT_COMMAND="fd --type f --strip-cwd-prefix"
|
|
||||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (( $+commands[fzf] )); then
|
|
||||||
# Fix fzf keybind after zsh-vi-mode has loaded
|
|
||||||
zvm_after_init_commands+=('_evalcache fzf --zsh')
|
|
||||||
|
|
||||||
if (( $+commands[paru] )); then
|
|
||||||
function pi {
|
|
||||||
paru -Slq | fzf -q "$1" --border-label=" Install package " --multi --preview 'paru -Si {1} --color=always' | xargs -ro paru -S
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
ZSH_TMUX_AUTOSTART=true
|
|
||||||
if (( $+commands[tmux] )); then
|
|
||||||
if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" && -z "$INTELLIJ_ENVIRONMENT_READER" && -z "$ZED_TERM" ]]; then
|
|
||||||
if (( $+commands[sesh] )) && (( $+commands[sesh-select] )); then
|
|
||||||
sesh-select
|
|
||||||
else
|
|
||||||
tmux new-session
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
+1
-1
Submodule zsh/ohmyzsh updated: 349b9e49ce...6ef47526f8
Reference in New Issue
Block a user