Compare commits
19 Commits
360e79aa8a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| fa3ec81cf3 | |||
| 9df3d54a4b | |||
| 2dad06edd8 | |||
| 30bcab5f3e | |||
|
49e7cf1816
|
|||
|
9a7378ef32
|
|||
|
7ed92881f1
|
|||
|
533b29e5e3
|
|||
|
daa73fbabc
|
|||
|
19933bf58d
|
|||
|
d471a8436a
|
|||
|
294210e113
|
|||
| 1f0acfed01 | |||
| c6ea3d1c8c | |||
| d3471e3dc8 | |||
| 8f11e727db | |||
|
12a16cf7f4
|
|||
|
5c7052140a
|
|||
|
eae08e98c5
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -16,3 +16,6 @@
|
||||
[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
|
||||
|
||||
11
git-aim/dot-gitconfig
Normal file
11
git-aim/dot-gitconfig
Normal file
@@ -0,0 +1,11 @@
|
||||
[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
git-aim/dot-local
Symbolic link
1
git-aim/dot-local
Symbolic link
@@ -0,0 +1 @@
|
||||
../git/dot-local
|
||||
@@ -2,3 +2,10 @@
|
||||
path = ~/.dotfiles/git/configs/common.gitconfig
|
||||
|
||||
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
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
[push]
|
||||
default = simple
|
||||
autoSetupRemote = true
|
||||
|
||||
[core]
|
||||
excludesfile = ~/.dotfiles/git/gitignore
|
||||
|
||||
@@ -5,3 +5,6 @@
|
||||
|
||||
[includeIf "gitdir:~/Projects/ALTEN/"]
|
||||
path = ~/.dotfiles/git/profiles/ALTEN.gitconfig
|
||||
|
||||
[includeIf "gitdir:~/Projects/aim-robotics/"]
|
||||
path = ~/.dotfiles/git/profiles/aim-robotics.gitconfig
|
||||
|
||||
6
git/profiles/aim-robotics.gitconfig
Normal file
6
git/profiles/aim-robotics.gitconfig
Normal file
@@ -0,0 +1,6 @@
|
||||
[user]
|
||||
name = Tim Huizinga
|
||||
email = th@aimrobotics.nl
|
||||
|
||||
[commit]
|
||||
gpgsign = false
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -euo pipefail
|
||||
|
||||
# Install additional dependencies
|
||||
sudo apt-get install fuse libfuse2 unzip ripgrep python3-venv xclip -y --no-install-recommends
|
||||
@@ -19,6 +19,3 @@ 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,51 +1,54 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"actions-preview.nvim": { "branch": "master", "commit": "36513ad213855d497b7dd3391a24d1d75d58e36f" },
|
||||
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
||||
"actions-preview.nvim": { "branch": "master", "commit": "cb938c25edaac38d362555f19244a9cb85d561e8" },
|
||||
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"bufresize.nvim": { "branch": "master", "commit": "3b19527ab936d6910484dcc20fb59bdb12322d8b" },
|
||||
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
|
||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||
"crates.nvim": { "branch": "main", "commit": "afcd1cc3eeceb5783676fc8464389b9216a29d05" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
||||
"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" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "8ae25b35ae16ca4bd5de3d3c472eec3b574018d4" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "0074b551a17338ccdcd299bd86687cc651bcb33d" },
|
||||
"kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||
"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" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"multicolumn.nvim": { "branch": "master", "commit": "a363bdfd422abf26256f343dac4df183031f8e94" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "9d6826582a3e8c84787bd7355df22a2812a1ad59" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "51cf7c995ed1eb6642aecf19067ee634fa1b6ba2" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "ef211089af881bea206c7aa3f2693a81feee7e90" },
|
||||
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ac98db2f9f06a56498ec890a96928774eae412c3" },
|
||||
"nvim-surround": { "branch": "main", "commit": "a868c256c861044beb9794b4dd126480dcdfbdad" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" },
|
||||
"nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
|
||||
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||
"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" },
|
||||
"schema-companion.nvim": { "branch": "main", "commit": "9a8cbeb9429958524331f49a4bd9c25cfbc2c208" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "27f7d753990c8d79bdefe75be0094e7e86eabf16" },
|
||||
"scrollEOF.nvim": { "branch": "master", "commit": "e462b9a07b8166c3e8011f1dcbc6bf68b67cd8d7" },
|
||||
"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": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"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": "74163ac321c7d208a5bb9cdf8964114c7064d6c7" },
|
||||
"undotree": { "branch": "master", "commit": "fe9a9d0645f0f5532360b5e5f5c550d7bb4f1869" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "72e160cb1ce8c0db2ac4315f77d97420a2f4223d" },
|
||||
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
|
||||
"which-key.nvim": { "branch": "winborder-support", "commit": "ab1a3b0d3005a95507ba6c18b96531d430370885" }
|
||||
}
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
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 = {
|
||||
@@ -5,5 +19,14 @@ return {
|
||||
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,
|
||||
}
|
||||
|
||||
@@ -75,20 +75,20 @@ local function on_attach(client, bufnr)
|
||||
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
|
||||
-- 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({
|
||||
|
||||
@@ -15,8 +15,12 @@ return {
|
||||
"!popup",
|
||||
},
|
||||
always_update = true,
|
||||
user_default_options = {
|
||||
names = false,
|
||||
options = {
|
||||
parsers = {
|
||||
names = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
412
nvim/dot-config/nvim/lua/plugins/diffview.lua
Normal file
412
nvim/dot-config/nvim/lua/plugins/diffview.lua
Normal file
@@ -0,0 +1,412 @@
|
||||
-- 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,
|
||||
}
|
||||
39
nvim/dot-config/nvim/lua/plugins/gitlab.lua
Normal file
39
nvim/dot-config/nvim/lua/plugins/gitlab.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
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>",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -5,11 +5,20 @@ local function get_schema()
|
||||
return ""
|
||||
end
|
||||
|
||||
local schema = (require("schema-companion").get_current_schemas() or "none")
|
||||
if schema == "none" then
|
||||
-- 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
|
||||
return schema
|
||||
|
||||
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
|
||||
|
||||
--- @module "lazy"
|
||||
|
||||
41
nvim/dot-config/nvim/lua/plugins/multicolumn.lua
Normal file
41
nvim/dot-config/nvim/lua/plugins/multicolumn.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
-- 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,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -14,10 +14,14 @@ return {
|
||||
{
|
||||
"<leader>ys",
|
||||
function()
|
||||
require("schema-companion").select_schema()
|
||||
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 = "Yaml schema",
|
||||
ft = "yaml",
|
||||
desc = "Select schema",
|
||||
},
|
||||
},
|
||||
--- @module "schema-companion"
|
||||
|
||||
17
nvim/dot-config/nvim/queries/yaml/injections.scm
Normal file
17
nvim/dot-config/nvim/queries/yaml/injections.scm
Normal file
@@ -0,0 +1,17 @@
|
||||
; 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)))
|
||||
@@ -14,6 +14,8 @@ 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
|
||||
# TODO: Escape does not work properly for leaving
|
||||
setw -g mode-keys vi
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
ohmyzsh
|
||||
custom
|
||||
fzf-git.sh
|
||||
|
||||
7
zsh/custom/completions/_tula
Normal file
7
zsh/custom/completions/_tula
Normal file
@@ -0,0 +1,7 @@
|
||||
#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/zsh-autosuggestions updated: 0e810e5afa...85919cd1ff
1
zsh/custom/plugins/zsh-vi-mode
Submodule
1
zsh/custom/plugins/zsh-vi-mode
Submodule
Submodule zsh/custom/plugins/zsh-vi-mode added at 08bd1c0452
@@ -15,17 +15,19 @@ zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||
# ENABLE_CORRECTION="true"
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
ZSH_DISABLE_COMPFIX="true"
|
||||
ZOXIDE_CMD_OVERRIDE="cd"
|
||||
|
||||
plugins=(
|
||||
git
|
||||
zsh-autosuggestions
|
||||
# Disabled because the highlighting conflicts with autosuggestions
|
||||
# history-substring-search
|
||||
vi-mode
|
||||
zsh-vi-mode
|
||||
colored-man-pages
|
||||
command-not-found
|
||||
zsh-autopair
|
||||
fast-syntax-highlighting
|
||||
zoxide
|
||||
)
|
||||
|
||||
bindkey -M vicmd "k" up-line-or-beginning-search
|
||||
@@ -37,11 +39,27 @@ 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?
|
||||
KEYTIMEOUT=1
|
||||
|
||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/completions
|
||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
||||
autoload -U compinit && compinit
|
||||
source "$ZSH/oh-my-zsh.sh"
|
||||
@@ -96,6 +114,9 @@ if [ -d "$PNPM_HOME" ]; then
|
||||
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'
|
||||
@@ -105,14 +126,17 @@ export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
|
||||
--color=border:#7c6f64,label:#7c6f64
|
||||
--border="sharp" --border-label-pos="0" --preview-window="border-sharp"
|
||||
--prompt="> " --marker="◆" --pointer=">" --separator="─"
|
||||
--scrollbar="│" --info="right"'
|
||||
--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
|
||||
source <(fzf --zsh)
|
||||
# Fix fzf keybind after zsh-vi-mode has loaded
|
||||
zvm_after_init_commands+=('source <(fzf --zsh)')
|
||||
|
||||
if (( $+commands[paru] )); then
|
||||
function pi {
|
||||
@@ -121,25 +145,6 @@ if (( $+commands[fzf] )); then
|
||||
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
|
||||
|
||||
Submodule zsh/ohmyzsh updated: 8c168e2662...8df5c1b18b
Reference in New Issue
Block a user