Debian 10, last vim from git(vim/src/ make, sudo make install). Another "fixers", for example: "prettier" - works fine.
.bashrc
NPM_PACKAGES="${HOME}/.local/.npm"
export PATH="$NPM_PACKAGES/bin:$PATH"
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
npm -g install standard
let g:ale_fixers = {'c': ['clang-format'], 'javascript': ['standard']}
I've tried ALEFix - no result.
Info:
Current Filetype: javascript
Available Linters: ['eslint', 'fecs', 'flow', 'flow-language-server', 'jscs', 'jshint', 'standard', 'tsserver', 'xo']
Enabled Linters: ['standard', 'tsserver']
Suggested Fixers:
'eslint' - Apply eslint --fix to a file.
'fecs' - Apply fecs format to a file.
'importjs' - automatic imports for javascript
'prettier' - Apply prettier to a file.
'prettier_eslint', 'prettier-eslint' - Apply prettier-eslint to a file.
'prettier_standard', 'prettier-standard' - Apply prettier-standard to a file.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'standard' - Fix JavaScript files using standard --fix
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
'xo' - Fix JavaScript/TypeScript files using xo --fix.
Linter Variables:
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_tsserver_config_path = ''
let g:ale_javascript_tsserver_executable = 'tsserver'
let g:ale_javascript_tsserver_use_global = 0
Global Variables:
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 1
let g:ale_fixers = {'c': ['clang-format'], 'javascript': ['standard']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 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_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'normal'
let g:ale_linter_aliases = {}
let g:ale_linters = {'javascript': ['standard', 'tsserver']}
let g:ale_linters_explicit = 0
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_lsp_root = {}
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 0
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_set_balloons = 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_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_sign_highlight_linenrs = 0
let g:ale_statusline_format = v:null
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(executable check - success) standard
(finished - exit code 1) ['/bin/bash', '-c', '''standard'' --stdin ''/home/pavel/JS/main.js'' < ''/tmp/veY6zf4/1/main.js''']
<<
(executable check - success) tsserver
(started) ['/bin/bash', '-c', '''tsserver''']
Anyone other information than, "doesn't work?"
Anyone other information than, "doesn't work?"
Yes, linter Standard for JS works fine, but ALEFix or fix on save - zero reaction. It's all. It is not just "plugin conflict" or something else, just no reaction. Another "fixers" works, for JS or whatever. Only standard with this behavior.
`
call plug#begin()
Plug 'dense-analysis/ale'
nmap e[ (ale_previous_wrap)
nmap e] (ale_next_wrap)
let g:ale_sign_error = '✘'
let g:ale_sign_warning = 'âš '
let g:ale_sign_column_always = 1
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_set_loclist = 0let b:ale_linters = {
\ 'javascript': ['standard'],
\ 'php': ['phpcs']
\ }
let g:ale_php_phpcs_standard = "psr2"Plug 'neomake/neomake'
let g:neomake_javascript_enabled_makers = ['standard']
let g:neomake_javascript_standard_maker = {
\ 'exe': 'standard',
\ 'args': ['--fix'],
\ }let g:neomake_php_enabled_makers = ['prettier', 'phpcsfixer']
let g:neomake_php_prettier_maker = {
\ 'exe': 'prettier',
\ 'args': ['--write'],
\ }
let g:neomake_php_phpcsfixer_maker = {
\ 'exe': 'php-cs-fixer',
\ 'args': ['fix', '--rules=@PSR2'],
\ }autocmd! BufWritePost * Neomake
augroup my_neomake_hooks
au!
autocmd User NeomakeJobFinished :checktime
augroup ENDcall plugin#end()
function! MyOnBattery()
if has('macunix')
return match(system('pmset -g batt'), "Now drawing from 'Battery Power'") != -1
elsif has('unix')
return readfile('/sys/class/power_supply/AC/online') == ['0']
endif
return 0
endfunctionif MyOnBattery()
call neomake#configure#automake('w')
else
call neomake#configure#automake('nw', 50)
endif`
Thanks! But if ale has "fix", why need other dependencies. I'll just will use integrate fix from vim-lsp language server.
I have a same problem. It worked perfectly when I used the standard version 12.0.1. Then it doesn't work when using 13.1.0 and 14.3.1.
Same here. Fix does nothing. It seems the temp file folder isn't created.
Probabily i have the same problem. I noticed stardard fixer works fine only if you open vim instance in /tmp folder.. maybe some path problem?
Same as @nack43 for me. Using 14.3.1 fails, but 12.0.1 works fine.
I'm having this problem, but I don't think it's ale related.
So when I look at :ALEInfo, I see:
(finished - exit code 1) ['/bin/bash', '-c', '''standard'' --fix ''/tmp/vrSbwAp/8/handler.js''']
Which suggests to me that ale has copied my file to a temporary folder before running standard on it. So I did the same thing:
cp /home/kit/work/mylambda/handler.js /tmp/foobar
standard --fix /tmp/foobar/handler.js
/usr/local/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:337
throw new Ctor(message)
^
RangeError: path should be a `path.relative()`d string, but got "../../../../../tmp/foobar/handler.js"
at throwError (/usr/local/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:337:9)
at checkPath (/usr/local/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:356:12)
at Ignore._test (/usr/local/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:473:5)
at Ignore.ignores (/usr/local/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:512:17)
at path (/usr/local/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:516:26)
at Array.filter (<anonymous>)
at Ignore.filter (/usr/local/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:520:29)
at /usr/local/lib/node_modules/standard/node_modules/deglob/index.js:46:31
at end (/usr/local/lib/node_modules/standard/node_modules/run-parallel/index.js:18:15)
at done (/usr/local/lib/node_modules/standard/node_modules/run-parallel/index.js:22:10)
So maybe it's something with standard. Like @imtyM , I'm also using 14.3.1
ETA: I think it's related to this issue: https://github.com/standard/standard/issues/1384
FWIW a workaround is to downgrade to standard@12 which doesn't exhibit this problem.
@theimpostor thanks, works with standard 12.0
Having the same issue with 14.3.1 but... I need 14.3.1 :s
Any solution or workaround beside downgrading ?
Same for me
| Software | Version |
|---|---|
| Standard | 14.3.4 |
| node | 14 |
| node | 12 |
| nvim | 0.4.3 |
| Kubuntu | 20.04 |
Thanks :heart:
It seems that PR #2816 fixes this. I hope @w0rp is doing fine and he can review the PR soon.
I've merged #3046 now, which I hear fixes this.
I recommend everyone use ESLint instead of standard, which is what standard uses under the hood, is much more configurable, and tends to work a lot better.
Most helpful comment
I've merged #3046 now, which I hear fixes this.
I recommend everyone use ESLint instead of
standard, which is whatstandarduses under the hood, is much more configurable, and tends to work a lot better.