diff options
author | Yaroslav <contact@yaroslavps.com> | 2020-03-31 17:52:49 +0300 |
---|---|---|
committer | Yaroslav <contact@yaroslavps.com> | 2020-03-31 17:52:49 +0300 |
commit | 7217c7749e5403c9c7856c1d12c7986eb9c3b460 (patch) | |
tree | d60a112d9119a51af1cf5f590c5efad81751edf6 /dotfiles/.vim/autoload/neomake/makers/ft/purescript.vim | |
parent | 9a3aa7b20a67c1b7991da1da9508ad5f78f76352 (diff) | |
download | vimrice-7217c7749e5403c9c7856c1d12c7986eb9c3b460.tar.gz vimrice-7217c7749e5403c9c7856c1d12c7986eb9c3b460.zip |
Goodbye vim, been using neovim for ages now; home directory cleanup
Diffstat (limited to 'dotfiles/.vim/autoload/neomake/makers/ft/purescript.vim')
-rw-r--r-- | dotfiles/.vim/autoload/neomake/makers/ft/purescript.vim | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/dotfiles/.vim/autoload/neomake/makers/ft/purescript.vim b/dotfiles/.vim/autoload/neomake/makers/ft/purescript.vim deleted file mode 100644 index a26a40f..0000000 --- a/dotfiles/.vim/autoload/neomake/makers/ft/purescript.vim +++ /dev/null @@ -1,63 +0,0 @@ -" vim: ts=4 sw=4 et - -function! neomake#makers#ft#purescript#EnabledMakers() abort - return ['pulp'] -endfunction - -function! neomake#makers#ft#purescript#pulp() abort - " command is `pulp build --no-psa -- --json-errors` - " as indicated in https://github.com/nwolverson/atom-ide-purescript/issues/136 - let maker = { - \ 'args': ['build', '--no-psa', '--', '--json-errors'], - \ 'append_file': 0, - \ 'process_output': function('neomake#makers#ft#purescript#PSProcessOutput'), - \ } - - " Find project root, since files are reported relative to it. - let bower_file = neomake#utils#FindGlobFile('bower.json') - if !empty(bower_file) - let maker.cwd = fnamemodify(bower_file, ':h') - endif - - return maker -endfunction - -function! neomake#makers#ft#purescript#PSProcessOutput(context) abort - let errors = [] - for line in a:context.output - if line[0] !=# '{' - continue - endif - let decoded = neomake#compat#json_decode(line) - for [key, values] in items(decoded) - let code = key ==# 'warnings' ? 'W' : 'E' - for item in values - let compiler_error = item['errorCode'] - let message = item['message'] - let position = item['position'] - let filename = item['filename'] - if position is g:neomake#compat#json_null - let row = 1 - let col = 1 - let end_col = 1 - let length = 1 - else - let row = position['startLine'] - let col = position['startColumn'] - let end_col = position['endColumn'] - let length = end_col - col - endif - - call add(errors, { - \ 'text': compiler_error . ' : ' . message, - \ 'type': code, - \ 'lnum': row, - \ 'col': col, - \ 'length': length, - \ 'filename': filename, - \ }) - endfor - endfor - endfor - return errors -endfunction |