I program in Haskell using lsp-mode with lsp-haskell. I need to have a working "jump to definition". xref-find-definitions using lsp--xref-backend sometimes fails to find the definition. xref-find-definitions using etags--xref-backend usually finds the definition together with other unrelated definitions. I want to have a command that runs lsp--xref-backend first, and if it doesn't find anything, runs etags--xref-backend. How do I achieve that? Simply setting xref-backend-functions to '(lsp--xref-backend etags--xref-backend) never invokes the etags backend even when the lsp backend doesn't find anything.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.