Archived
Clean up names and make spellcheck default for text bufs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; init.fnl - primary init file
|
||||
|
||||
(import-macros {: bind! : module-call!} :macros)
|
||||
(import-macros {: bind! : module-call! : hook!} :macros)
|
||||
|
||||
;; Make space leader
|
||||
(set vim.g.mapleader " ")
|
||||
@@ -70,12 +70,17 @@
|
||||
|
||||
;; Spell keybindings
|
||||
(bind! :n :<leader>l (fn []
|
||||
(let [new_spell (not (vim.opt_local.spell:get))]
|
||||
(set vim.opt_local.spell new_spell)
|
||||
(print (if new_spell
|
||||
(let [new-spell (not (vim.opt_local.spell:get))]
|
||||
(set vim.opt_local.spell new-spell)
|
||||
(print (if new-spell
|
||||
"Enabled Spellcheck"
|
||||
"Disabled Spellcheck")))))
|
||||
|
||||
;; Enable spell in certian buffers
|
||||
(hook! :FileType [ :text :markdown :tex :bib ]
|
||||
#(if (= (vim.fn.buflisted (vim.api.nvim_get_current_buf)) 1)
|
||||
(set vim.opt_local.spell true)))
|
||||
|
||||
(fn jump-or-open-terminal []
|
||||
"If no terminal buffer exists, create one. Otherwise, open new one."
|
||||
(var term_count 0)
|
||||
|
||||
Reference in New Issue
Block a user