You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried adding the features you have (bufs can return list of bufs),
Customizing add allows to add names without extension (or what I need full basename)
and it adds some caching which might be just good enough.
The text was updated successfully, but these errors were encountered:
Hi there! I'm not sure I understood correctly what you're trying to solve with that, could you please provide more info on features you wanted to add?
Caching - since the complete function is called each time when autocomplete is evoked, there isn't a lot of sense trying to cache buffers. Moreover, if you plan to do it, you need to actually subscribe to buffer events and manage them like that. While it's possible, it won't get you any boost in performance, but it will create complexity for such a simple extension. In your solution you're just checking a number of buffers open - this might not be enough since I can close a buffer and then open a new one. That way a number will be the same, but they could have different names (file names) and thus you will see your previous file name instead of a new one.
Extensions - I think I already drop the extensions of files when putting them inside completions. Do you have issues with that? If so, could you please provide more details?
Btw, thanks to you I got back to my code to check it and found a small bug, where I forgot to write buffer names into the table to prevent duplicating. Thanks!
Overall, please provide more info on what you planned to do and we would think how it could be done!
@MarcWeber do you want to make the function that gets you a list of buffers configurable? Is that what you wanted to do (as I see from your source files)?
https://github.com/MarcWeber/nvim-cmp-bufnames
I tried adding the features you have (bufs can return list of bufs),
Customizing add allows to add names without extension (or what I need full basename)
and it adds some caching which might be just good enough.
The text was updated successfully, but these errors were encountered: