2

I am using the markdown extension plasticboy/vim-markdown to navigate inside large markdown files:

" :Toc : create a quickfix vertical window navigable table of contents with the headers."

enter image description here

Since I In installed the ALE linter, the content of the quick fix window disappears after I save the markdown file.

enter image description here

When I disable ALE, it works fine and the TOC content remains visible at all times, even after file save. I can disable ale temporarily in a buffer this way:

let b:ale_enabled = 0

But how Can I get plasticboy/vim-markdown to continue working properly when ALE is activated?

5
  • 1
    Ale is overwriting the quickfix list; you’ll need to tell ale to use the location list instead
    – D. Ben Knoble
    Commented May 16, 2020 at 14:38
  • @D.BenKnoble Actually ALE uses the loclist by default... But see this FAQ for variables to control both lists: github.com/dense-analysis/ale/blob/master/…
    – filbranden
    Commented May 16, 2020 at 18:41
  • 2
    @filbranden yeah I see that; I read quickfix in the Q and assumed. Funnily, the quoted doc is wrong (as proven by the screenshot, which says loclist!).
    – D. Ben Knoble
    Commented May 16, 2020 at 18:46
  • @D.BenKnoble I actually think it's saying toclist()... ?!
    – filbranden
    Commented May 16, 2020 at 18:49
  • 2
    And yeah looks like vim-markdown uses loclist indeed: github.com/plasticboy/vim-markdown/blob/master/ftplugin/…
    – filbranden
    Commented May 16, 2020 at 18:52

1 Answer 1

2

In the absence of a more elegant fix, I disabled ALE for markdown files as explained in ALE issue 371, by adding this to my ~/.vimrc:

" Disable ale for some file extensions 
let g:ale_pattern_options = {          
\   '.*\.md$': {'ale_enabled': 0},     
\   '.*\.Rmd$': {'ale_enabled': 0},    
\}                                     

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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