Neomake: Automatically close location list when window gets closed

Created on 12 Jul 2017  路  2Comments  路  Source: neomake/neomake

When I am opening a file that has errors or warnings and then I close this file, the error list is still open.
It is a little bit annoying because i have to press an extra :q every time i have i file with errors.

Expected behavior

It should close this list

Steps to reproduce

Open a file that has errors or warnings and then press :q

Output from (verbose) NeomakeInfo

Neomake debug information

Async support: 1
Current filetype: javascript
Windows: 0

Enabled makers

For the current filetype ("javascript", used with :Neomake):

  • eslint

    • args: ['-f', 'compact']

    • auto_enabled: 0

    • errorformat: '%E%f: line %l\, col %c\, Error - %m,%W%f: line %l\, col %c\, Warning - %m,%-G,%-G%*\d problems%#'

    • exe: 'eslint'

      NOTE: you can define g:neomake_javascript_enabled_makers to configure it (or b:neomake_javascript_enabled_makers).

For the project (used with :Neomake!): None.
NOTE: you can define g:neomake_enabled_makers to configure it.

Default maker settings:

  • remove_invalid_entries: 0
  • buffer_output: 1
Settings
g:neomake_javascript_enabled_makers = ['eslint']
g:neomake_list_height = 4
g:neomake_open_list = 2
g:neomake_place_signs = 1
g:neomake_ruby_enabled_makers = ['mri']

:version

NVIM 0.1.7
Build type: None
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-wew7PE/neovim-0.1.7=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1  -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim-wew7PE/neovim-0.1.7/build/config -I/build/neovim-wew7PE/neovim-0.1.7/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim-wew7PE/neovim-0.1.7/build/src/nvim/auto -I/build/neovim-wew7PE/neovim-0.1.7/build/include
Compiled by [email protected]

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui      
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

:messages

"app/decorators/sku_decorator.rb" 218L, 6651C
"app/assets/javascripts/webpack/views/virtual_sku_page_view.js.es6" 339L, 11143C
E488: Trailing characters
NVIM 0.1.7
Build type: None
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-wew7PE/neovim-0.1.7=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1  -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim-wew7PE/neovim-0.1.7/build/config -I/build/neovim-wew7PE/neovim-0.1.7/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim-wew7PE/neovim-0.1.7/build/src/nvim/auto -I/build/neovim-wew7PE/neovim-0.1.7/build/include
NVIM 0.1.7
Build type: None
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-wew7PE/neovim-0.1.7=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1  -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim-wew7PE/neovim-0.1.7/build/config -I/build/neovim-wew7PE/neovim-0.1.7/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim-wew7PE/neovim-0.1.7/build/src/nvim/auto -I/build/neovim-wew7PE/neovim-0.1.7/build/include
enhancement

Most helpful comment

vim-qf handles this for me: https://github.com/romainl/vim-qf/blob/9922d9a4c0663ad65b9715e48967de7ab6ef4a25/plugin/qf.vim#L65

You can try this for now:

augroup my_neomake_qf
    autocmd!
    autocmd QuitPre * if &filetype !=# 'qf' | lclose | endif
augroup END

All 2 comments

vim-qf handles this for me: https://github.com/romainl/vim-qf/blob/9922d9a4c0663ad65b9715e48967de7ab6ef4a25/plugin/qf.vim#L65

You can try this for now:

augroup my_neomake_qf
    autocmd!
    autocmd QuitPre * if &filetype !=# 'qf' | lclose | endif
augroup END

It works, thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nathanajah picture nathanajah  路  6Comments

msecret picture msecret  路  4Comments

dolohow picture dolohow  路  5Comments

nhooyr picture nhooyr  路  6Comments

towry picture towry  路  5Comments