Add Haskell buffer symbol search
This PR is a follow-up from https://github.com/zed-industries/zed/pull/6786#issuecomment-1912912550 and adds an outline.scm file for buffer symbol search support in Haskell.
Release Notes:
- Added buffer symbol search support for Haskell
Screenshots
Open Question
Since functions/signatures don't have a special syntax keyword in Haskell, signatures show up in symbol search as just the string name. This is probably fine, but I was wondering if there was a way to override this and show these prefixed with signature in the buffer symbol search popup? So it might show up as:
signature genDecodeErr
Additionally, I was trying to add the types from a signature which would be pretty useful IMO but I couldn't figure out how to do this in the outline.scm file. Below is a screenshot showing the syntax tree and I was hoping to show something like:
genDecodeErr
DecodeErr -> Gen T.OnDecodeError
Which is the type: fun part in the syntax tree.
cc @mikayla-maki, sorry the follow-up took me a bit 🙂
and thank you @huwaireb for the tips!
@pseudomata This is awesome!
Additionally, I was trying to add the types from a signature which would be pretty useful IMO but I couldn't figure out how to do this in the
outline.scmfile. Below is a screenshot showing the syntax tree and I was hoping to show something like:
AFAIK our other language outlines don't show type information in signatures.
I was trying to do the same thing in #6733 before I noticed that other languages didn't include the types.
It does seem like something that could be useful, but it seems like a change we'd want to make across the board (and it's possible it requires some changes in our outlining support).