summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-05 10:47:44 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-05 10:47:44 +0900
commit1f755938761193399cad1f740fe58ec2483c2eac (patch)
treebcaeb92d27e0306f0952a702589aaeb04d68d308 /ar
parent77e535a277b59db201847a23f1d827f3bba01e7f (diff)
modified core/keymaps.lua, modified plugins/markdown.lua, modified plugins/telescope.lua, modified plugins/wiki.lua, created plugins/todo.lua
Diffstat (limited to 'ar')
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua5
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua8
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/telescope.lua63
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/todo.lua14
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua92
5 files changed, 168 insertions, 14 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua
index da9b3d6..993b051 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua
@@ -19,7 +19,7 @@ vim.keymap.set({ "n", "t" }, "<S-l>", "<cmd>bnext<cr>", { desc = "Next buffer" }
vim.keymap.set("n", "<leader><leader>", "<cmd>e #<cr>", { desc = "Switch to last buffer" })
vim.keymap.set({ "n", "v", "x", "t" }, "<leader>bd", "<cmd>:bd<cr>", { desc = "Close buffer" })
vim.keymap.set({ "n", "v", "x", "t" }, "<leader>BD", "<cmd>:bd!<cr>", { desc = "Force close buffer" })
-vim.keymap.set("n", "<leader>bn", "<cmd>enew<cr>", { desc = "New buffer" })
+vim.keymap.set("n", "<leader>bn", "<cmd>enew<cr>", { desc = "Open new buffer" })
vim.keymap.set({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save current buffer" })
vim.keymap.set({ "n", "v" }, "<leader>wq", "<cmd>wq<cr>", { desc = "Save current buffer and quit" })
vim.keymap.set({ "n", "v" }, "<leader>WQ", "<cmd>wqa<cr>", { desc = "Save all buffers and quit" })
@@ -154,9 +154,6 @@ vim.keymap.set("n", "<leader>qe", function()
end
end, { desc = "Close explorer (netrw)" })
--- Files
-vim.keymap.set("n", "<leader>fn", "<cmd>enew<cr>", { desc = "Open new buffer" })
-
-- Fix List & Trouble
vim.keymap.set("n", "[o", "<cmd>lprev<cr>zz", { desc = "Previous location" })
vim.keymap.set("n", "]o", "<cmd>lnext<cr>zz", { desc = "Next location" })
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
index 3199bec..51e3d50 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
@@ -248,6 +248,14 @@ return {
},
},
{
+ "ellisonleao/glow.nvim",
+ config = true,
+ cmd = "Glow",
+ keys = {
+ { "<leader>mf", "<cmd>Glow<CR>", desc = "Floating markdown preview" },
+ },
+ },
+ {
"dhruvasagar/vim-open-url",
init = function()
local wk = require("which-key")
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",
- "<leader>flf",
- ":lua require('telescope').extensions.live_grep_args.live_grep_args()<CR>",
- { desc = "Find live grep args" }
- )
+ vim.keymap.set("n", "<leader>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(
@@ -449,6 +446,52 @@ return {
},
},
{
+ "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 = {
+ ["<CR>"] = bibtex_actions.key_append("%s"), -- format is determined by filetype if the user has not set it explictly
+ ["<C-e>"] = bibtex_actions.entry_append,
+ ["<C-a>"] = bibtex_actions.citation_append("{{author}} ({{year}}), {{title}}."),
+ },
+ },
+ },
+ },
+ })
+ require("telescope").load_extension("bibtex")
+ end,
+ keys = {
+ {
+ "<leader>sB",
+ function()
+ require("telescope").extensions.bibtex.bibtex()
+ end,
+ desc = "Search bibtex",
+ },
+ },
+ },
+ {
+ "mzlogin/vim-markdown-toc",
+ keys = {
+ { "<leader>tg", "<cmd>GenTocGFM<CR>", desc = "Generate ToC to GFM" },
+ { "<leader>tr", "<cmd>GenTocRedcarpet<CR>", desc = "Generate ToC to Redcarpet" },
+ { "<leader>tl", "<cmd>GenTocGitLab<CR>", desc = "Generate ToC to Gitlab" },
+ { "<leader>tm", "<cmd>GenTocMarked<CR>", desc = "Generate ToC to Marked" },
+ },
+ },
+ {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
@@ -720,7 +763,7 @@ return {
vim.keymap.set("n", "<leader>fpb", function()
require("telescope.builtin").find_files({ cwd = vim.fn.expand("~/Public") })
end, { desc = "Find public files" })
- vim.keymap.set("n", "<leader>fr", function()
+ vim.keymap.set("n", "<leader>fa", function()
require("telescope.builtin").find_files({
cwd = vim.fn.expand("~/.local/bin"),
})
@@ -788,10 +831,10 @@ return {
vim.keymap.set("n", "<leader>sa", function()
require("telescope.builtin").autocommands({})
end, { desc = "Search auto commands" })
- vim.keymap.set("n", "<leader>sbf", function()
+ vim.keymap.set("n", "<leader>sb", function()
require("telescope.builtin").current_buffer_fuzzy_find({})
end, { desc = "Search current buffers " })
- vim.keymap.set("n", "<leader>sbt", function()
+ vim.keymap.set("n", "<leader>st", function()
require("telescope.builtin").current_buffer_tags({})
end, { desc = "Search current buffer tags" })
vim.keymap.set("n", "<leader>sc", function()
@@ -848,7 +891,7 @@ return {
vim.keymap.set("n", "<leader>sR", function()
require("telescope.builtin").resume({})
end, { desc = "Search resume" })
- vim.keymap.set("n", "<leader>st", function()
+ vim.keymap.set("n", "<leader>sf", function()
require("telescope.builtin").filetypes({})
end, { desc = "Search file types" })
vim.keymap.set("n", "<leader>sw", function()
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/todo.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/todo.lua
new file mode 100644
index 0000000..19947ae
--- /dev/null
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/todo.lua
@@ -0,0 +1,14 @@
+return {
+ "vimichael/floatingtodo.nvim",
+ config = function()
+ require("floatingtodo").setup({
+ target_file = "~/.local/share/vimwiki/todo.md",
+ border = "single", -- single, rounded, etc.
+ width = 0.8, -- width of window in % of screen size
+ height = 0.8, -- height of window in % of screen size
+ position = "center", -- topleft, topright, bottomleft, bottomright
+ })
+
+ vim.keymap.set("n", "<leader>tf", ":Td<CR>", { silent = true, desc = "Todo floating" })
+ end,
+}
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua
index a14181c..3c94532 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua
@@ -55,4 +55,96 @@ return {
vim.g.taskwiki_data_location = "~/.local/share/task"
end,
},
+ {
+ "renerocksai/telekasten.nvim",
+ dependencies = {
+ "nvim-telescope/telescope.nvim",
+ "nvim-telekasten/calendar-vim",
+ },
+ init = function()
+ local wk = require("which-key")
+ wk.add({
+ mode = { "n" },
+ { "<leader>n", group = "Notes" },
+ })
+ end,
+ config = function()
+ require("telekasten").setup({
+ home = vim.fn.expand("~/.local/share/vimwiki"), -- Put the name of your notes directory here
+ })
+ end,
+ keys = {
+ {
+ "<leader>fn",
+ function()
+ require("telekasten").find_notes()
+ end,
+ desc = "Find notes",
+ },
+ {
+ "<leader>np",
+ function()
+ require("telekasten").panel()
+ end,
+ desc = "Open note panel",
+ },
+ {
+ "<leader>sn",
+ function()
+ require("telekasten").search_notes()
+ end,
+ desc = "Search notes",
+ },
+ {
+ "<leader>nt",
+ function()
+ require("telekasten").goto_today()
+ end,
+ desc = "Goto today notes",
+ },
+ {
+ "<leader>nl",
+ function()
+ require("telekasten").follow_link()
+ end,
+ desc = "Follow link",
+ },
+ {
+ "<leader>nn",
+ function()
+ require("telekasten").new_note()
+ end,
+ desc = "Open new note",
+ },
+ {
+ "<leader>tc",
+ function()
+ require("telekasten").show_calendar()
+ end,
+ desc = "Show calendar",
+ },
+ {
+ "<leader>nb",
+ function()
+ require("telekasten").show_backlinks()
+ end,
+ desc = "Show backlinks",
+ },
+ {
+ "<leader>ii",
+ function()
+ require("telekasten").insert_img_link()
+ end,
+ desc = "Insert image link",
+ },
+ {
+ mode = "i",
+ "]]",
+ function()
+ require("telekasten").insert_link()
+ end,
+ desc = "Insert link",
+ },
+ },
+ },
}