Skip to content

K (doc-str) does not work with hy #723

@jsquaredosquared

Description

@jsquaredosquared

First of all, thanks for this amazing tool!

As the title says, looking up the documentation with K does not work in Hy. I think the problem is this section using outdated Hy features:

code (.. "(if (in (mangle '" obj ") --macros--)
(doc " obj ")
(help " obj "))")]

The following changes could make it work, though I haven't been able to test it:

        code (.. "(if (in (hy.mangle '" obj ") _hy_macros)
                    (help (get _hy_macros (hy.mangle '" obj ")))
                    (help " obj "))")]

Explanation of changes:

  • mangle now is in the hy namespace; without importing, it can be accessed like hy.mangle
  • --macros-- no longer exists; I think the equivalent is now _hy_macros
  • doc no longer exists; to get help for macros, first the object must be mangled and the result used to look up the function object in _hy_macros

I tried following the instructions in CONTRIBUTING.md, but the docker environment installs a version of Neovim that is no longer supported by Conjure. (Running sudo apt show neovim on 24.04 returns version 0.9.5-6ubuntu2).

I would appreciate it if you could look into these issues.

Thanks :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions