Anyone here using Emacs with python LSP? How on earth do I get LSP to work via venv?
thanks!
I don't directly but I might know some folks who would, what issue exactly are you getting? And which LS? Does this help? https://journal.spencerwnelson.com/entries/emacs_virtualenv_lsp.html
I did a while back. I remember hacking a path in lsp-pyls.el -> lsp-pyls-get-pyenv-environment I forget why, but pyenv and venv work the same or something. I'm pretty sure I used venv. One of these functions I overrode to just return the venv path. Sorry I forget the details right now.
did you get it to work @ben.sless?
I'm stuck with lots of squigglies that shouldn't be there
Yeah I somehow got it to work, it's a bit unwieldy but I can share what I did in a bit
okay Install pyvenv-auto, auto-virtualenv Then pretty early in your config
(require 'auto-virtualenv)
(setq autovirtualenv-verbose t)
(auto-virtualenv-setup)
(setq auto-virtualenv-reload-lsp t)
and ofc have python stuff and lsp installed and configured and it should work.
It works for me with spacemacsHas anyone got a nice slurp/barf solution for clojure going? I use smartparens but it sometimes adds random spaces to whatever sexp I'm slurping, resulting in broken code. And it doesn't slurp ? properly (issue here: https://github.com/Fuco1/smartparens/issues/1212 ) But tbh the first issue is the most frustrating one.
I guess that's a recent smartparens regression, as I doubt it would have had many clojure users otherwise. I can confirm lispy's slurp/barf also work well. (though it is probably abandoned, and quite different from paredit/smartparens)
I use evil-cleverparens and it works well
I used evil-cleverparens at some point in my Emacs life, but I switched to meow. Paredit seems nice, I've always dodged it because it seemed to me that smartparens was "paredit 2.0" but so far I see no difference. TBH I have rather basic sexp editing skills anyway so it's not like I'm pushing any boundaries here.
Maybe you can use this https://dawranliou.com/blog/structural-editing-in-vanilla-emacs/ as a starting point to add custom commands (sequence of existing vanilla commands) for only the operations you need.
The vanilla sexp commands (the ones that exist) seem to treat foobar? correctly.
So they should compose well with one another.