Skip to content

Commit

Permalink
Updated vimdoc, readded doom.theme
Browse files Browse the repository at this point in the history
  • Loading branch information
venine committed Feb 8, 2022
1 parent 8e9f1b5 commit 494e1c3
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 71 deletions.
4 changes: 2 additions & 2 deletions doc/init.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
5 changes: 4 additions & 1 deletion fnl/configs.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
13 changes: 4 additions & 9 deletions fnl/keybindings.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,10 @@
{:keys "<leader>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
Expand Down
121 changes: 62 additions & 59 deletions fnl/neorg-config.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -153,62 +153,65 @@
(vim.cmd "?^\\*")
(vim.cmd "noh"))

(utils.define-keys [{:keys "<leader>ol"
:help "Display buffer headings in qflist"
:exec (.. ":vimgrep \"^\\*\" " (vim.fn.expand "%:p") "<CR>")}

{:keys "<leader>oL"
:help "Display cwd headings in qflist"
:exec ":vimgrep \"^\\*\" *norg <CR>"}

{:keys "<C-c><C-c>"
: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 "<C-j>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec insert-bullet-or-heading}

{:keys "<C-f>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec next-heading}

{:keys "<C-b>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec prev-heading}

{:keys "<A-l>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec promote-bullet-or-heading}

; Demote bullet or point
{:keys "<A-h>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec demote-bullet-or-heading}])
(when doom.neorg_keybindings
(utils.define-keys [{:keys "<leader>ol"
:help "Display buffer headings in qflist"
:exec (.. ":vimgrep \"^\\*\" " (vim.fn.expand "%:p") "<CR>")}

{:keys "<leader>oL"
:help "Display cwd headings in qflist"
:exec ":vimgrep \"^\\*\" *norg <CR>"}

{:keys "<C-c><C-c>"
: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 "<C-j>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec insert-bullet-or-heading}

{:keys "<C-f>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec next-heading}

{:keys "<C-b>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec prev-heading}

{:keys "<A-l>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec promote-bullet-or-heading}

; Demote bullet or point
{:keys "<A-h>"
:key-attribs ["buffer" "silent"]
:events "BufEnter"
:patterns "*norg"
:exec demote-bullet-or-heading}]))


0 comments on commit 494e1c3

Please sign in to comment.