Add notifications and neotree copy options
This commit is contained in:
3
init.lua
3
init.lua
@@ -17,3 +17,6 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
|
|
||||||
-- Import plugins
|
-- Import plugins
|
||||||
require("lazy").setup("plugins")
|
require("lazy").setup("plugins")
|
||||||
|
|
||||||
|
-- Set vim.notify
|
||||||
|
vim.notify = require("notify")
|
||||||
|
|||||||
@@ -21,12 +21,12 @@
|
|||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
|
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" },
|
||||||
"neorg": { "branch": "main", "commit": "0ccc3bba3f67f6f8740b86a50aa5e1428327a741" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" },
|
"nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" },
|
"nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "9099871a7c7e1c16122e00d70208a2cd02078d80" },
|
"nvim-lspconfig": { "branch": "master", "commit": "9099871a7c7e1c16122e00d70208a2cd02078d80" },
|
||||||
|
"nvim-notify": { "branch": "master", "commit": "ebcdd8219e2a2cbc0a4bef68002f6867f1fde269" },
|
||||||
"nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" },
|
"nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "c4da7945641b2e74915313cd1e608b43877a56b7" },
|
"nvim-treesitter": { "branch": "master", "commit": "c4da7945641b2e74915313cd1e608b43877a56b7" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" },
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ return {
|
|||||||
"LunarVim/bigfile.nvim",
|
"LunarVim/bigfile.nvim",
|
||||||
"wakatime/vim-wakatime",
|
"wakatime/vim-wakatime",
|
||||||
"j-morano/buffer_manager.nvim",
|
"j-morano/buffer_manager.nvim",
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
|
||||||
-- NOTE: Plugins
|
-- NOTE: Plugins
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,7 +10,42 @@ return {
|
|||||||
cmd = "Neotree",
|
cmd = "Neotree",
|
||||||
opts = {
|
opts = {
|
||||||
window = {
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,8 @@ return {
|
|||||||
|
|
||||||
telescope.setup {
|
telescope.setup {
|
||||||
pickers = {
|
pickers = {
|
||||||
find_files = {
|
fd = { theme = "dropdown" },
|
||||||
theme = "dropdown"
|
current_buffer_fuzzy_find = { theme = "dropdown" }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ local function config()
|
|||||||
-- Finders
|
-- Finders
|
||||||
f = {
|
f = {
|
||||||
name = "Finders",
|
name = "Finders",
|
||||||
f = { "<cmd>Telescope find_files<CR>", "Find files" },
|
f = { "<cmd>Telescope fd<CR>", "Find files" },
|
||||||
w = { "<cmd>Telescope live_grep<CR>", "Text grep" },
|
w = { "<cmd>Telescope live_grep<CR>", "Text grep" },
|
||||||
s = { "<cmd>Telescope spell_suggest<CR>", "Spell suggest" },
|
s = { "<cmd>Telescope spell_suggest<CR>", "Spell suggest" },
|
||||||
t = { "<cmd>TodoTelescope<CR>", "Todos" },
|
t = { "<cmd>TodoTelescope<CR>", "Todos" },
|
||||||
|
|||||||
Reference in New Issue
Block a user