JS compatible check for Vim (Syntastic | YouCompleteMe)?

I used Syntastic before installing YouCompleteMe in vim terminal. So, the fact is that YouCompleteMe does not allow you to check Syntastic for errors, but I need both plugins.

YouCompleteMe has some error checking tools, but I have not found a way to make it work in order to correct Javascript errors.

How can i fix this?

.vimrc for Syntastic

let g:syntastic_always_populate_loc_list = 0 let g:syntastic_auto_loc_list = 2 let g:syntastic_loc_list_height = 8 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 1 let g:syntastic_aggregate_errors = 1 let g:syntastic_id_checkers = 1 let g:syntastic_error_symbol = "βœ—" let g:syntastic_warning_symbol = "⚠" set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* let g:syntastic_javascript_checkers = ['jslint', 'jsonlint', 'gjslint'] let g:syntastic_html_tidy_exec = 'tidy5' 

.vimrc for YCM:

 " YouCompleteMe and UltiSnips compatibility, with the helper of supertab let g:ycm_key_list_select_completion = ['<A-ΒΆ>', '<A-Space>', '<Down>'] let g:ycm_key_list_previous_completion = ['<A-Β§>', '<A-Ο€>', '<Up>'] " You Complete Me Options let g:ycm_show_diagnostics_ui = 0 let g:ycm_enable_diagnostic_highlighting = 0 let g:ycm_enable_diagnostic_signs = 0 let g:ycm_show_diagnostics_ui = 0 let g:ycm_open_loclist_on_ycm_diags = 0 let g:ycm_complete_in_comments = 0 let g:ycm_complete_in_strings = 0 let g:ycm_collect_identifiers_from_comments_and_strings = 0 let g:ycm_collect_identifiers_from_tags_files = 1 

:SyntasticInfo output

 > Syntastic version: 3.7.0-31 (Vim 704, Darwin) > Info for filetype: javascript > Global mode: active > Filetype javascript is active > The current file will be checked automatically > Available checkers: - > Currently enabled checkers: - 

I do not know why checkers are available and activated? They were there and worked before the start of YCM!

+5
source share
1 answer

What you can do is use Neovim instead of Vim along with ALE and possibly the LanguageClient-neovim plugin .

For the latter to work, you also need to run npm install -g javascript-typescript-langserver .

This gives you asynchronous listing (ALE) and asynchronous completion / fill functions using the JavaScript language server.

0
source

Source: https://habr.com/ru/post/1235973/


All Articles