hylang / hy-mode

Hy mode for Emacs
GNU General Public License v3.0
189 stars 48 forks source link

Jedhy integration - finalizing IDE components #74

Closed ekaschalk closed 5 years ago

ekaschalk commented 6 years ago

EDIT May 6th 2019: I'm actively working on hy-mode again and do not recommend master at this time. IDE features have been broken with Hy 0.16 and only jedhy supports it. I will be finishing this and solving various other bugs now.

--

For those actively using Hy:

jedhy is now updated for Hy 0.14/master and fully integrated in the dev branch: https://github.com/hylang/hy-mode/tree/new-shell-2.

Its autocompletion, doc inspection, and other IDE components are vastly improved over master and considered stable now. If you download and pip install it, you can utilize its features.

The only improvement to jedhy remaining is: removing the hyx prefixes that appear for some compile table symbols in eldoc.

Merging into master is pending on:

  1. Hy 0.15 (significant changes to Hy internals have been made).
  2. I'm not sure how to manage auto-installation of Python packages via Emacs yet in a kosher way.
  3. Feedback, as many significant changes have occurred.

Note that you can send imports in the current file via hy--shell-update-imports, so you can complete imported packages like pandas.

yuhan0 commented 5 years ago

Is the new-shell-2 branch supposed to be usable for testing with jedhy? On switching to it I'm getting errors immediately after opening a .hy file: (void-function hy-shell-get-process-name) Looks like some functions haven't been merged over?

ekaschalk commented 5 years ago

Yea you are likely right about the merging. I started merging some changes PRed to master, one of which dealt with process names, but hadn't tested them yet on that branch. I'll see if I can resolve those differences.

yuhan0 commented 5 years ago

If it helps, I got it working on that branch by copying over hy-shell-get-process-name from master

(defun hy-shell-get-process-name (&optional internal)
  "Get process name corr. to `hy-shell-buffer-name'/`hy-shell-internal-buffer-name'."
  (if internal
      hy-shell-internal-buffer-name
    hy-shell-buffer-name))

and defining the missing function:

(defun hy--shell-send-internal-setup-code ()
  "Send setup code for autocompletion and eldoc to hy internal process."
  (hy-shell-send-string-internal
   (concat hy-shell-internal-setup-code
           hy-shell-internal-update-namespace-code)))
ekaschalk commented 5 years ago

Took quite some time but this is now ready to close.