diff --git a/lua/custom/plugins/true-zen.lua b/lua/custom/plugins/true-zen.lua new file mode 100644 index 0000000..ce6a343 --- /dev/null +++ b/lua/custom/plugins/true-zen.lua @@ -0,0 +1,35 @@ +local api = vim.api + +api.nvim_set_keymap("n", "zn", ":TZNarrow", {}) +api.nvim_set_keymap("v", "zn", ":'<,'>TZNarrow", {}) +api.nvim_set_keymap("n", "zf", ":TZFocus", {}) +api.nvim_set_keymap("n", "zm", ":TZMinimalist", {}) +api.nvim_set_keymap("n", "za", ":TZAtaraxis", {}) + +return { + "Pocco81/true-zen.nvim", + -- Twilight allows to dim text outside of the cursor line. + dependencies = { + "folke/twilight.nvim", + opts = { + -- Set the context to null in order to avoid highlighting to much + -- paragraphs in markdown. + context = 0, + }, + }, + config = function () + require('true-zen').setup({ + modes = { + ataraxis = { + minimum_writing_area = { + width = 100 + } + } + }, + integrations = { + twilight = true, + lualine = true + } + }) + end +} diff --git a/lua/custom/plugins/zen-mode.lua b/lua/custom/plugins/zen-mode.lua deleted file mode 100644 index 8c11d88..0000000 --- a/lua/custom/plugins/zen-mode.lua +++ /dev/null @@ -1,42 +0,0 @@ --- Zen mode with twilight. --- Improves the edition experience with distraction free feature. - -return { - "folke/zen-mode.nvim", - ft = { - "markdown", - "pandoc" - }, - -- Twilight allows to dim text outside of the cursor line. - dependencies = { - "folke/twilight.nvim", - opts = { - -- Set the context to null in order to avoid highlighting to much - -- paragraphs in markdown. - context = 0, - }, - }, - opts = { - window = { - backdrop = 1, - -- Set the window width (85 columns) and height (80%). - width = 85, - height = .8, - options = { - -- Disable line numbering, signcolumn and colorcolumn. - number = false, - signcolumn = "no", - colorcolumn = "0" - }, - }, - plugins = { - options = { - enabled = true, - ruler = false, - showcmd = false, - foldcolumn = "0" - }, - gitsigns = { enabled = false }, - }, - }, -}