Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 2, 2019

Conversation

purcell
Copy link
Contributor

@purcell purcell commented May 1, 2019

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 #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)).)

… pragmas

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 jyp#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
Copy link
Owner

jyp commented May 2, 2019

Great, thanks!

@jyp jyp merged commit 850465a into jyp:master May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants