1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 23:50:04 +08:00

feat(pastebin): use lua pastebin for nvim 0.9.0+

This commit is contained in:
wsdjeg 2023-07-14 12:24:21 +08:00
parent 44875ab3a7
commit 7088f82fc7
2 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,13 @@
" License: GPLv3
"=============================================================================
if has('nvim-0.9.0')
function! SpaceVim#plugins#pastebin#paste() abort
lua require('spacevim.plugin.pastebin').paste()
endfunction
finish
endif
let s:JOB = SpaceVim#api#import('job')
let s:LOGGER =SpaceVim#logger#derive('pastebin')

View File

@ -96,6 +96,7 @@ end
function M.paste()
url = ''
local context = get_visual_selection()
log.debug('context is:\n' .. context)
if context == '' then
log.info('no selection text, skipped.')
return