|
45 | 45 | (nvim.ex.autocmd "BufNewFile,BufRead *.fnl setlocal filetype=clojure")
|
46 | 46 | (nvim.ex.augroup :END))
|
47 | 47 |
|
48 |
| - (let [buf (upsert-buf)] |
| 48 | + (let [maplocalleader-was-unset? |
| 49 | + (when (and (= "<localleader>" (config.get-in [:mapping :prefix])) |
| 50 | + (a.empty? nvim.g.maplocalleader)) |
| 51 | + (set nvim.g.maplocalleader ",") |
| 52 | + true) |
| 53 | + |
| 54 | + buf (upsert-buf)] |
49 | 55 | (nvim.ex.edit buf-name)
|
50 | 56 | (nvim.buf_set_lines buf 0 -1 false [])
|
51 | 57 | (append
|
52 | 58 | (a.concat
|
53 | 59 | ["(module user.conjure-school"
|
54 |
| - " {require {school conjure.school}})" |
| 60 | + " {require {school conjure.school}})" |
55 | 61 | ""
|
56 | 62 | ";; Welcome to Conjure school!"
|
57 | 63 | ";; Grab yourself a nice beverage and let's get evaluating. I hope you enjoy!"
|
|
66 | 72 | ";; You can learn how to change these mappings with :help conjure-mappings"
|
67 | 73 | ""
|
68 | 74 | (.. ";; Let's begin by evaluating the whole buffer using " (map-str :eval_buf))]
|
69 |
| - (when (= "<localleader>" (config.get-in [:mapping :prefix])) |
70 |
| - (if (a.empty? nvim.g.maplocalleader) |
71 |
| - (do |
72 |
| - (set nvim.g.maplocalleader ",") |
73 |
| - (nvim.ex.edit) |
74 |
| - [";; Your <localleader> wasn't configured so I've defaulted it to comma (,) for now." |
75 |
| - ";; See :help localleader for more information. (let maplocalleader=\",\")"]) |
76 |
| - [(.. ";; Your <localleader> is currently mapped to \"" nvim.g.maplocalleader "\"")])) |
| 75 | + (if maplocalleader-was-unset? |
| 76 | + [";; Your <localleader> wasn't configured so I've defaulted it to comma (,) for now." |
| 77 | + ";; See :help localleader for more information. (let maplocalleader=\",\")"] |
| 78 | + [(.. ";; Your <localleader> is currently mapped to \"" nvim.g.maplocalleader "\"")]) |
77 | 79 | ["(school.lesson-1)"]))))
|
78 | 80 |
|
79 | 81 | (defn lesson-1 []
|
|
0 commit comments