Skip to content

Commit

Permalink
feat(snacks): replace zen-mode.nvim and twilight.nvim with zen
Browse files Browse the repository at this point in the history
…module
  • Loading branch information
WilliamHsieh committed Dec 24, 2024
1 parent 4ed7881 commit b7d767e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 23 deletions.
6 changes: 2 additions & 4 deletions config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"scope.nvim": { "branch": "main", "commit": "932102696ead2b7ab9ff65017767b57e2722fdde" },
"smart-splits.nvim": { "branch": "master", "commit": "63d16fc6a8fa6864d00de99207943556b10676cb" },
"snacks.nvim": { "branch": "main", "commit": "282be8bfa8e6f46d6994ff46638d1c155b90753f" },
"snacks.nvim": { "branch": "main", "commit": "98df370703b3c47a297988f3e55ce99628639590" },
"symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
Expand All @@ -81,14 +81,12 @@
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"toggleterm.nvim": { "branch": "main", "commit": "87b2d6a3cab8e2bd9a0255427074285f0365398d" },
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" },
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
"vim-matchup": { "branch": "master", "commit": "5fb083de1e06fdd134c6ad8d007d4b5576b25ba7" },
"vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" },
"vim-tpipeline": { "branch": "master", "commit": "5f663e863df6fba9749ec6db0a890310ba4ad0a9" },
"vimtex": { "branch": "master", "commit": "3401dc81a14b7251bd813e2411eaf0d3b65bd2af" },
"which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" },
"zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }
"which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" }
}
4 changes: 3 additions & 1 deletion config/nvim/lua/core/mapping.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ map("n", "<leader>bb", "<cmd>FzfLua buffers<cr>", "Buffers")
map("n", "<leader>b>", "<cmd>BufferLineMoveNext<cr>", "Move right")
map("n", "<leader>b<", "<cmd>BufferLineMovePrev<cr>", "Move left")
map("n", "<leader>bs", "<cmd>so %|lua vim.notify('Buffer sourced.')<cr>", "Source this buffer")
map("n", "<leader>bz", "<cmd>ZenMode<cr>", "Zen mode")
map("n", "<leader>bz", function()
require("snacks").zen()
end, "Zen mode")
map("n", "<leader>br", "<cmd>%s/.*/mv & &/<cr>", "bulk rename")
map("n", "<leader>bf", "<cmd>FSToggle<cr>", "Flow state reading toggle")
--}}}
Expand Down
18 changes: 0 additions & 18 deletions config/nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,6 @@ return {
},
},

{
"folke/zen-mode.nvim",
cmd = "ZenMode",
opts = {
plugins = {
tmux = {
enabled = true,
},
},
},
dependencies = {
{
"folke/twilight.nvim",
config = true,
},
},
},

{
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
Expand Down
8 changes: 8 additions & 0 deletions config/nvim/lua/plugins/snacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ return {
hl = "IblScope",
},
},
zen = {
on_open = function()
vim.system { "tmux", "set", "status", "off" }
end,
on_close = function()
vim.system { "tmux", "set", "status", "on" }
end,
},
},

init = function()
Expand Down

0 comments on commit b7d767e

Please sign in to comment.