turned pastify on again
This commit is contained in:
parent
78794265d1
commit
e1dbc59bc9
@ -1,13 +1,49 @@
|
|||||||
|
local path = vim.fn.expand '%:h'
|
||||||
return {
|
return {
|
||||||
"TobinPalmer/pastify.nvim",
|
'TobinPalmer/pastify.nvim',
|
||||||
cmd = { "Pastify", "PastifyAfter" },
|
cmd = { 'Pastify', 'PastifyAfter' },
|
||||||
config = function()
|
event = { 'BufReadPost' }, -- Load after the buffer is read, I like to be able to paste right away
|
||||||
require("pastify").setup({
|
keys = {
|
||||||
opts = {
|
{ noremap = true, mode = 'x', '<leader>p', '<cmd>PastifyAfter<CR>' },
|
||||||
absolute_path = true,
|
{ noremap = true, mode = 'n', '<leader>p', '<cmd>PastifyAfter<CR>' },
|
||||||
save = "local_file",
|
{ noremap = true, mode = 'n', '<leader>P', '<cmd>Pastify<CR>' },
|
||||||
local_path = "Library/CloudStorage/OneDrive-VrijeUniversiteitAmsterdam/screenshots/",
|
|
||||||
},
|
},
|
||||||
})
|
config = function()
|
||||||
|
require('pastify').setup {
|
||||||
|
opts = {
|
||||||
|
-- absolute_path = true, -- use absolute or relative path to the working directory
|
||||||
|
absolute_path = false,
|
||||||
|
apikey = '', -- Api key, required for online saving
|
||||||
|
-- local_path = path .. '/attachments/', -- The path to put local files in, ex ~/Projects/<name>/assets/images/<imgname>.png
|
||||||
|
local_path = '',
|
||||||
|
save = 'local_file', -- Either 'local' or 'online' or 'local_file'
|
||||||
|
filename = function()
|
||||||
|
return vim.fn.expand '%:t:r' .. '_' .. os.date '%Y-%m-%d_%H-%M-%S'
|
||||||
|
end,
|
||||||
|
default_ft = 'markdown', -- Default filetype to use
|
||||||
|
},
|
||||||
|
ft = { -- Custom snippets for different filetypes, will replace $IMG$ with the image url
|
||||||
|
html = '<img src="$IMG$" alt="">',
|
||||||
|
markdown = '',
|
||||||
|
tex = [[\includegraphics[width=\linewidth]{$IMG$}]],
|
||||||
|
css = 'background-image: url("$IMG$");',
|
||||||
|
js = 'const img = new Image(); img.src = "$IMG$";',
|
||||||
|
xml = '<image src="$IMG$" />',
|
||||||
|
php = '<?php echo "<img src="$IMG$" alt="">"; ?>',
|
||||||
|
python = '# $IMG$',
|
||||||
|
java = '// $IMG$',
|
||||||
|
c = '// $IMG$',
|
||||||
|
cpp = '// $IMG$',
|
||||||
|
swift = '// $IMG$',
|
||||||
|
kotlin = '// $IMG$',
|
||||||
|
go = '// $IMG$',
|
||||||
|
typescript = '// $IMG$',
|
||||||
|
ruby = '# $IMG$',
|
||||||
|
vhdl = '-- $IMG$',
|
||||||
|
verilog = '// $IMG$',
|
||||||
|
systemverilog = '// $IMG$',
|
||||||
|
lua = '-- $IMG$',
|
||||||
|
},
|
||||||
|
}
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user