emacs-lsp / lsp-haskell

lsp-mode :heart: haskell
https://emacs-lsp.github.io/lsp-haskell
GNU General Public License v3.0
227 stars 56 forks source link

textDocument/codeCompletions not called #95

Closed gdevanla closed 3 years ago

gdevanla commented 3 years ago

I see this unexpected behavior while trying to complete {-# LANGUAGE <my_cursor_here #-}.

I noticed, that when inside {- -} , the textDocument/codeCompletions request is not being sent to the server. I tried this functionality with VS Code and latest version of hls/ghcide and everything works. This seems to only be a problem with Emacs lsp. I wonder if this ticket belongs here or should we post this to the core emacs-lsp issue list.

michaelpj commented 3 years ago

Hmmm, this tickled my memory, and I dug up https://github.com/emacs-lsp/lsp-mode/issues/2215. It looks like there's a client setting completion-in-comments?, which we should probably set to t, if HLS actually supports completion in comments (which it sounds like it does).

gdevanla commented 3 years ago

Awesome. I tried with the change and it works. Can I submit a PR for that?

michaelpj commented 3 years ago

Fantastic!