Closed ekaschalk closed 6 years ago
Have you seen the hy commands in the python layer in spacemacs?
I updated it a few months ago and I have keybindings set up for using virtualenvironments and connecting to / interacting with the inferior lisp repl.
I use Spacemacs as well. hy-mode
has since been redone and those commands will not work with hy master branch.
The shell has been rewritten and is started up with run-hy
rather than starting up through inferior-lisp
. I've also written hy-specific versions of the send to shell stuff.
If you still use hy your feedback on some of the new features like Eldoc and autocompletion would be helpful, I'm preparing to push to melpa stable and the updated commands to Spacemacs.
I will take a look at the updated spacemacs-hy over the weekend. I currently use the commands in the python layer and just happened to stumble upon this issue. I'm interested to try out the autocomplete since I've been working for a few months without it.
When the lastest version is pushed to melpa, I think it might make sense to strip the hy stuff out of the spacemacs python layer and submit a hy layer to them. I also wouldn't mind going in and updating the commands in the python layer myself once the changes are made if keeping the commands in the python layer is what people want to do.
Thanks that would be helpful.
I'm all for making hy layer a separate layer. And it would be good to include the new ob-hy: https://github.com/brantou/ob-hy
I used the hy-mode in spacemacs for a few days now so I thought I would give my feedback on it. I missed having the command for "evaluate sexp before point". In emacs-lisp the key for this is ", e e". I also miss the eval current function command ", e f" in emacs lisp. This almost works with the eval current form command (", e c"), but you have to navigate to the top layer of the function to use it.
I've been using it with the current virtual environment key bindings provided by the hy stuff already in spacemacs. That is something spacemancs-hy would need if it were to stand on its own since the current way it is working in spacemacs is by piggybacking off the python layer. If hy-mode stays in the python layer then nothing really needs to change.
The way the repl works is much nicer. Evaluating a buffer seems to work correctly, as does evaluating import statements. The old inferior lisp repl would seem to stop printing the compiled python code after working in it for a few hours and this one does not have that issue. Really nice work with the repl.
Also I could not make the autocompletion work. The function "spacemacs|add-company-backends" used in spacemacs-hy is not defined in the version of spacemacs I'm using: master branch version 0.200.9.
missed having the command for "evaluate sexp before point" / eval current function
Eval the last sexp is pretty simple, I can see about the function, right now I just eval the region in those cases.
virtual environment key bindings
Me too, I still had those activated from the python layer but you're right the pyvenv hooks/funcs will have to be in the hy layer.
function "spacemacs|add-company-backends" used in spacemacs-hy is not defined
It seems the API changed in the develop branch for autocompletion.
https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bcompletion/auto-completion
See if following their example works for you (or use dev branch):
(spacemacs|defvar-company-backends hy-mode)
(spacemacs|add-company-hook hy-mode)
(push 'company-hy company-backends-hy-mode)
Thanks for the feedback, also check out Eldoc and documentation of the thing at point with "shift-k".
@ekaschalk I created a Hy layer extracted from Python layer on develop branch: https://github.com/syl20bnr/spacemacs/tree/develop/layers/%2Blang/hy
I tried a bit in a Hy buffer but the auto-completion was not working although company-backends
is correctly set.
Most of SPC m e
bindings are now SPC m s
per convention, see https://github.com/syl20bnr/spacemacs/blob/develop/doc/CONVENTIONS.org#repls
I would be happy if you can update/fix the layer :-)
That's great. I'll look at the layer.
Are you perhaps using the master branch of Hy or the last tagged release to test Hy completion?
I try like you suggested with disabling hy, etc, but I get an error with company
(Spacemacs) Error in dotspacemacs/user-config: Symbol’s function definition is void: spacemacs|add-company-backends
@riatzukiza you have to use the develop branch of spacemacs to have this function.
@syl20bnr Hy completion should be resolved for Hy master, no spacemacs changes should be required.
I've tagged another release for it.
Ok great ! :+1: Eric Kaschalk notifications@github.com writes:
@syl20bnr Hy completion should be resolved for Hy master, no spacemacs changes should be required.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/hylang/hy-mode/issues/56#issuecomment-394824092
UPDATE: Hy now has its own Spacemacs layer! It's in Spacemac's dev branch.