Commit ff999aa
committed
Re-add dictionary completions for core functions
Meikel's ftplugin included dictionary completions for many functions in
clojure jar file. Given the superior functionality of a REPL connected
omnifunc completion function, and the fact that the keyword list tended
to go out of sync, I originally removed this feature when extracting
vim-clojure-static.
However, after a few weeks of use I can see that having at least the
core functions (a default Clojure namespace refers clojure.core) in the
completion list is very useful for the following reasons:
* Very discoverable. Completions appear in the default Ctrl-N/Ctrl-P
completion menu. The Ctrl-X_Ctrl-O command is not nearly as well
known in contrast
* Helpful to Clojure neophytes. Completing a var name assures you
that you have spelled it correctly, and the insert completion list
becomes a place to discover new functions.
* Enables completion even when not connected to a REPL
We do not include _all_ the public vars in the clojure jar because the
recommended way to use functions from other namespaces is to call them
by their fully qualified name (usually shortened by an alias) instead of
importing them directly into your namespace using 'use or 'refer.
This conflicts with a flat list of symbols across different namespaces,
so we include just clojure.core and the special forms.1 parent c95c328 commit ff999aa
File tree
3 files changed
+628
-12
lines changed- ftplugin
- clojure
3 files changed
+628
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
36 | 49 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 50 | + | |
42 | 51 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
0 commit comments