1

i have ALE installed with vundle, but none of the linters seem to be executing, neither automatically nor on demand.

vim starts with an error from my .vimrc:

E121: Undefined variable: g:ale_lint_on_insert_leave

and when executing :ALEFix

No fixers have been defined. Try :ALEFixSuggest 

on :ALELint, no error message is shown, but :ALEInfo shows logs saying (executable check - failure) flake8 similar errors happen when trying to lint my .rb files.

my .vimrc

packloadall
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'prettier/vim-prettier', { 'do': 'yarn install' }
Plugin 'dense-analysis/ale'
Plugin 'vimwiki/vimwiki'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'michal-h21/vim-zettel'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

" Settings for Vimwiki
let g:vimwiki_list = [{'path':'~/docs/zettel/','ext':'.md','syntax':'markdown'}, {"path":"~/docs/zettel/"}]

let g:ale_linters = {
      \   'ruby': ['standardrb', 'rubocop', 'srb'],
      \   'python': ['flake8', 'pylint'],
      \   'javascript': ['eslint'],
      \}
let g:ale_sign_column_always = 1
let g:ale_lint_on_insert_leave

set wrap linebreak nolist
set shiftwidth=2
set tabstop=2
set noexpandtab
set autoindent
set number
set foldcolumn=1
set incsearch
set scrolloff=7
set cursorline
set hlsearch

colo tretza

nmap <F3> i<C-R>=strftime("%F  %T %z")<CR><Esc>
imap <F3> <C-R>=strftime("%F  %T %z")<CR>

nmap <F5> i<C-R>=strftime("%F_%Hh%M")<CR><Esc>
imap <F5> <C-R>=strftime("%F_%Hh%M")<CR>

" Zettel vars
let g:zettel_format = "%F_%Hh%M"

my :ALEInfo output:

 Current Filetype: python
Available Linters: ['bandit', 'flake8', 'mypy', 'prospector', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylama', 'pylint', 'pyls', 'pyre', 'vulture']
  Enabled Linters: ['flake8', 'pylint']
 Suggested Fixers: 
  'add_blank_lines_for_python_control_statements' - Add blank lines before control statements.
  'autopep8' - Fix PEP8 issues with autopep8.
  'black' - Fix PEP8 issues with black.
  'isort' - Sort Python imports with isort.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'reorder-python-imports' - Sort Python imports with reorder-python-imports.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'yapf' - Fix Python files with yapf.
 Linter Variables:

let g:ale_python_auto_pipenv = 0
let g:ale_python_flake8_auto_pipenv = 0
let g:ale_python_flake8_change_directory = 1
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_pylint_auto_pipenv = 0
let g:ale_python_pylint_change_directory = 1
let g:ale_python_pylint_executable = 'pylint'
let g:ale_python_pylint_options = ''
let g:ale_python_pylint_use_global = 0
let g:ale_python_pylint_use_msg_id = 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 = v:null
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 = 0
let g:ale_fixers = {}
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 = {'ruby': ['standardrb', 'rubocop', 'srb'], 'javascript': ['eslint'], 'python': ['flake8', 'pylint']}
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 = 1
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 - failure) flake8
(executable check - failure) pylint
(executable check - failure) flake8
(executable check - failure) pylint
2

Two issues:

  1. let g:ale_lint_on_insert_leave doesn’t have an assignment, so vim tries to display the value (which is unset, so the variable doesn’t exist). Add = {val} where {val} is whatever you want to set it to.

  2. Ale doesn’t manage installing programs for you. You still need to have flake8/pylint executables somewhere ale can find them (generally, this means on your PATH). This is what it means when it says « executable check - failure ». The executables can’t be found. The solution here is to install them the usual way and make sure you can run them. If they aren’t on your path, you may have to tell where exactly the executable lives, but I find that less agreeable.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.