Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 749c89da0c | |||
| 1466a808c9 | |||
| a9f9a69887 | |||
| bd2c3c5303 |
+75
-12
@@ -553,6 +553,29 @@ local function makespec_lspconfig()
|
||||
}
|
||||
end
|
||||
|
||||
local function makespec_smearcursor()
|
||||
return {
|
||||
"sphamba/smear-cursor.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
enabled = false, -- Dormant on startup
|
||||
stiffness = 0.8,
|
||||
trailing_stiffness = 0.5,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
local function makespec_neoscroll()
|
||||
return {
|
||||
"karb94/neoscroll.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
-- Initialize with empty mappings. It is loaded, but completely dormant.
|
||||
require("neoscroll").setup({ mappings = {} })
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
local function makespec_hexokinase()
|
||||
return {
|
||||
-- coloring of colornames
|
||||
@@ -1061,15 +1084,6 @@ local function makespec_snacks()
|
||||
notify = true, -- show notification when big file detected
|
||||
size = 1.5 * 1024 * 1024, -- 1.5MB
|
||||
line_length = 1000, -- average line length (useful for minified files)
|
||||
-- Enable or disable features when big file detected
|
||||
---@param ctx {buf: number, ft:string}
|
||||
setup = function(ctx)
|
||||
if vim.fn.exists(":NoMatchParen") ~= 0 then vim.cmd([[NoMatchParen]]) end
|
||||
Snacks.util.wo(0, { foldmethod = "manual", statuscolumn = "", conceallevel = 0 })
|
||||
vim.schedule(function()
|
||||
if vim.api.nvim_buf_is_valid(ctx.buf) then vim.bo[ctx.buf].syntax = ctx.ft end
|
||||
end)
|
||||
end,
|
||||
},
|
||||
bufdelete = { enabled = true },
|
||||
debug = { enabled = true },
|
||||
@@ -1112,7 +1126,7 @@ local function makespec_snacks()
|
||||
{ "<leader>fc", function() Snacks.picker.files({ cwd = "/home/hjalmarlucius/dotfiles", title="Find Configs" }) end, desc = "Find Config" },
|
||||
{ "<leader>fn", function() Snacks.picker.files({ cwd = "/home/hjalmarlucius/notes", title="Find Notes" }) end, desc = "Find Note", },
|
||||
-- logs
|
||||
{ "<leader>ll", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
||||
{ "<leader>ll", function() Snacks.notifier.show_history() end, desc = "Notification History" },
|
||||
-- code
|
||||
{ "<leader>cs", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" },
|
||||
{ "<leader>cw", function() Snacks.picker.lsp_workspace_symbols() end, desc = "LSP Workspace Symbols" },
|
||||
@@ -1161,6 +1175,36 @@ local function makespec_snacks()
|
||||
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
||||
Snacks.toggle.treesitter():map("<leader>ut")
|
||||
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
|
||||
-- Toggle for Smear Cursor
|
||||
Snacks.toggle({
|
||||
name = "Smear Cursor",
|
||||
get = function() return require("smear_cursor").enabled end,
|
||||
set = function(state) require("smear_cursor").enabled = state end,
|
||||
}):map("<leader>uS")
|
||||
|
||||
-- Toggle for Neoscroll
|
||||
local ns_keys = { "<C-u>", "<C-d>", "<C-b>", "<C-f>", "<C-y>", "<C-e>", "zt", "zz", "zb" }
|
||||
vim.g.neoscroll_enabled = false
|
||||
|
||||
Snacks.toggle({
|
||||
name = "Smooth Scroll",
|
||||
get = function() return vim.g.neoscroll_enabled end,
|
||||
set = function(state)
|
||||
vim.g.neoscroll_enabled = state
|
||||
if state then
|
||||
-- Turn ON: Tell neoscroll to hijack the keys
|
||||
require("neoscroll").setup({
|
||||
mappings = ns_keys,
|
||||
hide_cursor = true,
|
||||
})
|
||||
else
|
||||
-- Turn OFF: Delete the hijacks so Neovim returns to default scrolling
|
||||
for _, key in ipairs(ns_keys) do
|
||||
pcall(vim.keymap.del, { "n", "v", "x" }, key)
|
||||
end
|
||||
end
|
||||
end,
|
||||
}):map("<leader>uN")
|
||||
end,
|
||||
})
|
||||
end,
|
||||
@@ -1174,6 +1218,25 @@ local function makespecs_mini()
|
||||
opts = { options = { basic = true, extra_ui = true }, mappings = { move_with_alt = true } },
|
||||
},
|
||||
{ "echasnovski/mini.icons", opts = {} },
|
||||
{
|
||||
"echasnovski/mini.bracketed",
|
||||
version = false,
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- Disabled because your custom LSP mappings (]e, ]w) are better!
|
||||
diagnostic = { suffix = "", options = {} },
|
||||
|
||||
-- These are the heavy hitters. They map [ and ] automatically.
|
||||
buffer = { suffix = "b", options = {} }, -- ]b / [b
|
||||
quickfix = { suffix = "q", options = {} }, -- ]q / [q
|
||||
location = { suffix = "l", options = {} }, -- ]l / [l
|
||||
yank = { suffix = "y", options = {} }, -- ]y / [y (cycle pasted text)
|
||||
indent = { suffix = "i", options = {} }, -- ]i / [i (match indent level)
|
||||
file = { suffix = "f", options = {} }, -- ]f / [f (next file on disk)
|
||||
window = { suffix = "w", options = {} }, -- ]w / [w (cycle windows)
|
||||
undo = { suffix = "u", options = {} }, -- ]u / [u (traverse undo tree)
|
||||
},
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.surround",
|
||||
version = false,
|
||||
@@ -1637,8 +1700,6 @@ local function makespec_noice()
|
||||
{ "<leader>lx", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
|
||||
{ "<leader>lh", function() require("noice").cmd("all") end, desc = "Noice History" },
|
||||
{ "<leader>ls", function() require("noice").cmd("stats") end, desc = "Noice Stats" },
|
||||
{ "<leader>un", function() require("noice").cmd("enable") end, desc = "Enable Noice" },
|
||||
{ "<leader>uN", function() require("noice").cmd("disable") end, desc = "Disable Noice" },
|
||||
},
|
||||
}
|
||||
end
|
||||
@@ -1673,6 +1734,8 @@ for _, spec in ipairs({
|
||||
makespec_flash(),
|
||||
makespec_grugfar(),
|
||||
-- visuals
|
||||
makespec_neoscroll(),
|
||||
makespec_smearcursor(),
|
||||
makespec_hexokinase(),
|
||||
makespec_lualine(),
|
||||
makespec_noice(),
|
||||
|
||||
Reference in New Issue
Block a user