Hi!
I've got a similar situation to last time, except now, ALE doesn't work in MacVim at all, while it does work in the terminal version.
:version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled May 8 2017 15:44:54)
MacOS X (unix) version
Included patches: 1-596
Compiled by [email protected]
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +cindent +cryptv -ebcdic +float +insert_expand +lispindent +mouseshape +mouse_xterm +path_extra +quickfix +statusline +terminfo +vertsplit +windows -xterm_save
+arabic +clientserver +cscope +emacs_tags +folding +job +listcmds +mouse_dec +multi_byte +perl/dyn +reltime -sun_workshop +termresponse +virtualedit +writebackup
+autocmd +clipboard +cursorbind +eval -footer +jumplist +localmap -mouse_gpm +multi_lang +persistent_undo +rightleft +syntax +textobjects +visual -X11
+balloon_eval +cmdline_compl +cursorshape +ex_extra +fork() +keymap +lua/dyn -mouse_jsbterm -mzscheme +postscript +ruby/dyn +tag_binary +timers +visualextra -xfontset
+browse +cmdline_hist +dialog_con_gui +extra_search +fullscreen +lambda +menu +mouse_netterm +netbeans_intg +printer +scrollbind +tag_old_static +title +viminfo +xim
++builtin_terms +cmdline_info +diff +farsi -gettext +langmap +mksession +mouse_sgr +num64 +profile +signs -tag_any_white +toolbar +vreplace -xpm
+byte_offset +comments +digraphs +file_in_path -hangul_input +libcall +modify_fname -mouse_sysmouse +odbeditor +python/dyn +smartindent -tcl +transparency +wildignore -xsmp
+channel +conceal +dnd +find_in_path +iconv +linebreak +mouse +mouse_urxvt +packages +python3/dyn +startuptime +termguicolors +user_commands +wildmenu -xterm_clipboard
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/
openssl/lib -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -framework Cocoa -fstack-protector -L/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE
Here's ALEInfo:
Current Filetype: python
Available Linters: ['flake8', 'mypy', 'pylint']
Enabled Linters: ['flake8', 'mypy', 'pylint']
Linter Variables:
let g:ale_python_flake8_executable = 'flake8'
let g:ale_python_flake8_options = ''
let g:ale_python_flake8_use_global = 0
let g:ale_python_mypy_executable = 'mypy'
let g:ale_python_mypy_options = ''
let g:ale_python_mypy_use_global = 0
let g:ale_python_pylint_executable = 'pylint'
let g:ale_python_pylint_options = ''
let g:ale_python_pylint_use_global = 0
Global Variables:
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 1
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 0) ['/usr/local/bin/zsh', '-c', '''flake8'' --version']
(finished - exit code 1) ['/usr/local/bin/zsh', '-c', '''flake8'' --stdin-display-name ''/Users/adam.olsen/Projects/someproject.io/apps/calendars/drf/v4/viewsets.py'' - < ''/var/folders/24/tbc7_m_n5ys52x70s9g_phq800010_/T/vyVYRgg/11/viewsets.py''']
(finished - exit code 1) ['/usr/local/bin/zsh', '-c', '''flake8'' --stdin-display-name ''/Users/adam.olsen/Projects/someproject.io/apps/calendars/drf/v4/viewsets.py'' - < ''/var/folders/24/tbc7_m_n5ys52x70s9g_phq800010_/T/vyVYRgg/14/viewsets.py''']
(finished - exit code 1) ['/usr/local/bin/zsh', '-c', '''flake8'' --stdin-display-name ''/Users/adam.olsen/Projects/someproject.io/apps/calendars/drf/v4/viewsets.py'' - < ''/var/folders/24/tbc7_m_n5ys52x70s9g_phq800010_/T/vyVYRgg/15/viewsets.py''']
It is worth noting that the dir /var/folders/24/tbc7_m_n5ys52x70s9g_phq800010_/T/vyVYRgg contains no files (not sure if it should or not?)
The temporary directory will be deleted shortly after the command finishes.
I was able to get flake8 to report problems with a pretty recent version of MacVim. What's the output of :ALEInfo in the terminal version of Vim, where it works for you?
Current Filetype: python
Available Linters: ['flake8', 'mypy', 'pylint']
Enabled Linters: ['flake8', 'mypy', 'pylint']
Linter Variables:
let g:ale_python_flake8_executable = 'flake8'
let g:ale_python_flake8_options = ''
let g:ale_python_flake8_use_global = 0
let g:ale_python_mypy_executable = 'mypy'
let g:ale_python_mypy_options = ''
let g:ale_python_mypy_use_global = 0
let g:ale_python_pylint_executable = 'pylint'
let g:ale_python_pylint_options = ''
let g:ale_python_pylint_use_global = 0
Global Variables:
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 1
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 0) ['/usr/local/bin/zsh', '-c', '''flake8'' --version']
(finished - exit code 0) ['/usr/local/bin/zsh', '-c', '''flake8'' --stdin-display-name ''/Users/adam.olsen/Projects/someproject.io/apps/calendars/drf/v4/viewsets.py'' - < ''/var/folders/24/tbc7_m_n5ys52x70s9g_phq800010_/T/vMoyfWq/8/viewsets.py''']
What do you get for :ALEInfo if you set let g:ale_history_log_output = 1?
Current Filetype: python
Available Linters: ['flake8', 'mypy', 'pylint']
Enabled Linters: ['flake8', 'mypy', 'pylint']
Linter Variables:
let g:ale_python_flake8_executable = 'flake8'
let g:ale_python_flake8_options = ''
let g:ale_python_flake8_use_global = 0
let g:ale_python_mypy_executable = 'mypy'
let g:ale_python_mypy_options = ''
let g:ale_python_mypy_use_global = 0
let g:ale_python_pylint_executable = 'pylint'
let g:ale_python_pylint_options = ''
let g:ale_python_pylint_use_global = 0
Global Variables:
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 1
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 0) ['/usr/local/bin/zsh', '-c', '''flake8'' --version']
(finished - exit code 1) ['/usr/local/bin/zsh', '-c', '''flake8'' --stdin-display-name ''/Users/adam.olsen/Projects/someproject.io/apps/calendars/drf/v4/viewsets.py'' - < ''/var/folders/24/tbc7_m_n5ys52x70s9g_phq800010_/T/vGggx3o/10/viewsets.py''']
<<<NO OUTPUT RETURNED>>>
(started) ['/usr/local/bin/zsh', '-c', '''flake8'' --stdin-display-name ''/Users/adam.olsen/Projects/someproject.io/apps/calendars/drf/v4/viewsets.py'' - < ''/var/folders/24/tbc7_m_n5ys52x70s9g_phq800010_/T/vGggx3o/11/viewsets.py''']
(finished - exit code 1) ['/usr/local/bin/zsh', '-c', '''flake8'' --stdin-display-name ''/Users/adam.olsen/Projects/someproject.io/apps/calendars/drf/v4/viewsets.py'' - < ''/var/folders/24/tbc7_m_n5ys52x70s9g_phq800010_/T/vGggx3o/12/viewsets.py''']
<<<NO OUTPUT RETURNED>>>
Does it work if you use set shell=/bin/bash?
Nope
Current Filetype: python
Available Linters: ['flake8', 'mypy', 'pylint']
Enabled Linters: ['flake8', 'mypy', 'pylint']
Linter Variables:
let g:ale_python_flake8_executable = 'flake8'
let g:ale_python_flake8_options = ''
let g:ale_python_flake8_use_global = 0
let g:ale_python_mypy_executable = 'mypy'
let g:ale_python_mypy_options = ''
let g:ale_python_mypy_use_global = 0
let g:ale_python_pylint_executable = 'pylint'
let g:ale_python_pylint_options = ''
let g:ale_python_pylint_use_global = 0
Global Variables:
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 1
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 0) ['/usr/local/bin/zsh', '-c', '''flake8'' --version']
(finished - exit code 1) ['/bin/bash', '-c', '''flake8'' --stdin-display-name ''/Users/adam.olsen/Projects/someproject.io/apps/calendars/drf/v4/viewsets.py'' - < ''/var/folders/24/tbc7_m_n5ys52x70s9g_phq800010_/T/vGggx3o/18/viewsets.py''']
<<<NO OUTPUT RETURNED>>>
I'm not sure what the problem is, then. It works under MacVim for me. It might be related to something in your project. Are you able to share your project?
There are no steps to repeat this, and it works in MacVim for me, so I'm closing this. If anyone has issues and can show how to repeat the issue, let me know.
Hi, I'm facing problems with MacVim too, I don't know if is the same reason, can you help?
Looks like ESLint is running from node_modules, but I can't see nothing, no marks and no airline.
ALEInfo -->
Current Filetype: javascript
Available Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Enabled Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Linter Variables:
let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_use_global = 0
let g:ale_javascript_flow_executable = 'flow'
let g:ale_javascript_flow_use_global = 0
let g:ale_javascript_jscs_executable = 'jscs'
let g:ale_javascript_jscs_use_global = 0
let g:ale_javascript_jshint_executable = 'jshint'
let g:ale_javascript_jshint_use_global = 0
let g:ale_javascript_standard_executable = 'standard'
let g:ale_javascript_standard_options = ''
let g:ale_javascript_standard_use_global = 0
let g:ale_javascript_xo_executable = 'xo'
let g:ale_javascript_xo_options = ''
let g:ale_javascript_xo_use_global = 0
Global Variables:
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {'vue': 'javascript'}
let g:ale_linters = {'vue': ['eslint']}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 0) ['/bin/bash', '-c', '''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/node_modules/eslint/bin/eslint.js'' -f unix --stdin --stdin-filename ''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/src/servicos/Servico.js'' < ''/var/folders/mn/k316l68n1qx98_w7t4hqww6c0000gn/T/v2hNYdd/51/Servico.js''']
<<<NO OUTPUT RETURNED>>>
(started) ['/bin/bash', '-c', '''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/node_modules/eslint/bin/eslint.js'' -f unix --stdin --stdin-filename ''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/src/servicos/Servico.js'' < ''/var/folders/mn/k316l68n1qx98_w7t4hqww6c0000gn/T/v2hNYdd/52/Servico.js''']
(finished - exit code 0) ['/bin/bash', '-c', '''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/node_modules/eslint/bin/eslint.js'' -f unix --stdin --stdin-filename ''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/src/servicos/Servico.js'' < ''/var/folders/mn/k316l68n1qx98_w7t4hqww6c0000gn/T/v2hNYdd/53/Servico.js''']
<<<NO OUTPUT RETURNED>>>
(finished - exit code 0) ['/bin/bash', '-c', '''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/node_modules/eslint/bin/eslint.js'' -f unix --stdin --stdin-filename ''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/src/servicos/Servico.js'' < ''/var/folders/mn/k316l68n1qx98_w7t4hqww6c0000gn/T/v2hNYdd/54/Servico.js''']
<<<NO OUTPUT RETURNED>>>
Based on the output above, eslint seems to be running and returning no output. Try running the same command from Vim with :! and compare the output.
I don't have eslint globally, but I'm using from project's node_modules. So I did a cd to file's path and
../../node_modules/eslint/bin/eslint.js --fix Servico.js
What happens is similar to what happened on MacVim, it runs but does nothing.
I'm thinking this can be an error in .eslintrc file, perhaps?
Yeah, I just got a confirmation about it, ESLint is returning nothing to ALE.
Thank you for the quick answer, I'll review this plugin settings.
On .eslintrc, ALE is warning me about ignore.
module.exports = {
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
"parser": "babel-eslint",
"ecmaVersion": 2017,
sourceType: 'module'
},
env: {
browser: true,
},
extends: [
'eslint:recommended',
'plugin:vue/recommended'
],
'rules': {
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
ALEInfo -->
Current Filetype: javascript
Available Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Enabled Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Linter Variables:
let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_use_global = 0
let g:ale_javascript_flow_executable = 'flow'
let g:ale_javascript_flow_use_global = 0
let g:ale_javascript_jscs_executable = 'jscs'
let g:ale_javascript_jscs_use_global = 0
let g:ale_javascript_jshint_executable = 'jshint'
let g:ale_javascript_jshint_use_global = 0
let g:ale_javascript_standard_executable = 'standard'
let g:ale_javascript_standard_options = ''
let g:ale_javascript_standard_use_global = 0
let g:ale_javascript_xo_executable = 'xo'
let g:ale_javascript_xo_options = ''
let g:ale_javascript_xo_use_global = 0
Global Variables:
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {'vue': 'javascript'}
let g:ale_linters = {'vue': ['eslint']}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 0) ['/bin/bash', '-c', '''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/node_modules/eslint/bin/eslint.js'' -f unix --stdin --stdin-filename ''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/.eslintrc.js'' < ''/var/folders/mn/k316l68n1qx98_w7t4hqww6c0000gn/T/v2hNYdd/61/.eslintrc.js''']
<<<OUTPUT STARTS>>>
/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/.eslintrc.js:0:0: File ignored by default. Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override. [Warning]
1 problem
<<<OUTPUT ENDS>>>
(finished - exit code 0) ['/bin/bash', '-c', '''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/node_modules/eslint/bin/eslint.js'' -f unix --stdin --stdin-filename ''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/.eslintrc.js'' < ''/var/folders/mn/k316l68n1qx98_w7t4hqww6c0000gn/T/v2hNYdd/62/.eslintrc.js''']
<<<OUTPUT STARTS>>>
/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/.eslintrc.js:0:0: File ignored by default. Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override. [Warning]
1 problem
<<<OUTPUT ENDS>>>
(finished - exit code 0) ['/bin/bash', '-c', '''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/node_modules/eslint/bin/eslint.js'' -f unix --stdin --stdin-filename ''/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/.eslintrc.js'' < ''/var/folders/mn/k316l68n1qx98_w7t4hqww6c0000gn/T/v2hNYdd/63/.eslintrc.js''']
<<<OUTPUT STARTS>>>
/Users/joelxr/Projects/tactus-upgrade/tu-frontend-vue/.eslintrc.js:0:0: File ignored by default. Use a negated ignore pattern (like "--ignore-pattern '!<relative/path/to/filename>'") to override. [Warning]
1 problem
<<<OUTPUT ENDS>>>
I'd expect to see that "file ignored" message. I think eslintrc itself is ignored by default.
Yup, but I replaced the ESLint settings to the following and everything is working great, the problem is with the https://github.com/vuejs/eslint-plugin-vue sample file.
ALE is working great now, thanks!
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
},
extends: 'standard',
plugins: [
'html'
],
'rules': {
'arrow-parens': 0,
'generator-star-spacing': 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
Most helpful comment
Yup, but I replaced the ESLint settings to the following and everything is working great, the problem is with the https://github.com/vuejs/eslint-plugin-vue sample file.
ALE is working great now, thanks!