Skip to content

Native support for Happy's .y files and grammar language #4409

Open
@anka-213

Description

@anka-213

Is your enhancement request related to a problem? Please describe.

Independent of the Haskell part of a Happy grammar (issue #689), there is also the grammar itself which would be nice to get some basic language server support for (like go to definition) to make it easier to navigate large grammars.

In this code

InlinePragma :: { Pragma }
InlinePragma
  : '{-#' 'INLINE' PragmaQName '#-}'
    { InlinePragma (getRange ($1,$2,$3,$4)) True $3 }

I would like to be able to go to definition for PragmaQName.

Describe the solution you'd like

I'd like some very basic language support for Happy's .y grammar files themselves integrated into HLS.

Describe alternatives you've considered

Another option would be to implement this as a completely separate language server and extension, since it is a separate language from Haskell, but that might make it more difficult to integrate with the inline Haskell parts (as well as inhibit discoverability). But maybe HLS's current architecture would make it difficult to add a non-haskell language, so it would be easier to make it separate anyways?

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions