spacevim/autoload/SpaceVim/layers/lang/asciidoc.vim
JIe 2bb7059579
Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
init
2024-08-21 14:17:26 +08:00

79 lines
2.4 KiB
VimL

"=============================================================================
" asciidoc.vim --- lang#asciidoc layer
" Copyright (c) 2016-2023 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg@outlook.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
""
" @section lang#asciidoc, layers-lang-asciidoc
" @parentsection layers
" This layer provides syntax highlighting for asciidoc. To enable this
" layer:
" >
" [[layers]]
" name = "lang#asciidoc"
" <
func! SpaceVim#layers#lang#asciidoc#plugins() abort
return [
\ [g:_spacevim_root_dir . 'bundle/vim-asciidoc', {'merged' : 0}],
\ [g:_spacevim_root_dir . 'bundle/VimRegStyle', {'merged' : 0}],
\ ]
endf
function! SpaceVim#layers#lang#asciidoc#config() abort
call SpaceVim#mapping#space#regesit_lang_mappings('asciidoc', function('s:language_specified_mappings'))
" tagbar configuration
"
let ctags_version = system('ctags --version')
if !v:shell_error && ctags_version =~# 'Universal Ctags'
else
let g:tagbar_type_asciidoc = {
\ 'ctagstype' : 'asciidoc',
\ 'kinds' : [
\ 'h:table of contents',
\ 'a:anchors:1',
\ 't:titles:1',
\ 'n:includes:1',
\ 'i:images:1',
\ 'I:inline images:1'
\ ],
\ 'deffile': g:_spacevim_root_dir . 'bundle/vim-asciidoc/ctags/asciidoc.conf' ,
\ 'sort' : 0
\ }
endif
endfunction
function! s:language_specified_mappings() abort
call SpaceVim#mapping#space#langSPC('nmap', ['l','h'],
\ 'call call('
\ . string(function('s:compile_to_html')) . ', [])',
\ 'compile-to-html', 1)
endfunction
function! s:compile_to_html() abort
let input = expand('%')
let target = fnamemodify(input, ':r') . '.html'
let cmd = printf('asciidoc -o %s %s', target, input)
call system(cmd)
endfunction
function! SpaceVim#layers#lang#asciidoc#health() abort
call SpaceVim#layers#lang#asciidoc#plugins()
call SpaceVim#layers#lang#asciidoc#config()
return 1
endfunction
" https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/
" https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/
" VimRegStyle based on https://github.com/Raimondi/VimRegStyle/commit/771e32e659b345cf29993d517e08b6b3f741f9c6
" vim-asciidoc is based on https://github.com/wsdjeg/vim-asciidoc/