From a9b7c5aa4d0bd734f0ad547232656c2dd33d7e21 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sat, 28 Dec 2024 18:16:22 -0700 Subject: [PATCH] add jjbm script to get latest bookmark --- dot_config/nvim/lua/community.lua | 40 +++++++++++---------- dot_config/private_fish/config.fish | 7 ++-- dot_config/private_fish/dot_on_install.fish | 5 ++- dot_config/private_fish/functions/jjbm.fish | 3 ++ 4 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 dot_config/private_fish/functions/jjbm.fish diff --git a/dot_config/nvim/lua/community.lua b/dot_config/nvim/lua/community.lua index 462d51b..4a3e444 100644 --- a/dot_config/nvim/lua/community.lua +++ b/dot_config/nvim/lua/community.lua @@ -13,11 +13,13 @@ return { { import = "astrocommunity.diagnostics.trouble-nvim" }, { import = "astrocommunity.editing-support.todo-comments-nvim" }, { import = "astrocommunity.editing-support.multicursors-nvim" }, + { import = "astrocommunity.editing-support.rainbow-delimiters-nvim" }, -- { import = "astrocommunity.lsp.lsp-signature-nvim" }, { import = "astrocommunity.lsp.inc-rename-nvim" }, { import = "astrocommunity.markdown-and-latex.glow-nvim" }, -- { import = "astrocommunity.motion.flash-nvim" }, { import = "astrocommunity.scrolling.mini-animate" }, + { import = "astrocommunity.search.grug-far-nvim" }, { import = "astrocommunity.test.neotest" }, { import = "astrocommunity.utility.noice-nvim" }, -- { import = "astrocommunity.workflow.hardtime-nvim" }, @@ -26,19 +28,19 @@ return { "kylechui/nvim-surround", opts = { keymaps = { - normal = 'sa', + normal = "sa", normal_cur = false, normal_line = false, normal_cur_line = false, - visual = 's', - visual_line = 'S', - delete = 'sd', - change = 'sr', + visual = "s", + visual_line = "S", + delete = "sd", + change = "sr", }, aliases = { - ['i'] = ']', -- Index - ['r'] = ')', -- Round - ['b'] = '}', -- Brackets + ["i"] = "]", -- Index + ["r"] = ")", -- Round + ["b"] = "}", -- Brackets }, }, }, @@ -59,23 +61,23 @@ return { }, }, { - "folke/noice.nvim", + "folke/noice.nvim", opts = { routes = { { filter = { - event = 'msg_show', + event = "msg_show", any = { - { find = '%d+L, %d+B' }, - { find = '; after #%d+' }, - { find = '; before #%d+' }, - { find = '%d fewer lines' }, - { find = '%d more lines' }, + { find = "%d+L, %d+B" }, + { find = "; after #%d+" }, + { find = "; before #%d+" }, + { find = "%d fewer lines" }, + { find = "%d more lines" }, }, }, opts = { skip = true }, - } - } - } - } + }, + }, + }, + }, } diff --git a/dot_config/private_fish/config.fish b/dot_config/private_fish/config.fish index 11dbb99..cbcc776 100644 --- a/dot_config/private_fish/config.fish +++ b/dot_config/private_fish/config.fish @@ -1,9 +1,5 @@ if status is-interactive # Commands to run in interactive sessions can go here - functions -q _insert_jj_after_git; and _insert_jj_after_git - if set -q GHOSTTY_RESOURCES_DIR - source "$GHOSTTY_RESOURCES_DIR/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish" - end if type -q zoxide zoxide init fish | source end @@ -24,4 +20,7 @@ end alias ls="lsd" +fish_add_path $HOME/.webman/bin + set -gx EDITOR nvim + diff --git a/dot_config/private_fish/dot_on_install.fish b/dot_config/private_fish/dot_on_install.fish index 3065666..7f48fca 100644 --- a/dot_config/private_fish/dot_on_install.fish +++ b/dot_config/private_fish/dot_on_install.fish @@ -10,6 +10,7 @@ if not functions -q fisher end fish_add_path ~/.webman/bin/ +set -gx --path XDG_DATA_DIRS $XDG_DATA_DIRS:$HOME/.local/share/ # if atuin is not installed, install it if not type -q atuin @@ -19,4 +20,6 @@ if not type -q atuin else atuin import auto end -end \ No newline at end of file +end + + diff --git a/dot_config/private_fish/functions/jjbm.fish b/dot_config/private_fish/functions/jjbm.fish new file mode 100644 index 0000000..91438eb --- /dev/null +++ b/dot_config/private_fish/functions/jjbm.fish @@ -0,0 +1,3 @@ +function jjbm + jj log -r 'heads(::@ & bookmarks())' --ignore-working-copy --template 'bookmarks' --no-graph | head -n1 | cut -d " " -f1 +end