Skip to content

Commit

Permalink
feat(nvim): only load zk when current dir is root zk folder
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Aug 21, 2023
1 parent d9be1bc commit 0106965
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 9 additions & 0 deletions modules/neovim/config/after/ftplugin/markdown.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
vim.opt_local.formatoptions:remove("l")
vim.opt_local.textwidth = 80
vim.opt_local.conceallevel = 1

if require("zk.util").notebook_root(vim.fn.expand("%:p")) ~= nil then
if vim.g.loaded_zk ~= 1 then
require("user.zk")
vim.g.loaded_zk = 1
end

-- TODO: add keymaps?
end
1 change: 0 additions & 1 deletion modules/neovim/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ require("dressing").setup({
end,
},
})
require("user.zk")
require("user.test")
require("user.harpoon")
require("user.telescope")
Expand Down

0 comments on commit 0106965

Please sign in to comment.