feat: add mini.nvim, flash, auto-dark-mode
This commit is contained in:
parent
a4b415c50c
commit
5716a3de5a
3 changed files with 89 additions and 0 deletions
21
lua/weeheavy/plugins/auto-dark-mode.lua
Normal file
21
lua/weeheavy/plugins/auto-dark-mode.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
|
return {
|
||||||
|
"f-person/auto-dark-mode.nvim",
|
||||||
|
opts = {
|
||||||
|
-- in ms. needs to be larger than whatever time your system takes to
|
||||||
|
-- query dark mode. Otherwise you risk freezing neovim on shutdown
|
||||||
|
update_interval = 4000,
|
||||||
|
set_dark_mode = function()
|
||||||
|
vim.api.nvim_set_option_value("background", "dark", {})
|
||||||
|
vim.cmd("colorscheme tokyonight-storm")
|
||||||
|
end,
|
||||||
|
set_light_mode = function()
|
||||||
|
vim.api.nvim_set_option_value("background", "light", {})
|
||||||
|
vim.cmd("colorscheme tokyonight-day")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local darkmode = require("auto-dark-mode")
|
||||||
|
darkmode.setup({})
|
||||||
|
end,
|
||||||
|
}
|
||||||
59
lua/weeheavy/plugins/flash.lua
Normal file
59
lua/weeheavy/plugins/flash.lua
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
-- Navigate code fast
|
||||||
|
-- https://github.com/folke/flash.nvim
|
||||||
|
return {
|
||||||
|
"folke/flash.nvim",
|
||||||
|
opts = {
|
||||||
|
label = {
|
||||||
|
-- allow uppercase labels
|
||||||
|
uppercase = true,
|
||||||
|
-- add any labels with the correct case here, that you want to exclude
|
||||||
|
exclude = "",
|
||||||
|
-- add a label for the first match in the current window.
|
||||||
|
-- you can always jump to the first match with `<CR>`
|
||||||
|
current = true,
|
||||||
|
-- show the label after the match
|
||||||
|
after = true, ---@type boolean|number[]
|
||||||
|
-- show the label before the match
|
||||||
|
before = false, ---@type boolean|number[]
|
||||||
|
-- position of the label extmark
|
||||||
|
-- style = "overlay", ---@type "eol" | "overlay" | "right_align" | "inline"
|
||||||
|
-- flash tries to re-use labels that were already assigned to a position,
|
||||||
|
-- when typing more characters. By default only lower-case labels are re-used.
|
||||||
|
reuse = "lowercase", ---@type "lowercase" | "all" | "none"
|
||||||
|
-- for the current window, label targets closer to the cursor first
|
||||||
|
distance = true,
|
||||||
|
-- minimum pattern length to show labels
|
||||||
|
-- Ignored for custom labelers.
|
||||||
|
min_pattern_length = 0,
|
||||||
|
-- Enable this to use rainbow colors to highlight labels
|
||||||
|
-- Can be useful for visualizing Treesitter ranges.
|
||||||
|
rainbow = {
|
||||||
|
enabled = true,
|
||||||
|
-- number between 1 and 9
|
||||||
|
shade = 4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
highlight = {
|
||||||
|
-- show a backdrop with hl FlashBackdrop
|
||||||
|
backdrop = true,
|
||||||
|
-- Highlight the search matches
|
||||||
|
matches = false,
|
||||||
|
-- extmark priority
|
||||||
|
priority = 5000,
|
||||||
|
groups = {
|
||||||
|
match = "FlashMatch",
|
||||||
|
current = "FlashCurrent",
|
||||||
|
backdrop = "FlashBackdrop",
|
||||||
|
label = "FlashLabel",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||||
|
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||||
|
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||||
|
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||||
|
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||||
|
},
|
||||||
|
}
|
||||||
9
lua/weeheavy/plugins/mini.lua
Normal file
9
lua/weeheavy/plugins/mini.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
|
return {
|
||||||
|
"echasnovski/mini.nvim",
|
||||||
|
version = false,
|
||||||
|
config = function()
|
||||||
|
local icons = require("mini.icons")
|
||||||
|
icons.setup({})
|
||||||
|
end,
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue