plugins: replace zen-mode by true-zen

- Removes the distraction-free plugin zen-mode, as it has some weird
  performance issue.
- Adds the true-zen distraction-free plugin which seems better in some
  ways.

Co-Authored-by: iGor milhit <igor@milhit.ch>
iGor milhit 2023-07-08 07:49:35 +02:00
parent d2ebe0e57f
commit 0b1efe213b
Signed by: igor
GPG Key ID: 692D97C3D0228A99
2 changed files with 28 additions and 42 deletions

View File

@ -0,0 +1,28 @@
local api = vim.api
api.nvim_set_keymap("n", "<leader>zn", ":TZNarrow<CR>", {})
api.nvim_set_keymap("v", "<leader>zn", ":'<,'>TZNarrow<CR>", {})
api.nvim_set_keymap("n", "<leader>zf", ":TZFocus<CR>", {})
api.nvim_set_keymap("n", "<leader>zm", ":TZMinimalist<CR>", {})
api.nvim_set_keymap("n", "<leader>za", ":TZAtaraxis<CR>", {})
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({
integrations = {
twilight = true,
lualine = true
}
})
end
}

View File

@ -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 },
},
},
}