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.
Today our handlers have access to all of
LspM, which lets them:We should probably run in a custom monad that is a wrapper around
LspMthat restricts some stuff, and maybe also change our handler types to mostly return their results.