Compare commits
3 Commits
master
...
1ef208c087
| Author | SHA1 | Date | |
|---|---|---|---|
|
1ef208c087
|
|||
|
c10869ab6b
|
|||
|
353ac7e479
|
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -10,12 +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
|
|
||||||
|
|||||||
20
README.md
20
README.md
@@ -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,11 +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
|
|
||||||
|
|
||||||
; I don't have my private key on work machines
|
|
||||||
[commit]
|
|
||||||
gpgsign = false
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../git/dot-local
|
|
||||||
@@ -1,11 +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
|
|
||||||
|
|
||||||
; I don't have my private key on work machines
|
|
||||||
[commit]
|
|
||||||
gpgsign = false
|
|
||||||
|
|||||||
@@ -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,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^
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
[user]
|
|
||||||
name = Tim Huizinga
|
|
||||||
email = th@aimrobotics.nl
|
|
||||||
|
|
||||||
[commit]
|
|
||||||
gpgsign = false
|
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
[include]
|
|
||||||
path = ~/.dotfiles/git/configs/lfs.gitconfig
|
|
||||||
path = ~/.dotfiles/git/configs/delta.gitconfig
|
|
||||||
|
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple
|
||||||
autoSetupRemote = true
|
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.dotfiles/git/gitignore
|
excludesfile = ~/.dotfiles/git/gitignore
|
||||||
@@ -25,9 +20,4 @@
|
|||||||
tool = nvimdiff
|
tool = nvimdiff
|
||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = master
|
||||||
|
|
||||||
[rebase]
|
|
||||||
autosquash = true
|
|
||||||
autostash = true
|
|
||||||
updateRefs = true
|
|
||||||
@@ -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,3 +1,8 @@
|
|||||||
|
-- Basic vim config stuff
|
||||||
|
require("keymaps")
|
||||||
|
require("options")
|
||||||
|
require("autocmds")
|
||||||
|
|
||||||
-- Install lazy package manager
|
-- Install lazy package manager
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
@@ -12,13 +17,6 @@ if not vim.loop.fs_stat(lazypath) then
|
|||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
-- Setup
|
|
||||||
require("keymaps")
|
|
||||||
require("options")
|
|
||||||
require("autocmds")
|
|
||||||
require("lsp")
|
|
||||||
|
|
||||||
-- Configure plugins
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
{ import = "themes" },
|
{ import = "themes" },
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
@@ -28,9 +26,6 @@ require("lazy").setup({
|
|||||||
"gruvbox",
|
"gruvbox",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
change_detection = {
|
|
||||||
notify = false,
|
|
||||||
},
|
|
||||||
rocks = {
|
rocks = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
@@ -39,3 +34,24 @@ require("lazy").setup({
|
|||||||
backdrop = 100,
|
backdrop = 100,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local lsp = require("tools.lsp")
|
||||||
|
for _, tool in pairs(lsp) do
|
||||||
|
if type(tool) == "table" then
|
||||||
|
local name = tool[1]
|
||||||
|
|
||||||
|
-- Apply additional config if specified
|
||||||
|
local config = tool[2]
|
||||||
|
if config ~= nil then
|
||||||
|
vim.lsp.config(name, config)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- System LSP are not managed by mason and need to be enabled manually
|
||||||
|
if
|
||||||
|
(type(tool.system) == "boolean" and tool.system and vim.fn.executable(name) > 0)
|
||||||
|
or (type(tool.system) == "string" and vim.fn.executable(tool.system) > 0)
|
||||||
|
then
|
||||||
|
vim.lsp.enable(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
@@ -1,54 +1,47 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"actions-preview.nvim": { "branch": "master", "commit": "cb938c25edaac38d362555f19244a9cb85d561e8" },
|
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
|
|
||||||
"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": "8b729e489f1475615dc6c9737da917b3bc163605" },
|
||||||
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
|
"gruvbox.nvim": { "branch": "main", "commit": "00e38a379bab3389e187b3953566d67d494dfddd" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
|
||||||
"gitlab.nvim": { "branch": "develop", "commit": "3d2828a9504b87fc36ee2aca1b0f36cf75003edd" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
|
|
||||||
"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" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"kubernetes.nvim": { "branch": "main", "commit": "1a08abc6c0694f0d1f5d6725bfa7a88daf0f7246" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" },
|
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
"luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
"mason-conform.nvim": { "branch": "main", "commit": "f3b96fa2217fcb1513301eefbe10ea0e765e33eb" },
|
||||||
"multicolumn.nvim": { "branch": "master", "commit": "a363bdfd422abf26256f343dac4df183031f8e94" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "d24b3f1612e53f9d54d866b16bedab51813f2bf1" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "9d6826582a3e8c84787bd7355df22a2812a1ad59" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "75d60a8f928decd8b38897f80849768b7c540a5b" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "ef211089af881bea206c7aa3f2693a81feee7e90" },
|
"neo-tree.nvim": { "branch": "main", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
|
||||||
|
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
|
||||||
"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": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" },
|
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
|
"nvim-surround": { "branch": "main", "commit": "0e62500b98f4513feaaf7425c135472457ea5b7d" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
|
"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": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"ros-nvim": { "branch": "main", "commit": "1ad64cd3a1e144dfea67890845f9da2e82d96900" },
|
"ros-nvim": { "branch": "main", "commit": "f0e16eebe68546025784593fa2355ca6749014a0" },
|
||||||
"schema-companion.nvim": { "branch": "main", "commit": "9a8cbeb9429958524331f49a4bd9c25cfbc2c208" },
|
"schemastore.nvim": { "branch": "main", "commit": "0098dde21296a454ae1426f9ac47340dd38c27ce" },
|
||||||
"schemastore.nvim": { "branch": "main", "commit": "27f7d753990c8d79bdefe75be0094e7e86eabf16" },
|
"smart-splits.nvim": { "branch": "master", "commit": "5ef94ca23b28148187846fc46f10184aad4d17b0" },
|
||||||
"scrollEOF.nvim": { "branch": "master", "commit": "e462b9a07b8166c3e8011f1dcbc6bf68b67cd8d7" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
"smart-open.nvim": { "branch": "0.3.x", "commit": "918c97cac0c33f7a116a822df144bc5bbefa4490" },
|
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "25bf40abf79720ebfa98e09259b7c42942055f4c" },
|
|
||||||
"snacks.nvim": { "branch": "main", "commit": "9912042fc8bca2209105526ac7534e9a0c2071b2" },
|
|
||||||
"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": "5255aa27c422de944791318024167ad5d40aad20" },
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
"todo-comments.nvim": { "branch": "main", "commit": "f8bd47e4bc15e3aa7c784b12e68b6dd6e97caea2" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "72e160cb1ce8c0db2ac4315f77d97420a2f4223d" },
|
"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" },
|
||||||
|
"yaml-companion.nvim": { "branch": "main", "commit": "131b0d67bd2e0f1a02e0daf2f3460482221ce3c0" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,3 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "clangd", "--offset-encoding=utf-16", "--clang-tidy" },
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
return require("schema-companion").setup_client(
|
|
||||||
require("schema-companion").adapters.jsonls.setup({
|
|
||||||
sources = {
|
|
||||||
require("schema-companion").sources.lsp.setup(),
|
|
||||||
require("schema-companion").sources.none.setup(),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
settings = {
|
|
||||||
json = {
|
|
||||||
validate = { enable = true },
|
|
||||||
schemas = require("schemastore").json.schemas(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
return {
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
workspace = {
|
|
||||||
checkThirdParty = false,
|
|
||||||
library = {
|
|
||||||
"./definitions",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
telemetry = { enable = false },
|
|
||||||
type = {
|
|
||||||
checkTableShape = true,
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
neededFileStatus = {
|
|
||||||
-- ["no-unknown"] = "Opened",
|
|
||||||
-- ["incomplete-signature-doc"] = "Opened",
|
|
||||||
-- ["await-in-sync"] = "Opened",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
settings = {
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
check = {
|
|
||||||
command = "clippy",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -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,5 +0,0 @@
|
|||||||
return {
|
|
||||||
init_options = {
|
|
||||||
diagnosticSeverity = "Hint",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
return require("schema-companion").setup_client(
|
|
||||||
require("schema-companion").adapters.yamlls.setup({
|
|
||||||
sources = {
|
|
||||||
require("matchers.kubernetes").setup({}),
|
|
||||||
require("schema-companion").sources.lsp.setup(),
|
|
||||||
require("schema-companion").sources.none.setup(),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
{}
|
|
||||||
)
|
|
||||||
@@ -24,3 +24,93 @@ vim.api.nvim_create_autocmd({ "InsertEnter", "WinLeave" }, {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local group = vim.api.nvim_create_augroup("lsp-attach", { clear = true })
|
||||||
|
-- Setup lsp keybindings
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
group = group,
|
||||||
|
callback = function(event)
|
||||||
|
local map = function(keys, func, desc, mode)
|
||||||
|
mode = mode or "n"
|
||||||
|
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = desc })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Symbols
|
||||||
|
map("grD", vim.lsp.buf.declaration, "Goto declaration")
|
||||||
|
|
||||||
|
local has_telescope, telescope = pcall(require, "telescope.builtin")
|
||||||
|
if has_telescope then
|
||||||
|
map("grd", telescope.lsp_definitions, "Goto definition")
|
||||||
|
|
||||||
|
map("grt", telescope.lsp_type_definitions, "Type definition")
|
||||||
|
|
||||||
|
map("grr", telescope.lsp_references, "Goto references")
|
||||||
|
map("gri", telescope.lsp_implementations, "Goto implementation")
|
||||||
|
map("gO", telescope.lsp_document_symbols, "Document symbols")
|
||||||
|
map("gW", telescope.lsp_dynamic_workspace_symbols, "Workspace symbols")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Diagnostics
|
||||||
|
map("[d", function()
|
||||||
|
vim.diagnostic.jump({ count = -1 })
|
||||||
|
end, "Go to previous diagnostic message")
|
||||||
|
map("]d", function()
|
||||||
|
vim.diagnostic.jump({ count = 1 })
|
||||||
|
end, "Go to next diagnostic message")
|
||||||
|
map("<leader>e", vim.diagnostic.open_float, "Open floating diagnostic message")
|
||||||
|
|
||||||
|
-- Helpers
|
||||||
|
vim.keymap.set("n", "grn", function()
|
||||||
|
return ":IncRename " .. vim.fn.expand("<cword>")
|
||||||
|
end, { buffer = event.buf, expr = true, desc = "Rename" })
|
||||||
|
map("gra", vim.lsp.buf.code_action, "Code actions", { "n", "x" })
|
||||||
|
|
||||||
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
|
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then
|
||||||
|
map("<leader>th", function()
|
||||||
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
|
||||||
|
end, "Inlay hints")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Setup cursor hover symbol highlight
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
group = group,
|
||||||
|
callback = function(event)
|
||||||
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
|
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then
|
||||||
|
local lsp_hover_hl = vim.api.nvim_create_augroup("LspHoverHighlight", { clear = false })
|
||||||
|
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
group = lsp_hover_hl,
|
||||||
|
callback = vim.lsp.buf.document_highlight,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
group = lsp_hover_hl,
|
||||||
|
callback = vim.lsp.buf.clear_references,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("LspDetach", {
|
||||||
|
group = vim.api.nvim_create_augroup("LspHoverHighlightDetach", { clear = true }),
|
||||||
|
callback = function(event2)
|
||||||
|
vim.lsp.buf.clear_references()
|
||||||
|
vim.api.nvim_clear_autocmds({ group = lsp_hover_hl, buffer = event2.buf })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Disable lsp based syntax highlighting
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
group = group,
|
||||||
|
callback = function(event)
|
||||||
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
|
if client and client.server_capabilities.semanticTokensProvider then
|
||||||
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|||||||
@@ -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,
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -1,157 +0,0 @@
|
|||||||
local diagnostic = require("symbols.diagnostic")
|
|
||||||
local methods = vim.lsp.protocol.Methods
|
|
||||||
|
|
||||||
local map = function(keys, func, desc, mode, bufnr)
|
|
||||||
mode = mode or "n"
|
|
||||||
vim.keymap.set(mode, keys, func, { desc = desc, buffer = bufnr })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- General keymaps
|
|
||||||
map("[d", function()
|
|
||||||
vim.diagnostic.jump({ count = -1 })
|
|
||||||
end, "Go to previous diagnostic message")
|
|
||||||
map("]d", function()
|
|
||||||
vim.diagnostic.jump({ count = 1 })
|
|
||||||
end, "Go to next diagnostic message")
|
|
||||||
|
|
||||||
map("[e", function()
|
|
||||||
vim.diagnostic.jump({ count = -1, severity = vim.diagnostic.severity.ERROR })
|
|
||||||
end, "Go to previous error message")
|
|
||||||
map("]e", function()
|
|
||||||
vim.diagnostic.jump({ count = 1, severity = vim.diagnostic.severity.ERROR })
|
|
||||||
end, "Go to next error message")
|
|
||||||
|
|
||||||
map("<leader>e", vim.diagnostic.open_float, "Open floating diagnostic message")
|
|
||||||
|
|
||||||
map("<leader>th", function()
|
|
||||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
|
||||||
end, "Toggle inlay hints")
|
|
||||||
|
|
||||||
map("gra", function()
|
|
||||||
require("actions-preview").code_actions()
|
|
||||||
end, "Code actions", { "n", "x" })
|
|
||||||
map("grD", vim.lsp.buf.declaration, "Goto declaration")
|
|
||||||
map("grd", function()
|
|
||||||
require("telescope.builtin").lsp_definitions({ jump_type = "never" })
|
|
||||||
end, "Goto definition")
|
|
||||||
|
|
||||||
map("grt", function()
|
|
||||||
require("telescope.builtin").lsp_type_definitions()
|
|
||||||
end, "Type definition")
|
|
||||||
map("grr", function()
|
|
||||||
require("telescope.builtin").lsp_references()
|
|
||||||
end, "Goto references")
|
|
||||||
map("gri", function()
|
|
||||||
require("telescope.builtin").lsp_implementations()
|
|
||||||
end, "Goto implementation")
|
|
||||||
|
|
||||||
map("<leader>ss", function()
|
|
||||||
require("telescope.builtin").lsp_document_symbols()
|
|
||||||
end, "Document symbols")
|
|
||||||
map("<leader>sS", function()
|
|
||||||
require("telescope.builtin").lsp_dynamic_workspace_symbols()
|
|
||||||
end, "Workspace symbols")
|
|
||||||
|
|
||||||
-- Provide a placeholder rename keymap, otherwise the rename appears to works until you hit enter at which point it will fail
|
|
||||||
map("grn", function()
|
|
||||||
vim.api.nvim_echo({ { "Rename are not available in current buffer" } }, true, { err = true })
|
|
||||||
end, "Rename")
|
|
||||||
|
|
||||||
---@param client vim.lsp.Client
|
|
||||||
---@param bufnr integer
|
|
||||||
local function on_attach(client, bufnr)
|
|
||||||
-- Setup actual rename keymap if it is available
|
|
||||||
if client:supports_method(methods.textDocument_rename, bufnr) then
|
|
||||||
vim.keymap.set("n", "grn", function()
|
|
||||||
return ":IncRename " .. vim.fn.expand("<cword>")
|
|
||||||
end, { buffer = bufnr, expr = true, desc = "Rename" })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Disable lsp based syntax highlighting, I don't like it
|
|
||||||
-- TODO: Switch to this once it is available
|
|
||||||
-- vim.lsp.document_color.enable(false, bufnr)
|
|
||||||
if client.server_capabilities.semanticTokensProvider then
|
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Highlight references under cursor
|
|
||||||
-- if client:supports_method(methods.textDocument_documentHighlight) then
|
|
||||||
-- local lsp_hover_hl = vim.api.nvim_create_augroup("LspHoverHighlight", { clear = false })
|
|
||||||
-- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
|
||||||
-- buffer = bufnr,
|
|
||||||
-- group = lsp_hover_hl,
|
|
||||||
-- callback = vim.lsp.buf.document_highlight,
|
|
||||||
-- })
|
|
||||||
--
|
|
||||||
-- vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
|
||||||
-- buffer = bufnr,
|
|
||||||
-- group = lsp_hover_hl,
|
|
||||||
-- callback = vim.lsp.buf.clear_references,
|
|
||||||
-- })
|
|
||||||
-- end
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.diagnostic.config({
|
|
||||||
severity_sort = true,
|
|
||||||
signs = {
|
|
||||||
numhl = {
|
|
||||||
[vim.diagnostic.severity.ERROR] = "DiagnosticNumError",
|
|
||||||
[vim.diagnostic.severity.WARN] = "DiagnosticNumWarn",
|
|
||||||
[vim.diagnostic.severity.HINT] = "DiagnosticNumHint",
|
|
||||||
[vim.diagnostic.severity.INFO] = "DiagnosticNumInfo",
|
|
||||||
},
|
|
||||||
text = {
|
|
||||||
[vim.diagnostic.severity.ERROR] = "",
|
|
||||||
[vim.diagnostic.severity.WARN] = "",
|
|
||||||
[vim.diagnostic.severity.HINT] = "",
|
|
||||||
[vim.diagnostic.severity.INFO] = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
float = {
|
|
||||||
severity_sort = false,
|
|
||||||
header = "",
|
|
||||||
suffix = function(d)
|
|
||||||
local code = d.code and string.format(" (%s)", d.code) or ""
|
|
||||||
|
|
||||||
return string.format("%s [%s]", code, d.source), "NormalFloat"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
virtual_text = {
|
|
||||||
prefix = function(d)
|
|
||||||
return diagnostic[d.severity]
|
|
||||||
end,
|
|
||||||
virt_text_pos = "eol_right_align",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local register_capability = vim.lsp.handlers[methods.client_registerCapability]
|
|
||||||
vim.lsp.handlers[methods.client_registerCapability] = function(err, res, ctx)
|
|
||||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
|
||||||
if not client then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
on_attach(client, vim.api.nvim_get_current_buf())
|
|
||||||
|
|
||||||
return register_capability(err, res, ctx)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
desc = "Configure LSP keymaps",
|
|
||||||
callback = function(args)
|
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
|
||||||
if not client then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
on_attach(client, args.buf)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Manually enable lsps, if installed
|
|
||||||
if vim.fn.executable("rust_analyzer") then
|
|
||||||
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,3 +1,4 @@
|
|||||||
|
local diagnostic = require("symbols.diagnostic")
|
||||||
local window = require("symbols.window")
|
local window = require("symbols.window")
|
||||||
|
|
||||||
-- Set highlight on search
|
-- Set highlight on search
|
||||||
@@ -65,7 +66,43 @@ vim.o.listchars = "trail:~,tab:¦⁃,nbsp:␣"
|
|||||||
vim.o.list = true
|
vim.o.list = true
|
||||||
|
|
||||||
-- Fold settings
|
-- Fold settings
|
||||||
|
vim.wo.foldmethod = "expr"
|
||||||
|
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||||
vim.o.foldlevelstart = 99
|
vim.o.foldlevelstart = 99
|
||||||
|
|
||||||
-- Windows borders
|
-- Windows borders
|
||||||
vim.o.winborder = window.border
|
vim.o.winborder = window.border
|
||||||
|
|
||||||
|
-- LSP config
|
||||||
|
vim.diagnostic.config({
|
||||||
|
severity_sort = true,
|
||||||
|
signs = {
|
||||||
|
numhl = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = "DiagnosticNumError",
|
||||||
|
[vim.diagnostic.severity.WARN] = "DiagnosticNumWarn",
|
||||||
|
[vim.diagnostic.severity.HINT] = "DiagnosticNumHint",
|
||||||
|
[vim.diagnostic.severity.INFO] = "DiagnosticNumInfo",
|
||||||
|
},
|
||||||
|
text = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = "",
|
||||||
|
[vim.diagnostic.severity.WARN] = "",
|
||||||
|
[vim.diagnostic.severity.HINT] = "",
|
||||||
|
[vim.diagnostic.severity.INFO] = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
float = {
|
||||||
|
severity_sort = false,
|
||||||
|
header = "",
|
||||||
|
suffix = function(d)
|
||||||
|
local code = d.code and string.format(" (%s)", d.code) or ""
|
||||||
|
|
||||||
|
return string.format("%s [%s]", code, d.source), "NormalFloat"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
virtual_text = {
|
||||||
|
prefix = function(d)
|
||||||
|
return diagnostic[d.severity]
|
||||||
|
end,
|
||||||
|
virt_text_pos = "eol_right_align",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|||||||
@@ -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,12 +1,8 @@
|
|||||||
-- https://github.com/altermo/ultimate-autopair.nvim
|
-- https://github.com/altermo/ultimate-autopair.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"altermo/ultimate-autopair.nvim",
|
"altermo/ultimate-autopair.nvim",
|
||||||
event = { "InsertEnter", "CmdlineEnter" },
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
branch = "v0.6",
|
branch = "v0.6",
|
||||||
--- @module "ultimate-autopair"
|
|
||||||
--- @type prof.def.conf
|
|
||||||
opts = {
|
opts = {
|
||||||
fastwarp = {
|
fastwarp = {
|
||||||
faster = true,
|
faster = true,
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
-- https://github.com/saghen/blink.cmp
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
|
-- optional: provides snippets for the snippet source
|
||||||
dependencies = { "rafamadriz/friendly-snippets" },
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
event = "InsertEnter",
|
|
||||||
|
|
||||||
-- use a release tag to download pre-built binaries
|
-- use a release tag to download pre-built binaries
|
||||||
version = "1.*",
|
version = "1.*",
|
||||||
|
|
||||||
--- @module "blink-cmp"
|
---@module 'blink.cmp'
|
||||||
--- @type blink.cmp.Config
|
---@type blink.cmp.Config
|
||||||
opts = {
|
opts = {
|
||||||
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
|
-- keymap = { preset = "default" },
|
||||||
keymap = {
|
keymap = {
|
||||||
preset = "default",
|
preset = "default",
|
||||||
|
-- ["<C-u>"] = {function(cmp) cmp.scroll_documentation_up(4) end},
|
||||||
|
-- ["<C-d>"] = {function(cmp) cmp.scroll_documentation_down(4) end},
|
||||||
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
|
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
|
||||||
["<C-u>"] = { "scroll_documentation_up" },
|
["<C-u>"] = { "scroll_documentation_up" },
|
||||||
["<C-d>"] = { "scroll_documentation_down" },
|
["<C-d>"] = { "scroll_documentation_down" },
|
||||||
@@ -26,8 +27,6 @@ return {
|
|||||||
if cmp.get_selected_item_idx() ~= nil or cmp.snippet_active() then
|
if cmp.get_selected_item_idx() ~= nil or cmp.snippet_active() then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
elseif cmp.snippet_active() then
|
|
||||||
vim.snippet.stop()
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
"fallback",
|
"fallback",
|
||||||
@@ -40,13 +39,17 @@ return {
|
|||||||
["<C-p>"] = { "select_prev", "fallback_to_mappings" },
|
["<C-p>"] = { "select_prev", "fallback_to_mappings" },
|
||||||
["<C-n>"] = { "select_next", "fallback_to_mappings" },
|
["<C-n>"] = { "select_next", "fallback_to_mappings" },
|
||||||
|
|
||||||
|
-- TODO: Does not appear to work?
|
||||||
["<C-k>"] = { "show_signature", "hide_signature", "fallback" },
|
["<C-k>"] = { "show_signature", "hide_signature", "fallback" },
|
||||||
},
|
},
|
||||||
|
|
||||||
appearance = {
|
appearance = {
|
||||||
nerd_font_variant = "normal",
|
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||||
|
-- Adjusts spacing to ensure icons are aligned
|
||||||
|
nerd_font_variant = "mono",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- (Default) Only show the documentation popup when manually triggered
|
||||||
completion = {
|
completion = {
|
||||||
ghost_text = {
|
ghost_text = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
@@ -54,6 +57,9 @@ return {
|
|||||||
list = {
|
list = {
|
||||||
selection = {
|
selection = {
|
||||||
preselect = false,
|
preselect = false,
|
||||||
|
-- preselect = function(ctx)
|
||||||
|
-- return vim.bo.filetype ~= "markdown"
|
||||||
|
-- end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
documentation = {
|
documentation = {
|
||||||
@@ -88,6 +94,8 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Default list of enabled providers defined so that you can extend it
|
||||||
|
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||||
sources = {
|
sources = {
|
||||||
default = {
|
default = {
|
||||||
"lazydev",
|
"lazydev",
|
||||||
@@ -100,15 +108,17 @@ return {
|
|||||||
lazydev = {
|
lazydev = {
|
||||||
name = "LazyDev",
|
name = "LazyDev",
|
||||||
module = "lazydev.integrations.blink",
|
module = "lazydev.integrations.blink",
|
||||||
|
-- make lazydev completions top priority (see `:h blink.cmp`)
|
||||||
score_offset = 100,
|
score_offset = 100,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
cmdline = {
|
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
||||||
enabled = false,
|
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
||||||
},
|
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
||||||
|
--
|
||||||
|
-- See the fuzzy documentation for more information
|
||||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||||
},
|
},
|
||||||
opts_extend = { "sources.default" },
|
opts_extend = { "sources.default" },
|
||||||
|
|||||||
23
nvim/dot-config/nvim/lua/plugins/bufdel.lua
Normal file
23
nvim/dot-config/nvim/lua/plugins/bufdel.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
-- https://github.com/ojroques/nvim-bufdel
|
||||||
|
return {
|
||||||
|
"ojroques/nvim-bufdel",
|
||||||
|
cmd = { "BufDel", "BuffDelOthers" },
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>bd",
|
||||||
|
function()
|
||||||
|
require("bufdel").delete_buffer_expr(nil, false)
|
||||||
|
end,
|
||||||
|
silent = true,
|
||||||
|
desc = "Buffer delete",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>bD",
|
||||||
|
function()
|
||||||
|
require("bufdel").delete_buffer_others(false)
|
||||||
|
end,
|
||||||
|
silent = true,
|
||||||
|
desc = "Buffer delete others",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -2,17 +2,40 @@
|
|||||||
local diagnostic = require("symbols.diagnostic")
|
local diagnostic = require("symbols.diagnostic")
|
||||||
local file = require("symbols.file")
|
local file = require("symbols.file")
|
||||||
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
--- @module "bufferline"
|
dependencies = {
|
||||||
--- @type bufferline.UserConfig
|
"ojroques/nvim-bufdel",
|
||||||
opts = {
|
},
|
||||||
|
config = function()
|
||||||
|
-- Enable mousemoveevent if possible
|
||||||
|
vim.o.mousemoveevent = true
|
||||||
|
|
||||||
|
local bufferline = require("bufferline")
|
||||||
|
|
||||||
|
-- Setup keybinds to move between buffers
|
||||||
|
vim.keymap.set("n", "<tab>", function()
|
||||||
|
bufferline.cycle(1)
|
||||||
|
end, { silent = true, desc = "Goto next buffer" })
|
||||||
|
vim.keymap.set("n", "<S-tab>", function()
|
||||||
|
bufferline.cycle(-1)
|
||||||
|
end, { silent = true, desc = "Goto previous buffer" })
|
||||||
|
|
||||||
|
-- Setup keybinds to move buffers around
|
||||||
|
vim.keymap.set("n", "<leader>b[", function()
|
||||||
|
bufferline.move(-1)
|
||||||
|
end, { silent = true, desc = "Move buffer to left" })
|
||||||
|
vim.keymap.set("n", "<leader>b]", function()
|
||||||
|
bufferline.move(1)
|
||||||
|
end, { silent = true, desc = "Move buffer to right" })
|
||||||
|
|
||||||
|
bufferline.setup({
|
||||||
options = {
|
options = {
|
||||||
show_buffer_icons = false,
|
show_buffer_icons = false,
|
||||||
show_buffer_close_icons = false,
|
show_buffer_close_icons = false,
|
||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
|
-- close_command = "BufDel %d",
|
||||||
|
-- right_mouse_command = "BufDel %d",
|
||||||
separator_style = "thick",
|
separator_style = "thick",
|
||||||
left_trunc_marker = "",
|
left_trunc_marker = "",
|
||||||
right_trunc_marker = "",
|
right_trunc_marker = "",
|
||||||
@@ -33,22 +56,6 @@ return {
|
|||||||
return s
|
return s
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
init = function()
|
|
||||||
-- Setup keybinds to move between buffers
|
|
||||||
vim.keymap.set("n", "<tab>", function()
|
|
||||||
require("bufferline").cycle(1)
|
|
||||||
end, { silent = true, desc = "Goto next buffer" })
|
|
||||||
vim.keymap.set("n", "<S-tab>", function()
|
|
||||||
require("bufferline").cycle(-1)
|
|
||||||
end, { silent = true, desc = "Goto previous buffer" })
|
|
||||||
|
|
||||||
-- Setup keybinds to move buffers around
|
|
||||||
vim.keymap.set("n", "<leader>b[", function()
|
|
||||||
require("bufferline").move(-1)
|
|
||||||
end, { silent = true, desc = "Move buffer to left" })
|
|
||||||
vim.keymap.set("n", "<leader>b]", function()
|
|
||||||
require("bufferline").move(1)
|
|
||||||
end, { silent = true, desc = "Move buffer to right" })
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
-- https://github.com/kwkarlwang/bufresize.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"kwkarlwang/bufresize.nvim",
|
|
||||||
opts = {},
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
-- https://github.com/NvChad/nvim-colorizer.lua
|
-- https://github.com/NvChad/nvim-colorizer.lua
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
lazy_load = true,
|
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"*", -- Enable color highlighting for all files
|
"*", -- Enable color highlighting for all files
|
||||||
"!neo-tree", -- Exclude neo-tree
|
"!neo-tree", -- Exclude neo-tree
|
||||||
@@ -15,12 +13,20 @@ return {
|
|||||||
"!popup",
|
"!popup",
|
||||||
},
|
},
|
||||||
always_update = true,
|
always_update = true,
|
||||||
options = {
|
user_default_options = {
|
||||||
parsers = {
|
names = false,
|
||||||
names = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- Fix lazy loading: https://github.com/NvChad/nvim-colorizer.lua
|
||||||
|
config = function(_, opts)
|
||||||
|
local colorizer = require("colorizer")
|
||||||
|
colorizer.setup(opts)
|
||||||
|
|
||||||
|
-- nvim-colorizer doesn't work on the initial buffer if we lazy load, so force it to attach
|
||||||
|
-- on load.
|
||||||
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
if bufnr and not colorizer.is_buffer_attached(bufnr) then
|
||||||
|
colorizer.attach_to_buffer(bufnr)
|
||||||
|
end
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
-- https://github.com/numToStr/Comment.nvim
|
-- https://github.com/numToStr/Comment.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
--- @module "Comment"
|
|
||||||
--- @type CommentConfig
|
|
||||||
opts = {
|
opts = {
|
||||||
toggler = {
|
toggler = {
|
||||||
block = "gBc",
|
block = "gBc",
|
||||||
|
|||||||
@@ -1,26 +1,5 @@
|
|||||||
-- https://github.com/stevearc/conform.nvim
|
-- https://github.com/stevearc/conform.nvim
|
||||||
local formatters_by_ft = {
|
local slow_format_filetypes = {}
|
||||||
c = { "clang-format" },
|
|
||||||
cpp = { "clang-format" },
|
|
||||||
go = { "goimports" },
|
|
||||||
python = { "ruff_organize_imports", "ruff_format" },
|
|
||||||
rust = { "rustfmt" },
|
|
||||||
javascript = { "prettier" },
|
|
||||||
javascriptreact = { "prettier" },
|
|
||||||
typescript = { "prettier" },
|
|
||||||
typescriptreact = { "prettier" },
|
|
||||||
css = { "prettier" },
|
|
||||||
markdown = { "prettier" },
|
|
||||||
yaml = { "prettier" },
|
|
||||||
lua = { "stylua" },
|
|
||||||
json = { "prettier" },
|
|
||||||
toml = { "taplo" },
|
|
||||||
-- ["*"] = { "injected" },
|
|
||||||
["_"] = { "trim_whitespace", "trim_newlines" },
|
|
||||||
}
|
|
||||||
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
event = { "BufWritePre" },
|
event = { "BufWritePre" },
|
||||||
@@ -33,21 +12,53 @@ return {
|
|||||||
require("conform").format({ async = true, lsp_fallback = true })
|
require("conform").format({ async = true, lsp_fallback = true })
|
||||||
end,
|
end,
|
||||||
mode = "",
|
mode = "",
|
||||||
desc = "Format buffer",
|
desc = "[F]ormat buffer",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
--- @module "conform"
|
|
||||||
--- @type conform.setupOpts
|
|
||||||
opts = {
|
opts = {
|
||||||
formatters_by_ft = formatters_by_ft,
|
formatters_by_ft = (function()
|
||||||
|
local formatters = require("tools.format")
|
||||||
|
local formatters_by_ft = {}
|
||||||
|
for lang, formatter in pairs(formatters) do
|
||||||
|
formatters_by_ft[lang] = {}
|
||||||
|
if type(formatter) == "table" then
|
||||||
|
for _, tool in ipairs(formatter) do
|
||||||
|
if type(tool) == "table" then
|
||||||
|
table.insert(formatters_by_ft[lang], tool[1])
|
||||||
|
else
|
||||||
|
table.insert(formatters_by_ft[lang], tool)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return formatters_by_ft
|
||||||
|
end)(),
|
||||||
notify_on_error = false,
|
notify_on_error = false,
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
--- @type conform.FormatOpts
|
if slow_format_filetypes[vim.bo[bufnr].filetype] then
|
||||||
return { lsp_format = "fallback" }
|
return
|
||||||
|
end
|
||||||
|
local function on_format(err)
|
||||||
|
if err and err:match("timeout$") then
|
||||||
|
slow_format_filetypes[vim.bo[bufnr].filetype] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return { timeout_ms = 200, lsp_fallback = true }, on_format
|
||||||
end,
|
end,
|
||||||
|
format_after_save = function(bufnr)
|
||||||
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not slow_format_filetypes[vim.bo[bufnr].filetype] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return { lsp_fallback = true }
|
||||||
|
end,
|
||||||
|
-- log_level = vim.log.levels.DEBUG,
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||||
@@ -61,7 +72,6 @@ return {
|
|||||||
desc = "Disable autoformat-on-save",
|
desc = "Disable autoformat-on-save",
|
||||||
bang = true,
|
bang = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||||
vim.b.disable_autoformat = false
|
vim.b.disable_autoformat = false
|
||||||
vim.g.disable_autoformat = false
|
vim.g.disable_autoformat = false
|
||||||
|
|||||||
@@ -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,9 +1,6 @@
|
|||||||
-- https://github.com/mfussenegger/nvim-dap
|
-- https://github.com/mfussenegger/nvim-dap
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
enabled = false,
|
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
@@ -89,7 +86,6 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled = false,
|
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
|
|||||||
@@ -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,9 +1,5 @@
|
|||||||
-- https://github.com/j-hui/fidget.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
event = "LspAttach",
|
|
||||||
opts = {
|
opts = {
|
||||||
notification = {
|
notification = {
|
||||||
window = {
|
window = {
|
||||||
|
|||||||
@@ -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,12 +1,7 @@
|
|||||||
-- https://github.com/lewis6991/gitsigns.nvim
|
-- https://github.com/lewis6991/gitsigns.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
event = { "BufWritePost", "BufReadPre" },
|
|
||||||
--- @module "gitsigns"
|
|
||||||
--- @type Gitsigns.Config
|
|
||||||
opts = {
|
opts = {
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = "+" },
|
add = { text = "+" },
|
||||||
@@ -32,42 +27,29 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.keymap.set("n", "gs", function()
|
local ga = require("gitsigns.actions")
|
||||||
require("gitsigns.actions").stage_hunk()
|
vim.keymap.set("n", "gs", ga.stage_hunk, { desc = "(Un)stage hunk" })
|
||||||
end, { desc = "(Un)stage hunk" })
|
vim.keymap.set("n", "gS", ga.stage_buffer, { desc = "Stage buffer" })
|
||||||
vim.keymap.set("n", "gS", function()
|
|
||||||
require("gitsigns.actions").stage_buffer()
|
|
||||||
end, { desc = "Stage buffer" })
|
|
||||||
vim.keymap.set("v", "gs", function()
|
vim.keymap.set("v", "gs", function()
|
||||||
require("gitsigns.actions").stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
ga.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||||
end, { desc = "(Un)stage selection" })
|
end, { desc = "(Un)stage selection" })
|
||||||
|
|
||||||
vim.keymap.set("n", "gd", function()
|
vim.keymap.set("n", "gd", ga.preview_hunk, { desc = "Diff hunk" })
|
||||||
require("gitsigns.actions").preview_hunk()
|
|
||||||
end, { desc = "Diff hunk" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>tb", function()
|
vim.keymap.set("n", "<leader>tb", ga.toggle_current_line_blame, { desc = "Line blame" })
|
||||||
require("gitsigns.actions").toggle_current_line_blame()
|
vim.keymap.set("n", "gb", ga.blame_line, { desc = "View blame" })
|
||||||
end, { desc = "Line blame" })
|
|
||||||
vim.keymap.set("n", "gb", function()
|
|
||||||
require("gitsigns.actions").blame_line()
|
|
||||||
end, { desc = "View blame" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>gr", function()
|
vim.keymap.set("n", "<leader>gr", ga.reset_hunk, { desc = "Reset hunk" })
|
||||||
require("gitsigns.actions").reset_hunk()
|
vim.keymap.set("n", "<leader>gR", ga.reset_buffer, { desc = "Reset buffer" })
|
||||||
end, { desc = "Reset hunk" })
|
|
||||||
vim.keymap.set("n", "<leader>gR", function()
|
|
||||||
require("gitsigns.actions").reset_buffer()
|
|
||||||
end, { desc = "Reset buffer" })
|
|
||||||
vim.keymap.set("v", "<leader>gr", function()
|
vim.keymap.set("v", "<leader>gr", function()
|
||||||
require("gitsigns.actions").reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
ga.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||||
end, { desc = "Git reset selection" })
|
end, { desc = "Reset selection" })
|
||||||
|
|
||||||
vim.keymap.set("n", "]g", function()
|
vim.keymap.set("n", "]g", function()
|
||||||
require("gitsigns.actions").nav_hunk("next")
|
ga.nav_hunk("next")
|
||||||
end, { desc = "Next hunk" })
|
end, { desc = "Next hunk" })
|
||||||
vim.keymap.set("n", "[g", function()
|
vim.keymap.set("n", "[g", function()
|
||||||
require("gitsigns.actions").nav_hunk("prev")
|
ga.nav_hunk("prev")
|
||||||
end, { desc = "Previous hunk" })
|
end, { desc = "Previous hunk" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
-- https://github.com/NMAC427/guess-indent.nvim
|
-- https://github.com/NMAC427/guess-indent.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
|
-- Adds a command to automatically detect the indentation settings
|
||||||
|
-- Prefer to use .editorconfig for projects and modeline for files
|
||||||
"NMAC427/guess-indent.nvim",
|
"NMAC427/guess-indent.nvim",
|
||||||
cmd = "GuessIndent",
|
|
||||||
event = { "BufReadPre" },
|
|
||||||
--- @module "guess-indent"
|
|
||||||
--- @type GuessIndentConfig
|
|
||||||
opts = {},
|
opts = {},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
-- https://github.com/smjonas/inc-rename.nvim
|
-- https://github.com/smjonas/inc-rename.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"smjonas/inc-rename.nvim",
|
"smjonas/inc-rename.nvim",
|
||||||
cmd = "IncRename",
|
|
||||||
-- We can't load on just the command otherwise the preview does not work
|
|
||||||
event = "LspAttach",
|
|
||||||
--- @module "inc_rename"
|
|
||||||
--- @type inc_rename.UserConfig
|
|
||||||
opts = {
|
opts = {
|
||||||
preview_empty_name = true,
|
preview_empty_name = true,
|
||||||
},
|
},
|
||||||
|
|||||||
14
nvim/dot-config/nvim/lua/plugins/indent-blankline.lua
Normal file
14
nvim/dot-config/nvim/lua/plugins/indent-blankline.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
-- https://github.com/lukas-reineke/indent-blankline.nvim
|
||||||
|
return {
|
||||||
|
-- Add indentation guides even on blank lines
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||||
|
-- See `:help indent_blankline.txt`
|
||||||
|
main = "ibl",
|
||||||
|
opts = {
|
||||||
|
indent = {
|
||||||
|
char = "¦",
|
||||||
|
},
|
||||||
|
scope = { enabled = true, show_start = false, show_end = false },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
-- https://github.com/diogo464/kubernetes.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"diogo464/kubernetes.nvim",
|
"diogo464/kubernetes.nvim",
|
||||||
ft = "yaml",
|
|
||||||
opts = {
|
opts = {
|
||||||
schema_strict = true,
|
schema_strict = true,
|
||||||
schema_generate_always = false,
|
schema_generate_always = false,
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
-- https://github.com/folke/lazydev.nvim
|
-- https://github.com/folke/lazydev.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
"folke/lazydev.nvim",
|
"folke/lazydev.nvim",
|
||||||
ft = "lua",
|
ft = "lua",
|
||||||
--- @module "lazydev"
|
|
||||||
--- @type lazydev.Config
|
|
||||||
opts = {
|
opts = {
|
||||||
library = {
|
library = {
|
||||||
-- See the configuration section for more details
|
-- See the configuration section for more details
|
||||||
@@ -13,4 +10,5 @@ return {
|
|||||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
-- https://github.com/neovim/nvim-lspconfig
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
cmd = { "LspInfo", "LspStart", "LspStop", "LspRestart" },
|
|
||||||
}
|
|
||||||
@@ -1,28 +1,13 @@
|
|||||||
-- 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
|
local schema = require("yaml-companion").get_buf_schema(0)
|
||||||
|
if schema.result[1].name == "none" then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
return schema.result[1].name
|
||||||
-- The provided get_current_schema function returns nonenil when no schema is known.
|
|
||||||
-- 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
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
|
|
||||||
return ("%s%s"):format(schema.name, #schemas > 1 and (" (+%d)"):format(#schemas - 1) or "")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
@@ -52,11 +37,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 },
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
-- https://github.com/mason-org/mason-lspconfig.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"mason-org/mason-lspconfig.nvim",
|
|
||||||
cmd = { "LspInstall", "LspUninstall" },
|
|
||||||
event = { "BufNewFile", "BufReadPre" },
|
|
||||||
--- @module "mason-lspconfig"
|
|
||||||
--- @type MasonLspconfigSettings
|
|
||||||
opts = {},
|
|
||||||
dependencies = {
|
|
||||||
"mason-org/mason.nvim",
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
--- https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim
|
|
||||||
local ensure_installed = {
|
|
||||||
-- LSP
|
|
||||||
"typos_lsp",
|
|
||||||
"clangd",
|
|
||||||
"basedpyright",
|
|
||||||
"lua_ls",
|
|
||||||
{
|
|
||||||
"gopls",
|
|
||||||
condition = function()
|
|
||||||
return vim.fn.executable("go") > 0
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
"jsonls",
|
|
||||||
"yamlls",
|
|
||||||
"taplo",
|
|
||||||
"neocmake",
|
|
||||||
-- Formatter
|
|
||||||
"clang-format",
|
|
||||||
{
|
|
||||||
"goimports",
|
|
||||||
condition = function()
|
|
||||||
return vim.fn.executable("go") > 0
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
"ruff",
|
|
||||||
"prettier",
|
|
||||||
"stylua",
|
|
||||||
"eslint",
|
|
||||||
}
|
|
||||||
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"mason-org/mason.nvim",
|
|
||||||
},
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = ensure_installed,
|
|
||||||
auto_update = true,
|
|
||||||
},
|
|
||||||
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,10 +1,96 @@
|
|||||||
-- https://github.com/mason-org/mason.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"mason-org/mason.nvim",
|
{
|
||||||
cmd = { "Mason", "MasonUpdate", "MasonInstall", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
--- @module "mason"
|
dependencies = {
|
||||||
--- @type MasonSettings
|
{ "mason-org/mason.nvim", opts = {} },
|
||||||
|
"mason-org/mason-lspconfig.nvim",
|
||||||
|
"zapling/mason-conform.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local lsp = require("tools.lsp")
|
||||||
|
|
||||||
|
-- Convert lsp entries to consistent format
|
||||||
|
local tools = {}
|
||||||
|
for _, tool in pairs(lsp) do
|
||||||
|
if type(tool) == "table" then
|
||||||
|
local name = tool[1]
|
||||||
|
local entry = {}
|
||||||
|
|
||||||
|
-- Make a copy and strip out name and lsp config
|
||||||
|
for k, v in pairs(tool) do
|
||||||
|
if k ~= 1 and k ~= 2 then
|
||||||
|
entry[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
tools[name] = entry
|
||||||
|
else
|
||||||
|
tools[tool] = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Convert formatters to same format and merge on top of the lsps
|
||||||
|
local formatters_by_ft = require("conform").formatters_by_ft
|
||||||
|
local mapping = require("mason-conform.mapping")
|
||||||
|
for _, formatter in pairs(formatters_by_ft) do
|
||||||
|
if type(formatter) == "table" then
|
||||||
|
for _, tool in ipairs(formatter) do
|
||||||
|
local entry = {}
|
||||||
|
local name = nil
|
||||||
|
if type(tool) == "table" then
|
||||||
|
name = mapping.conform_to_package[tool[1]]
|
||||||
|
|
||||||
|
-- Make a copy and strip out name
|
||||||
|
for k, v in pairs(tool) do
|
||||||
|
if k ~= 1 then
|
||||||
|
entry[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
name = mapping.conform_to_package[tool]
|
||||||
|
end
|
||||||
|
|
||||||
|
if name ~= nil then
|
||||||
|
tools[name] = vim.tbl_extend("error", tools[name] or {}, entry)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local ensure_installed = vim.iter(tools)
|
||||||
|
:map(function(name, tool)
|
||||||
|
if type(tool) == "table" then
|
||||||
|
if tool.system then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local entry = {
|
||||||
|
[1] = name,
|
||||||
|
}
|
||||||
|
|
||||||
|
for k, v in pairs(tool) do
|
||||||
|
entry[k] = v
|
||||||
|
end
|
||||||
|
|
||||||
|
return entry
|
||||||
|
end
|
||||||
|
return tool
|
||||||
|
end)
|
||||||
|
:totable()
|
||||||
|
|
||||||
|
require("mason-tool-installer").setup({
|
||||||
|
ensure_installed = ensure_installed,
|
||||||
|
auto_update = true,
|
||||||
|
debounde_hours = 24,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mason-org/mason-lspconfig.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
|
dependencies = {
|
||||||
|
{ "mason-org/mason.nvim", opts = {} },
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -2,11 +2,9 @@
|
|||||||
local fold = require("symbols.fold")
|
local fold = require("symbols.fold")
|
||||||
local file = require("symbols.file")
|
local file = require("symbols.file")
|
||||||
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @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",
|
||||||
@@ -17,9 +15,8 @@ return {
|
|||||||
},
|
},
|
||||||
-- netrw hijack does not work when lazy loading
|
-- netrw hijack does not work when lazy loading
|
||||||
lazy = false,
|
lazy = false,
|
||||||
--- @module "neo-tree"
|
config = function()
|
||||||
--- @type neotree.Config
|
require("neo-tree").setup({
|
||||||
opts = {
|
|
||||||
close_if_last_window = true,
|
close_if_last_window = true,
|
||||||
popup_border_style = require("symbols.window").border,
|
popup_border_style = require("symbols.window").border,
|
||||||
source_selector = {
|
source_selector = {
|
||||||
@@ -54,7 +51,6 @@ return {
|
|||||||
folder_closed = fold.closed,
|
folder_closed = fold.closed,
|
||||||
folder_open = fold.open,
|
folder_open = fold.open,
|
||||||
folder_empty = fold.empty,
|
folder_empty = fold.empty,
|
||||||
folder_empty_open = fold.open,
|
|
||||||
default = file.icon,
|
default = file.icon,
|
||||||
},
|
},
|
||||||
modified = {
|
modified = {
|
||||||
@@ -86,7 +82,7 @@ return {
|
|||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
popup = {
|
popup = {
|
||||||
title = function()
|
title = function(state)
|
||||||
return ""
|
return ""
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@@ -98,5 +94,6 @@ return {
|
|||||||
["<S-tab>"] = "prev_source",
|
["<S-tab>"] = "prev_source",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
-- https://github.com/toppair/peek.nvim
|
-- https://github.com/toppair/peek.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"toppair/peek.nvim",
|
"toppair/peek.nvim",
|
||||||
build = "deno task --quiet build:fast",
|
build = "deno task --quiet build:fast",
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
-- https://github.com/tadachs/ros-nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"tadachs/ros-nvim",
|
"tadachs/ros-nvim",
|
||||||
event = { "BufRead", "BufNewFile" },
|
|
||||||
opts = {
|
opts = {
|
||||||
commands = {
|
only_workspace = true,
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
build = ":TSInstall ros",
|
build = ":TSInstall ros",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
-- https://github.com/cenk1cenk2/schema-companion.nvim
|
|
||||||
--- @module "schema-companion"
|
|
||||||
--- @type schema_companion.Matcher
|
|
||||||
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"cenk1cenk2/schema-companion.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"diogo464/kubernetes.nvim",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>ys",
|
|
||||||
function()
|
|
||||||
local schemas = require("schema-companion").get_matching_schemas()
|
|
||||||
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,
|
|
||||||
desc = "Select schema",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
--- @module "schema-companion"
|
|
||||||
--- @type schema_companion.Config
|
|
||||||
opts = {},
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,13 @@
|
|||||||
-- https://github.com/b0o/schemastore.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"b0o/schemastore.nvim",
|
"b0o/schemastore.nvim",
|
||||||
lazy = true,
|
config = function()
|
||||||
|
vim.lsp.config("jsonls", {
|
||||||
|
settings = {
|
||||||
|
json = {
|
||||||
|
validate = { enable = true },
|
||||||
|
schemas = require("schemastore").json.schemas(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
-- https://github.com/Aasim-A/scrollEOF.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
"Aasim-A/scrollEOF.nvim",
|
|
||||||
event = { "CursorMoved", "WinScrolled" },
|
|
||||||
opts = {},
|
|
||||||
}
|
|
||||||
@@ -1,53 +1,25 @@
|
|||||||
-- https://github.com/mrjones2014/smart-splits.nvim
|
-- https://github.com/mrjones2014/smart-splits.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"mrjones2014/smart-splits.nvim",
|
"mrjones2014/smart-splits.nvim",
|
||||||
event = "VeryLazy",
|
config = function()
|
||||||
--- @module "smart-splits"
|
vim.keymap.set("n", "<M-h>", require("smart-splits").move_cursor_left)
|
||||||
--- @type SmartSplitsConfig
|
vim.keymap.set("n", "<M-j>", require("smart-splits").move_cursor_down)
|
||||||
opts = {
|
vim.keymap.set("n", "<M-k>", require("smart-splits").move_cursor_up)
|
||||||
|
vim.keymap.set("n", "<M-l>", require("smart-splits").move_cursor_right)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-w>h", require("smart-splits").swap_buf_left, { desc = "Swap buffer to the left" })
|
||||||
|
vim.keymap.set("n", "<C-w>j", require("smart-splits").swap_buf_down, { desc = "Swap buffer to the bottom" })
|
||||||
|
vim.keymap.set("n", "<C-w>k", require("smart-splits").swap_buf_up, { desc = "Swap buffer to the top" })
|
||||||
|
vim.keymap.set("n", "<C-w>l", require("smart-splits").swap_buf_right, { desc = "Swap buffer to the right" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<M-left>", require("smart-splits").resize_left, { desc = "Resize buffer to the left" })
|
||||||
|
vim.keymap.set("n", "<M-down>", require("smart-splits").resize_down, { desc = "Resize buffer to the bottom" })
|
||||||
|
vim.keymap.set("n", "<M-up>", require("smart-splits").resize_up, { desc = "Resize buffer to the top" })
|
||||||
|
vim.keymap.set("n", "<M-right>", require("smart-splits").resize_right, { desc = "Resize buffer to the right" })
|
||||||
|
|
||||||
|
require("smart-splits").setup({
|
||||||
at_edge = "stop",
|
at_edge = "stop",
|
||||||
cursor_follows_swapped_bufs = true,
|
cursor_follows_swapped_bufs = true,
|
||||||
},
|
})
|
||||||
init = function()
|
|
||||||
vim.keymap.set("n", "<M-h>", function()
|
|
||||||
require("smart-splits").move_cursor_left()
|
|
||||||
end)
|
|
||||||
vim.keymap.set("n", "<M-j>", function()
|
|
||||||
require("smart-splits").move_cursor_down()
|
|
||||||
end)
|
|
||||||
vim.keymap.set("n", "<M-k>", function()
|
|
||||||
require("smart-splits").move_cursor_up()
|
|
||||||
end)
|
|
||||||
vim.keymap.set("n", "<M-l>", function()
|
|
||||||
require("smart-splits").move_cursor_right()
|
|
||||||
end)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-w>h", function()
|
|
||||||
require("smart-splits").swap_buf_left()
|
|
||||||
end, { desc = "Swap buffer to the left" })
|
|
||||||
vim.keymap.set("n", "<C-w>j", function()
|
|
||||||
require("smart-splits").swap_buf_down()
|
|
||||||
end, { desc = "Swap buffer to the bottom" })
|
|
||||||
vim.keymap.set("n", "<C-w>k", function()
|
|
||||||
require("smart-splits").swap_buf_up()
|
|
||||||
end, { desc = "Swap buffer to the top" })
|
|
||||||
vim.keymap.set("n", "<C-w>l", function()
|
|
||||||
require("smart-splits").swap_buf_right()
|
|
||||||
end, { desc = "Swap buffer to the right" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<M-left>", function()
|
|
||||||
require("smart-splits").resize_left()
|
|
||||||
end, { desc = "Resize buffer to the left" })
|
|
||||||
vim.keymap.set("n", "<M-down>", function()
|
|
||||||
require("smart-splits").resize_down()
|
|
||||||
end, { desc = "Resize buffer to the bottom" })
|
|
||||||
vim.keymap.set("n", "<M-up>", function()
|
|
||||||
require("smart-splits").resize_up()
|
|
||||||
end, { desc = "Resize buffer to the top" })
|
|
||||||
vim.keymap.set("n", "<M-right>", function()
|
|
||||||
require("smart-splits").resize_right()
|
|
||||||
end, { desc = "Resize buffer to the right" })
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
-- https://github.com/folke/snacks.nvim
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"folke/snacks.nvim",
|
|
||||||
priority = 1000,
|
|
||||||
lazy = false,
|
|
||||||
--- @module "snacks"
|
|
||||||
--- @type snacks.Config
|
|
||||||
opts = {
|
|
||||||
bigfile = {
|
|
||||||
enabled = true,
|
|
||||||
---@param ctx {buf: number, ft:string}
|
|
||||||
setup = function(ctx)
|
|
||||||
-- Disable treesitter
|
|
||||||
vim.treesitter.stop(ctx.buf)
|
|
||||||
|
|
||||||
vim.schedule(function()
|
|
||||||
if vim.api.nvim_buf_is_valid(ctx.buf) then
|
|
||||||
vim.bo[ctx.buf].syntax = ctx.ft
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
indent = {
|
|
||||||
enabled = true,
|
|
||||||
indent = {
|
|
||||||
char = "¦",
|
|
||||||
},
|
|
||||||
animate = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
scope = {
|
|
||||||
char = "¦",
|
|
||||||
only_current = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>bd",
|
|
||||||
function()
|
|
||||||
Snacks.bufdelete.delete()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
desc = "Buffer delete",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>bD",
|
|
||||||
function()
|
|
||||||
Snacks.bufdelete.other()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
desc = "Buffer delete others",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
|
||||||
opts = function(_, opts)
|
|
||||||
local function on_move(data)
|
|
||||||
Snacks.rename.on_rename_file(data.source, data.destination)
|
|
||||||
end
|
|
||||||
local events = require("neo-tree.events")
|
|
||||||
opts.event_handlers = opts.event_handlers or {}
|
|
||||||
vim.list_extend(opts.event_handlers, {
|
|
||||||
{ event = events.FILE_MOVED, handler = on_move },
|
|
||||||
{ event = events.FILE_RENAMED, handler = on_move },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,6 @@
|
|||||||
-- https://github.com/kylechui/nvim-surround
|
-- https://github.com/kylechui/nvim-surround
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
--- @module "nvim-surround"
|
config = true,
|
||||||
--- @type user_options
|
|
||||||
opts = {
|
|
||||||
move_cursor = "sticky",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
15
nvim/dot-config/nvim/lua/plugins/symbols-outline.lua
Normal file
15
nvim/dot-config/nvim/lua/plugins/symbols-outline.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
-- https://github.com/simrat39/symbols-outline.nvim
|
||||||
|
return {
|
||||||
|
enabled = false,
|
||||||
|
"simrat39/symbols-outline.nvim",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<F5>",
|
||||||
|
function()
|
||||||
|
require("symbols-outline").toggle_outline()
|
||||||
|
end,
|
||||||
|
desc = "Toggle symbols outline",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
@@ -1,17 +1,22 @@
|
|||||||
-- https://github.com/nvim-telescope/telescope.nvim
|
-- https://github.com/nvim-telescope/telescope.nvim
|
||||||
local window = require("symbols.window")
|
local window = require("symbols.window")
|
||||||
--- @module "lazy"
|
-- TODO: Ensure installed ripgrep
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
cmd = { "Telescope" },
|
|
||||||
lazy = false,
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope-ui-select.nvim",
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
build = "make",
|
||||||
|
cond = function()
|
||||||
|
return vim.fn.executable("make") == 1
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
opts = function()
|
},
|
||||||
return {
|
config = function()
|
||||||
|
require("telescope").setup({
|
||||||
|
|
||||||
pickers = {
|
pickers = {
|
||||||
find_files = {
|
find_files = {
|
||||||
hidden = true,
|
hidden = true,
|
||||||
@@ -37,60 +42,8 @@ return {
|
|||||||
["ui-select"] = {
|
["ui-select"] = {
|
||||||
require("telescope.themes").get_dropdown(),
|
require("telescope.themes").get_dropdown(),
|
||||||
},
|
},
|
||||||
smart_open = {
|
|
||||||
match_algorithm = "fzf",
|
|
||||||
},
|
},
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
init = function()
|
|
||||||
vim.keymap.set("n", "<leader>.", function()
|
|
||||||
require("telescope.builtin").oldfiles()
|
|
||||||
end, { desc = "Find recently opened files" })
|
|
||||||
vim.keymap.set("n", "<leader>sb", function()
|
|
||||||
require("telescope.builtin").buffers()
|
|
||||||
end, { desc = "Buffers" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>/", function()
|
|
||||||
require("telescope.builtin").current_buffer_fuzzy_find({
|
|
||||||
-- Show matches in the order they appear in the document
|
|
||||||
sorting_strategy = "ascending",
|
|
||||||
})
|
})
|
||||||
end, { desc = "Fuzzily search in current buffer" })
|
|
||||||
vim.keymap.set("n", "<leader>s/", function()
|
|
||||||
require("telescope.builtin").live_grep({
|
|
||||||
grep_open_files = true,
|
|
||||||
prompt_title = "Live Grep in Open Files",
|
|
||||||
})
|
|
||||||
end, { desc = "Grep in open files" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader><space>", function()
|
|
||||||
require("telescope").extensions.smart_open.smart_open()
|
|
||||||
end, { desc = "Find files" })
|
|
||||||
vim.keymap.set("n", "<leader>sh", function()
|
|
||||||
require("telescope.builtin").help_tags()
|
|
||||||
end, { desc = "Help" })
|
|
||||||
vim.keymap.set("n", "<leader>sw", function()
|
|
||||||
require("telescope.builtin").grep_string({
|
|
||||||
-- Show matches in the order they appear in the document
|
|
||||||
sorting_strategy = "ascending",
|
|
||||||
})
|
|
||||||
end, { desc = "Current word" })
|
|
||||||
vim.keymap.set("n", "<leader>sg", function()
|
|
||||||
require("telescope.builtin").live_grep()
|
|
||||||
end, { desc = "Grep" })
|
|
||||||
vim.keymap.set("n", "<leader>sd", function()
|
|
||||||
require("telescope.builtin").diagnostics()
|
|
||||||
end, { desc = "Diagnostics" })
|
|
||||||
vim.keymap.set("n", "<leader>sr", function()
|
|
||||||
require("telescope.builtin").resume()
|
|
||||||
end, { desc = "Resume" })
|
|
||||||
vim.keymap.set("n", "<leader>sk", function()
|
|
||||||
require("telescope.builtin").keymaps()
|
|
||||||
end, { desc = "Keymaps" })
|
|
||||||
vim.keymap.set("n", "<leader>sn", function()
|
|
||||||
require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") })
|
|
||||||
end, { desc = "Neovim files" })
|
|
||||||
|
|
||||||
-- HACK: Workaround until new borders are fixed in telescope
|
-- HACK: Workaround until new borders are fixed in telescope
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
@@ -105,45 +58,40 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope-ui-select.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("ui-select")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
build = "make",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("fzf")
|
|
||||||
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 }
|
require("telescope").load_extension("fzf")
|
||||||
|
require("telescope").load_extension("ui-select")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>.", require("telescope.builtin").oldfiles, { desc = "Find recently opened files" })
|
||||||
|
vim.keymap.set("n", "<leader>sb", require("telescope.builtin").buffers, { desc = "Buffers" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>/", function()
|
||||||
|
require("telescope.builtin").current_buffer_fuzzy_find({
|
||||||
|
-- Show matches in the order they appear in the document
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
})
|
||||||
|
end, { desc = "Fuzzily search in current buffer" })
|
||||||
|
vim.keymap.set("n", "<leader>s/", function()
|
||||||
|
require("telescope.builtin").live_grep({
|
||||||
|
grep_open_files = true,
|
||||||
|
prompt_title = "Live Grep in Open Files",
|
||||||
|
})
|
||||||
|
end, { desc = "Grep in open files" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader><space>", require("telescope.builtin").find_files, { desc = "Find files" })
|
||||||
|
vim.keymap.set("n", "<leader>sh", require("telescope.builtin").help_tags, { desc = "Help" })
|
||||||
|
vim.keymap.set("n", "<leader>sw", function()
|
||||||
|
require("telescope.builtin").grep_string({
|
||||||
|
-- Show matches in the order they appear in the document
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
})
|
||||||
|
end, { desc = "Current word" })
|
||||||
|
vim.keymap.set("n", "<leader>sg", require("telescope.builtin").live_grep, { desc = "Grep" })
|
||||||
|
vim.keymap.set("n", "<leader>sd", require("telescope.builtin").diagnostics, { desc = "Diagnostics" })
|
||||||
|
vim.keymap.set("n", "<leader>sr", require("telescope.builtin").resume, { desc = "Resume" })
|
||||||
|
vim.keymap.set("n", "<leader>sk", require("telescope.builtin").keymaps, { desc = "Keymaps" })
|
||||||
|
vim.keymap.set("n", "<leader>sn", function()
|
||||||
|
require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") })
|
||||||
|
end, { desc = "Neovim files" })
|
||||||
end,
|
end,
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,32 @@
|
|||||||
-- https://github.com/folke/todo-comments.nvim
|
-- https://github.com/folke/todo-comments.nvim
|
||||||
local diagnostic = require("symbols.diagnostic")
|
local diagnostic = require("symbols.diagnostic")
|
||||||
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"folke/todo-comments.nvim",
|
-- 'folke/todo-comments.nvim',
|
||||||
|
-- NOTE: This fork highlights the entire matched word, not just the keyword.
|
||||||
|
"doongjohn/todo-comments.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
event = "VeryLazy",
|
config = function()
|
||||||
opts = {
|
vim.keymap.set("n", "]t", function()
|
||||||
signs = false,
|
require("todo-comments").jump_next()
|
||||||
|
end, { desc = "Next todo comment" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "[t", function()
|
||||||
|
require("todo-comments").jump_prev()
|
||||||
|
end, { desc = "Previous todo comment" })
|
||||||
|
|
||||||
|
if pcall(require, "trouble") then
|
||||||
|
-- TODO: Use cwd to only show todo's in the current file
|
||||||
|
-- vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo cwd=%<cr>", { desc = "Next todo comment" })
|
||||||
|
vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo<cr>", { desc = "Next todo comment" })
|
||||||
|
end
|
||||||
|
if pcall(require, "telescope") then
|
||||||
|
vim.keymap.set("n", "<leader>st", "<cmd>TodoTelescope<cr>", { desc = "Search todo" })
|
||||||
|
end
|
||||||
|
|
||||||
|
require("todo-comments").setup({
|
||||||
keywords = {
|
keywords = {
|
||||||
-- FIX: Fix
|
-- FIX: Fix
|
||||||
FIX = { icon = diagnostic.bug },
|
FIX = { icon = diagnostic.bug },
|
||||||
@@ -44,22 +60,6 @@ return {
|
|||||||
test = { "TodoCommentTest" },
|
test = { "TodoCommentTest" },
|
||||||
default = { "TodoCommentDefault" },
|
default = { "TodoCommentDefault" },
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
init = function()
|
|
||||||
vim.keymap.set("n", "]t", function()
|
|
||||||
require("todo-comments").jump_next()
|
|
||||||
end, { desc = "Next todo comment" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "[t", function()
|
|
||||||
require("todo-comments").jump_prev()
|
|
||||||
end, { desc = "Previous todo comment" })
|
|
||||||
|
|
||||||
-- -- TODO: Use cwd to only show todo's in the current file
|
|
||||||
-- -- vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo cwd=%<cr>", { desc = "Next todo comment" })
|
|
||||||
-- vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo<cr>", { desc = "Next todo comment" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>st", function()
|
|
||||||
require("telescope").extensions["todo-comments"].todo()
|
|
||||||
end, { desc = "Search todo" })
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
-- https://github.com/nvim-treesitter/nvim-treesitter
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
|
-- Highlight, edit, and navigate code
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "master" },
|
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "master" },
|
||||||
@@ -12,34 +10,8 @@ return {
|
|||||||
branch = "master",
|
branch = "master",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
main = "nvim-treesitter.configs",
|
main = "nvim-treesitter.configs",
|
||||||
init = function()
|
|
||||||
vim.wo.foldmethod = "expr"
|
|
||||||
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
|
||||||
end,
|
|
||||||
--- @module "nvim-treesitter"
|
|
||||||
--- @type TSConfig
|
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = require("tools.highlight"),
|
||||||
"c",
|
|
||||||
"cpp",
|
|
||||||
"go",
|
|
||||||
"lua",
|
|
||||||
"python",
|
|
||||||
"rust",
|
|
||||||
"tsx",
|
|
||||||
"typescript",
|
|
||||||
"vimdoc",
|
|
||||||
"vim",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"bash",
|
|
||||||
"sql",
|
|
||||||
"xml",
|
|
||||||
"cmake",
|
|
||||||
"json",
|
|
||||||
"yaml",
|
|
||||||
},
|
|
||||||
auto_install = true,
|
|
||||||
|
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
-- https://github.com/folke/trouble.nvim
|
-- https://github.com/folke/trouble.nvim
|
||||||
local fold = require("symbols.fold")
|
local fold = require("symbols.fold")
|
||||||
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
cmd = { "Trouble", "TroubleToggle" },
|
cmd = { "Trouble", "TroubleToggle" },
|
||||||
keys = {
|
keys = {
|
||||||
{ "<F3>", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Goto previous buffer" },
|
{ "<F3>", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Goto previous buffer" },
|
||||||
},
|
},
|
||||||
--- @module "trouble"
|
config = function()
|
||||||
--- @type trouble.Config
|
require("trouble").setup({
|
||||||
opts = {
|
|
||||||
icons = false,
|
icons = false,
|
||||||
auto_close = true,
|
auto_close = true,
|
||||||
fold_open = fold.open, -- icon used for open folds
|
fold_open = fold.open, -- icon used for open folds
|
||||||
fold_closed = fold.close, -- icon used for closed folds
|
fold_closed = fold.close, -- icon used for closed folds
|
||||||
use_diagnostic_signs = true,
|
use_diagnostic_signs = true,
|
||||||
},
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
-- https://github.com/mbbill/undotree
|
-- https://github.com/mbbill/undotree
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
"mbbill/undotree",
|
'mbbill/undotree',
|
||||||
keys = {
|
keys = {
|
||||||
{ "<F6>", vim.cmd.UndotreeToggle, desc = "Toggle undotree" },
|
{ '<F6>', vim.cmd.UndotreeToggle, desc = 'Toggle undotree' },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
-- https://github.com/folke/which-key.nvim
|
-- https://github.com/folke/which-key.nvim
|
||||||
local window = require("symbols.window")
|
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
return {
|
return {
|
||||||
-- "folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
"cameronr/which-key.nvim",
|
|
||||||
branch = "winborder-support",
|
|
||||||
event = "VeryLazy",
|
|
||||||
--- @module "which-key"
|
|
||||||
--- @type wk.Opts
|
|
||||||
opts = {
|
opts = {
|
||||||
preset = "modern",
|
preset = "modern",
|
||||||
delay = function(ctx)
|
delay = function(ctx)
|
||||||
return ctx.plugin and 0 or 500
|
return ctx.plugin and 0 or 500
|
||||||
end,
|
end,
|
||||||
win = {
|
win = {
|
||||||
border = window.border,
|
border = "single",
|
||||||
padding = { 1, 1 },
|
padding = { 1, 1 },
|
||||||
title = false,
|
title = false,
|
||||||
},
|
},
|
||||||
@@ -51,13 +43,16 @@ return {
|
|||||||
},
|
},
|
||||||
expand = 1,
|
expand = 1,
|
||||||
sort = { "alphanum" },
|
sort = { "alphanum" },
|
||||||
spec = {
|
},
|
||||||
|
init = function()
|
||||||
|
-- TODO: Only make a category show up if there actually are any keybinds under it
|
||||||
|
require("which-key").add({
|
||||||
{ "<leader>b", group = "Buffer" },
|
{ "<leader>b", group = "Buffer" },
|
||||||
{ "<leader>d", group = "Doument" },
|
{ "<leader>d", group = "Doument" },
|
||||||
{ "<leader>g", group = "Git" },
|
{ "<leader>g", group = "Git" },
|
||||||
{ "<leader>t", group = "Toggle" },
|
{ "<leader>t", group = "Toggle" },
|
||||||
{ "<leader>s", group = "Search" },
|
{ "<leader>s", group = "Search" },
|
||||||
{ "gr", group = "LSP" },
|
{ "gr", group = "LSP" },
|
||||||
},
|
})
|
||||||
},
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
19
nvim/dot-config/nvim/lua/plugins/whitespace.lua
Normal file
19
nvim/dot-config/nvim/lua/plugins/whitespace.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
enabled = false,
|
||||||
|
"johnfrankmorgan/whitespace.nvim",
|
||||||
|
config = function()
|
||||||
|
require("whitespace-nvim").setup({
|
||||||
|
-- configuration options and their defaults
|
||||||
|
|
||||||
|
-- `highlight` configures which highlight is used to display
|
||||||
|
-- trailing whitespace
|
||||||
|
highlight = "CursorLine",
|
||||||
|
-- `ignored_filetypes` configures which filetypes to ignore when
|
||||||
|
-- displaying trailing whitespace
|
||||||
|
ignored_filetypes = { "TelescopePrompt", "Trouble", "help" },
|
||||||
|
})
|
||||||
|
|
||||||
|
-- remove trailing whitespace with a keybinding
|
||||||
|
vim.keymap.set("n", "<Leader>t", require("whitespace-nvim").trim, { desc = "Remove trailing whitespace" })
|
||||||
|
end,
|
||||||
|
}
|
||||||
19
nvim/dot-config/nvim/lua/plugins/yaml-companion.lua
Normal file
19
nvim/dot-config/nvim/lua/plugins/yaml-companion.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
"someone-stole-my-name/yaml-companion.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
"diogo464/kubernetes.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("telescope").load_extension("yaml_schema")
|
||||||
|
|
||||||
|
vim.lsp.config("yamlls", require("yaml-companion").setup({
|
||||||
|
builtin_matchers = {
|
||||||
|
kubernetes = { enabled = false },
|
||||||
|
kubernetes_custom = { enabled = true },
|
||||||
|
},
|
||||||
|
}))
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,19 +1,11 @@
|
|||||||
-- https://github.com/ellisonleao/gruvbox.nvim
|
-- https://github.com/ellisonleao/gruvbox.nvim
|
||||||
--- @module "lazy"
|
|
||||||
--- @type LazySpec
|
|
||||||
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,
|
||||||
@@ -81,8 +73,10 @@ return {
|
|||||||
DiagnosticNumWarn = { fg = palette.dark0, bg = palette.bright_yellow, bold = true },
|
DiagnosticNumWarn = { fg = palette.dark0, bg = palette.bright_yellow, bold = true },
|
||||||
DiagnosticNumHint = { fg = palette.dark0, bg = palette.bright_aqua, bold = true },
|
DiagnosticNumHint = { fg = palette.dark0, bg = palette.bright_aqua, bold = true },
|
||||||
DiagnosticNumInfo = { fg = palette.dark0, bg = palette.bright_blue, bold = true },
|
DiagnosticNumInfo = { fg = palette.dark0, bg = palette.bright_blue, bold = true },
|
||||||
SnacksIndentScope = { fg = palette.light4 },
|
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
|
|
||||||
|
-- Load the colorscheme
|
||||||
|
vim.cmd.colorscheme("gruvbox")
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
19
nvim/dot-config/nvim/lua/tools/format.lua
Normal file
19
nvim/dot-config/nvim/lua/tools/format.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
c = { "clang-format" },
|
||||||
|
cpp = { "clang-format" },
|
||||||
|
go = { "goimports", "gofmt" },
|
||||||
|
python = { "ruff_organize_imports", "ruff_format" },
|
||||||
|
rust = { { "rustfmt", system = true } },
|
||||||
|
javascript = { "prettierd" },
|
||||||
|
javascriptreact = { "prettierd" },
|
||||||
|
typescript = { "prettierd" },
|
||||||
|
typescriptreact = { "prettierd" },
|
||||||
|
css = { "prettierd" },
|
||||||
|
markdown = { "prettierd" },
|
||||||
|
yaml = { "prettierd" },
|
||||||
|
lua = { "stylua" },
|
||||||
|
json = { "jq" },
|
||||||
|
toml = { "taplo" },
|
||||||
|
-- ["*"] = { "injected" },
|
||||||
|
["_"] = { "trim_whitespace", "trim_newlines" },
|
||||||
|
}
|
||||||
16
nvim/dot-config/nvim/lua/tools/highlight.lua
Normal file
16
nvim/dot-config/nvim/lua/tools/highlight.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
"c",
|
||||||
|
"cpp",
|
||||||
|
"go",
|
||||||
|
"lua",
|
||||||
|
"python",
|
||||||
|
"rust",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vimdoc",
|
||||||
|
"vim",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"bash",
|
||||||
|
"sql",
|
||||||
|
}
|
||||||
45
nvim/dot-config/nvim/lua/tools/lsp.lua
Normal file
45
nvim/dot-config/nvim/lua/tools/lsp.lua
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"rust_analyzer",
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
check = {
|
||||||
|
command = "clippy",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
system = "rust-analyzer",
|
||||||
|
},
|
||||||
|
{ "typos_lsp", {
|
||||||
|
init_options = {
|
||||||
|
diagnosticSeverity = "Hint",
|
||||||
|
},
|
||||||
|
} },
|
||||||
|
{ "clangd", {
|
||||||
|
cmd = { "clangd", "--offset-encoding=utf-16", "--clang-tidy" },
|
||||||
|
} },
|
||||||
|
"basedpyright",
|
||||||
|
{
|
||||||
|
"lua_ls",
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
workspace = { checkThirdParty = false },
|
||||||
|
telemetry = { enable = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gopls",
|
||||||
|
condition = function()
|
||||||
|
return vim.fn.executable("go") > 0
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
"jsonls",
|
||||||
|
"yamlls",
|
||||||
|
"taplo",
|
||||||
|
"neocmake",
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local api = vim.api
|
||||||
|
local uri = require("kubernetes").yamlls_schema()
|
||||||
|
|
||||||
|
local schema = {
|
||||||
|
name = "Kubernetes",
|
||||||
|
uri = uri,
|
||||||
|
}
|
||||||
|
|
||||||
|
M.match = function(bufnr)
|
||||||
|
local lines = 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 schema
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
M.handles = function()
|
||||||
|
return { schema }
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -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/fast-syntax-highlighting deleted from 3d574ccf48
Submodule zsh/custom/plugins/zsh-autosuggestions updated: 85919cd1ff...0e810e5afa
Submodule zsh/custom/plugins/zsh-completions deleted from b48b5de9d8
Submodule zsh/custom/plugins/zsh-vi-mode deleted from 08bd1c0452
101
zsh/dot-zshrc
101
zsh/dot-zshrc
@@ -15,19 +15,18 @@ zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
|||||||
# 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=(
|
||||||
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
|
|
||||||
)
|
)
|
||||||
|
|
||||||
bindkey -M vicmd "k" up-line-or-beginning-search
|
bindkey -M vicmd "k" up-line-or-beginning-search
|
||||||
@@ -37,35 +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
|
||||||
autoload -U compinit && compinit
|
ZSH_TMUX_FIXTERM=true
|
||||||
source "$ZSH/oh-my-zsh.sh"
|
|
||||||
|
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
|
||||||
@@ -73,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 ..
|
||||||
@@ -105,54 +74,10 @@ if (( $+commands[devcontainer] )); then
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PNPM_HOME="/home/tim/.local/share/pnpm"
|
if hash pnpm 2>/dev/null; then
|
||||||
if [ -d "$PNPM_HOME" ]; then
|
export PNPM_HOME="/home/tim/.local/share/pnpm"
|
||||||
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
|
|
||||||
source <(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+=('source <(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
|
||||||
|
|||||||
Submodule zsh/ohmyzsh updated: 8df5c1b18b...6ef47526f8
Reference in New Issue
Block a user