LanguageClient-neovim icon indicating copy to clipboard operation
LanguageClient-neovim copied to clipboard

neomake and LC competing for location list

Open teto opened this issue 5 years ago • 4 comments

  • Did you upgrade to latest plugin version? y
  • Did you upgrade to/compile latest binary? 1.141
  • (Neovim users only) Did you check output of :checkhealth LanguageClient? y
  • Did you check troubleshooting?

Describe the bug

LC and neomake are competing for the location list (or quickfix depending on configuration). Aka neomake fills the location list on save (as per my configuration) but then LC clears all entries for its diagnostic. I know there is no silver bullet when severral plugins compete for the same list. What could be done is check for the location list title. If it's different than the LC one, create a new location list instead of erasing current entries. Then the user can at least cycle through older lists.

Environment

  • neovim/vim version (nvim --version or vim --version): master
  • This plugin version (git rev-parse --short HEAD): 1.141

teto avatar Mar 17 '19 14:03 teto

Would specify different lists for neomake and LC work? Say, configure neomake to use quickfix and LC to use location list.

autozimu avatar Mar 26 '19 04:03 autozimu

Neomake can use both in fact (depending on project-level or buffer-level) so a proper solution would be nice even though I deem it low-priority. For now I disable neomake.

teto avatar Mar 26 '19 06:03 teto

I am having the the same problem an was hoping for a solution like this:

au BufReadPost * 
    \ if LanguageClient#has_LC_for_filetype() | 
    \   echo 'nothing' |
    \ else | \
    \   call enable_neomake_for_this_buffer() | \
    \ endif

I did not find any function like LanguageClient#has_LC_for_filetype(). Is there a function that can tell me if LanguageClient has a functioning language server for some buffer?

lucc avatar Oct 13 '19 08:10 lucc

It would be nice if it was possible to select between the location and quickfix list as well as be able to disable the population of them by LanguageClient-neovim.

NilsIrl avatar Jan 21 '20 20:01 NilsIrl