Переглянути джерело

PoC zen mode hot reload config and refactor

christianchiarulli 4 роки тому
батько
коміт
04f9f53914
4 змінених файлів з 26 додано та 23 видалено
  1. 3 1
      lua/default-config.lua
  2. 21 0
      lua/lv-zen/config.lua
  3. 1 21
      lua/lv-zen/init.lua
  4. 1 1
      lua/settings.lua

+ 3 - 1
lua/default-config.lua

@@ -75,7 +75,7 @@ O = {
     -- Builtins
     dashboard = { active = false },
     colorizer = { active = false },
-    zen = { active = false },
+    -- zen = { active = false },
     ts_playground = { active = false },
     ts_context_commentstring = { active = false },
     ts_hintobjects = { active = false },
@@ -265,3 +265,5 @@ O = {
     footer = { "chrisatmachine.com" },
   },
 }
+
+require "lv-zen.config"

+ 21 - 0
lua/lv-zen/config.lua

@@ -0,0 +1,21 @@
+O.plugin["zen"] = {
+	window = {
+		backdrop = 1,
+		height = 0.85, -- height of the Zen window
+		options = {
+			signcolumn = "no", -- disable signcolumn
+			number = false, -- disable number column
+			relativenumber = false, -- disable relative numbers
+			-- cursorline = false, -- disable cursorline
+			-- cursorcolumn = false, -- disable cursor column
+			-- foldcolumn = "0", -- disable fold column
+			-- list = false, -- disable whitespace characters
+		},
+	},
+	plugins = {
+		gitsigns = { enabled = false }, -- disables git signs
+		-- your configuration comes here
+		-- or leave it empty to use the default settings
+		-- refer to the configuration section below
+	},
+}

+ 1 - 21
lua/lv-zen/init.lua

@@ -5,26 +5,6 @@ if not status_ok then
 end
 
 M.config = function()
-  zen_mode.setup {
-    window = {
-      backdrop = 1,
-      height = 0.85, -- height of the Zen window
-      options = {
-        signcolumn = "no", -- disable signcolumn
-        number = false, -- disable number column
-        relativenumber = false, -- disable relative numbers
-        -- cursorline = false, -- disable cursorline
-        -- cursorcolumn = false, -- disable cursor column
-        -- foldcolumn = "0", -- disable fold column
-        -- list = false, -- disable whitespace characters
-      },
-    },
-    plugins = {
-      gitsigns = { enabled = false }, -- disables git signs
-      -- your configuration comes here
-      -- or leave it empty to use the default settings
-      -- refer to the configuration section below
-    },
-  }
+  zen_mode.setup(O.plugin.zen)
 end
 return M

+ 1 - 1
lua/settings.lua

@@ -41,7 +41,7 @@ opt.swapfile = false -- creates a swapfile
 opt.termguicolors = true -- set term gui colors (most terminals support this)
 opt.timeoutlen = O.timeoutlen -- time to wait for a mapped sequence to complete (in milliseconds)
 opt.title = true -- set the title of window to the value of the titlestring
-opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to
+-- opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to
 opt.undodir = CACHE_PATH .. "/undo" -- set an undo directory
 opt.undofile = true -- enable persisten undo
 opt.updatetime = 300 -- faster completion