-
Notifications
You must be signed in to change notification settings - Fork 346
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
OPTIONS and LANGUAGE completion using ghci #444
Conversation
symbol-at-point => thing-at-point 'symbol Also thing-at-point, then bounds-of-thing-at-point looks it up twice, which is unnecessary.
The allowed IIRC, those lists already collected elsewhere at startup by quering |
Also, move option/language-pragma lists out of haskell-yas, because it's nothing to do with yasnippet, and they are needed for completion.
I see, I found it: it's in haskell-yas, and you have to type "lang" by itself, not inside a comment, and it will expand to a LANGUAGE pragma inside a proper comment and offer completions. I missed that, I didn't look in the yasnippet menu carefully. I can't find an OPTIONS snippet, I think it's not there. I would still like for ordinary non-snippet completion to work for these too. I changed it to precompute the list of completions properly. |
@gracjan I didn't remove the snippet, I added completion but it doesn't replace the snippet. |
@gracjan those two facilities (snippet vs. completion-at-point) are not mutually exclusive (but rather complementary -- I use both), I just wanted to hint at that there's already infrastructure that could be shared. |
OPTIONS and LANGUAGE completion using ghci
I just committed a change renaming |
Similar to a previous PR, this adds completion for LANGUAGE and OPTIONS ghc pragmas inside comments, using ghci's
:complete repl ":set ..."
, which understands all language/option flags.It's not spectacularly useful because normally (?) you'd need to type the first three (?) characters yourself before completion kicks in.
I also made a small change to some previous code to avoid some unnecessary string -> symbol -> string conversion.