typescript.nvim icon indicating copy to clipboard operation
typescript.nvim copied to clipboard

Fallback as a user-defined function for TypescriptGoToSourceDefinition

Open dsych opened this issue 2 years ago • 1 comments

Allow users to supply the fallback function instead of assuming that they want to call the vanilla implementation.

For example, this would allow us to call telescope's implementation of go-to def:

require("typescript").goToSourceDefinition(winnr, {
    fallback = require("telescope.builtin").lsp_definitions
})

here we would simply check the type of the fallback and if it's a function, we would just call it.

dsych avatar May 25 '23 03:05 dsych

Sure, PR welcome.

jose-elias-alvarez avatar May 28 '23 16:05 jose-elias-alvarez