haskell / haskell/haskell-language-server

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

Open
#4,409 1 comment 2 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

## 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
```haskell
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.