Skip to content

Commit 532890f

Browse files
committed
Merge pull request #840 from gracjan/pr-anim-import-statement-complete
Add anim showing import statement completion
2 parents 23155e4 + 875a79a commit 532890f

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed
96.8 KB
Loading

doc/gifcasts/gifcasts.el

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,54 @@
7777

7878
(kill-buffer "Main.hs")))))))
7979
nil)
80+
81+
(gifcast-animate
82+
(set-frame-size (window-frame (get-buffer-window)) 70 15)
83+
(when (get-buffer "Main.hs")
84+
(kill-buffer "Main.hs"))
85+
(switch-to-buffer (get-buffer-create "Main.hs"))
86+
(set-visited-file-name "Main.hs" t)
87+
(delete-other-windows)
88+
(tabbar-mode -1)
89+
(tool-bar-mode -1)
90+
(linum-mode -1)
91+
(blink-cursor-mode -1)
92+
(message nil)
93+
94+
(haskell-mode)
95+
(company-mode)
96+
(setq company-idle-delay 0.01)
97+
(linum-mode -1)
98+
99+
(insert (concat
100+
"\n\n\n"
101+
"main :: IO ()\n"
102+
"main = return ()\n"))
103+
(save-buffer)
104+
105+
(haskell-process-load-file)
106+
(sit-for 5)
107+
(select-window (get-buffer-window "Main.hs"))
108+
109+
(goto-char (+ 1 (point-min)))
110+
(gifcast-keys-async
111+
""
112+
(gifcast-capture)
113+
(gifcast-keys-async
114+
"import"
115+
(gifcast-capture)
116+
(gifcast-keys-async
117+
" Control."
118+
(gifcast-capture)
119+
(gifcast-keys-async
120+
"A"
121+
(gifcast-capture)
122+
(gifcast-keys-async
123+
"\C-m"
124+
(gifcast-capture)
125+
(gifcast-generate "../anim/company-mode-import-statement.gif")
126+
127+
(haskell-kill-session-process)
128+
(set-buffer-modified-p nil)
129+
(kill-buffer "Main.hs"))))))
130+
nil)

doc/haskell-mode.texi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,15 @@ extensions. This is part of @code{haskell-interactive-mode}.
218218
@image{anim/company-mode-language-pragma}
219219
@end ifhtml
220220

221+
If haskell-interactive-mode is enabled and working haskell mode provides
222+
completions for import statements taking into account currently loaded
223+
and available packages.
224+
225+
@ifhtml
226+
@image{anim/company-mode-import-statement}
227+
@end ifhtml
228+
229+
221230
@node Unicode support
222231
@chapter Unicode support
223232

0 commit comments

Comments
 (0)