-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(editing-support): add true-zen.nvim (#223)
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
34
lua/astrocommunity/editing-support/true-zen-nvim/true-zen-nvim.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" }, | ||
}, | ||
}, | ||
} |