haskell / haskell/haskell-language-server

Prioritise completion suggestion of required fields

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

Description

Related to #3664.

When suggesting fields in the top level or in stanzas of a cabal file, it would be nice to prioritise suggestion of required fields over optional ones.
Additionally, it would be nice to label required fields as such using the details field of the CompletionItem.

* In order to implement this, the data structure storing the keywords and their completers needs to be updated with some way of marking the required fields.
* Then, the `weightedConstantCompleter` function can be used to prioritse the suggestion accordingly.
* In order to add a label, the CompleterData probably needs to carry the information whether the suggested field is required.

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.