diff --git a/init.lua b/init.lua index 8827d07..ab477f5 100644 --- a/init.lua +++ b/init.lua @@ -17,3 +17,6 @@ vim.opt.rtp:prepend(lazypath) -- Import plugins require("lazy").setup("plugins") + +-- Set vim.notify +vim.notify = require("notify") diff --git a/lazy-lock.json b/lazy-lock.json index 004c6e3..ef62e16 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -21,12 +21,12 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" }, - "neorg": { "branch": "main", "commit": "0ccc3bba3f67f6f8740b86a50aa5e1428327a741" }, "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, "nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" }, "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-lspconfig": { "branch": "master", "commit": "9099871a7c7e1c16122e00d70208a2cd02078d80" }, + "nvim-notify": { "branch": "master", "commit": "ebcdd8219e2a2cbc0a4bef68002f6867f1fde269" }, "nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" }, "nvim-treesitter": { "branch": "master", "commit": "c4da7945641b2e74915313cd1e608b43877a56b7" }, "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index fb69e19..b0c2fb6 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -2,6 +2,7 @@ return { "LunarVim/bigfile.nvim", "wakatime/vim-wakatime", "j-morano/buffer_manager.nvim", + "rcarriga/nvim-notify", -- NOTE: Plugins diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua deleted file mode 100644 index 080773c..0000000 --- a/lua/plugins/neorg.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - "nvim-neorg/neorg", - build = ":Neorg sync-parsers", - dependencies = "nvim-lua/plenary.nvim", - opts = { - load = { - ["core.defaults"] = {}, - ["core.concealer"] = {}, - ["core.dirman"] = { - config = { - workspaces = { - notes = "~/Sync/Neorg", - work = "~/Sync/Work" - }, - default_workspace = "notes" - } - } - } - } -} diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua index 1e16d6e..d836eb7 100644 --- a/lua/plugins/neotree.lua +++ b/lua/plugins/neotree.lua @@ -10,7 +10,42 @@ return { cmd = "Neotree", opts = { window = { - position = "current" + position = "current", + + mappings = { + ["Y"] = function(state) + local node = state.tree:get_node() + local filepath = node:get_id() + local filename = node.name + local modify = vim.fn.fnamemodify + + + local results = { + filepath, + modify(filepath, ':.'), + modify(filepath, ':~'), + filename, + modify(filename, ':r'), + modify(filename, ':e'), + } + + vim.ui.select({ + '1. Absolute path: ' .. results[1], + '2. Path relative to CWD: ' .. results[2], + '3. Path relative to HOME: ' .. results[3], + '4. Filename: ' .. results[4], + '5. Filename without extension: ' .. results[5], + '6. Extension of the filename: ' .. results[6], + }, { prompt = 'Choose to copy to clipboard:' }, function(choice) + if choice then + local i = tonumber(choice:sub(1, 1)) + local result = results[i] + vim.fn.setreg('"+', result) + vim.notify("Copied: " .. result) + end + end) + end + } } } } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index e9d1276..33e1386 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -13,9 +13,8 @@ return { telescope.setup { pickers = { - find_files = { - theme = "dropdown" - } + fd = { theme = "dropdown" }, + current_buffer_fuzzy_find = { theme = "dropdown" } } } diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua index a6d6f8a..372cf7f 100644 --- a/lua/plugins/whichkey.lua +++ b/lua/plugins/whichkey.lua @@ -6,7 +6,7 @@ local function config() -- Finders f = { name = "Finders", - f = { "Telescope find_files", "Find files" }, + f = { "Telescope fd", "Find files" }, w = { "Telescope live_grep", "Text grep" }, s = { "Telescope spell_suggest", "Spell suggest" }, t = { "TodoTelescope", "Todos" },