jyp / dante

392 stars 51 forks source link

Don't complete inside comments, which allows haskell-mode to complete pragmas #118

Closed purcell closed 5 years ago

purcell commented 5 years ago

If dante-company declines to perform completions, then subsequent company backends can take their turn. This includes the standard company-capf backend which checks completion-at-point-functions: haskell-mode provides such functions for completing LANGUAGE and other pragmas.

This change makes Dante's company backend decline to complete inside comments, which tackles the specific case of pragma completion as requested in https://github.com/jyp/dante/issues/37 but without adding functionality to Dante itself.

Dante should arguably not complete inside a string either, but I have not implemented that here. (One would check for (nth 4 (syntax-ppss)).)

jyp commented 5 years ago

Great, thanks!