some changes for the better
This commit is contained in:
parent
ead2540502
commit
27622c55c0
7 changed files with 431 additions and 31 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
if true then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"yetone/avante.nvim",
|
"yetone/avante.nvim",
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if true then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"RileyGabrielson/inspire.nvim",
|
"RileyGabrielson/inspire.nvim",
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if true then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"sindrets/diffview.nvim",
|
"sindrets/diffview.nvim",
|
||||||
|
|
|
@ -269,7 +269,7 @@ return {
|
||||||
{
|
{
|
||||||
"chrisgrieser/nvim-scissors",
|
"chrisgrieser/nvim-scissors",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = { "nvim-telescope/telescope.nvim", "garymjr/nvim-snippets" },
|
dependencies = { "garymjr/nvim-snippets" }, -- "nvim-telescope/telescope.nvim"
|
||||||
opts = {
|
opts = {
|
||||||
snippetDir = "~/.config/nvim/snippets", -- <- i have this as a submodule in my neovim config to have a seperate repo https://git.k4li.de/dotfiles/nvim-snippets.git
|
snippetDir = "~/.config/nvim/snippets", -- <- i have this as a submodule in my neovim config to have a seperate repo https://git.k4li.de/dotfiles/nvim-snippets.git
|
||||||
},
|
},
|
||||||
|
|
383
lua/pika/plugins/snacks.lua
Normal file
383
lua/pika/plugins/snacks.lua
Normal file
|
@ -0,0 +1,383 @@
|
||||||
|
return {
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
priority = 1000,
|
||||||
|
lazy = false,
|
||||||
|
---@type snacks.Config
|
||||||
|
opts = {
|
||||||
|
explorer = { enabled = false },
|
||||||
|
|
||||||
|
bigfile = { enabled = true },
|
||||||
|
quickfile = { enabled = true },
|
||||||
|
|
||||||
|
---@class snacks.animate.Config
|
||||||
|
---@field easing? snacks.animate.easing|snacks.animate.easing.Fn
|
||||||
|
animate = {
|
||||||
|
enabled = true,
|
||||||
|
---@type snacks.animate.Duration|number
|
||||||
|
duration = 4, -- ms per step
|
||||||
|
|
||||||
|
easing = "linear",
|
||||||
|
fps = 60, -- frames per second. Global setting for all animations
|
||||||
|
},
|
||||||
|
notifier = { enabled = true },
|
||||||
|
indent = { enabled = true },
|
||||||
|
toggle = { enabled = true },
|
||||||
|
scroll = { enabled = true },
|
||||||
|
dashboard = {
|
||||||
|
row = nil,
|
||||||
|
col = nil,
|
||||||
|
pane_gap = 2,
|
||||||
|
enabled = true,
|
||||||
|
-- example = "pokemon",
|
||||||
|
sections = {
|
||||||
|
{ section = "header" },
|
||||||
|
{
|
||||||
|
pane = 2,
|
||||||
|
section = "terminal",
|
||||||
|
cmd = "colorscript -e square",
|
||||||
|
height = 6,
|
||||||
|
padding = 1,
|
||||||
|
},
|
||||||
|
{ section = "keys", gap = 1, padding = 1 },
|
||||||
|
{
|
||||||
|
pane = 2,
|
||||||
|
icon = " ",
|
||||||
|
title = "Recent Files",
|
||||||
|
section = "recent_files",
|
||||||
|
indent = 2,
|
||||||
|
padding = 1,
|
||||||
|
},
|
||||||
|
{ pane = 2, icon = " ", title = "Projects", section = "projects", indent = 2, padding = 1 },
|
||||||
|
{
|
||||||
|
pane = 2,
|
||||||
|
icon = " ",
|
||||||
|
title = "Git Status",
|
||||||
|
section = "terminal",
|
||||||
|
enabled = function()
|
||||||
|
return Snacks.git.get_root() ~= nil
|
||||||
|
end,
|
||||||
|
cmd = "git status --short --branch --renames",
|
||||||
|
height = 5,
|
||||||
|
padding = 1,
|
||||||
|
ttl = 5 * 60,
|
||||||
|
indent = 3,
|
||||||
|
},
|
||||||
|
{ section = "startup" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
-- Top Pickers & Explorer
|
||||||
|
{
|
||||||
|
"<leader>sf",
|
||||||
|
function()
|
||||||
|
Snacks.picker.smart()
|
||||||
|
end,
|
||||||
|
desc = "Smart Find Files",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader><space>",
|
||||||
|
function()
|
||||||
|
Snacks.picker.buffers()
|
||||||
|
end,
|
||||||
|
desc = "Buffers",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>/",
|
||||||
|
function()
|
||||||
|
Snacks.picker.grep()
|
||||||
|
end,
|
||||||
|
desc = "Grep",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>:",
|
||||||
|
function()
|
||||||
|
Snacks.picker.command_history()
|
||||||
|
end,
|
||||||
|
desc = "Command History",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>n",
|
||||||
|
function()
|
||||||
|
Snacks.picker.notifications()
|
||||||
|
end,
|
||||||
|
desc = "Notification History",
|
||||||
|
},
|
||||||
|
-- {
|
||||||
|
-- "<leader>e",
|
||||||
|
-- function()
|
||||||
|
-- Snacks.explorer()
|
||||||
|
-- end,
|
||||||
|
-- desc = "File Explorer",
|
||||||
|
-- },
|
||||||
|
-- find
|
||||||
|
-- {
|
||||||
|
-- "<leader>fb",
|
||||||
|
-- function()
|
||||||
|
-- Snacks.picker.buffers()
|
||||||
|
-- end,
|
||||||
|
-- desc = "Buffers",
|
||||||
|
-- },
|
||||||
|
{
|
||||||
|
"<leader>fc",
|
||||||
|
function()
|
||||||
|
Snacks.picker.files({ cwd = vim.fn.stdpath("config") })
|
||||||
|
end,
|
||||||
|
desc = "Find Config File",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ff",
|
||||||
|
function()
|
||||||
|
Snacks.picker.files()
|
||||||
|
end,
|
||||||
|
desc = "Find Files",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fg",
|
||||||
|
function()
|
||||||
|
Snacks.picker.git_files()
|
||||||
|
end,
|
||||||
|
desc = "Find Git Files",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fp",
|
||||||
|
function()
|
||||||
|
Snacks.picker.projects()
|
||||||
|
end,
|
||||||
|
desc = "Projects",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fr",
|
||||||
|
function()
|
||||||
|
Snacks.picker.recent()
|
||||||
|
end,
|
||||||
|
desc = "Recent",
|
||||||
|
},
|
||||||
|
-- git
|
||||||
|
{
|
||||||
|
"<leader>gb",
|
||||||
|
function()
|
||||||
|
Snacks.picker.git_branches()
|
||||||
|
end,
|
||||||
|
desc = "Git Branches",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gl",
|
||||||
|
function()
|
||||||
|
Snacks.picker.git_log()
|
||||||
|
end,
|
||||||
|
desc = "Git Log",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gL",
|
||||||
|
function()
|
||||||
|
Snacks.picker.git_log_line()
|
||||||
|
end,
|
||||||
|
desc = "Git Log Line",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gs",
|
||||||
|
function()
|
||||||
|
Snacks.picker.git_status()
|
||||||
|
end,
|
||||||
|
desc = "Git Status",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gS",
|
||||||
|
function()
|
||||||
|
Snacks.picker.git_stash()
|
||||||
|
end,
|
||||||
|
desc = "Git Stash",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gd",
|
||||||
|
function()
|
||||||
|
Snacks.picker.git_diff()
|
||||||
|
end,
|
||||||
|
desc = "Git Diff (Hunks)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gf",
|
||||||
|
function()
|
||||||
|
Snacks.picker.git_log_file()
|
||||||
|
end,
|
||||||
|
desc = "Git Log File",
|
||||||
|
},
|
||||||
|
-- Grep
|
||||||
|
{
|
||||||
|
"<leader>sg",
|
||||||
|
function()
|
||||||
|
Snacks.picker.grep()
|
||||||
|
end,
|
||||||
|
desc = "Grep",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>sw",
|
||||||
|
function()
|
||||||
|
Snacks.picker.grep_word()
|
||||||
|
end,
|
||||||
|
desc = "Visual selection or word",
|
||||||
|
mode = { "n", "x" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>T",
|
||||||
|
function()
|
||||||
|
Snacks.picker.colorschemes()
|
||||||
|
end,
|
||||||
|
desc = "Colorschemes",
|
||||||
|
},
|
||||||
|
-- LSP
|
||||||
|
{
|
||||||
|
"gd",
|
||||||
|
function()
|
||||||
|
Snacks.picker.lsp_definitions()
|
||||||
|
end,
|
||||||
|
desc = "Goto Definition",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gD",
|
||||||
|
function()
|
||||||
|
Snacks.picker.lsp_declarations()
|
||||||
|
end,
|
||||||
|
desc = "Goto Declaration",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gr",
|
||||||
|
function()
|
||||||
|
Snacks.picker.lsp_references()
|
||||||
|
end,
|
||||||
|
nowait = true,
|
||||||
|
desc = "References",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gI",
|
||||||
|
function()
|
||||||
|
Snacks.picker.lsp_implementations()
|
||||||
|
end,
|
||||||
|
desc = "Goto Implementation",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gy",
|
||||||
|
function()
|
||||||
|
Snacks.picker.lsp_type_definitions()
|
||||||
|
end,
|
||||||
|
desc = "Goto T[y]pe Definition",
|
||||||
|
},
|
||||||
|
-- Other
|
||||||
|
{
|
||||||
|
"<leader>z",
|
||||||
|
function()
|
||||||
|
Snacks.zen()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Zen Mode",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>Z",
|
||||||
|
function()
|
||||||
|
Snacks.zen.zoom()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Zoom",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>n",
|
||||||
|
function()
|
||||||
|
Snacks.notifier.show_history()
|
||||||
|
end,
|
||||||
|
desc = "Notification History",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cR",
|
||||||
|
function()
|
||||||
|
Snacks.rename.rename_file()
|
||||||
|
end,
|
||||||
|
desc = "Rename File",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gB",
|
||||||
|
function()
|
||||||
|
Snacks.gitbrowse()
|
||||||
|
end,
|
||||||
|
desc = "Git Browse",
|
||||||
|
mode = { "n", "v" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gg",
|
||||||
|
function()
|
||||||
|
Snacks.lazygit()
|
||||||
|
end,
|
||||||
|
desc = "Lazygit",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>un",
|
||||||
|
function()
|
||||||
|
Snacks.notifier.hide()
|
||||||
|
end,
|
||||||
|
desc = "Dismiss All Notifications",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>N",
|
||||||
|
desc = "Neovim News",
|
||||||
|
function()
|
||||||
|
Snacks.win({
|
||||||
|
file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
|
||||||
|
width = 0.6,
|
||||||
|
height = 0.6,
|
||||||
|
wo = {
|
||||||
|
spell = false,
|
||||||
|
wrap = false,
|
||||||
|
signcolumn = "yes",
|
||||||
|
statuscolumn = " ",
|
||||||
|
conceallevel = 3,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "VeryLazy",
|
||||||
|
callback = function()
|
||||||
|
-- Setup some globals for debugging (lazy-loaded)
|
||||||
|
_G.dd = function(...)
|
||||||
|
Snacks.debug.inspect(...)
|
||||||
|
end
|
||||||
|
_G.bt = function()
|
||||||
|
Snacks.debug.backtrace()
|
||||||
|
end
|
||||||
|
vim.print = _G.dd -- Override print to use snacks for `:=` command
|
||||||
|
|
||||||
|
-- Create some toggle mappings
|
||||||
|
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
||||||
|
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
|
||||||
|
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
|
||||||
|
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||||
|
Snacks.toggle.line_number():map("<leader>ul")
|
||||||
|
Snacks.toggle
|
||||||
|
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
|
||||||
|
:map("<leader>uc")
|
||||||
|
Snacks.toggle.treesitter():map("<leader>uT")
|
||||||
|
Snacks.toggle
|
||||||
|
.option("background", { off = "light", on = "dark", name = "Dark Background" })
|
||||||
|
:map("<leader>ub")
|
||||||
|
Snacks.toggle.inlay_hints():map("<leader>uh")
|
||||||
|
Snacks.toggle.indent():map("<leader>ug")
|
||||||
|
Snacks.toggle.dim():map("<leader>uD")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"folke/persistence.nvim",
|
||||||
|
event = "BufReadPre",
|
||||||
|
opts = {},
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
-- { "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },
|
||||||
|
-- { "<leader>ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
|
||||||
|
-- { "<leader>qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" },
|
||||||
|
{ "<leader>db", "<cmd>:Dashboard<CR>", desc = "Dashboard"},
|
||||||
|
{ "<leader>dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,3 +1,8 @@
|
||||||
|
if true then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||||
|
--
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
branch = "0.1.x",
|
branch = "0.1.x",
|
||||||
|
|
|
@ -189,36 +189,36 @@ return {
|
||||||
-- ╭────────────────────────────────────╮
|
-- ╭────────────────────────────────────╮
|
||||||
-- │ notify for excellent notifications │
|
-- │ notify for excellent notifications │
|
||||||
-- ╰────────────────────────────────────╯
|
-- ╰────────────────────────────────────╯
|
||||||
{
|
-- {
|
||||||
"rcarriga/nvim-notify",
|
-- "rcarriga/nvim-notify",
|
||||||
config = function()
|
-- config = function()
|
||||||
require("notify").setup({
|
-- require("notify").setup({
|
||||||
stages = "slide",
|
-- stages = "slide",
|
||||||
background_colour = "FloatShadow",
|
-- background_colour = "FloatShadow",
|
||||||
max_width = 120,
|
-- max_width = 120,
|
||||||
timeout = 2750,
|
-- timeout = 2750,
|
||||||
render = "wrapped-compact",
|
-- render = "wrapped-compact",
|
||||||
-- Minimum/Maximum width for notification windows
|
-- -- Minimum/Maximum width for notification windows
|
||||||
minimum_width = 30,
|
-- minimum_width = 30,
|
||||||
maximum_width = 120,
|
-- maximum_width = 120,
|
||||||
|
--
|
||||||
-- Function called when a new window is opened, use for changing win settings/config
|
-- -- Function called when a new window is opened, use for changing win settings/config
|
||||||
on_open = nil,
|
-- on_open = nil,
|
||||||
|
--
|
||||||
-- Function called when a window is closed
|
-- -- Function called when a window is closed
|
||||||
on_close = nil,
|
-- on_close = nil,
|
||||||
icons = {
|
-- icons = {
|
||||||
ERROR = "", -- alternate symbol
|
-- ERROR = "", -- alternate symbol
|
||||||
WARN = "",
|
-- WARN = "",
|
||||||
INFO = "",
|
-- INFO = "",
|
||||||
DEBUG = "",
|
-- DEBUG = "",
|
||||||
TRACE = "",
|
-- TRACE = "",
|
||||||
},
|
-- },
|
||||||
})
|
-- })
|
||||||
vim.notify = require("notify")
|
-- vim.notify = require("notify")
|
||||||
end,
|
-- end,
|
||||||
vim.keymap.set("n", "<leader>tn", "<cmd>Telescope notify<CR>", { desc = "Telescope show Notifications" }),
|
-- vim.keymap.set("n", "<leader>tn", "<cmd>Telescope notify<CR>", { desc = "Telescope show Notifications" }),
|
||||||
},
|
-- },
|
||||||
|
|
||||||
-- ╭────────────────────────────────╮
|
-- ╭────────────────────────────────╮
|
||||||
-- │ lualine - another bar for nvim │
|
-- │ lualine - another bar for nvim │
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue