Compare commits
1 Commits
master
..
6c0c07ae5d
| Author | SHA1 | Date | |
|---|---|---|---|
|
6c0c07ae5d
|
@@ -19,9 +19,3 @@
|
||||
[submodule "zsh/custom/plugins/zsh-vi-mode"]
|
||||
path = zsh/custom/plugins/zsh-vi-mode
|
||||
url = https://github.com/jeffreytse/zsh-vi-mode
|
||||
[submodule "zsh/custom/plugins/evalcache"]
|
||||
path = zsh/custom/plugins/evalcache
|
||||
url = https://github.com/mroth/evalcache/
|
||||
[submodule "zsh/custom/plugins/zsh-defer"]
|
||||
path = zsh/custom/plugins/zsh-defer
|
||||
url = https://github.com/romkatv/zsh-defer
|
||||
|
||||
@@ -2,6 +2,3 @@
|
||||
path = ~/.dotfiles/git/configs/common.gitconfig
|
||||
|
||||
path = ~/.dotfiles/git/profiles/aim-robotics.gitconfig
|
||||
|
||||
[includeIf "gitdir:~/.dotfiles/"]
|
||||
path = ~/.dotfiles/git/profiles/Dreaded_X.gitconfig
|
||||
|
||||
@@ -2,6 +2,3 @@
|
||||
path = ~/.dotfiles/git/configs/common.gitconfig
|
||||
|
||||
path = ~/.dotfiles/git/profiles/ALTEN.gitconfig
|
||||
|
||||
[includeIf "gitdir:~/.dotfiles"]
|
||||
path = ~/.dotfiles/git/profiles/Dreaded_X.gitconfig
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[include]
|
||||
path = ~/.dotfiles/git/configs/lfs.gitconfig
|
||||
path = ~/.dotfiles/git/configs/delta.gitconfig
|
||||
path = ~/.dotfiles/git/configs/sign.gitconfig
|
||||
|
||||
[push]
|
||||
default = simple
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
[user]
|
||||
signingkey = CD17A34CBFB21DE9A73D47EB76BDEC4E165D8AD9
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
@@ -1,3 +1,6 @@
|
||||
[user]
|
||||
name = Tim Huizinga
|
||||
email = tim.huizinga@alten.nl
|
||||
|
||||
[commit]
|
||||
gpgsign = false
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
[user]
|
||||
name = Dreaded_X
|
||||
email = tim@huizinga.dev
|
||||
signingkey = CD17A34CBFB21DE9A73D47EB76BDEC4E165D8AD9
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
[user]
|
||||
name = Tim Huizinga
|
||||
email = th@aimrobotics.nl
|
||||
|
||||
[commit]
|
||||
gpgsign = false
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
enable-ssh-support
|
||||
|
||||
default-cache-ttl 180800
|
||||
max-cache-ttl 180800
|
||||
default-cache-ttl-ssh 180800
|
||||
max-cache-ttl-ssh 180800
|
||||
|
||||
pinentry-program /usr/bin/pinentry-tty
|
||||
@@ -1,54 +1,51 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"actions-preview.nvim": { "branch": "master", "commit": "2b604b2e8e662c03b716436f6ffebcb19663e66a" },
|
||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||
"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": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
|
||||
"crates.nvim": { "branch": "main", "commit": "afcd1cc3eeceb5783676fc8464389b9216a29d05" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"gitlab.nvim": { "branch": "develop", "commit": "0f007fcf7934426338fcb5f2f17a8d6e9f3bc514" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "8d82c240f190fc33723d48c308ccc1ed8baad69d" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "561126520034a1dac2f78ab063db025d12555998" },
|
||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "0074b551a17338ccdcd299bd86687cc651bcb33d" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "a2f4b564c72ea1f22cba2caa97db603618d16d6f" },
|
||||
"kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "f5d2a8570f8b736ddb9bb4be504355bcd6e15ec8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "21c2a84ce368e99b18f52ab348c4c02c32c02fcf" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" },
|
||||
"multicolumn.nvim": { "branch": "master", "commit": "a363bdfd422abf26256f343dac4df183031f8e94" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "5cfe7fffbd01e17b3c1e14af85d5febdef88bd8c" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "338409dd8a6ed74767bad3eb5269f1b903ffb3cf" },
|
||||
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "cb5bc0b2b35a6d513e3298d285db81453e791f4f" },
|
||||
"nvim-surround": { "branch": "main", "commit": "9291040de8cd8a4439eb64c441e8d5d2bf884a5a" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" },
|
||||
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"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": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"ros-nvim": { "branch": "main", "commit": "1ad64cd3a1e144dfea67890845f9da2e82d96900" },
|
||||
"schema-companion.nvim": { "branch": "main", "commit": "bcccfe46a1796f86b81dc3be6ab80ece3664d3b2" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "f5df9e70403b5d4c0642702a64534f04f3d71d03" },
|
||||
"schema-companion.nvim": { "branch": "main", "commit": "9a8cbeb9429958524331f49a4bd9c25cfbc2c208" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "55ca969ceed5209d62cbf4c20cef023ff188b6c5" },
|
||||
"scrollEOF.nvim": { "branch": "master", "commit": "e462b9a07b8166c3e8011f1dcbc6bf68b67cd8d7" },
|
||||
"smart-open.nvim": { "branch": "0.3.x", "commit": "918c97cac0c33f7a116a822df144bc5bbefa4490" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "09796a7ad0776c92518e0afae8688ef8d7f720e6" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "b9d563ea52c4926a4d91e5e795c68bb8f89f8ba0" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "f7c673b8e46e8f233ff581d3624a517d33a7e264" },
|
||||
"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": "6b58234de921437836efe27714b2026ed2ee235a" },
|
||||
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
|
||||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "72e160cb1ce8c0db2ac4315f77d97420a2f4223d" },
|
||||
"undotree": { "branch": "master", "commit": "d8f99084d98c32f651860eb0baaf89759f91debc" },
|
||||
"which-key.nvim": { "branch": "winborder-support", "commit": "ab1a3b0d3005a95507ba6c18b96531d430370885" }
|
||||
}
|
||||
|
||||
@@ -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,12 +15,8 @@ return {
|
||||
"!popup",
|
||||
},
|
||||
always_update = true,
|
||||
options = {
|
||||
parsers = {
|
||||
names = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
user_default_options = {
|
||||
names = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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,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,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,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
branch = "main",
|
||||
opts = {
|
||||
select = {
|
||||
lookahead = true,
|
||||
include_surrounding_whitespace = true,
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
vim.keymap.set({ "x", "o" }, "aa", function()
|
||||
require("nvim-treesitter-textobjects.select").select_textobject("@parameter.outer", "textobjects")
|
||||
end)
|
||||
vim.keymap.set({ "x", "o" }, "ia", function()
|
||||
require("nvim-treesitter-textobjects.select").select_textobject("@parameter.inner", "textobjects")
|
||||
end)
|
||||
vim.keymap.set({ "x", "o" }, "af", function()
|
||||
require("nvim-treesitter-textobjects.select").select_textobject("@function.outer", "textobjects")
|
||||
end)
|
||||
vim.keymap.set({ "x", "o" }, "if", function()
|
||||
require("nvim-treesitter-textobjects.select").select_textobject("@function.inner", "textobjects")
|
||||
end)
|
||||
-- vim.keymap.set({ "x", "o" }, "ac", function()
|
||||
-- require("nvim-treesitter-textobjects.select").select_textobject("@class.outer", "textobjects")
|
||||
-- end)
|
||||
-- vim.keymap.set({ "x", "o" }, "ic", function()
|
||||
-- require("nvim-treesitter-textobjects.select").select_textobject("@class.inner", "textobjects")
|
||||
-- end)
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function()
|
||||
require("nvim-treesitter-textobjects.swap").swap_next("@parameter.inner")
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>A", function()
|
||||
require("nvim-treesitter-textobjects.swap").swap_previous("@parameter.inner")
|
||||
end)
|
||||
end,
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
-- https://github.com/windwp/nvim-ts-autotag
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"windwp/nvim-ts-autotag",
|
||||
}
|
||||
@@ -2,8 +2,6 @@
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
-- Issues with nvim 0.12
|
||||
enabled = false,
|
||||
"tadachs/ros-nvim",
|
||||
event = { "BufRead", "BufNewFile" },
|
||||
opts = {
|
||||
|
||||
@@ -4,13 +4,22 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "master" },
|
||||
{ "windwp/nvim-ts-autotag", opts = {} },
|
||||
},
|
||||
lazy = false,
|
||||
branch = "main",
|
||||
branch = "master",
|
||||
build = ":TSUpdate",
|
||||
-- Taken from kickstart.nvim
|
||||
config = function()
|
||||
-- ensure basic parser are installed
|
||||
local parsers = {
|
||||
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 = {
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"cpp",
|
||||
"go",
|
||||
@@ -29,57 +38,66 @@ return {
|
||||
"cmake",
|
||||
"json",
|
||||
"yaml",
|
||||
}
|
||||
require("nvim-treesitter").install(parsers)
|
||||
},
|
||||
auto_install = true,
|
||||
|
||||
---@param buf integer
|
||||
---@param language string
|
||||
local function treesitter_try_attach(buf, language)
|
||||
-- Check if the parser exists
|
||||
if not vim.treesitter.language.add(language) then
|
||||
return
|
||||
end
|
||||
vim.treesitter.start(buf, language)
|
||||
|
||||
-- TODO: Does this work properly?
|
||||
local has_fold_query = vim.treesitter.query.get(language, "folds") ~= nil
|
||||
if has_fold_query then
|
||||
vim.wo.foldmethod = "expr"
|
||||
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
end
|
||||
|
||||
local has_indent_query = vim.treesitter.query.get(language, "indents") ~= nil
|
||||
if has_indent_query then
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end
|
||||
end
|
||||
|
||||
local available_parsers = require("nvim-treesitter").get_available()
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
callback = function(args)
|
||||
local buf, filetype = args.buf, args.match
|
||||
|
||||
local language = vim.treesitter.language.get_lang(filetype)
|
||||
if not language then
|
||||
return
|
||||
end
|
||||
|
||||
local installed_parsers = require("nvim-treesitter").get_installed("parsers")
|
||||
|
||||
if vim.tbl_contains(installed_parsers, language) then
|
||||
-- enable the parser if it is installed
|
||||
treesitter_try_attach(buf, language)
|
||||
elseif vim.tbl_contains(available_parsers, language) then
|
||||
-- if a parser is available in `nvim-treesitter` auto install it, and enable it after the installation is done
|
||||
require("nvim-treesitter").install(language):await(function()
|
||||
treesitter_try_attach(buf, language)
|
||||
end)
|
||||
else
|
||||
-- try to enable treesitter features in case the parser exists but is not available from `nvim-treesitter`
|
||||
treesitter_try_attach(buf, language)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<M-o>",
|
||||
node_incremental = "<M-o>",
|
||||
node_decremental = "<M-i>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["aa"] = "@parameter.outer",
|
||||
["ia"] = "@parameter.inner",
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
-- ["ac"] = "@class.outer",
|
||||
-- ["ic"] = "@class.inner",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true,
|
||||
goto_next_start = {
|
||||
["]a"] = "@parameter.inner",
|
||||
["]f"] = "@function.outer",
|
||||
["]c"] = "@class.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]A"] = "@parameter.inner",
|
||||
["]F"] = "@function.outer",
|
||||
["]c"] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[a"] = "@parameter.inner",
|
||||
["[f"] = "@function.outer",
|
||||
["[c"] = "@class.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[A"] = "@parameter.inner",
|
||||
["[F"] = "@function.outer",
|
||||
["[c"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["<leader>a"] = "@parameter.inner",
|
||||
},
|
||||
swap_previous = {
|
||||
["<leader>A"] = "@parameter.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ 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,7 +0,0 @@
|
||||
#compdef tula
|
||||
|
||||
_tula_completion() {
|
||||
eval $(env _TYPER_COMPLETE_ARGS="${words[1,$CURRENT]}" _TULA_COMPLETE=complete_zsh tula)
|
||||
}
|
||||
|
||||
compdef _tula_completion tula
|
||||
Submodule zsh/custom/plugins/evalcache deleted from d6973f8c3e
@@ -1,32 +0,0 @@
|
||||
# mise
|
||||
|
||||
Adds integration with [mise](https://github.com/jdx/mise) (formerly `rtx`), a runtime executor compatible with
|
||||
npm, nodenv, pyenv, etc. mise is written in rust and is very fast. 20x-200x faster than asdf. With that being
|
||||
said, mise is compatible with asdf plugins and .tool-versions files. It can be used as a drop-in replacement.
|
||||
|
||||
## Installation
|
||||
|
||||
1. [Download & install mise](https://github.com/jdx/mise#installation) by running the following:
|
||||
|
||||
```bash
|
||||
curl https://mise.jdx.dev/install.sh | sh
|
||||
```
|
||||
|
||||
2. [Enable mise](https://github.com/jdx/mise#quickstart) by adding it to your `plugins` definition in
|
||||
`~/.zshrc`.
|
||||
|
||||
```bash
|
||||
plugins=(mise)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
See the [mise readme](https://github.com/jdx/mise#table-of-contents) for information on how to use mise. Here
|
||||
are a few examples:
|
||||
|
||||
```bash
|
||||
mise install node Install the current version specified in .tool-versions/.mise.toml
|
||||
mise use -g node@system Use system node as global default
|
||||
mise install node@20.0.0 Install a specific version number
|
||||
mise use -g node@20 Use node-20.x as global default
|
||||
```
|
||||
@@ -1,17 +0,0 @@
|
||||
if (( ! $+commands[mise] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# Load mise hooks
|
||||
zsh-defer -a _evalcache mise activate zsh
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `mise`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_mise" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _mise
|
||||
_comps[mise]=_mise
|
||||
fi
|
||||
|
||||
# Generate and load mise completion
|
||||
mise completion zsh >| "$ZSH_CACHE_DIR/completions/_mise" &|
|
||||
Submodule zsh/custom/plugins/zsh-autosuggestions updated: 85919cd1ff...0e810e5afa
Submodule zsh/custom/plugins/zsh-completions updated: 47e40c923c...b48b5de9d8
Submodule zsh/custom/plugins/zsh-defer deleted from 53a26e287f
@@ -156,32 +156,72 @@ prompt_git() {
|
||||
fi
|
||||
}
|
||||
|
||||
git_toplevel() {
|
||||
local repo_root=$(git rev-parse --show-toplevel)
|
||||
if [[ $repo_root = '' ]]; then
|
||||
# We are in a bare repo. Use git dir as root
|
||||
repo_root=$(git rev-parse --git-dir)
|
||||
if [[ $repo_root = '.' ]]; then
|
||||
repo_root=$PWD
|
||||
prompt_bzr() {
|
||||
(( $+commands[bzr] )) || return
|
||||
|
||||
# Test if bzr repository in directory hierarchy
|
||||
local dir="$PWD"
|
||||
while [[ ! -d "$dir/.bzr" ]]; do
|
||||
[[ "$dir" = "/" ]] && return
|
||||
dir="${dir:h}"
|
||||
done
|
||||
|
||||
local bzr_status status_mod status_all revision
|
||||
if bzr_status=$(bzr status 2>&1); then
|
||||
status_mod=$(echo -n "$bzr_status" | head -n1 | grep "modified" | wc -m)
|
||||
status_all=$(echo -n "$bzr_status" | head -n1 | wc -m)
|
||||
revision=${$(bzr log -r-1 --log-format line | cut -d: -f1):gs/%/%%}
|
||||
if [[ $status_mod -gt 0 ]] ; then
|
||||
prompt_segment yellow black "bzr@$revision ✚"
|
||||
else
|
||||
if [[ $status_all -gt 0 ]] ; then
|
||||
prompt_segment yellow black "bzr@$revision"
|
||||
else
|
||||
prompt_segment 10 black "bzr@$revision"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
prompt_hg() {
|
||||
(( $+commands[hg] )) || return
|
||||
local rev st branch
|
||||
if $(hg id >/dev/null 2>&1); then
|
||||
if $(hg prompt >/dev/null 2>&1); then
|
||||
if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
|
||||
# if files are not added
|
||||
prompt_segment red white
|
||||
st='±'
|
||||
elif [[ -n $(hg prompt "{status|modified}") ]]; then
|
||||
# if any modification
|
||||
prompt_segment yellow black
|
||||
st='±'
|
||||
else
|
||||
# if working copy is clean
|
||||
prompt_segment 10 $CURRENT_FG
|
||||
fi
|
||||
echo -n ${$(hg prompt "☿ {rev}@{branch}"):gs/%/%%} $st
|
||||
else
|
||||
st=""
|
||||
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
|
||||
branch=$(hg id -b 2>/dev/null)
|
||||
if `hg st | grep -q "^\?"`; then
|
||||
prompt_segment red black
|
||||
st='±'
|
||||
elif `hg st | grep -q "^[MA]"`; then
|
||||
prompt_segment yellow black
|
||||
st='±'
|
||||
else
|
||||
prompt_segment 10 $CURRENT_FG
|
||||
fi
|
||||
echo -n "☿ ${rev:gs/%/%%}@${branch:gs/%/%%}" $st
|
||||
fi
|
||||
fi
|
||||
echo -n $repo_root
|
||||
}
|
||||
|
||||
# Dir: current working directory
|
||||
prompt_dir() {
|
||||
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
||||
# Git repo and inline path enabled, hence only show the git root
|
||||
local repo_root=$(git_toplevel)
|
||||
local path_in_repo=$(pwd | sed "s/^$(echo "$repo_root" | sed 's:/:\\/:g;s/\$/\\$/g')//;s:^/::;s:/$::;")
|
||||
if [[ -z "$path_in_repo" ]]; then
|
||||
prompt_segment 12 $CURRENT_FG "$(git_toplevel | sed "s:^$HOME:~:")"
|
||||
else
|
||||
prompt_segment 12 $CURRENT_FG "$(git_toplevel | sed "s:^$HOME:~:")/%B$path_in_repo%b"
|
||||
fi
|
||||
else
|
||||
prompt_segment 12 $CURRENT_FG '%~'
|
||||
fi
|
||||
}
|
||||
|
||||
# Virtualenv: current working virtualenv
|
||||
@@ -192,6 +232,27 @@ prompt_virtualenv() {
|
||||
fi
|
||||
}
|
||||
|
||||
# nix-shell: currently running nix-shell
|
||||
prompt_nix_shell() {
|
||||
if [[ -n "$IN_NIX_SHELL" ]]; then
|
||||
if [[ -n $NIX_SHELL_PACKAGES ]]; then
|
||||
local package_names=""
|
||||
local packages=($NIX_SHELL_PACKAGES)
|
||||
for package in $packages; do
|
||||
package_names+=" ${package##*.}"
|
||||
done
|
||||
prompt_segment magenta black "$package_names"
|
||||
elif [[ -n $name ]]; then
|
||||
local cleanName=${name#interactive-}
|
||||
cleanName=${cleanName#lorri-keep-env-hack-}
|
||||
cleanName=${cleanName%-environment}
|
||||
prompt_segment magenta black "$cleanName"
|
||||
else # This case is only reached if the nix-shell plugin isn't installed or failed in some way
|
||||
prompt_segment magenta black "nix-shell"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Status:
|
||||
# - was there an error
|
||||
# - am I root
|
||||
@@ -203,14 +264,31 @@ prompt_status() {
|
||||
[[ $UID -eq 0 ]] && prompt_segment 11 black ""
|
||||
}
|
||||
|
||||
#AWS Profile:
|
||||
# - display current AWS_PROFILE name
|
||||
# - displays yellow on red if profile name contains 'production' or
|
||||
# ends in '-prod'
|
||||
# - displays black on green otherwise
|
||||
prompt_aws() {
|
||||
[[ -z "$AWS_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return
|
||||
case "$AWS_PROFILE" in
|
||||
*-prod|*production*) prompt_segment red 11 "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
|
||||
*) prompt_segment cyan black "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
## Main prompt
|
||||
build_prompt() {
|
||||
RETVAL=$?
|
||||
prompt_status
|
||||
prompt_context
|
||||
prompt_virtualenv
|
||||
prompt_nix_shell
|
||||
prompt_aws
|
||||
prompt_dir
|
||||
prompt_git
|
||||
prompt_bzr
|
||||
prompt_hg
|
||||
prompt_end
|
||||
}
|
||||
|
||||
|
||||
+25
-33
@@ -1,4 +1,3 @@
|
||||
# vim: set ft=zsh:
|
||||
# Path to your oh-my-zsh installation.
|
||||
export DOTFILES=${DOTFILES:-"$HOME/.dotfiles"}
|
||||
export ZSH="$DOTFILES/zsh/ohmyzsh"
|
||||
@@ -6,18 +5,8 @@ export ZSH_CUSTOM="$DOTFILES/zsh/custom"
|
||||
|
||||
ZSH_THEME="agnoster_dx"
|
||||
|
||||
zstyle -s ':omz:update' mode "disabled"
|
||||
|
||||
# Fix slow pasting due to zsh-autosuggestions
|
||||
pasteinit() {
|
||||
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
|
||||
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
|
||||
}
|
||||
pastefinish() {
|
||||
zle -N self-insert $OLD_SELF_INSERT
|
||||
}
|
||||
zstyle :bracketed-paste-magic paste-init pasteinit
|
||||
zstyle :bracketed-paste-magic paste-finish pastefinish
|
||||
zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||
# zstyle ':omz:update' frequency 13
|
||||
|
||||
# CASE_SENSITIVE="true"
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
@@ -26,11 +15,8 @@ zstyle :bracketed-paste-magic paste-finish pastefinish
|
||||
# ENABLE_CORRECTION="true"
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
ZSH_DISABLE_COMPFIX="true"
|
||||
ZOXIDE_CMD_OVERRIDE="cd"
|
||||
|
||||
plugins=(
|
||||
evalcache
|
||||
zsh-defer
|
||||
git
|
||||
zsh-autosuggestions
|
||||
# Disabled because the highlighting conflicts with autosuggestions
|
||||
@@ -40,10 +26,6 @@ plugins=(
|
||||
command-not-found
|
||||
zsh-autopair
|
||||
fast-syntax-highlighting
|
||||
zoxide
|
||||
mise
|
||||
gpg-agent
|
||||
vagrant
|
||||
)
|
||||
|
||||
bindkey -M vicmd "k" up-line-or-beginning-search
|
||||
@@ -55,8 +37,6 @@ HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_TIMEOUT=3
|
||||
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
|
||||
# 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,
|
||||
@@ -68,15 +48,14 @@ function zvm_after_lazy_keybindings() {
|
||||
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"
|
||||
|
||||
less_termcap[so]="${fg_bold[black]}${bg[white]}"
|
||||
@@ -129,10 +108,6 @@ if [ -d "$PNPM_HOME" ]; then
|
||||
else
|
||||
unset PNPM_HOME
|
||||
fi
|
||||
if (( $+commands[pnpm] )); then
|
||||
# Without evalcache it more than doubles startup time
|
||||
_evalcache pnpm completion zsh
|
||||
fi
|
||||
|
||||
export FZF_DEFAULT_OPTS='--tmux'
|
||||
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
|
||||
@@ -142,17 +117,15 @@ 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"
|
||||
--layout="default"'
|
||||
--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
|
||||
# Fix fzf keybind after zsh-vi-mode has loaded
|
||||
zvm_after_init_commands+=('_evalcache fzf --zsh')
|
||||
source <(fzf --zsh)
|
||||
zvm_after_init_commands+=('source <(fzf --zsh)')
|
||||
|
||||
if (( $+commands[paru] )); then
|
||||
function pi {
|
||||
@@ -161,6 +134,25 @@ 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
|
||||
|
||||
+1
-1
Submodule zsh/ohmyzsh updated: 349b9e49ce...8c168e2662
Reference in New Issue
Block a user