-
Notifications
You must be signed in to change notification settings - Fork 1
Why not make this part of Citar itself? #3
Comments
I looked at the code - there is really only a single function You define a minor mode: Lines 97 to 109 in 59006cb
I think such a mode should be avoided, since activating it will only load the package more eagerly. For the user it is not a big difference to activate a mode or to add an auxillary Capf function to the |
@minad - no; I was pretty agnostic, and @mclearc asked if I was OK with it (I gave him part of the code, or at least an idea how to make it work), and so I said sure. But I didn't think about one or two of your points, and am also fine to move it back too. |
BTW, someone on the doom discord mentioned all capfs, including this, that use If that's true, do you know of a workaround? |
Yes, non-exclusive Capfs are affected by this issue in default completion. But it is not a serious issue. I talked to Stefan Monnier about this and he even considers this behavior somewhat intentional, but advises against using non-exclusive Capfs. The issue is that non-exclusive Capfs must match the prefix such that they are taken into consideration. This means the completion style is ignored and non-exclusive Capfs may be falsely rejected for more complex completion style configurations (e.g. Orderless). But even then this is not a serious issue since the input prefix usually matches some of the candidates when you trigger completion (via TAB or automatically). Anyway, Corfu contains a workaround for this issue such that the completion styles are always taken into account, and such that the issue can be considered fixed completely if you use Corfu. Additionally, I recommend to extract the Capf properties to a separate variable such that users can adjust the configuration (e.g., |
@mclearc - could you see about a preparing a PR against this branch, with just the function, and incorporating @minad's other suggestion? That would have the advantage that when I merge breaking changes, this code will work. Plus you can give us feedback ;-) Or you could wait until we merge that, likely sometime over the next week. |
Closed via emacs-citar/citar#629 |
As this has been merged into citar itself, I would recommend archiving this repository and add a |
Yeah that's the plan! |
The advantage of the Capf API is that it doesn't incur dependencies, so it could go directly into Citar. Is the provided functionality controversial such that @bdarcus prefers to have it in a separate package? If not, having this inside Citar will be advantageous:
Generally I am all for a modularized package ecosystem where it makes sense. But sometimes packages are too fine grained as it seems to be the case here.
The text was updated successfully, but these errors were encountered: