From 1f755938761193399cad1f740fe58ec2483c2eac Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Thu, 5 Jun 2025 10:47:44 +0900 Subject: modified core/keymaps.lua, modified plugins/markdown.lua, modified plugins/telescope.lua, modified plugins/wiki.lua, created plugins/todo.lua --- .../lua/thesiahxyz/plugins/telescope.lua | 63 ++++++++++++++++++---- 1 file changed, 53 insertions(+), 10 deletions(-) (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/telescope.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/telescope.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/telescope.lua index ceb6872..8e1fbe6 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/telescope.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/telescope.lua @@ -304,12 +304,9 @@ return { }, }) require("telescope").load_extension("live_grep_args") - vim.keymap.set( - "n", - "flf", - ":lua require('telescope').extensions.live_grep_args.live_grep_args()", - { desc = "Find live grep args" } - ) + vim.keymap.set("n", "flf", function() + require("telescope").extensions.live_grep_args.live_grep_args() + end, { desc = "Find live grep args" }) local live_grep_args_shortcuts = require("telescope-live-grep-args.shortcuts") vim.keymap.set( @@ -448,6 +445,52 @@ return { { "se", ":Telescope emoji", desc = "Search emoji" }, }, }, + { + "nvim-telescope/telescope-bibtex.nvim", + requires = { + { "nvim-telescope/telescope.nvim" }, + }, + config = function() + local bibtex_actions = require("telescope-bibtex.actions") + require("telescope").setup({ + extensions = { + bibtex = { + -- Use context awareness + context = true, + -- Use non-contextual behavior if no context found + -- This setting has no effect if context = false + context_fallback = true, + mappings = { + i = { + [""] = bibtex_actions.key_append("%s"), -- format is determined by filetype if the user has not set it explictly + [""] = bibtex_actions.entry_append, + [""] = bibtex_actions.citation_append("{{author}} ({{year}}), {{title}}."), + }, + }, + }, + }, + }) + require("telescope").load_extension("bibtex") + end, + keys = { + { + "sB", + function() + require("telescope").extensions.bibtex.bibtex() + end, + desc = "Search bibtex", + }, + }, + }, + { + "mzlogin/vim-markdown-toc", + keys = { + { "tg", "GenTocGFM", desc = "Generate ToC to GFM" }, + { "tr", "GenTocRedcarpet", desc = "Generate ToC to Redcarpet" }, + { "tl", "GenTocGitLab", desc = "Generate ToC to Gitlab" }, + { "tm", "GenTocMarked", desc = "Generate ToC to Marked" }, + }, + }, { "ThePrimeagen/harpoon", branch = "harpoon2", @@ -720,7 +763,7 @@ return { vim.keymap.set("n", "fpb", function() require("telescope.builtin").find_files({ cwd = vim.fn.expand("~/Public") }) end, { desc = "Find public files" }) - vim.keymap.set("n", "fr", function() + vim.keymap.set("n", "fa", function() require("telescope.builtin").find_files({ cwd = vim.fn.expand("~/.local/bin"), }) @@ -788,10 +831,10 @@ return { vim.keymap.set("n", "sa", function() require("telescope.builtin").autocommands({}) end, { desc = "Search auto commands" }) - vim.keymap.set("n", "sbf", function() + vim.keymap.set("n", "sb", function() require("telescope.builtin").current_buffer_fuzzy_find({}) end, { desc = "Search current buffers " }) - vim.keymap.set("n", "sbt", function() + vim.keymap.set("n", "st", function() require("telescope.builtin").current_buffer_tags({}) end, { desc = "Search current buffer tags" }) vim.keymap.set("n", "sc", function() @@ -848,7 +891,7 @@ return { vim.keymap.set("n", "sR", function() require("telescope.builtin").resume({}) end, { desc = "Search resume" }) - vim.keymap.set("n", "st", function() + vim.keymap.set("n", "sf", function() require("telescope.builtin").filetypes({}) end, { desc = "Search file types" }) vim.keymap.set("n", "sw", function() -- cgit v1.2.3