From 74c846a7b6461c2be572c3778d67d5df682a34e9 Mon Sep 17 00:00:00 2001 From: Squibid Date: Sun, 22 Jan 2023 02:00:25 -0500 Subject: moar stuff --- lua/core/maps.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'lua/core/maps.lua') 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", "to", "vw:term", opts) a.nvim_set_keymap("t", "", "", opts) -- open Trouble buffer -a.nvim_set_keymap("n", "tt", ":TroubleToggle", opts) +a.nvim_set_keymap("n", "tt", + "TroubleToggle document_diagnostics", opts) +a.nvim_set_keymap("n", "td", "TodoTrouble", opts) + +-- dismiss notifications +a.nvim_set_keymap("n", "nd", "", { callback = require('notify').dismiss }) -- open file viewer a.nvim_set_keymap("n", "fo", ":Ex", opts) @@ -40,7 +45,7 @@ a.nvim_set_keymap("n", '', "SmartResizeUp", opts) a.nvim_set_keymap("n", '', "SmartResizeRight", opts) -- don't blame me pls -a.nvim_set_keymap("n", "", ":Gitsigns toggle_current_line_blame", opts) +a.nvim_set_keymap("n", "", [[Gitsigns toggle_current_line_blame]], opts) -- telescope a.nvim_set_keymap('n', 'sf', 'Telescope find_files', opts) @@ -51,6 +56,10 @@ a.nvim_set_keymap('n', 'so', 'Telescope oldfiles', opts) a.nvim_set_keymap('n', 'sc', 'Telescope neoclip unnamed', opts) a.nvim_set_keymap('n', 'su', 'Telescope undo', opts) a.nvim_set_keymap('n', 'sd', 'Telescope diagnostics', opts) +a.nvim_set_keymap('n', 'sn', 'Telescope notify', opts) + +-- resource snippets +a.nvim_set_keymap('n', 's', 'source ~/.config/nvim/lua/core/snippets/init.lua', 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 ]] 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 v -- cgit v1.2.1