-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fully replace evil-integration #60
Comments
Yup, as mentioned in the same thread.
I'm fully ok with copy-pasting from evil-integration and disabling what doesn't make sense and was planning to once a version of evil with that change is out in the wild. |
Planning on attempting this in the next week (or few weeks). I think a solid peacemeal plan would be to:
@Ambrevar @noctuid Sound good? If anyone else has the time or energy, feel free to kick start the process too. |
Looks good to me. Next few weeks will be busy ones on my end :/ |
Step 1 should be done. The rest will probably come in piecemeal. |
I wonder how we want to handle something like this in evil-integration.
We can put it in the company file but it'd be reasonable for a user to disable the company integration (assuming they have their own setting). But doing that would mean they'd disable this nice integration too. The want here is that these integrations should go with their integration file but I could see a user wanting this 'integration' but not wanting the bindings. The changes in evil-integration just around bindings are easier because they're just bindings. It might be better to leave this type of change in evil-collection-integration but that seems unsatisfying. |
Found this on reddit: https://www.reddit.com/r/emacs/comments/7obhve/evil_and_avy/ |
Any idea on how we want to handle this? This might be one of those needs that would suggest tweaking the init system for these packages to handle the case where a user wants 'integration' but no bindings. We could always just go for the absolutely simple route and consider integration to be the same as bindings and let the user recreate whatever setup is needed. |
Relevant PR to evil.
I think it would be best to give the user a way to opt out of getting keybindings. For example, another argument could be added to Edit: |
Yeah, I've been noodling about how to do this. I think that part is what's blocking the rest of evil-collection-integration being dispersed into separate modules. @noctuid If you had a good idea on how to handle this, I think a PR would be awesome. I'd think we'd want to be able to allow the user to disable either the integration and/or the keybindings. It may or may not look similar to what @Ambrevar was playing around with a while back on tweaking the init list. |
I can potentially make a pull request at some point if I have time, but I'd rather everyone agree on how to do it before doing any work. To elaborate on my previous suggestion, each setup function would now takes two optional arguments. For example: As for
Can you point me to that? Regardless of the method used, work could potentially be done just to split integration from keybindings in each file (even if it still always runs both for now). If not for old files, it may be a good idea to do this for any new files to make things less work later on. I haven't looked through everything, but we may want to discuss any special cases beforehand. There are some cases where keybindings should be considered integration (e.g. for the avy remap commands and for my suggested change to the minibuffer keybindings). I think integration should be only for any "fixes" that pretty much every user will want, but we can still have it be optionally disabled. |
Don't have a strong opinion either way. @Ambrevar
I'm erring on the side of someone that wants this package would probably use it mostly for the keybindings so maybe we can assume the case where the user wants 0 bindings is an edge-case. Open to suggestions here if we can have our cake and eat it too.
It was on a separate branch. I forget what the goal there was. https://github.com/emacs-evil/evil-collection/tree/init
I don't have a strong opinion where we draw the line. |
I think anyone who would normally want to just use |
It's Lisp after all, users are free to use loops to simplify the setup. I don't think this would be a problem at all. |
Fair point. Use keywords in |
Not completely sure about what you have in mind, but if I understood correctly, then I suggest that the default behaviour when no key argument is specified is to include both the bindings and the integration. In short:
|
Hey guys, what's the impacts of what you are planning for users that don't use |
Seriously guys, Is that possible to improve Thank you! |
|
Spacemacs does not use |
By breaking change I mean loss of features like avy integration, key-bindings etc... |
My apologies it seems that I made a mistake about what's going on here. Seeing breaking So I agree with you about the split and it's unfortunate that you have to duplicate the integration to support them in @wasamasa @TheBB I know that we don't want to touch evil too much but I guess we should improve |
Ideally we should make what it takes to keep |
Sorry @syl20bnr but I'm pretty much out of the project. I've never expected to contribute much to it (see https://www.reddit.com/r/emacs/comments/5g9d53/evil_needs_a_new_maintainer/daqij57/ for my announcement), ended up being the one doing most of the work and now I don't have any time left for it at all. You've heard my opinion on this, I consider a small bit of code duplication far better than bikeshedding over how to make code reusable/modular. However, it's ultimately @TheBB's decision. |
evil-collection started (partially) as a replacement for evil-integration.el. This, includes keybindings as well as integrations.
See above.
I agree somewhat. If there can be an improvement to evil, it should go there. For any keybinding/integration change, I 'd prefer it to be in evil-collection. Again, evil-collection isn 't just a set of key bindings, it was meant (at least from me, not sure about @Ambrevar) to be a replacement for evil-integration.
I agree but evil-collection as this point is still expected to be more bleeding-edge.
For what it 's worth, I do think this is a good idea but will settle for the one flag that needs to be set to nil. |
Thank you for the clear answers. Not sure we agree on the meaning of integration here. In contrast to key bindings which are opinionated by nature, integrations are not a subjective matter so it would be not efficient for us to duplicate the effort on them. For instance, using Clearly |
There are no plans to remove anything from
I think that we are mostly on the same page. Most everything in I agree that it would be preferable to have all non-controversial "integration" done in evil. Anything more could be left for other packages like Also, I really don't think that there is much room for bikeshedding over how @wasamasa Even with the "potentially controversial" configuration I mentioned left in, removing the keybinding configuration alone (which everyone who has wanted to split the file has already agreed on) would make evil-integration.el easily usable by evil-collection without any bikeshedding/discussion necessary. I also think any discussion could be had once only. While I agree that the code duplication is not a huge deal, I wouldn't be surprised if in the future someone made a PR to evil-collection adding some basic non-controversial integration improvement and did not also make a PR to evil, which is what I think that @syl20bnr is worried about. Maybe this is also not a huge deal, but I think it's a problem that's not difficult to prevent. |
My intent was just to provide context, as in evil-collection was meant to be an alternative to the entire evil-integration.el file. For example, I don 't think term, minibuffer, company, eshell, helm, wdired type changes in evil-collection would make it into evil (or is even appropriate there).
Agreed.
Agreed, if @TheBB is ok with splitting, we can start looking at what the list looks like.
I think this would be good. I also don 't like the thought of having to port over changes to evil-integration.el to evil-collection. As of right now, it's a necessary evil.
I think that 's a fair scenario. Right now, the reverse is happening (evil -> evil-collection). Of course, if we can avoid it, lets go for it. |
This is in now (we're back on leveraging evil's evil-integration)! Hopefully users will be able reset their configuration without a hitch. |
Do you want to have a dedicated issue open for selectively enabling keybindings vs. Integration? |
Yeah, I'll look into adding it soon. |
See emacs-evil/evil-collection#60 for background behind this change. I had to make this change to suppress a warning printed whenever Evil was loaded.
`evil-collection' assumes `evil-want-keybinding' is set to `nil' before loading `evil' and `evil-collection' See also - https://github.com/emacs-evil/evil-collection#installation - emacs-evil/evil-collection#60 - emacs-evil/evil#1087
to avoid warning (evil-want-keybinding) when load evil and evil-collection we set a special from (setq) before load evil and evil-collection we set (evil-want-keybinding) before load evil, evil-visualstart and evil-collection ref: - https://github.com/emacs-evil/evil-collection#installation - emacs-evil/evil-collection#60
Since I didn't see a solution on here and the error is still showing up and referring to this github issue I wanted to share my solution. Here's what I did to solve it: Add this before loading evil-leader:
Then add it again before loading evil. The warning disappeared after this. |
From emacs-evil/evil#992:
Currently,
evil-collection
is mainly focused on keybindings and is not an alternative toevil-integration
. I'm not suggesting doing any opinionated configuration by default, only adding "fixes" that it's unlikely anyone would object to (e.g. advisingshow-paren-function
to makeshow-paren-mode
work correctly in normal state, adding evil command properties such as:repeat
,:type
,:keep-visual
, and:suppress-operator
, etc.). Anything considered potentially intrusive could be optional. Unfortunately, sinceevil-integration
is all or nothing and will stay that way, its useful, non-intrusive functionality needs to be replicated in another package for users who want to sanely only use those parts ofevil-integration
. Maybeevil-collection
is not the suitable place to do this, but I'm interested to hear your thoughts.The text was updated successfully, but these errors were encountered: