haskell / haskell/haskell-language-server
Handlers should run in a custom monad that doesn't expose stuff that people shouldn't use
Open
Hackathon
level: easy
type: enhancement
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 12
Description
Today our handlers have access to all of `LspM`, which lets them:
- Access the VFS and the configuration
- This is incorrect - plugin handlers should be accessing the snapshots of these that we have in the shake graph
- Send arbitrary messages
- This makes things harder to test, we can't just look at the handler return value to see the main thing that the handler "does"
We should probably run in a custom monad that is a wrapper around `LspM` that restricts some stuff, and maybe also change our handler types to mostly return their results.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.