diff --git a/modules/mail/himalaya.nix b/modules/mail/himalaya.nix index bca7cbf..90dc298 100644 --- a/modules/mail/himalaya.nix +++ b/modules/mail/himalaya.nix @@ -1,8 +1,5 @@ { config, pkgs, lib, ... }: { - # Required to place identity file on machine - imports = [ ../shell/age.nix ]; - options = { mailUser = lib.mkOption { type = lib.types.str; diff --git a/modules/neovim/lua/packer/misc.lua b/modules/neovim/lua/packer/misc.lua index 5b015a4..014f839 100644 --- a/modules/neovim/lua/packer/misc.lua +++ b/modules/neovim/lua/packer/misc.lua @@ -29,7 +29,37 @@ M.packer = function(use) }) -- Markdown renderer / wiki notes - use("vimwiki/vimwiki") + -- use("vimwiki/vimwiki") + use({ + "jakewvincent/mkdnflow.nvim", + config = function() + require("mkdnflow").setup({ + modules = { + bib = false, + conceal = true, + folds = false, + }, + perspective = { + priority = "current", + fallback = "first", + nvim_wd_heel = false, -- Don't change working dir + }, + links = { + style = "markdown", + conceal = true, + }, + wrap = true, + to_do = { + symbols = { " ", "-", "x" }, + }, + }) + -- Save when moving to new buffer + vim.api.nvim_create_autocmd("FileType", { + pattern = "markdown", + command = "set autowriteall", + }) + end, + }) end return M diff --git a/modules/neovim/lua/settings.lua b/modules/neovim/lua/settings.lua index 913be33..130d8e2 100644 --- a/modules/neovim/lua/settings.lua +++ b/modules/neovim/lua/settings.lua @@ -83,34 +83,3 @@ vim.g.netrw_banner = 0 -- Remove useless banner vim.g.netrw_winsize = 15 -- Explore window takes % of page vim.g.netrw_browse_split = 4 -- Open in previous window vim.g.netrw_altv = 1 -- Always split left - --- VimWiki -vim.g.vimwiki_list = { - { - ["path"] = "$NOTES_PATH", - ["syntax"] = "markdown", - ["index"] = "home", - ["ext"] = ".md", - }, -} -vim.g.vimwiki_key_mappings = { - ["all_maps"] = 1, - ["mouse"] = 1, -} -vim.g.vimwiki_auto_chdir = 1 -- Set local dir to Wiki when open -vim.g.vimwiki_create_link = 0 -- Don't automatically create new links -vim.g.vimwiki_listsyms = " x" -- Set checkbox symbol progression -vim.g.vimwiki_table_mappings = 0 -- VimWiki table keybinds interfere with tab completion -vim.api.nvim_exec( - [[ - au FileType markdown inoremap ;tt :AddTag - - function! PInsert(item) - let @z=a:item - norm "zpx - endfunction - - command! AddTag call fzf#run({'source': 'rg "#[A-Za-z/]+[ |\$]" -o --no-filename --no-line-number | sort | uniq', 'sink': function('PInsert')}) -]], - false -) diff --git a/modules/repositories/notes.nix b/modules/repositories/notes.nix index c357723..47e521b 100644 --- a/modules/repositories/notes.nix +++ b/modules/repositories/notes.nix @@ -3,7 +3,7 @@ home-manager.users.${config.user} = { home.sessionVariables = { - NOTES_PATH = "${config.homePath}/dev/personal/notes"; + NOTES_PATH = "${config.homePath}/dev/personal/notes/content"; }; };