Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete for Emacs mode tidal.el #647

Open
xmacex opened this issue May 12, 2020 · 2 comments
Open

Autocomplete for Emacs mode tidal.el #647

xmacex opened this issue May 12, 2020 · 2 comments

Comments

@xmacex
Copy link
Contributor

xmacex commented May 12, 2020

Is your feature request related to a problem? Please describe.
Autocomplete in Emacs would be nice, to save typing and reduce typos.

Describe the function/feature you'd like
When typing things, the editor would suggest defined symbols which match partial user input. Like you know an autocomplete.

Describe alternatives you've considered
Emacs has (AFAIK) two autocomplete engines, Auto-Complete and Company. The latter, Company allows creation of backends quite nicely.

SCENE 1.

ENTER THE SKEPTIC

  • The Skeptic: "I am not entirely sure if Tidal should actually have it's own, special autocomplete or should a generic Haskell autocomplete be used."
  • The Protagonist: "It is ye, the vile Skeptic, bringer of doubts! What unfortunate turn of events lured ye here? Since there are two kinds of things to complete, Haskell functions and sounds in SuperCollider, I thought maybe an algoraving -specific completion mechanism makes sense."

Tidal defaults to using GHCi as the Haskell environment. GHCi has this nice :complete repl "9" command for completing to 90s_was_an_era_of_excellent_rave_music, 909, 99luftballons etc. Company can also provide a bit of metadata for the Emacs to present to the user for a richer completing experience than just a list of symbols with a given prefix.

Additional context

SCENE 2.

emacs-tidal-autocomplete-in-the-works

I am lowkey (very lowkey) working on this here https://github.com/xmacex/Tidal/tree/autocomplete-for-emacs on a Company backend, and will make a PR to Tidal when it is somehow ready for showtime.

Currently (2020-05-12) it does successfully retrieve minimal completions of Haskell symbols, but there are all kinds of issues such as a bug caused by asynchronous execution, no nice metadata, SuperCollider/SuperDirt sounds are not completed, there are no tests or useful documentation, no error resilience e.g. in the case of non-GHCi Haskell environment etc. My Haskell skills are non-existent and I don't even understand how the whole contraption works, and my ELisp skills are trash, but I'm learning :)

@ndr-brt
Copy link
Contributor

ndr-brt commented May 12, 2020

In atom-tidalcycles :browse Sound.Tidal.Context is used to retrieve tidal function names and build autocomplete data.
In addition, hoogle is used to add documentaion.

@xmacex
Copy link
Contributor Author

xmacex commented May 17, 2020

Thanks @ndr-brt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants