mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 09:00:06 +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
|
" 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:JOB = SpaceVim#api#import('job')
|
||||||
let s:LOGGER =SpaceVim#logger#derive('pastebin')
|
let s:LOGGER =SpaceVim#logger#derive('pastebin')
|
||||||
|
@ -96,6 +96,7 @@ end
|
|||||||
function M.paste()
|
function M.paste()
|
||||||
url = ''
|
url = ''
|
||||||
local context = get_visual_selection()
|
local context = get_visual_selection()
|
||||||
|
log.debug('context is:\n' .. context)
|
||||||
if context == '' then
|
if context == '' then
|
||||||
log.info('no selection text, skipped.')
|
log.info('no selection text, skipped.')
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user