haskell / lsp

Haskell library for the Microsoft Language Server Protocol
359 stars 89 forks source link

Handle dynamic registration using different methods #582

Open michaelpj opened 1 month ago

michaelpj commented 1 month ago

Extremely annoyingly, some methods are dynamically registered under a different method. Notably the semantic tokens methods are registered under textDocument/semanticTokens, which is not actually a method that is defined.

This information is in the metamodel ("registrationMethod") so we can do something with it. Probably we need to add a method like the custom method for each of them, and then have another type family that maps methods to their registration methods, which will be the identity in most cases but not all.