Giter Club home page Giter Club logo

jedhy's Introduction

Jedhy

Last Hy version verified working for: Hy 0.16.0

jedhy provides autocompletion, documentation introspection and formatting, and other tools useful to IDEs for Hy, a lisp embedded in Python.

Leveraged in Emacs hy-mode IDE which I maintain.

Install from pypi pip install jedhy.

Features

  1. Completes:
    1. All standard python constructs (builtins, user-defined funcs, modules, etc.)
    2. Hy constructs (macros, shadowed operators, compile table)
    3. All of the above with Hy’s mangling rules handled.
  2. Documentation introspection and formatting (eg. for Emacs Eldoc mode).
  3. Annotations (eg. for Emacs Company mode).

Jedhy is fully tested. The tests folder is the easiest way to see example usage.

See jedhy.api, the simple entry point.

Example Usage

(setv jedhy (jedhy.api.API))

;; Add some stuff to namespace
(import [numpy :as np])
(import itertools)
(defclass Foo [object] "A class\nDetails..." (defn --init-- [self x y]))
(defmacro foo-macro [x])

(jedhy.set-namespace :locals- (locals) :macros- --macros--)

;; COMPLETION
(jedhy.complete "pr")     ; print
(jedhy.complete "print.") ; print.--call--, print.--str--, ...
(jedhy.complete "np.a")   ; np.add, np.array, ...
(jedhy.complete "foo-")   ; foo-macro

;; DOCS
(jedhy.docs "itertools")  ; "Functional tools for creating and using iterators."
(jedhy.docs "Foo")        ; "Foo: (x y) - A class"
(jedhy.full-docs "Foo")   ; "Foo: (x y) - A class\nDetails..."

;; ANNOTATION
(jedhy.annotate "itertools") ; <module itertools>
(jedhy.annotate "try")       ; <compiler try>

jedhy's People

Contributors

ekaschalk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.