haskell-mode icon indicating copy to clipboard operation
haskell-mode copied to clipboard

Jump to definition is broken with LSP and doom-emacs

Open ericnething opened this issue 5 years ago • 2 comments

M-. is broken when using it with lsp-mode and doom-emacs, which has a very nice setup that works with all other language modes. The problem is that M-. is bound to the internal haskell-mode function haskell-mode-jump-to-def-or-tag. This prevents lsp-mode and doom-emacs from using it, and results in it not working at all with the error Unable to find symbol in current document.

The only way to fix this is to unset the keybinding after loading haskell-mode.

ericnething avatar May 12 '20 00:05 ericnething

Since we now require Emacs 25.1, we should likely just define and register an xref backend, so that the default M-. binding will pick that up. Afaik lsp-mode overrides that with its own backend in order to provide its functionality.

purcell avatar May 12 '20 01:05 purcell

I believe that is correct, lsp-mode uses xref.

ericnething avatar May 12 '20 01:05 ericnething