From 1d5dc822236490b65c4b119c5bfde7f417e7c50e Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 19 Sep 2024 08:53:25 -0400 Subject: [PATCH 1/6] Allow ripgrep to search hidden in dotfiles Do I actually just want this everywhere? --- .mise.toml | 4 ++++ .ripgreprc | 1 + 2 files changed, 5 insertions(+) create mode 100644 .mise.toml create mode 100644 .ripgreprc diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 0000000..17f4d27 --- /dev/null +++ b/.mise.toml @@ -0,0 +1,4 @@ +[env] +RIPGREP_CONFIG_PATH = "./.ripgreprc" + +# private configuration to go in .mise.local.toml diff --git a/.ripgreprc b/.ripgreprc new file mode 100644 index 0000000..a7f4c7c --- /dev/null +++ b/.ripgreprc @@ -0,0 +1 @@ +--hidden From be00d3d0fc25855c3f019556f41690125097983a Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 19 Sep 2024 08:54:57 -0400 Subject: [PATCH 2/6] Use nvim for diffing --- git/.gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/.gitconfig b/git/.gitconfig index dfd17da..dbf627d 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -23,7 +23,7 @@ program = gpg [merge] - tool = vimdiff + tool = nvim -d [pull] rebase = false From 3b88ee0494e12745066426492f1950152d84481f Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 19 Sep 2024 08:57:51 -0400 Subject: [PATCH 3/6] Alias podman to docker --- zsh/.config/zsh/aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/.config/zsh/aliases b/zsh/.config/zsh/aliases index 09e2d77..b828a07 100644 --- a/zsh/.config/zsh/aliases +++ b/zsh/.config/zsh/aliases @@ -15,6 +15,7 @@ alias c="clear" alias cs="toggle-color-mode" alias cdr="git-root" alias dc="docker-compose-call" +alias docker="podman" alias g="g" # overwrite g alias alias ga="git add" alias gaa="git add --all" From 4648495a42447e8a505107a779c5ecdc5318dded Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 20 Sep 2024 20:32:47 -0400 Subject: [PATCH 4/6] Bump nvim depends --- nvim/.config/nvim/lazy-lock.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 8b4afe9..2ce3218 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,21 +1,21 @@ { - "bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" }, + "bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" }, "editorconfig.nvim": { "branch": "master", "commit": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf" }, - "git-messenger.vim": { "branch": "master", "commit": "8a61bdfa351d4df9a9118ee1d3f45edbed617072" }, + "git-messenger.vim": { "branch": "master", "commit": "edc603d4cda7894a743e383e16c638e206d03148" }, "gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" }, - "gitsigns.nvim": { "branch": "main", "commit": "5fc573f2d2a49aec74dd6dc977e8b137429d1897" }, - "gruvbox": { "branch": "master", "commit": "86c767ff91e2518da44ba8c78b3bc6c979cf5403" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "nvim-surround": { "branch": "main", "commit": "0855a89e00a5822c3a482a82e5223fcf2e9ede13" }, - "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "telescope.nvim": { "branch": "master", "commit": "18774ec7929c8a8003a91e9e1f69f6c32258bbfe" }, - "typescript-vim": { "branch": "master", "commit": "eafdcf5e9ee73b43d92372d69dd84458bf98c5e3" }, - "vim-eunuch": { "branch": "master", "commit": "67f3dd32b4dcd1c427085f42ff5f29c7adc645c6" }, - "vim-go": { "branch": "master", "commit": "97327927551d519f8f035f6f12f7bca041fed665" }, - "vim-markdown": { "branch": "master", "commit": "f2b82b7884a3d8bde0c5de7793b27e07030eb2bc" }, - "vim-rails": { "branch": "master", "commit": "1ad9663ce31e8c08134849d04184cda94bb42aba" }, + "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, + "gruvbox": { "branch": "master", "commit": "143a3b8babcfd2bce6c99d6ba496942647c3e30b" }, + "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, + "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "telescope.nvim": { "branch": "master", "commit": "b5fd7f7ae0ea4537511077ed8ef4a6021cedba2f" }, + "typescript-vim": { "branch": "master", "commit": "8d169e16b5487771f6568125d4c63e6086e524d9" }, + "vim-eunuch": { "branch": "master", "commit": "8fb3904be27b6b60d086f87c2570085902414069" }, + "vim-go": { "branch": "master", "commit": "105c4591c99ab152fac967ef4a566c97e071104e" }, + "vim-markdown": { "branch": "master", "commit": "f405b47fd8774ecd5e808e6de9c85d9029da251c" }, + "vim-rails": { "branch": "master", "commit": "d3954dfe3946c9330dc91b4fbf79ccacb2c626c0" }, "vim-ruby": { "branch": "master", "commit": "f06f069ce67bdda6f2cd408f8859cdf031e5b6b4" }, - "vim-terraform": { "branch": "master", "commit": "d37ae7e7828aa167877e338dea5d4e1653ed3eb1" }, + "vim-terraform": { "branch": "master", "commit": "24de93afb05078bac6a2e966402cc1f672277708" }, "vim-zoom": { "branch": "master", "commit": "01c737005312c09e0449d6518decf8cedfee32c7" }, - "whitespace.nvim": { "branch": "master", "commit": "fe9ca0ba3c6e6cc1dd14c0d6cbe49d97496700dd" } -} \ No newline at end of file + "whitespace.nvim": { "branch": "master", "commit": "f7d14be0f23a9c1e8021aca70d280aea26649b68" } +} From 1f0b857f0f3ced3b505ebedb168845bcfd9e24c9 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 20 Sep 2024 21:45:33 -0400 Subject: [PATCH 5/6] Update gitlinker, use custom router for gitea --- nvim/.config/nvim/after/plugin/config.lua | 53 +++++++++++++++++------ nvim/.config/nvim/lazy-lock.json | 2 +- nvim/.config/nvim/lua/plugins.lua | 2 +- 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/nvim/.config/nvim/after/plugin/config.lua b/nvim/.config/nvim/after/plugin/config.lua index 0edf073..1d5ea7d 100644 --- a/nvim/.config/nvim/after/plugin/config.lua +++ b/nvim/.config/nvim/after/plugin/config.lua @@ -5,19 +5,42 @@ vim.keymap.set("n", "bd", function() end) --- gitlinker.nvim -require"gitlinker".setup() -vim.keymap.set("n", "gh", function() - require"gitlinker".get_buf_range_url( - "n", - { action_callback = require"gitlinker.actions".open_in_browser } - ) -end, { silent = true }) -vim.keymap.set("v", "gh", function() - require"gitlinker".get_buf_range_url( - "v", - { action_callback = require"gitlinker.actions".open_in_browser } - ) -end) +require"gitlinker".setup({ + router = { + browse = { + ["^git%.atomaka%.com"] = "https://git.atomaka.com/" + .. "{_A.ORG}/" + .. "{_A.REPO}/commit/" + .. "{_A.REV}/" + }, + blame = { + ["^git%.atomaka%.com"] = "https://git.atomaka.com/" + .. "{_A.ORG}/" + .. "{_A.REPO}/blame/" + .. "branch/{_A.CURRENT_BRANCH}/" + .. "{_A.FILE}" + }, + }, +}) +vim.keymap.set( + {"n", 'v'}, + "gl", + function() + require("gitlinker").link({ action = require("gitlinker.actions").system }) + end, + { silent = true, noremap = true, desc = "GitLink!" } +) +vim.keymap.set( + {"n", 'v'}, + "glb", + function() + require("gitlinker").link({ + router_type = "blame", + action = require("gitlinker.actions").system, + }) + end, + { silent = true, noremap = true, desc = "GitLink! blame" } +) --- gitsigns.nvim require("gitsigns").setup() @@ -30,6 +53,10 @@ vim.g["git_messenger_always_into_popup"] = 1 require("nvim-surround").setup() --- telescope.nvim +vim.api.nvim_set_keymap('n', 't', ':Telescope', { + noremap = true, + silent = true, +}) vim.keymap.set("n", "", function() require("telescope.builtin").find_files({ file_ignore_patterns = {".git/", "node_modules/"}, diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 2ce3218..8d2e408 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -2,7 +2,7 @@ "bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" }, "editorconfig.nvim": { "branch": "master", "commit": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf" }, "git-messenger.vim": { "branch": "master", "commit": "edc603d4cda7894a743e383e16c638e206d03148" }, - "gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" }, + "gitlinker.nvim": { "branch": "master", "commit": "a221c13fc3c7f5b8799933f4966ee8e618287292" }, "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, "gruvbox": { "branch": "master", "commit": "143a3b8babcfd2bce6c99d6ba496942647c3e30b" }, "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 855fc94..cc0d55d 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -21,7 +21,7 @@ require("lazy").setup({ -- "FabijanZulj/blame.nvim", "rhysd/git-messenger.vim", "lewis6991/gitsigns.nvim", - "ruifm/gitlinker.nvim", + "linrongbin16/gitlinker.nvim", "tpope/vim-eunuch", "gruvbox-community/gruvbox", From 4a79421eefbc4eac555ce3016f7a0d8546007c12 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 20 Sep 2024 21:54:38 -0400 Subject: [PATCH 6/6] Link to blame commit I really need to consolidate git plugins --- nvim/.config/nvim/after/plugin/config.lua | 11 +++++++++++ nvim/.config/nvim/lazy-lock.json | 1 + nvim/.config/nvim/lua/plugins.lua | 1 + 3 files changed, 13 insertions(+) diff --git a/nvim/.config/nvim/after/plugin/config.lua b/nvim/.config/nvim/after/plugin/config.lua index 1d5ea7d..f6a47d2 100644 --- a/nvim/.config/nvim/after/plugin/config.lua +++ b/nvim/.config/nvim/after/plugin/config.lua @@ -4,6 +4,17 @@ vim.keymap.set("n", "bd", function() require("bufdelete").bufdelete(0, true) end) +--- gitblame.nvim +vim.g.gitblame_use_blame_commit_file_urls = true +vim.g.gitblame_display_virtual_text = 0 + +require('gitblame').setup {enabled = true} + +vim.api.nvim_set_keymap('n', 'gbo', ':GitBlameOpenCommitURL', { + noremap = true, + silent = true, +}) + --- gitlinker.nvim require"gitlinker".setup({ router = { diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 8d2e408..7da69cd 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,6 +1,7 @@ { "bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" }, "editorconfig.nvim": { "branch": "master", "commit": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf" }, + "git-blame.nvim": { "branch": "master", "commit": "8c56e864d448e84e0162872c381dd2715824dce2" }, "git-messenger.vim": { "branch": "master", "commit": "edc603d4cda7894a743e383e16c638e206d03148" }, "gitlinker.nvim": { "branch": "master", "commit": "a221c13fc3c7f5b8799933f4966ee8e618287292" }, "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index cc0d55d..b533ece 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -22,6 +22,7 @@ require("lazy").setup({ "rhysd/git-messenger.vim", "lewis6991/gitsigns.nvim", "linrongbin16/gitlinker.nvim", + "f-person/git-blame.nvim", "tpope/vim-eunuch", "gruvbox-community/gruvbox",