Compare commits
56 Commits
90fb7736cf
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d84bc8062e | |||
| 4e3d0500b9 | |||
|
38f4c63336
|
|||
|
434ff26226
|
|||
|
af95197cb1
|
|||
|
c2772d1874
|
|||
|
dd22699549
|
|||
|
b35b35731b
|
|||
|
881f99ef16
|
|||
|
0117cc612e
|
|||
|
1d3ae136be
|
|||
|
362064b206
|
|||
|
c84b6b6584
|
|||
|
9108f57780
|
|||
|
e4d4be54c6
|
|||
|
54b1090984
|
|||
|
43b0059631
|
|||
|
5c64115e5d
|
|||
|
af1ddc5b3f
|
|||
|
c2f57e070c
|
|||
|
374825559b
|
|||
|
d8cf7121ef
|
|||
|
1176535475
|
|||
|
25b3a169a2
|
|||
|
254bfd4be2
|
|||
|
ba282e656d
|
|||
|
e10de143eb
|
|||
|
e22f0c594c
|
|||
|
b22739cb71
|
|||
|
a9163907be
|
|||
|
59b2334253
|
|||
|
17a23eb7e4
|
|||
|
9a76b5071e
|
|||
|
02d298a163
|
|||
|
87359588e0
|
|||
|
98aa0593c9
|
|||
|
f96eb0e234
|
|||
|
026e3f9fc2
|
|||
|
b15b68fa5d
|
|||
|
c906025f68
|
|||
|
c1b73e5822
|
|||
|
a60d4a8246
|
|||
| d59b067075 | |||
| 4daa29ada3 | |||
| a041084bef | |||
| 5b97d37ed3 | |||
| 35803b0b03 | |||
| f7cc6a8c51 | |||
| 5d16b49967 | |||
| f19466063a | |||
|
2f1c1460a6
|
|||
|
27d2c14665
|
|||
|
73d4fbbbfb
|
|||
|
c146ff0f95
|
|||
|
d755aa90f5
|
|||
|
7be1fa7a21
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -10,3 +10,9 @@
|
||||
[submodule "zsh/custom/plugins/zsh-autopair"]
|
||||
path = zsh/custom/plugins/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
|
||||
|
||||
20
README.md
Normal file
20
README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
## Tools
|
||||
|
||||
### Core tools
|
||||
|
||||
```
|
||||
bat
|
||||
fd
|
||||
fzf
|
||||
git-delta
|
||||
paru
|
||||
rg
|
||||
zoxide
|
||||
```
|
||||
|
||||
### Useful
|
||||
|
||||
```
|
||||
jq
|
||||
git-cliff
|
||||
```
|
||||
1
git-alten/dot-local
Symbolic link
1
git-alten/dot-local
Symbolic link
@@ -0,0 +1 @@
|
||||
../git/dot-local
|
||||
@@ -24,4 +24,9 @@
|
||||
tool = nvimdiff
|
||||
|
||||
[init]
|
||||
defaultBranch = master
|
||||
defaultBranch = main
|
||||
|
||||
[rebase]
|
||||
autosquash = true
|
||||
autostash = true
|
||||
updateRefs = true
|
||||
|
||||
19
git/dot-local/bin/git-fixup
Executable file
19
git/dot-local/bin/git-fixup
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/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^
|
||||
24
helpers/legacy_ubuntu_nvim.sh
Executable file
24
helpers/legacy_ubuntu_nvim.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# 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
|
||||
|
||||
# Remove include paths from copied host gitconfig
|
||||
sed -i '/path = /d' ~/.gitconfig
|
||||
@@ -1,49 +1,51 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"actions-preview.nvim": { "branch": "master", "commit": "36513ad213855d497b7dd3391a24d1d75d58e36f" },
|
||||
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
|
||||
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" },
|
||||
"bufresize.nvim": { "branch": "master", "commit": "3b19527ab936d6910484dcc20fb59bdb12322d8b" },
|
||||
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
|
||||
"crates.nvim": { "branch": "main", "commit": "afcd1cc3eeceb5783676fc8464389b9216a29d05" },
|
||||
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "8bdaccdb897945a3c99c1ad8df94db0ddf5c8790" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "00e38a379bab3389e187b3953566d67d494dfddd" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "2eaff20526ff6101337b84f4b0d238c11f47d7f4" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "8ae25b35ae16ca4bd5de3d3c472eec3b574018d4" },
|
||||
"kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "67da97f8c2fd12d05427bb485ce07ee6418e0a51" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
|
||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
|
||||
"nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "7f9a39fcd2ac6e979001f857727d606888f5909c" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "51cf7c995ed1eb6642aecf19067ee634fa1b6ba2" },
|
||||
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "03bc581e05e81d33808b42b2d7e76d70adb3b595" },
|
||||
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ac98db2f9f06a56498ec890a96928774eae412c3" },
|
||||
"nvim-surround": { "branch": "main", "commit": "a868c256c861044beb9794b4dd126480dcdfbdad" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
||||
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"ros-nvim": { "branch": "main", "commit": "f0e16eebe68546025784593fa2355ca6749014a0" },
|
||||
"schema-companion.nvim": { "branch": "main", "commit": "7d662b6c1497fdd82e3e8836eb122f5c4b0d8277" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "59d6bfa8c109675065f68a81664c17557cc19a9c" },
|
||||
"scrollEOF.nvim": { "branch": "master", "commit": "2575109749b4bf3a0bf979a17947b3c1e8c5137e" },
|
||||
"smart-open.nvim": { "branch": "0.2.x", "commit": "560d8f16e17977c8303db6f9660db58a4415ca41" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "5aa2dd82d56cde2f01aef4e902c961e2f7a5453e" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"ros-nvim": { "branch": "main", "commit": "1ad64cd3a1e144dfea67890845f9da2e82d96900" },
|
||||
"schema-companion.nvim": { "branch": "main", "commit": "e94f5f8439705d772363817c9d2c6c9fc7562bd0" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "d522e3ed6ed2c7bed7ebe1e42615e79b3aabfe65" },
|
||||
"scrollEOF.nvim": { "branch": "master", "commit": "aeedfad14e4a0cfa31b44b531c1ad8fd4696b551" },
|
||||
"smart-open.nvim": { "branch": "0.3.x", "commit": "e7f27218bd43de5262d3e8e3e84a135737ca6942" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "51e400b0bb6cbfd48e56d1baca250f34028cf1d3" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "b24b97c538b71b6de0ce9d84e47df27b6ecafd76" },
|
||||
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "74163ac321c7d208a5bb9cdf8964114c7064d6c7" },
|
||||
"undotree": { "branch": "master", "commit": "fe9a9d0645f0f5532360b5e5f5c550d7bb4f1869" },
|
||||
"which-key.nvim": { "branch": "winborder-support", "commit": "ab1a3b0d3005a95507ba6c18b96531d430370885" }
|
||||
}
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
return {
|
||||
settings = {
|
||||
json = {
|
||||
validate = { enable = true },
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
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,8 +1,23 @@
|
||||
return {
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
"./definitions",
|
||||
},
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
type = {
|
||||
checkTableShape = true,
|
||||
},
|
||||
diagnostics = {
|
||||
neededFileStatus = {
|
||||
-- ["no-unknown"] = "Opened",
|
||||
-- ["incomplete-signature-doc"] = "Opened",
|
||||
-- ["await-in-sync"] = "Opened",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
9
nvim/dot-config/nvim/lsp/taplo.lua
Normal file
9
nvim/dot-config/nvim/lsp/taplo.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
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 +1,10 @@
|
||||
return require("schema-companion").setup_client({
|
||||
settings = {
|
||||
yaml = {},
|
||||
},
|
||||
})
|
||||
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(),
|
||||
},
|
||||
}),
|
||||
{}
|
||||
)
|
||||
|
||||
@@ -15,3 +15,16 @@ vim.keymap.set("n", "N", "Nzz")
|
||||
|
||||
-- Clear search highlight by pressing esc
|
||||
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,
|
||||
})
|
||||
|
||||
@@ -148,7 +148,10 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
||||
end,
|
||||
})
|
||||
|
||||
-- Manually enable rust analyzer, if installed
|
||||
-- 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
|
||||
|
||||
57
nvim/dot-config/nvim/lua/matchers/kubernetes.lua
Normal file
57
nvim/dot-config/nvim/lua/matchers/kubernetes.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
---@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
|
||||
7
nvim/dot-config/nvim/lua/plugins/bufresize.lua
Normal file
7
nvim/dot-config/nvim/lua/plugins/bufresize.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- https://github.com/kwkarlwang/bufresize.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"kwkarlwang/bufresize.nvim",
|
||||
opts = {},
|
||||
}
|
||||
@@ -5,15 +5,15 @@ local formatters_by_ft = {
|
||||
go = { "goimports" },
|
||||
python = { "ruff_organize_imports", "ruff_format" },
|
||||
rust = { "rustfmt" },
|
||||
javascript = { "prettierd" },
|
||||
javascriptreact = { "prettierd" },
|
||||
typescript = { "prettierd" },
|
||||
typescriptreact = { "prettierd" },
|
||||
css = { "prettierd" },
|
||||
markdown = { "prettierd" },
|
||||
yaml = { "prettierd" },
|
||||
javascript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
css = { "prettier" },
|
||||
markdown = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
lua = { "stylua" },
|
||||
json = { "jq" },
|
||||
json = { "prettier" },
|
||||
toml = { "taplo" },
|
||||
-- ["*"] = { "injected" },
|
||||
["_"] = { "trim_whitespace", "trim_newlines" },
|
||||
|
||||
21
nvim/dot-config/nvim/lua/plugins/crates.lua
Normal file
21
nvim/dot-config/nvim/lua/plugins/crates.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
-- 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,15 +1,15 @@
|
||||
-- https://github.com/nvim-lualine/lualine.nvim
|
||||
|
||||
local function get_schema()
|
||||
if vim.bo.filetype ~= "yaml" then
|
||||
if not (vim.bo.filetype == "yaml" or vim.bo.filetype == "json" or vim.bo.filetype == "toml") then
|
||||
return ""
|
||||
end
|
||||
|
||||
local schema = require("schema-companion.context").get_buffer_schema()
|
||||
if schema.name == "none" then
|
||||
local schema = (require("schema-companion").get_current_schemas() or "none")
|
||||
if schema == "none" then
|
||||
return ""
|
||||
end
|
||||
return schema.name
|
||||
return schema
|
||||
end
|
||||
|
||||
--- @module "lazy"
|
||||
@@ -43,7 +43,9 @@ return {
|
||||
"encoding",
|
||||
{ "fileformat", icons_enabled = false },
|
||||
"filetype",
|
||||
get_schema,
|
||||
{
|
||||
get_schema,
|
||||
},
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
|
||||
@@ -24,9 +24,9 @@ local ensure_installed = {
|
||||
end,
|
||||
},
|
||||
"ruff",
|
||||
"prettierd",
|
||||
"prettier",
|
||||
"stylua",
|
||||
"jq",
|
||||
"eslint",
|
||||
}
|
||||
|
||||
--- @module "lazy"
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
-- "tadachs/ros-nvim",
|
||||
"DreadedX/ros-nvim",
|
||||
"tadachs/ros-nvim",
|
||||
event = { "BufRead", "BufNewFile" },
|
||||
opts = {
|
||||
commands = {
|
||||
|
||||
@@ -1,33 +1,6 @@
|
||||
-- https://github.com/cenk1cenk2/schema-companion.nvim
|
||||
--- @module "schema-companion"
|
||||
--- @type schema_companion.Matcher
|
||||
local kubernetes = {
|
||||
name = "Kubernetes",
|
||||
match = function(bufnr)
|
||||
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
|
||||
local kind = false
|
||||
local api_version = false
|
||||
|
||||
for _, line in ipairs(lines) do
|
||||
if kind or vim.regex("^kind: .*$"):match_str(line) then
|
||||
kind = true
|
||||
end
|
||||
|
||||
if api_version or vim.regex("^apiVersion: .*$"):match_str(line) then
|
||||
api_version = true
|
||||
end
|
||||
|
||||
if kind and api_version then
|
||||
return {
|
||||
name = "Kubernetes",
|
||||
uri = require("kubernetes").yamlls_schema(),
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end,
|
||||
}
|
||||
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
@@ -35,14 +8,13 @@ return {
|
||||
"cenk1cenk2/schema-companion.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"diogo464/kubernetes.nvim",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>ys",
|
||||
function()
|
||||
require("telescope").extensions.schema_companion.select_schema()
|
||||
require("schema-companion").select_schema()
|
||||
end,
|
||||
desc = "Yaml schema",
|
||||
ft = "yaml",
|
||||
@@ -50,11 +22,5 @@ return {
|
||||
},
|
||||
--- @module "schema-companion"
|
||||
--- @type schema_companion.Config
|
||||
opts = {
|
||||
enable_telescope = true,
|
||||
matchers = {
|
||||
kubernetes,
|
||||
},
|
||||
schemas = {},
|
||||
},
|
||||
opts = {},
|
||||
}
|
||||
|
||||
@@ -37,6 +37,9 @@ return {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown(),
|
||||
},
|
||||
smart_open = {
|
||||
match_algorithm = "fzf",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
@@ -114,24 +117,25 @@ return {
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-fzy-native.nvim",
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("fzy_native")
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"danielfalk/smart-open.nvim",
|
||||
branch = "0.2.x",
|
||||
branch = "0.3.x",
|
||||
config = function()
|
||||
require("telescope").load_extension("smart_open")
|
||||
end,
|
||||
dependencies = {
|
||||
"kkharji/sqlite.lua",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-telescope/telescope-fzy-native.nvim",
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
opts = function(_, opts)
|
||||
|
||||
@@ -34,7 +34,12 @@ return {
|
||||
"markdown_inline",
|
||||
"bash",
|
||||
"sql",
|
||||
"xml",
|
||||
"cmake",
|
||||
"json",
|
||||
"yaml",
|
||||
},
|
||||
auto_install = true,
|
||||
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
|
||||
@@ -3,7 +3,9 @@ local window = require("symbols.window")
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
-- "folke/which-key.nvim",
|
||||
"cameronr/which-key.nvim",
|
||||
branch = "winborder-support",
|
||||
event = "VeryLazy",
|
||||
--- @module "which-key"
|
||||
--- @type wk.Opts
|
||||
|
||||
1
sesh/.stow-local-ignore
Normal file
1
sesh/.stow-local-ignore
Normal file
@@ -0,0 +1 @@
|
||||
setup
|
||||
25
sesh/dot-config/sesh/sesh.toml
Normal file
25
sesh/dot-config/sesh/sesh.toml
Normal file
@@ -0,0 +1,25 @@
|
||||
# Hide all scratch sessions
|
||||
blacklist = ["scratch-*"]
|
||||
|
||||
# Scratch sessions rename themselves to something unique and are hidden from the overview
|
||||
[[session]]
|
||||
name = "scratch"
|
||||
startup_command = "tmux rename-session scratch-$(echo -n $(date) | sha256sum | cut -c1-4) && tmux set detach-on-destroy on && 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"
|
||||
17
sesh/dot-local/bin/sesh-select
Executable file
17
sesh/dot-local/bin/sesh-select
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/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
|
||||
15
sesh/setup/niestern_sander.sh
Executable file
15
sesh/setup/niestern_sander.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/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,12 +1,18 @@
|
||||
# Plugins
|
||||
set -g @plugin 'mrjones2014/smart-splits.nvim'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'wfxr/tmux-fzf-url'
|
||||
|
||||
# Settings
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
setw -g monitor-activity on
|
||||
setw -g automatic-rename 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
|
||||
|
||||
# Setup vi-mode with better keybindings
|
||||
# TODO: Escape does not work properly for leaving
|
||||
@@ -58,3 +64,20 @@ wg_is_keys_off="#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'TRUE' )
|
||||
source-file "$DOTFILES/tmux/gruvbox.conf"
|
||||
|
||||
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
zsh/custom/plugins/fast-syntax-highlighting
Submodule
1
zsh/custom/plugins/fast-syntax-highlighting
Submodule
Submodule zsh/custom/plugins/fast-syntax-highlighting added at 3d574ccf48
1
zsh/custom/plugins/zsh-completions
Submodule
1
zsh/custom/plugins/zsh-completions
Submodule
Submodule zsh/custom/plugins/zsh-completions added at b48b5de9d8
@@ -22,11 +22,10 @@ plugins=(
|
||||
# Disabled because the highlighting conflicts with autosuggestions
|
||||
# history-substring-search
|
||||
vi-mode
|
||||
tmux
|
||||
colored-man-pages
|
||||
command-not-found
|
||||
dirhistory
|
||||
zsh-autopair
|
||||
fast-syntax-highlighting
|
||||
)
|
||||
|
||||
bindkey -M vicmd "k" up-line-or-beginning-search
|
||||
@@ -36,16 +35,16 @@ HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="fg=yellow"
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND="fg=red"
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_TIMEOUT=3
|
||||
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
|
||||
VI_MODE_RESET_PROMPT_ON_MODE_CHANGE=true
|
||||
VI_MODE_SET_CURSOR=true
|
||||
# Might cause issues?
|
||||
KEYTIMEOUT=1
|
||||
|
||||
ZSH_TMUX_AUTOSTART=true
|
||||
ZSH_TMUX_AUTOCONNECT=false
|
||||
ZSH_TMUX_FIXTERM=true
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
||||
autoload -U compinit && compinit
|
||||
source "$ZSH/oh-my-zsh.sh"
|
||||
|
||||
less_termcap[so]="${fg_bold[black]}${bg[white]}"
|
||||
export LESS="-F -R -i --incsearch -M"
|
||||
@@ -56,19 +55,27 @@ export EDITOR=nvim
|
||||
|
||||
alias cl="clear"
|
||||
|
||||
if hash bat 2>/dev/null; then
|
||||
if (( $+commands[bat] )); then
|
||||
export BAT_THEME="gruvbox-dark"
|
||||
alias cat=bat
|
||||
fi
|
||||
|
||||
if hash devcontainer 2>/dev/null; then
|
||||
if (( $+commands[devcontainer] )); then
|
||||
dc() {
|
||||
ORIG_DIR="$PWD"
|
||||
while [[ "$PWD" != / ]] ; do
|
||||
if find "$PWD"/ -maxdepth 1 -type d -name ".devcontainer" | grep -q ".devcontainer"; then
|
||||
WORKSPACE_FOLDER="$PWD"
|
||||
builtin cd "$ORIG_DIR"
|
||||
devcontainer exec --workspace-folder "$WORKSPACE_FOLDER" $@
|
||||
|
||||
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" $@
|
||||
fi
|
||||
|
||||
return 0
|
||||
else
|
||||
builtin cd ..
|
||||
@@ -80,10 +87,67 @@ if hash devcontainer 2>/dev/null; then
|
||||
}
|
||||
fi
|
||||
|
||||
if hash pnpm 2>/dev/null; then
|
||||
export PNPM_HOME="/home/tim/.local/share/pnpm"
|
||||
export PNPM_HOME="/home/tim/.local/share/pnpm"
|
||||
if [ -d "$PNPM_HOME" ]; then
|
||||
case ":$PATH:" in
|
||||
*":$PNPM_HOME:"*) ;;
|
||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||
esac
|
||||
else
|
||||
unset PNPM_HOME
|
||||
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"'
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
export _ZO_FZF_OPTS="--tmux"
|
||||
if (( $+commands[zoxide] )); then
|
||||
eval "$(zoxide init zsh --cmd cd)"
|
||||
fi
|
||||
|
||||
# Generate missing text objects
|
||||
autoload -Uz select-bracketed select-quoted
|
||||
zle -N select-quoted
|
||||
zle -N select-bracketed
|
||||
for km in viopp visual; do
|
||||
bindkey -M $km -- '-' vi-up-line-or-history
|
||||
for c in {a,i}${(s..)^:-\'\"\`\|,./:;=+@}; do
|
||||
bindkey -M $km $c select-quoted
|
||||
done
|
||||
for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do
|
||||
bindkey -M $km $c select-bracketed
|
||||
done
|
||||
done
|
||||
|
||||
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
|
||||
|
||||
Submodule zsh/ohmyzsh updated: 6ef47526f8...8c168e2662
Reference in New Issue
Block a user