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

How to make lsp-haskell more loosely tied to haskell-mode?

Open magthe opened this issue 2 years ago • 4 comments

In my experimenting with making a Haskell mode that uses tree-sitter I ended up having to make some changes to lsp-haskell to detach it from haskell-mode. My very hacky change is here: https://github.com/magthe/lsp-haskell/commit/2084ff1a313cb8a01020fb19fb86897546112c9e

I'd love some input on how to do this more properly and turn it into a PR eventually.

magthe avatar Oct 15 '23 17:10 magthe

No idea tbh. Probably a question for @yyoncho ?

I'm not sure what's wrong with just adding haskell-ng-mode to the set of modes that we are enabled for? i.e. just do what is already done for e.g. haskell-literate-mode?

michaelpj avatar Nov 07 '23 10:11 michaelpj

Well, I think it's mostly a question of cleanliness, if lsp-haskell depends on both packages, then both will be installed all the time. Even if it only makes sense to use one or the other, never both.

magthe avatar Nov 07 '23 14:11 magthe

Your patch doesn't make lsp-haskell depend on haskell-ng-mode? Or am I missing something? do we need a dependency? or is that just an elisp symbol for the mode name?

michaelpj avatar Nov 07 '23 14:11 michaelpj

No, it only removes completely the dependency on haskell-mode so I can avoid having it around while working on haskell-ng-mode.

magthe avatar Nov 07 '23 14:11 magthe