From 193a8523359b4b96184189dad15cc74d31952b1d Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 26 Jun 2021 07:52:48 +0530 Subject: [PATCH] lazy load truezen.nvim --- init.lua | 1 - lua/misc-utils.lua | 4 -- lua/pluginList.lua | 10 ++++- lua/zenmode.lua | 96 ++++++++++++++++++++++++---------------------- 4 files changed, 60 insertions(+), 51 deletions(-) diff --git a/init.lua b/init.lua index 79d7198..9ae56de 100644 --- a/init.lua +++ b/init.lua @@ -38,5 +38,4 @@ vim.api.nvim_exec( false ) -require "zenmode" require "whichkey" diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index c3bd7fd..59a089c 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -41,12 +41,8 @@ vim.g.loaded_gzip = 0 vim.g.loaded_tar = 0 vim.g.loaded_tarPlugin = 0 vim.g.loaded_zipPlugin = 0 -vim.g.loaded_2html_plugin = 1 vim.g.loaded_netrw = 0 vim.g.loaded_netrwPlugin = 0 -vim.g.loaded_matchit = 1 -vim.g.loaded_matchparen = 1 -vim.g.loaded_spec = 1 local M = {} diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 6615f4c..4a3c8d1 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -124,7 +124,15 @@ return packer.startup( } use "karb94/neoscroll.nvim" - use "kdav5758/TrueZen.nvim" + + use { + "kdav5758/TrueZen.nvim", + cmd = {"TZAtaraxis", "TZMinimalist"}, + config = function() + require("zenmode").config() + end + } + use "folke/which-key.nvim" -- use "alvan/vim-closetag" -- for html diff --git a/lua/zenmode.lua b/lua/zenmode.lua index b9d49ff..d1b14b3 100644 --- a/lua/zenmode.lua +++ b/lua/zenmode.lua @@ -1,47 +1,53 @@ -local true_zen = require("true-zen") +local M = {} -true_zen.setup( - { - true_false_commands = false, - cursor_by_mode = false, - before_minimalist_mode_shown = true, - before_minimalist_mode_hidden = true, - after_minimalist_mode_shown = true, - after_minimalist_mode_hidden = true, - bottom = { - hidden_laststatus = 0, - hidden_ruler = false, - hidden_showmode = false, - hidden_showcmd = false, - hidden_cmdheight = 1, - shown_laststatus = 2, - shown_ruler = true, - shown_showmode = false, - shown_showcmd = false, - shown_cmdheight = 1 - }, - top = { - hidden_showtabline = 0, - shown_showtabline = 2 - }, - left = { - hidden_number = false, - hidden_relativenumber = false, - hidden_signcolumn = "no", - shown_number = true, - shown_relativenumber = false, - shown_signcolumn = "yes" - }, - ataraxis = { - just_do_it_for_me = false, - left_padding = 37, - right_padding = 37, - top_padding = 2, - bottom_padding = 2, - custome_bg = "#1e222a" - }, - integrations = { - integration_galaxyline = true +M.config = function() + local true_zen = require("true-zen") + + true_zen.setup( + { + true_false_commands = false, + cursor_by_mode = false, + before_minimalist_mode_shown = true, + before_minimalist_mode_hidden = true, + after_minimalist_mode_shown = true, + after_minimalist_mode_hidden = true, + bottom = { + hidden_laststatus = 0, + hidden_ruler = false, + hidden_showmode = false, + hidden_showcmd = false, + hidden_cmdheight = 1, + shown_laststatus = 2, + shown_ruler = true, + shown_showmode = false, + shown_showcmd = false, + shown_cmdheight = 1 + }, + top = { + hidden_showtabline = 0, + shown_showtabline = 2 + }, + left = { + hidden_number = false, + hidden_relativenumber = false, + hidden_signcolumn = "no", + shown_number = true, + shown_relativenumber = false, + shown_signcolumn = "yes" + }, + ataraxis = { + just_do_it_for_me = false, + left_padding = 37, + right_padding = 37, + top_padding = 2, + bottom_padding = 2, + custome_bg = "#1e222a" + }, + integrations = { + integration_galaxyline = true + } } - } -) + ) +end + +return M