vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

asciidoc(tor) issues #1659

Closed synthmeat closed 8 years ago

synthmeat commented 8 years ago

asciidoc checker (with asciidoc binary) gives false positive warnings (on filters which work), while with asciidoctor binary it does not throw warnings at all for anything.

No errors reported, extended logs look fine.

lcd047 commented 8 years ago

Please open an asciidoc file, set g:syntastic_debug to 3, run the checker, run :mes, and post the output.

synthmeat commented 8 years ago

Here's the output of two runs with it, one with asciidoc and one with asciidoctor, as well as adoc in question and vimrc, if relevant.

asciidoc

"notes.adoc" 164L, 3641C
syntastic: 0.075293: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shellslash = 0, &shelltemp = 1, &shellxquote = '', &shellxescape = ''
syntastic: 0.075827: UpdateErrors (auto): default checkers
syntastic: 0.076198: CacheErrors: default checkers
syntastic: 0.076979: g:syntastic_aggregate_errors = 1
syntastic: 0.077899: getcwd() = '/Users/synthmeat/Projects/showdown/showdown-stuff'
syntastic: 0.080704: CacheErrors: Invoking checker: asciidoc/asciidoc
syntastic: 0.083679: SyntasticMake: called with options: {'errorformat': '%Easciidoc: %tRROR: %f: line %l: %m,%Easciidoc: %tRROR: %f: %m,%Easciidoc: FAILED: %f: line %l: %m,%Easciidoc: FAILED: %f: %m,%Wasciidoc: %tARNING: %
f: line %l: %m,%Wasciidoc: %tARNING: %f: %m,%Wasciidoc: DEPRECATED: %f: line %l: %m,%Wasciidoc: DEPRECATED: %f: %m', 'makeprg': 'asciidoc -o /dev/null notes.adoc', 'returns': [0, 1]}
syntastic: 0.560053: checker output: ['asciidoc: WARNING: notes.adoc: line 147: missing style: [blockdef-open]: sidear', 'music2png.py: [Errno 13] Permission denied: ''/dev/notes__1.md5''', 'asciidoc: WARNING: notes.adoc: l
ine 163: filter non-zero exit code: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" -: returned 1', 'asciidoc: WARNING: notes.adoc:
line 163: no output from filter: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" -', '']
syntastic: 0.560985: raw loclist: [{'lnum': 147, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern': '', 'text': 'missing style: [blockdef-open]: sidear'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid
': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'music2png.py: [Errno 13] Permission denied: ''/dev/notes__1.md5'''}, {'lnum': 163, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern'
: '', 'text': 'filter non-zero exit code: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" -: returned 1'}, {'lnum': 163, 'bufnr': 1,
 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern': '', 'text': 'no output from filter: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o
"/dev/notes__1.png" -'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]
syntastic: 0.561745: getLocList: checker asciidoc/asciidoc returned 0
syntastic: 0.562034: asciidoc/asciidoc raw: [{'lnum': 147, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern': '', 'text': 'missing style: [blockdef-open]: sidear'}, {'lnum': 0, 'bufnr': 0, 'col':
 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'music2png.py: [Errno 13] Permission denied: ''/dev/notes__1.md5'''}, {'lnum': 163, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W',
 'pattern': '', 'text': 'filter non-zero exit code: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" -: returned 1'}, {'lnum': 163, '
bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern': '', 'text': 'no output from filter: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.
py" -m -o "/dev/notes__1.png" -'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]
syntastic: 0.562790: quiet_messages filter: {'regex': 'main redeclared'}
syntastic: 0.563300: filtered by quiet_messages: [{'lnum': 147, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern': '', 'text': 'missing style: [blockdef-open]: sidear'}, {'lnum': 0, 'bufnr': 0, '
col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'music2png.py: [Errno 13] Permission denied: ''/dev/notes__1.md5'''}, {'lnum': 163, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type':
 'W', 'pattern': '', 'text': 'filter non-zero exit code: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" -: returned 1'}, {'lnum': 1
63, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern': '', 'text': 'no output from filter: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music
2png.py" -m -o "/dev/notes__1.png" -'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]
syntastic: 0.564548: aggregated: {'_sorted': 0, '_name': 'asciidoc (asciidoc)', '_owner': 1, '_columns': 1, '_rawLoclist': [{'lnum': 147, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern': '', 't
ext': 'missing style: [blockdef-open]: sidear [asciidoc/asciidoc]'}, {'lnum': 163, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': 'W', 'pattern': '', 'text': 'filter non-zero exit code: "/usr/local/opt/pytho
n/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" -: returned 1 [asciidoc/asciidoc]'}, {'lnum': 163, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1,
 'type': 'W', 'pattern': '', 'text': 'no output from filter: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" - [asciidoc/asciidoc]'}
]}
syntastic: 0.565473: sorted: {'_sorted': 1, '_name': 'asciidoc (asciidoc)', '_owner': 1, '_columns': 1, '_rawLoclist': [{'lnum': 147, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'scol': 0, 'type': 'W', 'pattern':
 '', 'text': 'missing style: [blockdef-open]: sidear [asciidoc/asciidoc]'}, {'lnum': 163, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'scol': 0, 'type': 'W', 'pattern': '', 'text': 'filter non-zero exit code: "/u
sr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" -: returned 1 [asciidoc/asciidoc]'}, {'lnum': 163, 'bufnr': 1, 'col': 0, 'valid': 1, 'v
col': 0, 'nr': -1, 'scol': 0, 'type': 'W', 'pattern': '', 'text': 'no output from filter: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1
.png" - [asciidoc/asciidoc]'}]}

asciidoctor

"notes.adoc" 164L, 3641C
syntastic: 0.072301: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shellslash = 0, &shelltemp = 1, &shellxquote = '', &shellxescape = ''
syntastic: 0.072765: UpdateErrors (auto): default checkers
syntastic: 0.073151: CacheErrors: default checkers
syntastic: 0.073936: g:syntastic_aggregate_errors = 1
syntastic: 0.074193: getcwd() = '/Users/synthmeat/Projects/showdown/showdown-stuff'
syntastic: 0.076734: CacheErrors: Invoking checker: asciidoc/asciidoc
syntastic: 0.077975: SyntasticMake: called with options: {'errorformat': '%Easciidoc: %tRROR: %f: line %l: %m,%Easciidoc: %tRROR: %f: %m,%Easciidoc: FAILED: %f: line %l: %m,%Easciidoc: FAILED: %f: %m,%Wasciidoc: %tARNING: %
f: line %l: %m,%Wasciidoc: %tARNING: %f: %m,%Wasciidoc: DEPRECATED: %f: line %l: %m,%Wasciidoc: DEPRECATED: %f: %m', 'makeprg': 'asciidoctor -o /dev/null notes.adoc', 'returns': [0, 1]}
syntastic: 0.209522: checker output: ['asciidoctor: WARNING: notes.adoc: line 147: invalid style for open block: sidear', 'asciidoctor: WARNING: notes.adoc: line 154: invalid style for listing block: music', '']
syntastic: 0.210166: raw loclist: [{'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'asciidoctor: WARNING: notes.adoc: line 147: invalid style for open block: sidear'}, {
'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'asciidoctor: WARNING: notes.adoc: line 154: invalid style for listing block: music'}, {'lnum': 0, 'bufnr': 0, 'col': 0, '
valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]
syntastic: 0.210692: getLocList: checker asciidoc/asciidoc returned 0
syntastic: 0.210907: asciidoc/asciidoc raw: [{'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'asciidoctor: WARNING: notes.adoc: line 147: invalid style for open block: s
idear'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'asciidoctor: WARNING: notes.adoc: line 154: invalid style for listing block: music'}, {'lnum': 0, 'bufnr': 0, '
col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]
syntastic: 0.211474: quiet_messages filter: {'regex': 'main redeclared'}
syntastic: 0.211932: filtered by quiet_messages: [{'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'asciidoctor: WARNING: notes.adoc: line 147: invalid style for open blo
ck: sidear'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'asciidoctor: WARNING: notes.adoc: line 154: invalid style for listing block: music'}, {'lnum': 0, 'bufnr':
 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]
syntastic: 0.212642: aggregated: {'_sorted': 0, '_name': '', '_owner': 1, '_columns': 1, '_rawLoclist': []}
syntastic: 0.213052: sorted: {'_sorted': 1, '_name': '', '_owner': 1, '_columns': 1, '_rawLoclist': []}

notes.adoc

= Line Break Doc Title
Doc Writer <doc.writer@asciidoc.org>
2012-01-01
:appversion: 1.0.0

A preamble - the current version of the application is {appversion}.

== Level 1 Section

This journey begins one late Monday afternoon in Antwerp.  Our team desperately
needs coffee, but none of us dare open the office door.

To leave means code dismemberment and certain death.

Rubies are red, +
Topazes are blue.

WARNING: Wolpertingers are known to nest in server racks. Enter at your own
risk.

I can't believe it, we *won*!
_italic phrase_
`monospace phrase` and le``tt``ers

Type the word [userinput]#asciidoc# into the search bar.
\*Stars* will appear as *Stars*, not as bold text.
\\__func__ will appear as __func__, not as emphasized text.
\{two-semicolons} will appear {two-semicolons}, not resolved as ;;.

[subs="verbatim,macros"] 
----
I better not contain *bold* or _italic_ text.
pass:quotes[But I should contain *bold* text.] 
----

This +*literal*+ will appear as *literal*.

* Edgar Allen Poe
* Sheri S. Tepper
* Bill Bryson

.Kizmet's Favorite Authors
* Edgar Allen Poe
* Sheri S. Tepper
* Bill Bryson

- Edgar Allen Poe
- Sheri S. Tepper
- Bill Bryson

//^

* Apples
* Oranges

//^

.Possible DefOps manual locations
* West wood maze
** Maze heart
*** Reflection pool
** Secret exit
* Untracked file in git repository

1. Protons
2. Electrons
3. Neutrons

. Protons
. Electrons
. Neutrons

[start=4]
. Step four
. Step five
. Step six

. Step 1
. Step 2
.. Step 2a
.. Step 2b
. Step 3

CPU:: The brain of the computer.
Hard drive:: Permanent storage for operating system and/or user files.
RAM:: Temporarily stores information the CPU uses during operation.
Keyboard:: Used to enter text or control items on the screen.
Mouse:: Used to point to and select items on your computer screen.
Monitor:: Displays information in visual form using text and graphics.

[horizontal]
CPU:: The brain of the computer.
Hard drive:: Permanent storage for operating system and/or user files.
RAM:: Temporarily stores information the CPU uses during operation.

Dairy::
* Milk
* Eggs
Bakery::
* Bread
Produce::
* Bananas

* The header in AsciiDoc is optional, but if it is used it must start with a
* document title.

* Optional Author and Revision information
immediately follows the header title.

* The document header must be separated from the remainder of the document by
* one or more blank lines and cannot contain blank lines.

Chat with other Asciidoctor users in the
irc://irc.freenode.org/#asciidoctor[Asciidoctor IRC channel].

link:protocol.json[Open the JSON file]

The section <<images>> describes how to insert images into your document.

Refer to <<Internal cross references>>.

image::sunset.jpg[Sunset]

[[img-sunset]]
.A mountain sunset
image::sunset.jpg[Sunset, 300, 200,
link="http://www.flickr.com/photos/javh/5448336655"]

Press the image:save.png[Save, title="Save"] button.

.Gettysburg Address
[[gettysburg]]
[quote, Abraham Lincoln, Address delivered at the dedication of the Cemetery at
Gettysburg]
____
Four score and seven years ago our fathers brought forth
on this continent a new nation...

Now we are engaged in a great civil war, testing whether
that nation, or any nation so conceived and so dedicated,
can long endure. ...
____

[sidear]
.Related information
--
This is aside text.

It is used to present information related to the main content.
--

[music]
---------------------------------------------------------------------
\version "2.14.2"
\paper {
     ragged-right = ##t
}
{
     \time 3/4
      \clef bass
       c2 e4 g2. f4 e d c2 r4
}
---------------------------------------------------------------------

vimrc

" sets vim not to be vi-compatible
set nocompatible

" mouse mode availability
set mouse=

" times
set updatetime=1000
set splitbelow

" backups, swap, viminfo, undo
" set viminfo^=%
set noswapfile
set dir=~/.logs/vim/swap
set nobackup
set backupdir=~/.logs/vim/backup
set undofile
set undodir=~/.logs/vim/undo
set viminfo+=n~/.logs/vim/viminfo

" whitespace display
" set list
" set listchars=tab:──,space:·,trail:∘,eol:¬

" setup leader and its mappings
let mapleader=" "
set timeoutlen=1500 ttimeoutlen=0
map <Leader>bn :bn<cr>
map <Leader>bp :bp<cr>
map <Leader>bd :bd<cr>
nmap <Leader>w :w!<CR>
" Remove hilights.
map <silent> <Leader><CR> :noh<CR>
" Remove the Windows ^M - when the encodings gets messed up
noremap <Leader>m mmHmt:%s/<C-V><CR>//ge<CR>'tzt'm
" Toggle nerdtree
map <Leader>e :NERDTreeToggle<CR>
" FileBeagle shortcut
nmap <Leader>f :FileBeagle<CR>
" Dash search
nmap <silent> <Leader>da <Plug>DashSearch
" tags
nmap <Leader>t :TagbarToggle<CR>
" undo
nnoremap <Leader>u :GundoToggle<CR>
" Golang stuff
au FileType go nmap <Leader>goru <Plug>(go-run)
au FileType go nmap <Leader>gore <Plug>(go-rename)
au FileType go nmap <Leader>gobu <Plug>(go-build)
au FileType go nmap <Leader>gote <Plug>(go-test)
au FileType go nmap <Leader>goco <Plug>(go-coverage)
au FileType go nmap <Leader>goss <Plug>(go-def-split)
au FileType go nmap <Leader>gosv <Plug>(go-def-vertical)
au FileType go nmap <Leader>gods <Plug>(go-doc)
au FileType go nmap <Leader>godv <Plug>(go-doc-vertical)
au FileType go nmap <Leader>goim <Plug>(go-implements)
au FileType go nmap <Leader>goin <Plug>(go-info)

" Sets encoding of vim characters, not the file.
set encoding=utf-8
scriptencoding utf-8

" Show 80th column
" set colorcolumn=80

" Updates vim buffer if a file changes from outside.
set autoread
set autowriteall
set hidden

" Folding
set nofoldenable

" Continuous delimiter line.
set fillchars=vert:┃,diff:⎼,fold:⎼

" Set backspacing.
set backspace=eol,start,indent

" Sets number of lines to the cursor to scroll.
set so=5

" Set scroll count
set scroll=10
noremap <C-u> 10<C-u>
noremap <C-d> 10<C-d>

" line numbers
set number

" Makes * and + registers clipboard.
set clipboard+=unnamed,unnamedplus

" sudo trick
cmap w!! w !sudo tee % >/dev/null

" Enables wildmenu to its fullest and ignores few file types.
set wildmenu
set wildmode=longest:full,full
set wildignore+=*/tmp/*,*.so,*.swp,*.zip

" Sets vim command-line height.
set cmdheight=1

" Shows column and row of the cursor in status line.
set ruler

" Ignores case when all lowercase, and not when there's an uppercase.
set ignorecase
set smartcase

" Highlight all matches and find them as-you-type, and a map to disable it.
set hlsearch
set incsearch

" Highlight matching parenthesis, and how long to blink.
" set cursorline
set re=1
set showmatch
" set mat=2
" let loaded_matchparen = 1

" optional speed boosts
set nocuc
set nocul
set ttyfast
" set lazyredraw

" Well, it's magic!
set magic

" Disables stupid bells.
set noerrorbells
" set novisualbell

" Order of EOL formats.
set ffs=unix,mac,dos

" Sets tab and be smart about it.
set tabstop=4
set shiftwidth=4
set smarttab
set softtabstop=4
" set expandtab

" Autoindent next line or copy indent of the last line.
set autoindent
set copyindent
set smartindent

" Tell vim that your terminal supports 256 colors
set t_Co=256

" Smart way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l

" Column warnings
" augroup vimrc_autocmds
"   autocmd BufEnter * highlight OverLength ctermbg=darkgrey
" augroup END

" Lines
autocmd Filetype markdown setlocal tw=80
autocmd Filetype asciidoc setlocal tw=80
autocmd Filetype json setlocal foldmethod=syntax
autocmd Filetype javascript setlocal foldmethod=syntax
autocmd Filetype yaml setlocal ts=4 sw=4 expandtab

" Filetypes
au BufRead,BufNewFile *.md set filetype=markdown
au BufRead,BufNewFile *.as set filetype=as3

" Always show the status line.
set laststatus=2

" Profiling shortcuts
" nnoremap <silent> <leader>pstart :exe ":profile start profile.log"<cr>
"   \ :exe ":profile func *"<cr>:exe ":profile file *"<cr>
" nnoremap <silent> <leader>pstop :exe ":profile pause"<cr>:noautocmd qall!<cr>

" Setting up pathogen plugin manager.
call pathogen#infect('bundle/{}')
call pathogen#helptags()

" Enable syntax and filetype checking.
syntax on
filetype indent on
filetype plugin on

" Set color scheme.
colorscheme hybrid

" Return to last edit position when opening files.
autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") |
    \   exe "normal! g`\"" |
    \ endif

" Quick deletion of trailing spaces.
func! DeleteTrailingWS()
    exe "normal mz"
    %s/\s\+$//ge
    exe "normal `z"
endfunc

" Remove multi-spaces
func! MultiSpaceDeletion()
    exe "normal mz"
    %s![^ ]\zs  \+! !g
    exe "normal `z"
endfunc

" Encryption
" set secure
" set viminfo=
" set noswapfile
" set nobackup
" set nowritebackup
" set history=0
" set noshelltemp
" set cm=blowfish2

function Scramble()
%!gpg -q --cipher-algo aes256 --symmetric --armor 2>/dev/null
endfunction

function Unscramble()
    %!gpg -q --cipher-algo aes256 --decrypt --armor 2>/dev/null
endfunction

map <silent> <F7> :call Scramble()<Esc>
map <silent> <F8> :call Unscramble()<Esc>

" NerdTree setup.
autocmd bufenter * if (winnr("$") == 1
    \ && exists("b:NERDTreeType")
    \ && b:NERDTreeType == "primary") | q | endif
let g:NERDTreeWinSize=30
let NERDTreeShowHidden=1
let g:NERDTreeDirArrows=1
let g:NERDTreeStatusline=' '
let g:NERDTreeMinimalUI=1
let g:NERDTreeSortHiddenFirst=1
let NERDTreeQuitOnOpen=1
let NERDTreeIgnore=[
    \ '.DS_Store',
    \ '.DS_Store?',
    \ '.Spotlight-V100',
    \ '.Trashes',
    \ '.ehthumbs.db',
    \ '.Thumbs.db',
    \ '.thumbs.db',
    \ '.VolumeIcon.icns',
    \ '.fseventsd',
    \ 'Icon^M^M',
    \ ]

" Vim Javascript setup.
let javascript_enable_domhtmlcss=1
let b:javascript_fold=1

" EasyAlign setup
vmap <Enter> <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)

" CtrlP setup.
let g:ctrlp_custom_ignore = {
    \ 'dir':  '\v[\/](node_modules|build|rls|dbg|sub|tmp)|(\.(swp|ico|git|svn))$',
    \ 'file': '\v\.(exe|so|dll|swf)$',
    \ 'link': 'some_bad_symbolic_links',
    \ }
let g:ctrlp_show_hidden = 1

" Syntastic setup.
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_aggregate_errors = 1
let g:syntastic_html_checkers=['']
let g:syntastic_loc_list_height = 5
let g:syntastic_echo_current_error = 1
let g:syntastic_enable_signs = 1
let g:syntastic_cursor_column = 1
let g:syntastic_enable_balloons = 1
let g:syntastic_enable_highlighting = 1
let g:syntastic_full_redraws = 1
let g:syntastic_javascript_checkers=['jshint', 'jscs']
let g:syntastic_asciidoc_asciidoc_exec = 'asciidoc'
let g:syntastic_debug = 3

augroup File-Type
    autocmd!
    autocmd FileType qf setlocal wrap
augroup END

" CSS3 hacks
augroup VimCSS3Syntax
    autocmd!
    autocmd FileType css setlocal iskeyword+=-
augroup END

" JSON setup.
let g:vim_json_syntax_conceal = 0

" Dash setup
let g:dash_map = {
    \ 'as3' : ['actionscript', 'starling'],
    \ 'javascript' : ['nodejs', 'javascript']
    \ }

" GLSL setup
let g:glsl_default_version = 'glsl330'
let g:glsl_file_extensions = '*.glsl,*.vsh,*.fsh'

" airline setup
let g:airline_powerline_fonts = 1
let g:airline_theme='hybridline'
let g:airline#extensions#whitespace#enabled = 0
let g:airline#extensions#whitespace#checks = [ 'trailing' ]
" let g:airline#extensions#tabline#enabled = 1
" let g:airline#extensions#tabline#fnamemod = ':t'

" tmux nav
" let g:tmux_navigator_no_mappings = 1
" nnoremap <silent> {Left-mapping} :TmuxNavigateLeft<cr>
" nnoremap <silent> {Down-Mapping} :TmuxNavigateDown<cr>
" nnoremap <silent> {Up-Mapping} :TmuxNavigateUp<cr>
" nnoremap <silent> {Right-Mapping} :TmuxNavigateRight<cr>
" nnoremap <silent> {Previous-Mapping} :TmuxNavigatePrevious<cr>

" golang setup
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:go_fmt_command = "goimports"
let g:syntastic_quiet_messages = { "regex": "main redeclared" }
" let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
" let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }

" omnisharp
let g:Omnisharp_start_server = 0
let g:Omnisharp_stop_server = 1
set completeopt=longest,menuone
let g:syntastic_cs_checkers = ['syntax', 'semantic', 'issues']

" gist
if has("unix")
  let s:uname = system("uname -s")
  if s:uname == "Darwin"
    let g:gist_clip_command = 'pbcopy'
  endif
endif
let g:gist_detect_filetype = 1
let g:gist_show_privates = 1
let g:gist_post_private = 1

" tagbar
let g:tagbar_width = 80
let g:tagbar_type_go = {
    \ 'ctagstype' : 'go',
    \ 'kinds'     : [
        \ 'p:package',
        \ 'i:imports:1',
        \ 'c:constants',
        \ 'v:variables',
        \ 't:types',
        \ 'n:interfaces',
        \ 'w:fields',
        \ 'e:embedded',
        \ 'm:methods',
        \ 'r:constructor',
        \ 'f:functions'
    \ ],
    \ 'sro' : '.',
    \ 'kind2scope' : {
        \ 't' : 'ctype',
        \ 'n' : 'ntype'
    \ },
    \ 'scope2kind' : {
        \ 'ctype' : 't',
        \ 'ntype' : 'n'
    \ },
    \ 'ctagsbin'  : 'gotags',
    \ 'ctagsargs' : '-sort -silent'
    \ }

" color customization
set background=dark
highlight Normal ctermbg=0
" hi MatchParen cterm=none ctermbg=red ctermfg=yellow
lcd047 commented 8 years ago

Please open Vim, and post the output of this:

:lcd /Users/synthmeat/Projects/showdown/showdown-stuff
:echo system('asciidoc -o /dev/null notes.adoc')
synthmeat commented 8 years ago

asciidoc

asciidoc: WARNING: notes.adoc: line 147: missing style: [blockdef-open]: sidear
music2png.py: [Errno 13] Permission denied: '/dev/notes__1.md5'
asciidoc: WARNING: notes.adoc: line 163: filter non-zero exit code: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" -: returned 1
asciidoc: WARNING: notes.adoc: line 163: no output from filter: "/usr/local/opt/python/bin/python2.7" "/usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/filters/music/music2png.py" -m -o "/dev/notes__1.png" -

asciidoctor (":echo system('asciidoctor -o /dev/null notes.adoc')")

asciidoctor: WARNING: notes.adoc: line 147: invalid style for open block: sidear
asciidoctor: WARNING: notes.adoc: line 154: invalid style for listing block: music
lcd047 commented 8 years ago

... Which is what syntastic shows you. shrug

Now, why do asciidoc and asciidoctor return these results when run from Vim, is a matter between your shell, your Vim, and asciidoc / asciidoctor. It has nothing to do with syntastic. You seem to be running OS-X, and this seems to be a common problem: various Python programs behave in "interesting" ways when run from Vim. You might want to rise this on an OS-X forum.

lcd047 commented 8 years ago

Unrelated: it looks like asciidoctor has been broken in a while. This should be fixed in c57ba0d.

synthmeat commented 8 years ago

I can confirm it works now with asciidoctor on osx & freebsd.

Thank you very much.