Skip to content

Commit

Permalink
feat(editing-support): add true-zen.nvim (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-babu authored May 25, 2023
1 parent b88a6e6 commit 5356792
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/editing-support/true-zen-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 🦝 true-zen.nvim

**Repository:** https://github.com/Pocco81/true-zen.nvim

Clean and elegant distraction-free writing for NeoVim
34 changes: 34 additions & 0 deletions lua/astrocommunity/editing-support/true-zen-nvim/true-zen-nvim.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
local utils = require "astronvim.utils"
return {
"Pocco81/true-zen.nvim",
opts = {
integrations = {
tmux = os.getenv "TMUX" ~= nil, -- hide tmux status bar in (minimalist, ataraxis)
twilight = utils.is_available "twilight.nvim", -- enable twilight (ataraxis)
},
},
keys = {
{ "<leader>zf", require("true-zen").focus },
{ "<leader>zm", require("true-zen").minimalist },
{ "<leader>za", require("true-zen").ataraxis },
{
"<leader>zn",
function()
local truezen = require "true-zen"
local first = 0
local last = vim.api.nvim_buf_line_count(0)
truezen.narrow(first, last)
end,
},
{
"<leader>zn",
function()
local truezen = require "true-zen"
local first = vim.fn.line "v"
local last = vim.fn.line "."
truezen.narrow(first, last)
end,
mode = { "v" },
},
},
}

0 comments on commit 5356792

Please sign in to comment.