Skip to content

Commit

Permalink
Remove some telescope extensions (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
dycw authored Apr 14, 2024
1 parent e7f791b commit fe82321
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 135 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bumpversion]
current_version = 0.1.91
current_version = 0.1.92
48 changes: 24 additions & 24 deletions git/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,52 +53,52 @@ if command -v git >/dev/null 2>&1; then
while test $# != 0; do
case "$1" in
-a)
amend=1
__amend=1
shift
;;
-n)
no_verify=1
__no_verify=1
shift
;;
-r)
reuse=1
__reuse=1
shift
;;
-f)
force=1
__force=1
shift
;;
*) break ;;
esac
done
if [ -n "${amend}" ] && [ -n "${reuse}" ]; then
if [ -n "${__amend}" ] && [ -n "${__reuse}" ]; then
echo "Expected at most one of --amend or --reuse; got both"
elif [ -n "${amend}" ] && [ -z "${reuse}" ]; then
# amend, not reuse
if [ -n "${force}" ]; then
if [ -n "${no_verify}" ] && [ $# -eq 0 ]; then
git commit -n --amend
elif [ -n "${no_verify}" ] && [ $# -eq 1 ]; then
git commit -nm "$1" --amend
elif [ -z "${no_verify}" ] && [ $# -eq 0 ]; then
git commit --amend
elif [ -z "${no_verify}" ] && [ $# -eq 1 ]; then
git commit -m "$1" --amend
elif [ -n "${__amend}" ] && [ -z "${__reuse}" ]; then
# __amend, not reuse
if [ -n "${__force}" ]; then
if [ -n "${__no_verify}" ] && [ $# -eq 0 ]; then
git commit -n --__amend
elif [ -n "${__no_verify}" ] && [ $# -eq 1 ]; then
git commit -nm "$1" --__amend
elif [ -z "${__no_verify}" ] && [ $# -eq 0 ]; then
git commit --__amend
elif [ -z "${__no_verify}" ] && [ $# -eq 1 ]; then
git commit -m "$1" --__amend
else
echo "Since --amend, expected at most 1 argument; got $#"
fi
gpf
else
echo "Since --amend, expected --force"
fi
elif [ -z "${amend}" ] && [ -n "${reuse}" ]; then
elif [ -z "${__amend}" ] && [ -n "${__reuse}" ]; then
# reuse, not amend
if [ $# -ge 1 ]; then
echo "Since --reuse, expected no arguments; got $#"
elif [ -z "${force}" ]; then
elif [ -z "${__force}" ]; then
echo "Since --reuse, expected --force"
else
if [ -n "${no_verify}" ]; then
if [ -n "${__no_verify}" ]; then
git commit -n --amend --no-edit
else
git commit --amend --no-edit
Expand All @@ -107,18 +107,18 @@ if command -v git >/dev/null 2>&1; then
fi
else
# not amend, not reuse
if [ -n "${no_verify}" ] && [ $# -eq 0 ]; then
if [ -n "${__no_verify}" ] && [ $# -eq 0 ]; then
git commit -n
elif [ -n "${no_verify}" ] && [ $# -eq 1 ]; then
elif [ -n "${__no_verify}" ] && [ $# -eq 1 ]; then
git commit -nm "$1"
elif [ -z "${no_verify}" ] && [ $# -eq 0 ]; then
elif [ -z "${__no_verify}" ] && [ $# -eq 0 ]; then
git commit
elif [ -z "${no_verify}" ] && [ $# -eq 1 ]; then
elif [ -z "${__no_verify}" ] && [ $# -eq 1 ]; then
git commit -m "$1"
else
echo "Basic case expected at most 1 argument; got $#"
fi
if [ -n "${force}" ]; then
if [ -n "${__force}" ]; then
gpf
else
gp
Expand Down
5 changes: 4 additions & 1 deletion nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ local opts = {
enabled = false,
},
}
require("lazy").setup(spec, opts)
local lazy = require("lazy")
lazy.setup(spec, opts)

require("utilities").keymap_set("n", "<Leader>lu", lazy.update, "lazy [u]pdate")
34 changes: 7 additions & 27 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"auto-session": {
"branch": "main",
"commit": "64dc86e43c85f0062baafb0b607a6162efc99c91"
"commit": "9e0a169b6fce8791278abbd110717b921afe634d"
},
"better-escape.nvim": {
"branch": "master",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"conform.nvim": {
"branch": "master",
"commit": "9d5ba06d6ee7418c674f498634617416d15b6239"
"commit": "820eec990d5f332d30cf939954c8672a43a0459e"
},
"dial.nvim": {
"branch": "master",
Expand Down Expand Up @@ -65,7 +65,7 @@
},
"fzf-lua": {
"branch": "main",
"commit": "8161cb9e0fcaab67dab0b99916932605f11aad6b"
"commit": "344b309421e5222a6199e4b46d01041089b6a2ae"
},
"gitsigns.nvim": {
"branch": "main",
Expand Down Expand Up @@ -169,7 +169,7 @@
},
"nvim-lspconfig": {
"branch": "master",
"commit": "b3014f2209503944f2714cf27c95591433a0c7d8"
"commit": "76b1bbaecbe7215498983356d50a16b46c20d6b0"
},
"nvim-neoclip.lua": {
"branch": "main",
Expand All @@ -193,11 +193,11 @@
},
"nvim-treesitter": {
"branch": "master",
"commit": "ef267f0c285928ea3a0d3362a260a0728fd4a146"
"commit": "f08a9d97f7a2ac02115a5c1c8e3973b2634d996b"
},
"nvim-treesitter-context": {
"branch": "master",
"commit": "f19766163c18515fb4d3c12d572bf9cba6cdb990"
"commit": "ba05c6b753130d96b284d3e8ba8f54c28c0fb6d1"
},
"nvim-ts-autotag": {
"branch": "main",
Expand Down Expand Up @@ -239,30 +239,10 @@
"branch": "master",
"commit": "5ee5002373655fd684a4ad0d47a3de876ceacf9a"
},
"telescope-fzf-native.nvim": {
"branch": "main",
"commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27"
},
"telescope-git-conflicts.nvim": {
"branch": "main",
"commit": "1ac7040f601d16ab3800bdda6f5912a0e385cb29"
},
"telescope-live-grep-args.nvim": {
"branch": "master",
"commit": "731a046da7dd3adff9de871a42f9b7fb85f60f47"
},
"telescope-project.nvim": {
"branch": "master",
"commit": "1aaf16580a614601a7f7077d9639aeb457dc5559"
},
"telescope-recent-files.nvim": {
"branch": "main",
"commit": "9f8cb7d22b999346ce819390e75a509e4048f4de"
},
"telescope-ui-select.nvim": {
"branch": "master",
"commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2"
},
"telescope-undo.nvim": {
"branch": "main",
"commit": "d19e2edc8b18d03283bd91f67310ac300ad003ce"
Expand Down Expand Up @@ -317,7 +297,7 @@
},
"vim-tmux-navigator": {
"branch": "master",
"commit": "38b1d0402c4600543281dc85b3f51884205674b6"
"commit": "a26954a585b02a2ac02f87145e204f8798a7cbc2"
},
"vim-visual-multi": {
"branch": "master",
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/custom/plugins/auto-save.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ return {
config = function()
require("utilities").keymap_set("n", "<leader>as", function()
require("auto-save").toggle()
end, "Toggle Trouble")
end, "auto [s]ave")
require("auto-save").setup({
enabled = true,
})
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/custom/plugins/close-buffers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ return {
config = function()
require("utilities").keymap_set("n", "<Leader>bd", function()
require("close_buffers").delete({ type = "this" })
end, "Buffer [D]elete")
end, "buffer [d]elete")
end,
}
9 changes: 6 additions & 3 deletions nvim/lua/custom/plugins/fzf-lua.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ return {
-- buffers and files
keymap_set("n", "<Leader><Leader>", fzf_lua.buffers, "buffers")
keymap_set("n", "<Leader>al", fzf_lua.lines, "all [l]ines")
keymap_set("n", "<Leader>bl", fzf_lua.blines, "Buffer [l]ines")
keymap_set("n", "<Leader>bl", fzf_lua.blines, "buffer [l]ines")
keymap_set("n", "<Leader>of", fzf_lua.oldfiles, "old [f]iles")
keymap_set("n", "<Leader>qf", fzf_lua.quickfix, "quick [f]ix")
keymap_set("n", "<Leader>ta", fzf_lua.tabs, "T[a]bs")
keymap_set("n", "<Leader>ta", fzf_lua.tabs, "t[a]bs")
-- search
keymap_set("n", "<Leader>/", fzf_lua.grep_curbuf, "grep buffer")
for _, value in ipairs({ { "\\", "grep project" }, { "gf", "g[r]ep project" } }) do
Expand Down Expand Up @@ -51,14 +51,17 @@ return {
keymap_set("n", "<Leader>fr", fzf_lua.resume, "fzf-lua [r]esume")
keymap_set("n", "<Leader>ht", fzf_lua.help_tags, "help [t]ags")
keymap_set("n", "<Leader>hl", fzf_lua.highlights, "high[l]ights")
keymap_set("n", "<Leader>ht", fzf_lua.manpages, "man [p]ages")
keymap_set("n", "<Leader>ju", fzf_lua.jumps, "j[u]mps")
keymap_set("n", "<Leader>km", fzf_lua.keymaps, "key [m]aps")
keymap_set("n", "<Leader>m", fzf_lua.marks, "[m]arks")
keymap_set("n", "<Leader>me", fzf_lua.menus, "m[e]nus")
keymap_set("n", "<Leader>mp", fzf_lua.manpages, "man [p]ages")
keymap_set("n", "<Leader>re", fzf_lua.registers, "r[e]gisters")
keymap_set("n", "<Leader>sh", fzf_lua.search_history, "search [h]istory")
keymap_set("n", "<Leader>ss", fzf_lua.spell_suggest, "spell [s]uggest")

require("fzf-lua.providers.ui_select").register()
end,

dependencies = { "nvim-tree/nvim-web-devicons" },
}
4 changes: 2 additions & 2 deletions nvim/lua/custom/plugins/iswap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ return {
local iswap = require("iswap")
keymap_set("n", "<Leader>is", function()
iswap.iswap()
end, "I[S]wap")
end, "i[s]wap")
keymap_set("n", "<Leader>iw", function()
iswap.iswap_with()
end, "ISwap [W]ith")
end, "iswap [w]ith")
end,
}
2 changes: 1 addition & 1 deletion nvim/lua/custom/plugins/nvim-neoclip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ return {
})
require("utilities").keymap_set("n", "<Leader>nc", function()
require("telescope").extensions.neoclip.neoclip()
end, "Neo[C]lip")
end, "neo[c]lip")
end,
dependencies = {
{ "nvim-telescope/telescope.nvim" },
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/custom/plugins/symbols-outline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ return {
symbols_outline.setup()
require("utilities").keymap_set("n", "<Leader>ls", function()
symbols_outline.toggle_outline()
end, "Document [S]ymbols (list)")
end, "list document [s]ymbols")
end,
}
4 changes: 2 additions & 2 deletions nvim/lua/custom/plugins/telescope-file-browser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ return {
},
},
})
telescope.load_extension("recent-files")
telescope.load_extension("file_browser")
require("utilities").keymap_set("n", "<Leader>fb", function()
telescope.extensions.file_browser.file_browser()
end, "File [B]rowser")
end, "file [b]rowser")
end,
dependencies = "nvim-telescope/telescope.nvim",
}
12 changes: 0 additions & 12 deletions nvim/lua/custom/plugins/telescope-fzf-native.lua

This file was deleted.

2 changes: 1 addition & 1 deletion nvim/lua/custom/plugins/telescope-git-conflicts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ return {
telescope.load_extension("conflicts")
require("utilities").keymap_set("n", "<Leader>gC", function()
telescope.extensions.conflicts.conflicts({})
end, "Git [C]onflicts")
end, "git [c]onflicts")
end,
dependencies = "nvim-telescope/telescope.nvim",
}
11 changes: 0 additions & 11 deletions nvim/lua/custom/plugins/telescope-live-grep-args.lua

This file was deleted.

23 changes: 0 additions & 23 deletions nvim/lua/custom/plugins/telescope-project.lua

This file was deleted.

11 changes: 0 additions & 11 deletions nvim/lua/custom/plugins/telescope-recent-files.lua

This file was deleted.

8 changes: 0 additions & 8 deletions nvim/lua/custom/plugins/telescope-ui-select.lua

This file was deleted.

2 changes: 1 addition & 1 deletion nvim/lua/custom/plugins/telescope-undo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ return {
telescope.load_extension("undo")
require("utilities").keymap_set("n", "<Leader>uh", function()
telescope.extensions.undo.undo()
end, "Undo [H]istory")
end, "undo [h]istory")
end,
dependencies = "nvim-telescope/telescope.nvim",
}
8 changes: 4 additions & 4 deletions nvim/lua/custom/plugins/trouble.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ return {

keymap_set("n", "<Leader>ld", function()
trouble.open("document_diagnostics")
end, "[D]ocument Diagnostics (list)")
end, "list [d]ocument diagnostics")
keymap_set("n", "<Leader>lq", function()
trouble.open("quickfix")
end, "Quick [F]ix (list)")
end, "list [q]uick fix")
keymap_set("n", "<Leader>lr", function()
trouble.open("lsp_references")
end, "[R]eferences (list)")
end, "list [r]eferences")
keymap_set("n", "<Leader>lw", function()
trouble.open("workspace_diagnostics")
end, "[W]orkspace diagnostics (list)")
end, "list [w]orkspace diagnostics")
end,
dependencies = { "nvim-tree/nvim-web-devicons" },
}

0 comments on commit fe82321

Please sign in to comment.