restructure: removed some files, addet qol and ui for better distinguishability
This commit is contained in:
parent
91efc5bfcd
commit
37c84420c1
20 changed files with 565 additions and 480 deletions
263
lua/pika/plugins/qol.lua
Normal file
263
lua/pika/plugins/qol.lua
Normal file
|
@ -0,0 +1,263 @@
|
|||
return {
|
||||
-- ╭───────────╮
|
||||
-- │ autopairs │
|
||||
-- ╰───────────╯
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = { "InsertEnter" },
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
config = function()
|
||||
-- import nvim-autopairs
|
||||
local autopairs = require("nvim-autopairs")
|
||||
|
||||
-- configure autopairs
|
||||
autopairs.setup({
|
||||
check_ts = true, -- enable treesitter
|
||||
ts_config = {
|
||||
lua = { "string" }, -- don't add pairs in lua string treesitter nodes
|
||||
javascript = { "template_string" }, -- don't add pairs in javascript template_string treesitter nodes
|
||||
java = false, -- don't check treesitter on java
|
||||
},
|
||||
})
|
||||
|
||||
-- import nvim-autopairs completion functionality
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
|
||||
-- import nvim-cmp plugin (completions plugin)
|
||||
local cmp = require("cmp")
|
||||
|
||||
-- make autopairs and completion work together
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
},
|
||||
|
||||
-- ╭─────────────────────────────────────╮
|
||||
-- │ ╭───────────────╮ │
|
||||
-- │ │ comment boxes │<- yes, those ones │
|
||||
-- │ ╰───────────────╯ │
|
||||
-- ╰─────────────────────────────────────╯
|
||||
{
|
||||
"LudoPinelli/comment-box.nvim",
|
||||
lazy = false,
|
||||
opts = {
|
||||
comment_style = "line",
|
||||
doc_width = 90, -- width of the document
|
||||
box_width = 75, -- width of the boxes
|
||||
line_width = 120, -- width of the lines
|
||||
},
|
||||
-- ───────────────────────────────< keymaps - commentboxes >───────────────────────────────
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cd",
|
||||
"<Cmd>CBd<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]ommentbox [d]elete" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cd",
|
||||
"<Cmd>CBd<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]ommentbox [d]elete" }
|
||||
),
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cy",
|
||||
"<Cmd>CBy<CR>",
|
||||
{ noremap = true, silent = true, desc = "[y]ank content of Commentbox" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cy",
|
||||
"<Cmd>CBy<CR>",
|
||||
{ noremap = true, silent = true, desc = "[y]ank content of Commentbox" }
|
||||
),
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cb",
|
||||
"<Cmd>CBlabox1<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [b]ox" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cb",
|
||||
"<Cmd>CBlabox1<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [b]ox" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cB",
|
||||
"<Cmd>CBcabox1<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [b]ox (centered)" }
|
||||
),
|
||||
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cB",
|
||||
"<Cmd>CBcabox1<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [b]ox (centered)" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cc",
|
||||
"<Cmd>CBllbox14<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate [c]omment" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cc",
|
||||
"<Cmd>CBllbox14<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate [c]omment" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cC",
|
||||
"<Cmd>CBclbox14<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate [c]omment (C)entered" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cC",
|
||||
"<Cmd>CBclbox14<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate [c]omment (C)entered" }
|
||||
),
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cl",
|
||||
"<Cmd>CBllline8<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [l]ine" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cL",
|
||||
"<Cmd>CBlcline8<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [L]ine" }
|
||||
),
|
||||
},
|
||||
|
||||
-- ╭───────────╮
|
||||
-- │ colorizer │
|
||||
-- ╰───────────╯
|
||||
{
|
||||
"brenoprata10/nvim-highlight-colors",
|
||||
opts = {
|
||||
---Render style
|
||||
---@usage 'background'|'foreground'|'virtual'
|
||||
render = "background",
|
||||
|
||||
---Set virtual symbol (requires render to be set to 'virtual')
|
||||
virtual_symbol = "■",
|
||||
|
||||
---Set virtual symbol suffix (defaults to '')
|
||||
virtual_symbol_prefix = "",
|
||||
|
||||
---Set virtual symbol suffix (defaults to ' ')
|
||||
virtual_symbol_suffix = " ",
|
||||
|
||||
---Set virtual symbol position()
|
||||
---@usage 'inline'|'eol'|'eow'
|
||||
---inline mimics VS Code style
|
||||
---eol stands for `end of column` - Recommended to set `virtual_symbol_suffix = ''` when used.
|
||||
---eow stands for `end of word` - Recommended to set `virtual_symbol_prefix = ' ' and virtual_symbol_suffix = ''` when used.
|
||||
virtual_symbol_position = "inline",
|
||||
|
||||
---Highlight hex colors, e.g. '#FFFFFF'
|
||||
enable_hex = true,
|
||||
|
||||
---Highlight short hex colors e.g. '#fff'
|
||||
enable_short_hex = true,
|
||||
|
||||
---Highlight rgb colors, e.g. 'rgb(0 0 0)'
|
||||
enable_rgb = true,
|
||||
|
||||
---Highlight hsl colors, e.g. 'hsl(150deg 30% 40%)'
|
||||
enable_hsl = true,
|
||||
|
||||
---Highlight CSS variables, e.g. 'var(--testing-color)'
|
||||
enable_var_usage = true,
|
||||
|
||||
---Highlight named colors, e.g. 'green'
|
||||
enable_named_colors = true,
|
||||
|
||||
---Highlight tailwind colors, e.g. 'bg-blue-500'
|
||||
enable_tailwind = false,
|
||||
|
||||
---Set custom colors
|
||||
---Label must be properly escaped with '%' to adhere to `string.gmatch`
|
||||
--- :help string.gmatch
|
||||
custom_colors = {
|
||||
{ label = "%-%-theme%-primary%-color", color = "#0f1219" },
|
||||
{ label = "%-%-theme%-secondary%-color", color = "#5a5d64" },
|
||||
},
|
||||
|
||||
-- Exclude filetypes or buftypes from highlighting e.g. 'exclude_buftypes = {'text'}'
|
||||
exclude_filetypes = {},
|
||||
exclude_buftypes = {},
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭──────────────────────────────────────╮
|
||||
-- │ flash - to navigate more efficiently │
|
||||
-- ╰──────────────────────────────────────╯
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
vscode = true,
|
||||
-- @type Flash.Config
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "o", "x" }, 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" },
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭──────────────────────────────╮
|
||||
-- │ renaming (also project wide) │
|
||||
-- ╰──────────────────────────────╯
|
||||
{
|
||||
"MagicDuck/grug-far.nvim",
|
||||
opts = { headerMaxWidth = 80 },
|
||||
cmd = "GrugFar",
|
||||
-- ────────────────────────────────────< keybindings >─────────────────────────────────
|
||||
keys = {
|
||||
{
|
||||
"<leader>sr",
|
||||
function()
|
||||
local grug = require("grug-far")
|
||||
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
|
||||
grug.grug_far({
|
||||
transient = true,
|
||||
prefills = {
|
||||
filesFilter = ext and ext ~= "" and "*." .. ext or nil,
|
||||
},
|
||||
})
|
||||
end,
|
||||
mode = { "n", "v" },
|
||||
desc = "Search and Replace",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- ╭──────────╮
|
||||
-- │ snippets │
|
||||
-- ╰──────────╯
|
||||
{
|
||||
{
|
||||
"chrisgrieser/nvim-scissors",
|
||||
lazy = false,
|
||||
dependencies = { "nvim-telescope/telescope.nvim", "garymjr/nvim-snippets" },
|
||||
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
|
||||
},
|
||||
},
|
||||
-- ──────────────────────────< keybindings for snippets engine >───────────────────────
|
||||
vim.keymap.set("n", "<leader>sm", "<CMD>:ScissorsEditSnippet<cr>"),
|
||||
vim.keymap.set("v", "<leader>sa", "<CMD>:ScissorsAddNewSnippet<cr>"),
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue