forked from nvim-lua/kickstart.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
20 lines (18 loc) · 730 Bytes
/
init.lua
File metadata and controls
20 lines (18 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
---@module 'lazy'
---@type LazySpec
return {
vim.keymap.set('n', '<leader>bc', function()
local path = vim.fn.expand '%:.'
vim.fn.setreg('+', path)
vim.notify('Copied "' .. path .. '" to the clipboard!')
end, { desc = 'Copy relative path of the buffer to clipboard' }),
vim.keymap.set('n', '<leader>bca', function()
local path = vim.fn.expand '%'
vim.fn.setreg('+', path)
vim.notify('Copied "' .. path .. '" to the clipboard!')
end, { desc = 'Copy absolute path of the buffer to clipboard' }),
}