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

Add IDE support chart #104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add IDE support chart #104

wants to merge 1 commit into from

Conversation

rainbyte
Copy link

Hello,

I figured out that editor/IDE features could be tracked using a chart.

In this pr there is a basic example, inspired by rust areweideyet.

Thanks in advance!

@Gabriella439
Copy link
Owner

Looks great so far! I have a few questions:

  • What is "Snippets" support referring to?
  • What is the scope of the "Debugger" column? The reason I ask is that Debugger can mean different things to different people. Some people interpret it as stepping through code (i.e. integration with the ghci debugger with breakpoints and single stepping) and others have lower expectations and interpret it as just having a REPL available with the project loaded into the REPL
  • Do the vim and emacs editors include their plugins? I believe both of those editors support a large number of those columns if you include plugins
  • vim supports "Goto Def" out of the box through it's builtin support for ctags (and Haskell's fast-tags package provides an executable that generates the expected ctags format)
  • hindent is used for automatic code formatting and I know that at least emacs/vim/atom support hindent integration
  • Any editor that supports ghc-mod supports code auto-completion, and I know for sure that emacs/vim/atom do via plugins (and possibly IntelliJ, too)
  • I'd also suggest the following additional columns (which you can fill with question marks for now; we can fill them in later):
    • Infer type at location
      • I'm not sure how much this overlaps with "Doc tooltips"
    • Hoogle integration
      • I'm not sure how much this overlaps with "Doc tooltips"
    • Automatically manage import list
      • By this I mean not just formatting it for you, but actually adding imports for you for newly introduced symbols and pruning unused imports)
    • Automatically manage dependencies

@rainbyte
Copy link
Author

Thanks for the fast answer... About the items:

  • Snippets would be as in emacs yasnippet. Completion for pre-made pices of code (e.g. if I type "if", it could offer "if _ then _ else _")
  • I think debugger is the step-by-step one. The other could be just "repl", maybe.
  • About plugins: I've written which one supports the feature inside a tooltip. I think each line should contain a single config with only compatible plugins (e.g. emacs+intero and emacs+ghc-mod should have separate lines in the table).
  • I do not use vim nor ctags (didn't know about it, will investigate), but in vscode haskelly provides "goto def" without any special config/preparation (I think it is via intero). Maybe the table should indicate in some way (e.g. via colour?) which one works automatically, and which one needs manual intervention.
  • I'll investigate (and add) hindent
  • About completion: in theory lots of plugins/configs support this feature, in practice that's not always true (e.g. in some cases completion does not work with modules, or does not even work alt all). This should be reflected in the table.
  • I like those ideas... Let's see how to include them without making the table too big / unmanageable.

Thanks again for your detailed review :)

@rainbyte
Copy link
Author

Ahh... I've written "docs tooltip" as in "type info + some description text (if available)".

@rainbyte
Copy link
Author

I've apply some of the suggestions, and added links to the projects/plugins behind each feature.

@rainbyte rainbyte force-pushed the master branch 2 times, most recently from a12e375 to 05ea0b3 Compare February 28, 2017 00:40
@rainbyte
Copy link
Author

Also added different symbols to represent the support level

@rainbyte rainbyte force-pushed the master branch 4 times, most recently from 98f8f87 to a490d1b Compare February 28, 2017 01:00
@saurabhnanda
Copy link

Some more suggestions:

  • Go-to definition when the current file doesn't compile due to a type-error -- are Java IDEs able to handle this?
  • Displaying type variable-names in documentation tooltips
  • Display expanded TH splices, like macro-expand in Lisp
  • Support for hot code reloading -- very important for webapp development

@rainbyte
Copy link
Author

When there are features missing in some item or support was reduced (e.g. plug-in does not work anymore), we could handle those situations with a decrease in level of support (e.g. goto def cannot be best in class if it could be provide a feature but it does not).

Type variable names should be part of doc. tooltips. Maybe each category should state somewhere which sub-features are taken into account.

I think TH and Hot Code Reloading should have an independent item.

@rainbyte
Copy link
Author

I'm updating the chart here. At least until it is ready to be merged.

@Gabriella439
Copy link
Owner

One minor bikeshed: is there any reason that you use a new moon for excellent support and full moon for poor support? I would have expected the opposite

