diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index b2fa9b2..42f89e3 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -53,11 +53,10 @@ function M.load(opts) "matchit", "matchparen", "netrwPlugin", - -- "rplugin", + "rplugin", "tarPlugin", "tohtml", "tutor", - "zipPlugin", }, }, }, diff --git a/lua/config/options.lua b/lua/config/options.lua index ef692de..3e9ad4f 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -22,6 +22,7 @@ vim.opt.listchars = "trail:·,nbsp:◇,tab:→ ,extends:▸,precedes:◂" vim.opt.pumblend = 10 vim.g.os = vim.uv.os_uname().sysname +vim.g.fps = vim.g.os == "Darwin" and 120 or 160 vim.g.dotfiles = vim.env.DOTFILES or vim.fn.expand("~/.dotfiles") vim.g.vim_dir = vim.g.dotfiles .. "/.config/nvim" @@ -52,8 +53,6 @@ if vim.g.neovide then vim.g.neovide_scale_factor = 0.3 end --- vim.opt.mousescroll = "ver:8,hor:6" - vim.o.title = true vim.o.titlestring = LazyVim.root.cwd():match("([^/]+)$") diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 58ecd99..c90cd18 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -3,7 +3,29 @@ return { { "snacks.nvim", opts = { - profiler = { runtime = "~/projects/neovim/runtime/" }, + profiler = { + runtime = "~/projects/neovim/runtime/", + presets = { + on_stop = function() + Snacks.profiler.scratch() + end, + }, + }, + input = {}, + indent = { + scope = { + treesitter = { + enabled = true, + }, + }, + }, + scroll = { + animate = { + duration = { total = 100 }, + easing = "inOutExpo", + fps = vim.g.fps, + }, + }, dashboard = { example = "github" }, gitbrowse = { config = function(opts, defaults) @@ -14,37 +36,36 @@ return { keys = { { "p", "", desc = "+profile" }, { - "pp", - desc = "Group traces and open a picker", - function() - if not Snacks.profiler.toggle() then - Snacks.profiler.pick({ min_time = 0.2 }) - end - end, - }, - { - "ph", - desc = "Toggle profiler highlights", + "ps", function() - Snacks.profiler.highlight() + Snacks.profiler.scratch() end, }, { "pd", desc = "Toggle profiler debug", function() - if not Snacks.profiler.enabled then + if not Snacks.profiler.running() then Snacks.notify("Profiler debug started") Snacks.profiler.start() else Snacks.profiler.debug() Snacks.notify("Profiler debug stopped") end - if not Snacks.profiler.enabled then - Snacks.profiler.pick({}) - end end, }, }, }, + { + "snacks.nvim", + opts = function() + LazyVim.on_load("which-key.nvim", function() + Snacks.toggle.profiler():map("pp") + Snacks.toggle.profiler_highlights():map("ph") + Snacks.toggle.indent():map("ug") + Snacks.toggle.dim():map("uD") + Snacks.toggle.zen():map("z") + end) + end, + }, } diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index 234f9db..6bd4354 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -109,7 +109,7 @@ return { "rcarriga/nvim-notify", opts = { level = vim.log.levels.INFO, - fps = vim.g.os == "Darwin" and 120 or 160, + fps = vim.g.fps, stages = "fade_in_slide_out", background_colour = "#000000", time_formats = { @@ -484,29 +484,12 @@ return { event = "BufReadPre", }, - "folke/twilight.nvim", { - "folke/zen-mode.nvim", - cmd = "ZenMode", + "edgy.nvim", opts = { - plugins = { - gitsigns = true, - tmux = true, - kitty = { enabled = false, font = "+2" }, + animate = { + fps = vim.g.fps, }, }, - keys = { { "z", "ZenMode", desc = "Zen Mode" } }, - }, - - { - "echasnovski/mini.animate", - opts = function(_, opts) - local animate = require("mini.animate") - opts.open = { enable = false } - opts.close = { enable = false } - opts.cursor = { enable = false } - opts.scroll.timing = animate.gen_timing.exponential({ duration = 50, easing = "out", unit = "total" }) - return opts - end, }, }