reddit / emacs
PyCharm like execution configs
carnivorousdrew · 2022-05-31 18:07
Hi everyone.
I have been using emacs for a while and only a couple of features from the jetbrains editor I miss: the Conflict Resolution tool, and the execution configurations.
These execution configurations usually specify which file to execute, with which virtual env, set environment variables and things like those.
I have tried to see if lsp mode or python mode offer something like that but it does not look like it, so I spent some time building some functions to achieve similar functionality making the assumption you use pyvenv:
https://gist.github.com/andcarnivorous/9a9fad7a267cba8f7840f338ad76cbf5
Still don't know if this is worth packaging on MELPA, but it sure has made my workflow more efficient.
If you know of any alternative already present in a major package please let me know :)
ndpian · 2022-05-31 21:00
This is very cool, thanks for sharing!
Sudo_Brew · 2022-06-01 11:12
Has anyone found or made something comparable to the conflict resolution tool? It has been the chief elusive feature I miss from JetBrains as well
carnivorousdrew · 2022-06-01 11:21
I dug through the threads in the subreddit and googled around but it seems there is nothing that offers the same kind of layout as the jetbrains conflict resolution tool.
Sudo_Brew · 2022-06-01 11:44
Yeah I've been looking on and off for quite some time and nothing has ever seemed to have come up. And unfortunately it looks like it would be very complicated and time-consuming to implement, and I'm not quite motivated enough to put in the time.
csemacs · 2022-06-01 12:20
Doesn’t ediff or smerge work for you?
I have used jetbrains conflict resolution tool before, it was like any other conflict resolution tool.
Did I miss using some existing feature that makes Jetbrains conflict resolution incomparable with other tools?
carnivorousdrew · 2022-06-01 13:20
Idk but for me the horizontal layout and graphical line references make it way simpler to sort things out in my head and keep track of things across a big file. But I can see how someone could feel the same with ediff as well, should be part of a personality test maybe: You have a big monolith and 12 merge conflicts, do you use JetBrains or ediff? lol
Sudo_Brew · 2022-06-01 13:40
Oh yeah, I use ediff all the time and its fine, but I miss the better visual representation of changes in JetBrains, it makes complicated and/or large conflicts easier and faster to understand, at least for me. The JetBrains tool doesn't have a lot on ediff or smerge, but just enough that I would eagerly switch to a copycat package if I could.
csemacs · 2022-06-01 15:30
Ediff and vim diff works fine for me. Anyway whatever works for you is what that matters.
Any merge or diff tool follow the same concepts inherently.
cradlemann · 2022-06-06 14:43
Emacs has a build in equivalent for this - [.dir-locals.el](https://www.emacswiki.org/emacs/DirectoryVariables) file where you can override any Emacs variable or list for files and sub directories inside this directory.
carnivorousdrew · 2022-06-06 14:47
interesting I had never found that out. I ended up making a package out of this however and is now in review for melpa :P I like how you set up execution configs with dap-mode and wanted something similar to that.