Open yegappan opened 6 years ago
I saw a thread about this on Reddit. Thank you for the information! It wasn't clear at all how to actually use these features from the Vim documentation or the other posts in the newsgroups.
A bit of version checking will be needed for these features. I wouldn't be surprised if this isn't supported in NeoVim at all, or if it is supported, but using a different API.
If the maximum number of quickfix lists in a stack is 10, then won't this solution only work for up to 10 plugins?
Do you know which patch version includes support for quickfix IDs? My version of Vim 8 never seems to return an ID for quickfix lists.
If the maximum number of quickfix lists in a stack is 10, then won't this solution only work for up to 10 plugins?
Yes. Vim currently has a maximum limit of 10 quickfix lists in the global stack and 10 locations lists per window. If a quickfix/location list is aged out, then the plugin should detect that the list is no longer valid and stop updating it.
Do you know which patch version includes support for quickfix IDs? My version of Vim 8 never seems to return an ID for quickfix lists.
Patch 1023 added the support for the quickfix list identifier.
Okay, thank you for the patch number. That will be useful.
I would like some help with this at some point, as the information I looked up at the time didn't make much sense. I wouldn't want to see a patch which changes a great number of lines of code which isn't easy to understand for this. I'd be more after something like call setloclist(..., {'id': 'ale'})
, or something of that nature, if that is a thing.
Hi,
On Monday, April 23, 2018, 12:58:44 PM PDT, w0rp notifications@github.com wrote:> > I would like some help with this at some point, as the information I> looked up at the time didn't make much sense. I wouldn't want to see a> patch which changes a great number of lines of code which isn't easy> to understand for this. I'd be more after something like call> setloclist(..., {'id': 'ale'}), or something of that nature, if that> is a thing.> A plugin may create more than one location list. So the location listidentifier is a number and not a string. You can get the identifier ofa location list using the following: let myid = getloclist(0, {'id' : 0}).id When modifying a location list using the setloclist() function, youcan pass this identifier: call setloclist(0, [], 'a', {'id' : myid, 'lines' : text})
- Yegappan
Can you use any number for the ID?
I wouldn't be surprised if this isn't supported in NeoVim at all, or if it is supported, but using a different API.
Nvim will support the Vim8 quickfix enhancements with an identical API. We've merged at least part of the relevant patches, and will eventually merge all of them.
In general Nvim merges all Vim features. It's Vim that doesn't merge Nvim features (and later chooses a different API).
Cool, good to know.
Related: #3457
Hi,
When ALE plugin is updating a quickifx list asynchronously, some other Vim plugin or user can create/modify the quickfix list resulting in ALE plugin updating the incorrect quickfix list. This can be avoided by using the new features in Vim8.
Refer to the following thread for the steps to do this: https://groups.google.com/forum/#!topic/vim_use/LTWNG0nRQCc