-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: pass in a custom request to use instead of default LSP's #127
Comments
Ah, I belive you are talking about the handler?Those are a bit harder to make configurable, because some require speciel treatement (e.g. we use our own hover handler because the default nvim one doesn't like hovers responses that originate from another buffer) |
I see! Thanks for taking the time to answer at that hour of the night :) |
For some requests your custom handlers may work out of the box. You can experiment with using the otter.keeper.send_request function directly (e.g. by copy-pasting one of the ask_... functions for your own needs). Because for some requests all the necessary changes are already done in the filter function, while others required special treatment of the handler itself (like hover). Maybe we can identify parts of handlers that can safely be exchanged and thus be made configurable more easily. |
I just merged a big rewrite. Depending on the nature of your usual type_defintion function, it should now just work or be apparent why it doesn't currently (see https://github.com/jmbuhr/otter.nvim?tab=readme-ov-file#current-limitations) |
Hey Jannik, sorry for the late reply, I'm drowning in work. |
Same kind of request as for the fallback, I'd like Otter to use my usual function for type_definition (for example) instead of the default LSP.
Would default to the current behavior (using the LSP's builtin function).
I looked into the code to do it myself but I don't understand where it is done, I'd be happy to open a PR if you can give me some directions. :)
My idea is to add a second parameter
callback
of typefunction|nil
to all ask_* functions.The text was updated successfully, but these errors were encountered: