alexwl / haskell-code-explorer

Web application for exploring and understanding Haskell codebases
MIT License
509 stars 20 forks source link

Are there any new features? #34

Open haskell-monad opened 5 years ago

haskell-monad commented 5 years ago
  1. Whether the left directory tree can be sorted by directory and alphabetically.

  2. Whether the code area can be edited. For example, when viewing the source code, you want to add some comments and save them for future viewing.

  3. After viewing the file A.hs/B.hs/C.hs sequentially, can you provide a shortcut key to quickly jump to the previous browsed file. For example, when viewing C.hs, use the shortcut key to return to the B.hs file.

  4. Integrate with development tools such as vs-code or IntelliJ IDEA?

alexwl commented 5 years ago

Hi,

  1. It definitely makes sense to be able to sort files in alphabetical order. It should be quite easy to implement (this feature is purely client-side). I will work on it this week.

  2. haskell-code-explorer explicitly does not support modifications of the source code. It is a trade-off that makes the architecture of haskell-code-explorer much simpler than that of a full-blown IDE.

  3. When you click on an identifier, the JavaScipt application adds a URL of the current line (e.g., /package/base-4.12.0.0/show/GHC/Conc/Signal.hs#L69) to browser history and then shows the definition site of the identifier. So, it is possible to use browser back button or Alt/Option + Left Arrow shortcut key (in Chrome and Firefox) to return to the previously browsed file.

  4. Integration with code editors is possible, but it would require significant effort (#32).

    There are development tools for Haskell that are specifically designed to add code intelligence features (go to definition, type and documentation on hover, code completion) to existing code editors:

    https://github.com/haskell/haskell-ide-engine works with VS Code, Vim and Emacs https://github.com/rikvdkleij/intellij-haskell is a plugin for IntelliJ IDEA

haskell-monad commented 5 years ago

thank you, this project is really good, even better than haskell-ide-engine, come on

alexwl commented 5 years ago

6954dbf99e66052cf7a0518355088d62bfdec5dd adds an option to sort files by name/type. By default, files are sorted by name (in alphabetical order).