diff --git a/doc/init.txt b/doc/init.txt index 051ffad..d53625f 100644 --- a/doc/init.txt +++ b/doc/init.txt @@ -21,8 +21,8 @@ CONTENTS *doom-toc* 6. Snippets |doom-snippets| 7. Treesitter |doom-treesitter| 8. Neorg |doom-neorg| -8. Help-editing |doom-help-editing| -9. Caveats |doom-caveats| +9. Help-editing |doom-help-editing| +10. Caveats |doom-caveats| ============================================================================== INTRODUCTION *doom-introduction* diff --git a/fnl/configs.fnl b/fnl/configs.fnl index 7de9fe2..fdff53d 100644 --- a/fnl/configs.fnl +++ b/fnl/configs.fnl @@ -15,7 +15,10 @@ (after! [:lualine.nvim :palenight.vim] #(do - (vim.cmd "color everforest") + (if doom.theme + (vim.cmd (.. "color " doom.theme)) + (vim.cmd "color everforest")) + (utils.try-require :modeline :DOOM))) (after! :vim-vsnip #(require :vim-vsnip-config)) diff --git a/fnl/keybindings.fnl b/fnl/keybindings.fnl index c310489..98f5c7a 100644 --- a/fnl/keybindings.fnl +++ b/fnl/keybindings.fnl @@ -124,15 +124,10 @@ {:keys "hrr" :help "Reload doom" :exec (fn [] - (vim.cmd "tabnew") - (vim.cmd "edit ~/.config/nvim/fnl/init.fnl") - (vim.cmd "ConjureEvalBuf") - - (if (> (vim.call "tabpagenr") 1) - (vim.cmd "tabclose") - (vim.cmd (.. ":Bdelete " "init.fnl"))) - - (vim.cmd "echom \"Successfully reloaded Doom!\""))}]) + (require :init) + (require :modeline) + (set doom.user_packages (require :user-packages)) + (set doom.default_packages (require :default_packages)))}]) ; Quickly adjust indentation ; Respects v:count and lines in visual range diff --git a/fnl/neorg-config.fnl b/fnl/neorg-config.fnl index 7caa151..ecbbbf6 100644 --- a/fnl/neorg-config.fnl +++ b/fnl/neorg-config.fnl @@ -153,62 +153,65 @@ (vim.cmd "?^\\*") (vim.cmd "noh")) -(utils.define-keys [{:keys "ol" - :help "Display buffer headings in qflist" - :exec (.. ":vimgrep \"^\\*\" " (vim.fn.expand "%:p") "")} - - {:keys "oL" - :help "Display cwd headings in qflist" - :exec ":vimgrep \"^\\*\" *norg "} - - {:keys "" - :noremap false - :key-attribs ["buffer" "silent"] - :events "BufEnter" - :patterns "*norg" - :exec #(let [sym (get-bullet-or-heading-under-point) ] - (when (= sym.is :bullet) - (let [input (utils.get-user-input "Task type (p/d/h/c/u/r/u) > " - #(match $1 - :p :pending - :d :done - :h :hold - :c :cancelled - :u :urgent - :r :recurring - :u :uncertain - _ nil) - true - {:use_function true})] - (edit-bullet nil nil input))))} - - {:keys "" - :key-attribs ["buffer" "silent"] - :events "BufEnter" - :patterns "*norg" - :exec insert-bullet-or-heading} - - {:keys "" - :key-attribs ["buffer" "silent"] - :events "BufEnter" - :patterns "*norg" - :exec next-heading} - - {:keys "" - :key-attribs ["buffer" "silent"] - :events "BufEnter" - :patterns "*norg" - :exec prev-heading} - - {:keys "" - :key-attribs ["buffer" "silent"] - :events "BufEnter" - :patterns "*norg" - :exec promote-bullet-or-heading} - - ; Demote bullet or point - {:keys "" - :key-attribs ["buffer" "silent"] - :events "BufEnter" - :patterns "*norg" - :exec demote-bullet-or-heading}]) +(when doom.neorg_keybindings + (utils.define-keys [{:keys "ol" + :help "Display buffer headings in qflist" + :exec (.. ":vimgrep \"^\\*\" " (vim.fn.expand "%:p") "")} + + {:keys "oL" + :help "Display cwd headings in qflist" + :exec ":vimgrep \"^\\*\" *norg "} + + {:keys "" + :noremap false + :key-attribs ["buffer" "silent"] + :events "BufEnter" + :patterns "*norg" + :exec #(let [sym (get-bullet-or-heading-under-point) ] + (when (= sym.is :bullet) + (let [input (utils.get-user-input "Task type (p/d/h/c/u/r/u) > " + #(match $1 + :p :pending + :d :done + :h :hold + :c :cancelled + :u :urgent + :r :recurring + :u :uncertain + _ nil) + true + {:use_function true})] + (edit-bullet nil nil input))))} + + {:keys "" + :key-attribs ["buffer" "silent"] + :events "BufEnter" + :patterns "*norg" + :exec insert-bullet-or-heading} + + {:keys "" + :key-attribs ["buffer" "silent"] + :events "BufEnter" + :patterns "*norg" + :exec next-heading} + + {:keys "" + :key-attribs ["buffer" "silent"] + :events "BufEnter" + :patterns "*norg" + :exec prev-heading} + + {:keys "" + :key-attribs ["buffer" "silent"] + :events "BufEnter" + :patterns "*norg" + :exec promote-bullet-or-heading} + + ; Demote bullet or point + {:keys "" + :key-attribs ["buffer" "silent"] + :events "BufEnter" + :patterns "*norg" + :exec demote-bullet-or-heading}])) + +