haskell/haskell-language-server

Don't generate completion when cursor is in a comment

Opened this issue · 3 comments

Is your enhancement request related to a problem? Please describe.

Nil language server has recently gained the ability to not publish completion when typing inside a comment. This made me realized it is possible, and I would like to see it in HLS as well :)

Describe the solution you'd like

Have the LSP publish completions only when the cursor is not in a comment.

Describe alternatives you've considered

Additional context

I agree, this is annoying. I do think though, that completion after symbols after/between ' would be super helpful, as well as completion of module names after/between ".

In general, is it possible to teach HLS interpret haddock markup?

I have to add, it is user super helpful when writing code blocks in Haddock comments or code to be evaluated using the eval plugin (-- >>> evaluateThis).