haskell / haskell/haskell-language-server

Improve Autocompletion of pragmas within instance declarations

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

Description

Take this for example:
![image](https://user-images.githubusercontent.com/8463814/203031223-110ab470-4c6e-4250-80b6-a12d0eb3d74c.png)

The completion only occurs if it happens between two `{-# #-}`, and if I select the completion, this is the result:
![image](https://user-images.githubusercontent.com/8463814/203031430-d2b73586-3935-4e22-86b2-e199a5232f43.png)

This is invalid code. Would be better if we did not introduce the second `#-}`.

In LANGUAGE pragmas at the very beginning of a file, this does not happen, so I presume this requires just a little bit of fine-tuning of the existing code and adding a test-case.

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.