diff --git a/init.lua b/init.lua index d930002..682a253 100644 --- a/init.lua +++ b/init.lua @@ -59,6 +59,8 @@ vim.keymap.set("n", "", 'echo "Use j to move!!"') -- C-BS for deleting whole word in insert mode vim.keymap.set("i", "", "", { noremap = true }) +-- Setup notifications + -- Keybinds for MiniSessions vim.keymap.set("n", "qj", function() -- quit and save session local MiniSessions.write(".session") @@ -66,8 +68,13 @@ vim.keymap.set("n", "qj", function() -- quit and save session local end, { noremap = true }) vim.keymap.set("n", "qw", function() -- quit and save session global - MiniSessions.write(vim.cmd("pwd")) - vim.cmd("wqa") + local sessionName = vim.fn.input("Session Name: ") + if sessionName ~= "" then + MiniSessions.write(sessionName) + vim.cmd("wqa") + else + vim.notify("Session Name Invalid", vim.log.levels.INFO) + end end, { noremap = true }) vim.keymap.set("n", "qd", function() -- quit and delete session diff --git a/lua/plugins/functional/flash.lua b/lua/plugins/functional/flash.lua index ebf713b..016e2ba 100644 --- a/lua/plugins/functional/flash.lua +++ b/lua/plugins/functional/flash.lua @@ -36,13 +36,5 @@ return { end, desc = "Treesitter Search", }, - { - "", - mode = { "c" }, - function() - require("flash").toggle() - end, - desc = "Toggle Flash Search", - }, }, } diff --git a/lua/plugins/functional/mini.lua b/lua/plugins/functional/mini.lua index 70ab81f..21d9d25 100644 --- a/lua/plugins/functional/mini.lua +++ b/lua/plugins/functional/mini.lua @@ -28,6 +28,11 @@ return { require("mini.notify").setup({ window = { winblend = 0 }, }) -- Better Notifications + vim.notify = MiniNotify.make_notify({ + ERROR = { duration = 5000 }, + WARN = { duration = 4000 }, + INFO = { duration = 3000 }, + }) require("mini.surround").setup() -- Suround selections with characters require("mini.move").setup({ mappings = { diff --git a/lua/plugins/functional/neorg/neorg.lua b/lua/plugins/functional/neorg.lua similarity index 100% rename from lua/plugins/functional/neorg/neorg.lua rename to lua/plugins/functional/neorg.lua diff --git a/lua/plugins/functional/neorg/neorg-telescope.lua b/lua/plugins/functional/neorg/neorg-telescope.lua deleted file mode 100644 index 81766b5..0000000 --- a/lua/plugins/functional/neorg/neorg-telescope.lua +++ /dev/null @@ -1 +0,0 @@ -return { "nvim-neorg/neorg-telescope" } diff --git a/lua/plugins/functional/telescope.lua b/lua/plugins/functional/telescope.lua index 1093bb0..d0ee6da 100644 --- a/lua/plugins/functional/telescope.lua +++ b/lua/plugins/functional/telescope.lua @@ -10,7 +10,6 @@ return { extensions = { file_browser = { theme = "ivy", - -- disables netrw and use telescope-file-browser in its place hijack_netrw = true, }, ["ui-select"] = { @@ -27,7 +26,11 @@ return { end, { desc = "Telescope find files (current file dir)" }) vim.keymap.set("n", "fn", function() - require("telescope").extensions.file_browser.file_browser() + local full_path = vim.api.nvim_buf_get_name(0) + local dir = vim.fn.fnamemodify(full_path, ":h") + require("telescope").extensions.file_browser.file_browser({ + path = dir, + }) end) vim.keymap.set("n", "fs", function() -- select sessions diff --git a/lua/plugins/ui/noice.lua b/lua/plugins/ui/noice.lua index 999acc3..9130fcb 100644 --- a/lua/plugins/ui/noice.lua +++ b/lua/plugins/ui/noice.lua @@ -2,7 +2,12 @@ return { "folke/noice.nvim", event = "VeryLazy", opts = { - -- add any options here + messages = { + enabled = false, + }, + notify = { + enabled = false, + }, }, dependencies = { -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries