mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 21:00:03 +08:00
feat(pastebin): use lua pastebin for nvim 0.9.0+
This commit is contained in:
parent
44875ab3a7
commit
7088f82fc7
@ -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')
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user