Also, the current system doesn't have an option for: "the feature is completely absent". I also don't think there needs to be a "best in class" rating for these sorts of things. I think "mature" is good enough for the highest ranking. One possible suggestion is:

  • New moon = Feature is absent
  • Half moon = Immature
  • Full moon = Mature
  • ... = Unknown

The one column I definitely would really like to see is automatic import management, even if it turns out that no editor supports it yet. That's a big deal for Haskell programmers and I would like to draw attention to the need for that feature. Haskell is an import-heavy language due to lacking support for object-oriented features.

Also, I like the idea of linking the entries to the specific plugin that supports the feature

There should also be an entry for Leksah, too. That's actively maintained and pretty feature rich

For more specific information on entries:

  • atom's support for doc tooltips is mature
  • I believe there are two IntelliJ plugins for Haskell: the one created by JetBrains and the HaskForce plugin so we should clarify which one the chart is referring to (or include rows for both)

@chris-martin
Copy link

This is the good IntelliJ plugin: https://github.com/rikvdkleij/intellij-haskell

@ocharles
Copy link

I wonder if modes of transport might be a little more intuitive than moon phase. 🚲 🚗 🚀 for example, shows an evolution.

@themattchan
Copy link

themattchan commented Feb 28, 2017

Re: @Gabriel439's tweet:

I don't have opinions on IDE support, but I do have some on emacs integration. Maybe this is the wrong thread to discuss these, but here's a brain dump/wishlist --

  • Automatic cabal file management, preferably without needing to reload intero/ghci.
  • Better Literate Haskell support: maybe it's just that my config is broken, but I have this problem where lhs mode's Bird-track insert keeps adding leading characters to lines that are not code.
  • intero is quite flaky and needs to be reinstalled for each different GHC version, so it becomes quite hard to switch between projects. Once you get it working though, the type previews in the minibuffer are wonderful.
  • hoogle and snippets are somewhat usable from emacs, though it would be better if there was a more complete/automatic solution
    • On the subject of snippets, I would like to see some company-coq level snippet insertion for patterns when you do a case over some type.
  • I manage goto-def/find usages by using silver-searcher, which works fine. So I'd give that a 🌓 at least
  • It would be really nice to have some sort of IntelliSense like thing for autocomplete, possibly hooking into hoogle. It would be especially great for lenses.
  • Two columns I would add:
    • integrated error reporting. flycheck really shines here, and many of the above improvements can probably hook into flycheck.
    • REPL + typed holes integration. A basic repl is available, but I would love to see better integration with typed holes and possibly code completion based on them.
  • For tooltips, what kinds of information are we considering? There are quite a few things that they can display: types, documentation, completion, usages (e.g. DrRacket), more fancy liquidhaskell things

@NickSeagull
Copy link

Great idea! Wanted to take part in this by showcasing HaskellDO, and getting suggestions for implementing them in the future 😄

@fosskers
Copy link
Contributor

Intero doesn't seem to be mentioned yet?

@Gabriella439
Copy link
Owner

@fosskers The latest version of the chart is being updated at https://github.com/rainbyte/haskell-ide-chart and that does mention intero

@fosskers
Copy link
Contributor

Gotcha, I was only looking at the diff here.

@rainbyte
Copy link
Author

I've updated the icons using the 🚲 🚗 🚀 suggestion (thanks @ocharles !), please take a look :)

@rainbyte
Copy link
Author

I've tried Leksah before without to much success... Does anyone know what are the current levels of support?

@fosskers
Copy link
Contributor

Yi probably deserves a mention.

@rainbyte
Copy link
Author

@fosskers , do you know the state of Yi support?

@Gabriel439 , maybe is would be better to track this specific issues in the other repo (?)

@Gabriella439
Copy link
Owner

@rainbyte We can use whichever format is more convenient for you to track this discussion

@fosskers
Copy link
Contributor

@rainbyte Unfortunately I've never used it.

@rainbyte
Copy link
Author

@Gabriel439, let's track specific requests there, and here how will it be integrated with sotu.

@cnd
Copy link

cnd commented Mar 1, 2017

I'd like this link to be added https://atom.io/users/atom-haskell /cc @lierdakil

@lierdakil
Copy link
Contributor

@mpkh, not sure where that link would go here, but sure, if we're talking editor support, it'd be hard to avoid at least mentioning atom-haskell, since it's pretty much responsible for Haskell support in Atom at this point.

Some observations:

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

Successfully merging this pull request may close these issues.

None yet

10 participants