haskell / haskell/haskell-mode
Consider marking pragmas as something other than comments
- Dominant language
- Emacs Lisp
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 2
Description
The root of this issue is that for `lsp-mode`-based completions, we would like to complete language pragmas. Since `lsp-mode` is quite generic, we don't have a good way of saying this, and we just have to say that we want completion in all comments. _That_ is often quite annoying (https://github.com/emacs-lsp/lsp-haskell/issues/135).
@alanz made the suggestion that we could consider _not_ treating pragmas as comments. I think that would mean a change to how `haskell-mode` tokenizes Haskell source, and ultimately I don't have a good sense of whether it would have lots of unintended consequences. But there is a certain logic to it: unlike normal comments, pragmas are active program elements that have a prescribed structure, and so in that sense are perhaps more like real syntax than comments.
As I said, I don't really know if this is a good idea or not, so I'd appreciate some wisdom!
Contributor guide
Research direction
Start by examining how haskell-mode tokenizes Haskell source and how lsp-mode-based completions interpret comments. Determine whether pragmas can be classified separately without unintended consequences, then use the issue discussion to establish the expected behavior and whether a change is wanted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs, haskell
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100