summaryrefslogtreecommitdiffstats
path: root/lua/core/maps.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/core/maps.lua')
-rw-r--r--lua/core/maps.lua18
1 files changed, 16 insertions, 2 deletions
diff --git a/lua/core/maps.lua b/lua/core/maps.lua
index 457ed98..bd4367e 100644
--- a/lua/core/maps.lua
+++ b/lua/core/maps.lua
@@ -10,7 +10,12 @@ a.nvim_set_keymap("n", "<leader>to", "<C-w>v<C-w>w:term<CR>", opts)
a.nvim_set_keymap("t", "<ESC>", "<C-\\><C-n>", opts)
-- open Trouble buffer
-a.nvim_set_keymap("n", "<leader>tt", "<cmd>:TroubleToggle<CR>", opts)
+a.nvim_set_keymap("n", "<leader>tt",
+ "<cmd>TroubleToggle document_diagnostics<CR>", opts)
+a.nvim_set_keymap("n", "<leader>td", "<cmd>TodoTrouble<CR>", opts)
+
+-- dismiss notifications
+a.nvim_set_keymap("n", "<leader>nd", "", { callback = require('notify').dismiss })
-- open file viewer
a.nvim_set_keymap("n", "<leader>fo", ":Ex<CR>", opts)
@@ -40,7 +45,7 @@ a.nvim_set_keymap("n", '<C-k>', "<cmd>SmartResizeUp<CR>", opts)
a.nvim_set_keymap("n", '<C-l>', "<cmd>SmartResizeRight<CR>", opts)
-- don't blame me pls
-a.nvim_set_keymap("n", "<C-g>", ":Gitsigns toggle_current_line_blame<CR>", opts)
+a.nvim_set_keymap("n", "<C-g>", [[<cmd>Gitsigns toggle_current_line_blame<CR>]], opts)
-- telescope
a.nvim_set_keymap('n', '<leader>sf', '<cmd>Telescope find_files<CR>', opts)
@@ -51,6 +56,10 @@ a.nvim_set_keymap('n', '<leader>so', '<cmd>Telescope oldfiles<CR>', opts)
a.nvim_set_keymap('n', '<leader>sc', '<cmd>Telescope neoclip unnamed<CR>', opts)
a.nvim_set_keymap('n', '<leader>su', '<cmd>Telescope undo<CR>', opts)
a.nvim_set_keymap('n', '<leader>sd', '<cmd>Telescope diagnostics<CR>', opts)
+a.nvim_set_keymap('n', '<leader>sn', '<cmd>Telescope notify<CR>', opts)
+
+-- resource snippets
+a.nvim_set_keymap('n', '<leader><leader>s', '<cmd>source ~/.config/nvim/lua/core/snippets/init.lua<CR>', opts)
-- auto comand keybinds
-- add some keybinds to the file view
@@ -71,6 +80,7 @@ a.nvim_create_autocmd('FileType', {
-- vbox note taking
function _G.Toggle_venn()
local venn_enabled = vim.inspect(vim.b.venn_enabled)
+ vim.notify = require('notify')
if venn_enabled == "nil" then
vim.b.venn_enabled = true
cmd[[setlocal ve=all]]
@@ -86,12 +96,16 @@ function _G.Toggle_venn()
-- make easier to navigate
o.cursorcolumn = true
o.colorcolumn = { 0 }
+ -- notify
+ vim.notify("venn toggled on", "info", { title = "Neovim config" })
else
cmd[[setlocal ve=]]
cmd[[mapclear <buffer>]]
vim.b.venn_enabled = nil
o.cursorcolumn = false
o.colorcolumn = { 80 }
+ -- notify
+ vim.notify("venn toggled off", "info", { title = "Neovim config" })
end
end
-- toggle keymappings for venn using <leader>v