hylang / hy-mode

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

Erorr in the autocomplete suggestions field #106

Open unsafe-andrew-old opened 2 years ago

unsafe-andrew-old commented 2 years ago

photo_2022-06-28_20-22-10 I use Doom Emacs and company-mode. I think, no additional notes should be added

Pinjontall94 commented 1 year ago

Also getting these same errors! Very curious if there's any workaround in the meantime

alejandrogallo commented 1 year ago

I'm also trying this out, but I have the feeling the language changed in the meantime

this is the source of =hy-jedhy.el= to load the jedhy instance

(defconst hy-jedhy--setup-code
  "(import hy [hy.core.language [*]] [hy.core.macros [*]]) (require [hy.extra.anaphoric [*]]) (try (do (import jedhy jedhy.api) (setv --JEDHY (jedhy.api.API)) \"Started jedhy\") (except [e Exception] \"Failed to start jedhy\"))"

which translates in

(import hy [hy.core.language [*]] [hy.core.macros [*]])
(require [hy.extra.anaphoric [*]])
(try
 (do (import jedhy jedhy.api)
     (setv --JEDHY (jedhy.api.API))
   "Started jedhy")
 (except [e Exception]
         "Failed to start jedhy"))

which does not work at all for a newly checkout version of =Hy= for me

=> (import hy [hy.core.language [*]] [hy.core.macros [*]])
=> Traceback (most recent call last):
  File "stdin-4ed2839626872f28f7164ebdcc3e117f1e4842f7", line 1, in <module>
    (import hy [hy.core.language [*]] [hy.core.macros [*]])
  File "<stdin>", line 1
    (import hy [hy.core.language [*]] [hy.core.macros [*]])
               ^
hy.errors.HySyntaxError: parse error for pattern macro 'import': got unexpected token: hy.models.Symbol('hy'), expected: end of file

heck I thing the code is not valid v1 Hy, but I just started using it and I'm not sure. Is this the case?

BTW I am using

hy --version
hy 1.0a4
kovan commented 1 year ago

@alejandrogallo yeah I think that is the issue. Try with hy 0.20.0.