diff --git a/init.lua b/init.lua index 68f2a4d..a4a2ea5 100644 --- a/init.lua +++ b/init.lua @@ -7,38 +7,3 @@ require("pika.lazy") -- ╰──────────────────────────────────────────────────────╯ vim.cmd.colorscheme("oldschool") - --- Keybind for saving clipboard screenshot and inserting a Markdown link -vim.api.nvim_set_keymap("n", "ps", ":lua SaveScreenshotAndInsertLink()", { noremap = true, silent = true }) - -function SaveScreenshotAndInsertLink() - -- Prompt for Hugo base directory if needed - - -- Define the Hugo base directory and screenshot subfolder path - local base_dir - local current_file_dir = vim.fn.expand("%:p:h") - - -- Detect base dir by looking for the Hugo structure, or prompt if not found - if current_file_dir:match("/content/") then - base_dir = current_file_dir:match("(.*)/content/") - else - -- Prompt for Hugo base directory if automatic detection fails - base_dir = vim.fn.input("Enter base directory of your Hugo site: ", "", "file") - end - - local img_folder = base_dir .. "/static/images/screenshots/" - vim.fn.mkdir(img_folder, "p") -- Ensure the directory exists - - -- Define the image name and full path - local img_name = os.date("%Y-%m-%d_%H-%M-%S") .. ".png" - local full_path = img_folder .. img_name - - -- Save clipboard image as binary PNG file using wl-paste - os.execute("wl-paste --type image/png > " .. full_path) - - -- Insert markdown image link at cursor position - local img_markdown = "![](/images/screenshots/" .. img_name .. ")\n" - vim.api.nvim_put({ img_markdown }, "c", true, true) - - print("Screenshot saved and link added: " .. full_path) -end diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index 633eb1c..57203c8 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -16,10 +16,6 @@ map("n", "", "nohlsearch") map("n", "", "gcc", { desc = "comment toggle", remap = true }) map("v", "", "gc", { desc = "comment toggle", remap = true }) --- ─< cmd line >──────────────────────────────────────────────────────────────────────── -vim.api.nvim_set_keymap("n", ":", "FineCmdline", { noremap = true }) -map("n", "T", "FineCmdline") - -- ─< Terminal >──────────────────────────────────────────────────────────────────────── map("t", "", "", { desc = "terminal escape terminal mode" }) diff --git a/lua/pika/plugins/autopairs.lua b/lua/pika/plugins/autopairs.lua deleted file mode 100644 index c9f5b9a..0000000 --- a/lua/pika/plugins/autopairs.lua +++ /dev/null @@ -1,30 +0,0 @@ -return { - "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, -} diff --git a/lua/pika/plugins/avante-ai.lua b/lua/pika/plugins/avante-ai.lua deleted file mode 100644 index 682a95f..0000000 --- a/lua/pika/plugins/avante-ai.lua +++ /dev/null @@ -1,59 +0,0 @@ -return { - "yetone/avante.nvim", - event = "VeryLazy", - version = false, -- Set this to "*" to always pull the latest release version, or set it to false to update to the latest code changes. - opts = { - -- add any opts here - -- for example - provider = "openai", - openai = { - endpoint = "https://api.openai.com/v1", - model = "gpt-4o", -- your desired model (or use gpt-4o, etc.) - timeout = 30000, -- timeout in milliseconds - temperature = 0, -- adjust if needed - max_tokens = 4096, - -- reasoning_effort = "high" -- only supported for reasoning models (o1, etc.) - }, - }, - -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` - build = "make", - -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows - dependencies = { - "nvim-treesitter/nvim-treesitter", - "stevearc/dressing.nvim", - "nvim-lua/plenary.nvim", - "MunifTanjim/nui.nvim", - --- The below dependencies are optional, - "echasnovski/mini.pick", -- for file_selector provider mini.pick - "nvim-telescope/telescope.nvim", -- for file_selector provider telescope - "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions - "ibhagwan/fzf-lua", -- for file_selector provider fzf - "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons - "zbirenbaum/copilot.lua", -- for providers='copilot' - { - -- support for image pasting - "HakonHarnes/img-clip.nvim", - event = "VeryLazy", - opts = { - -- recommended settings - default = { - embed_image_as_base64 = false, - prompt_for_file_name = false, - drag_and_drop = { - insert_mode = true, - }, - -- required for Windows users - use_absolute_path = true, - }, - }, - }, - { - -- Make sure to set this up properly if you have lazy=true - "MeanderingProgrammer/render-markdown.nvim", - opts = { - file_types = { "markdown", "Avante" }, - }, - ft = { "markdown", "Avante" }, - }, - }, -} diff --git a/lua/pika/plugins/barbecue.lua b/lua/pika/plugins/barbecue.lua deleted file mode 100644 index 86824d9..0000000 --- a/lua/pika/plugins/barbecue.lua +++ /dev/null @@ -1,55 +0,0 @@ -return { - "utilyre/barbecue.nvim", - name = "barbecue", - version = "*", - dependencies = { - "SmiteshP/nvim-navic", - "echasnovski/mini.icons", -- optional dependency - }, - opts = { - theme = { - -- this highlight is used to override other highlights - -- you can take advantage of its `bg` and set a background throughout your winbar - -- (e.g. basename will look like this: { fg = "#c0caf5", bold = true }) - normal = { fg = "#c0caf5" }, - - -- these highlights correspond to symbols table from config - ellipsis = { fg = "#737aa2" }, - separator = { fg = "#737aa2" }, - modified = { fg = "#737aa2" }, - - -- these highlights represent the _text_ of three main parts of barbecue - dirname = { fg = "#737aa2" }, - basename = { bold = true }, - context = {}, - - -- these highlights are used for context/navic icons - context_file = { fg = "#ac8fe4" }, - context_module = { fg = "#ac8fe4" }, - context_namespace = { fg = "#ac8fe4" }, - context_package = { fg = "#ac8fe4" }, - context_class = { fg = "#ac8fe4" }, - context_method = { fg = "#ac8fe4" }, - context_property = { fg = "#ac8fe4" }, - context_field = { fg = "#ac8fe4" }, - context_constructor = { fg = "#ac8fe4" }, - context_enum = { fg = "#ac8fe4" }, - context_interface = { fg = "#ac8fe4" }, - context_function = { fg = "#ac8fe4" }, - context_variable = { fg = "#ac8fe4" }, - context_constant = { fg = "#ac8fe4" }, - context_string = { fg = "#ac8fe4" }, - context_number = { fg = "#ac8fe4" }, - context_boolean = { fg = "#ac8fe4" }, - context_array = { fg = "#ac8fe4" }, - context_object = { fg = "#ac8fe4" }, - context_key = { fg = "#ac8fe4" }, - context_null = { fg = "#ac8fe4" }, - context_enum_member = { fg = "#ac8fe4" }, - context_struct = { fg = "#ac8fe4" }, - context_event = { fg = "#ac8fe4" }, - context_operator = { fg = "#ac8fe4" }, - context_type_parameter = { fg = "#ac8fe4" }, - }, - }, -} diff --git a/lua/pika/plugins/bufferline.lua b/lua/pika/plugins/bufferline.lua deleted file mode 100644 index 0a8c69a..0000000 --- a/lua/pika/plugins/bufferline.lua +++ /dev/null @@ -1,49 +0,0 @@ -return { - "akinsho/bufferline.nvim", - dependencies = { "echasnovski/mini.icons" }, - version = "*", - opts = { - options = { - diagnostics = "nvim_lsp", - diagnostics_update_on_event = true, -- use nvim's diagnostic handler - diagnostics_indicator = function(count, level) - local icon = level:match("error") and " " or " " - return " " .. icon .. count - end, - offsets = { { filetype = "neo-tree", text = "File Explorer", highlight = "Directory" } }, - -- ─< style >─────────────────────────────────────────────────────────────────────────── - indicator = { - icon = "▎", -- this should be omitted if indicator style is not 'icon' - style = "icon", - }, - move_wraps_at_ends = true, -- whether or not the move command "wraps" at the first or last position - separator_style = "slope", - -- ─< icons >─────────────────────────────────────────────────────────────────────────── - modified_icon = "󱞇", - left_trunc_marker = "󰬩", - right_trunc_marker = "󰬫", - themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default - close_icon = "󱄊", - buffer_close_icon = "󱄊", - show_buffer_icons = true, -- disable filetype icons for buffers - show_buffer_close_icons = true, - show_close_icon = true, - show_tab_indicators = true, - hover = { - enabled = true, - delay = 80, - reveal = { "close" }, - hide = { "nvim_lsp" }, - }, - -- You can set buffer_mode to "list" or "tabbed" based on your preference. - buffer_mode = "list", - color_icons = true, -- whether or not to add the filetype icon highlights - }, - }, - config = function(_, opts) - require("bufferline").setup(opts) - -- Remap the tab key for buffer navigation (you can adjust the keys as needed) - vim.keymap.set("n", "", "BufferLineCycleNext") - vim.keymap.set("n", "", "BufferLineCyclePrev") - end, -} diff --git a/lua/pika/plugins/cmd-line.lua b/lua/pika/plugins/cmd-line.lua deleted file mode 100644 index ea0e2f5..0000000 --- a/lua/pika/plugins/cmd-line.lua +++ /dev/null @@ -1,41 +0,0 @@ -return { - "VonHeikemen/fine-cmdline.nvim", - dependencies = { - { "MunifTanjim/nui.nvim" }, - }, - config = function() - require("fine-cmdline").setup({ - cmdline = { - enable_keymaps = true, - smart_history = true, - prompt = " ", - }, - popup = { - position = { - row = "10%", - col = "50%", - }, - size = { - width = "60%", - }, - border = { - style = "rounded", - }, - win_options = { - winhighlight = "Normal:Normal,FloatBorder:FloatBorder", - }, - }, - hooks = { - before_mount = function(input) - -- code - end, - after_mount = function(input) - -- code - end, - set_keymaps = function(imap, feedkeys) - -- code - end, - }, - }) - end, -} diff --git a/lua/pika/plugins/colorizer.lua b/lua/pika/plugins/colorizer.lua deleted file mode 100644 index 0d3dac4..0000000 --- a/lua/pika/plugins/colorizer.lua +++ /dev/null @@ -1,72 +0,0 @@ -return { - -- { - -- 'norcalli/nvim-colorizer.lua', - -- opts = { - -- 'css', - -- 'html', - -- 'php', - -- 'bash', - -- 'fish', - -- 'lua', - -- 'toml', - -- html = { - -- mode = 'foreground', - -- }, - -- }, - -- }, - "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 = {}, - }, -} diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index d977b29..750d932 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -10,20 +10,7 @@ return { { "eldritch-theme/eldritch.nvim" }, -- { "sainnhe/sonokai" }, { "samharju/synthweave.nvim" }, - { "sainnhe/gruvbox-material" }, - { "pauchiner/pastelnight.nvim" }, - { "ptdewey/darkearth-nvim" }, { "marko-cerovac/material.nvim" }, - -- { - -- "ferdinandrau/lavish.nvim", - -- opts = { - -- style = { - -- italic_comments = false, - -- italic_strings = false, - -- transparent = false, - -- }, - -- }, - -- }, { "neko-night/nvim", lazy = false, @@ -44,16 +31,6 @@ return { }, }, }, - { - "scottmckendry/cyberdream.nvim", - name = "cyberdream", - lazy = false, - opts = { - transparent = true, - hide_fillchars = true, - terminal_colors = true, - }, - }, { "ribru17/bamboo.nvim", opts = { diff --git a/lua/pika/plugins/comment-box.lua b/lua/pika/plugins/comment-box.lua deleted file mode 100644 index bba9c90..0000000 --- a/lua/pika/plugins/comment-box.lua +++ /dev/null @@ -1,40 +0,0 @@ -return { - "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 - }, - -- ─< Comment-Box mappings >──────────────────────────────────────────────────────────── - vim.keymap.set("n", "cd", "CBd", { noremap = true, silent = true, desc = "[c]ommentbox [d]elete" }), - vim.keymap.set("v", "cd", "CBd", { noremap = true, silent = true, desc = "[c]ommentbox [d]elete" }), - - vim.keymap.set("n", "cy", "CBy", { noremap = true, silent = true, desc = "[y]ank content of Commentbox" }), - vim.keymap.set("v", "cy", "CBy", { noremap = true, silent = true, desc = "[y]ank content of Commentbox" }), - - vim.keymap.set("n", "cb", "CBlabox1", { noremap = true, silent = true, desc = "[c]reate comment [b]ox" }), - vim.keymap.set("v", "cb", "CBlabox1", { noremap = true, silent = true, desc = "[c]reate comment [b]ox" }), - vim.keymap.set( - "n", - "cB", - "CBcabox1", - { noremap = true, silent = true, desc = "[c]reate comment [b]ox (centered)" } - ), - - vim.keymap.set( - "v", - "cB", - "CBcabox1", - { noremap = true, silent = true, desc = "[c]reate comment [b]ox (centered)" } - ), - vim.keymap.set("n", "cc", "CBllbox14", { noremap = true, silent = true, desc = "[c]reate [c]omment" }), - vim.keymap.set("v", "cc", "CBllbox14", { noremap = true, silent = true, desc = "[c]reate [c]omment" }), - vim.keymap.set("n", "cC", "CBclbox14", { noremap = true, silent = true, desc = "[c]reate [c]omment (C)entered" }), - vim.keymap.set("v", "cC", "CBclbox14", { noremap = true, silent = true, desc = "[c]reate [c]omment (C)entered" }), - - vim.keymap.set("n", "cl", "CBllline8", { noremap = true, silent = true, desc = "[c]reate comment [l]ine" }), - vim.keymap.set("n", "cL", "CBlcline8", { noremap = true, silent = true, desc = "[c]reate comment [L]ine" }), - -} diff --git a/lua/pika/plugins/comment.lua b/lua/pika/plugins/comment.lua deleted file mode 100644 index a0f254e..0000000 --- a/lua/pika/plugins/comment.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - "numToStr/Comment.nvim", - event = { "BufReadPre", "BufNewFile" }, - dependencies = { - "JoosepAlviste/nvim-ts-context-commentstring", - }, - config = function() - -- import comment plugin safely - local comment = require("Comment") - - local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim") - - -- enable comment - comment.setup({ - -- for commenting tsx, jsx, svelte, html files - pre_hook = ts_context_commentstring.create_pre_hook(), - }) - end, -} diff --git a/lua/pika/plugins/flash.lua b/lua/pika/plugins/flash.lua deleted file mode 100644 index 626eac9..0000000 --- a/lua/pika/plugins/flash.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "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" }, - { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, - }, -} diff --git a/lua/pika/plugins/grug-far.lua b/lua/pika/plugins/grug-far.lua deleted file mode 100644 index 3768072..0000000 --- a/lua/pika/plugins/grug-far.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - "MagicDuck/grug-far.nvim", - opts = { headerMaxWidth = 80 }, - cmd = "GrugFar", - keys = { - { - "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", - }, - }, -} diff --git a/lua/pika/plugins/indent-blankline.lua b/lua/pika/plugins/indent-blankline.lua deleted file mode 100644 index 67f9f38..0000000 --- a/lua/pika/plugins/indent-blankline.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - "lukas-reineke/indent-blankline.nvim", - event = { "BufReadPre", "BufNewFile" }, - main = "ibl", - opts = { - indent = { - char = "┊", - tab_char = "┊", - -- char = "│", - -- tab_char = "│", - }, - }, -} diff --git a/lua/pika/plugins/notify.lua b/lua/pika/plugins/notify.lua deleted file mode 100644 index bcf486a..0000000 --- a/lua/pika/plugins/notify.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - "rcarriga/nvim-notify", - config = function() - require("notify").setup({ - stages = "slide", - background_colour = "FloatShadow", - max_width = 120, - timeout = 2750, - render = "wrapped-compact", - -- Minimum/Maximum width for notification windows - minimum_width = 30, - maximum_width = 120, - - -- Function called when a new window is opened, use for changing win settings/config - on_open = nil, - - -- Function called when a window is closed - on_close = nil, - icons = { - ERROR = "", -- alternate symbol  - WARN = "", - INFO = "", - DEBUG = "", - TRACE = "", - }, - }) - vim.notify = require("notify") - end, -} diff --git a/lua/pika/plugins/qol.lua b/lua/pika/plugins/qol.lua new file mode 100644 index 0000000..c012d60 --- /dev/null +++ b/lua/pika/plugins/qol.lua @@ -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", + "cd", + "CBd", + { noremap = true, silent = true, desc = "[c]ommentbox [d]elete" } + ), + vim.keymap.set( + "v", + "cd", + "CBd", + { noremap = true, silent = true, desc = "[c]ommentbox [d]elete" } + ), + + vim.keymap.set( + "n", + "cy", + "CBy", + { noremap = true, silent = true, desc = "[y]ank content of Commentbox" } + ), + vim.keymap.set( + "v", + "cy", + "CBy", + { noremap = true, silent = true, desc = "[y]ank content of Commentbox" } + ), + + vim.keymap.set( + "n", + "cb", + "CBlabox1", + { noremap = true, silent = true, desc = "[c]reate comment [b]ox" } + ), + vim.keymap.set( + "v", + "cb", + "CBlabox1", + { noremap = true, silent = true, desc = "[c]reate comment [b]ox" } + ), + vim.keymap.set( + "n", + "cB", + "CBcabox1", + { noremap = true, silent = true, desc = "[c]reate comment [b]ox (centered)" } + ), + + vim.keymap.set( + "v", + "cB", + "CBcabox1", + { noremap = true, silent = true, desc = "[c]reate comment [b]ox (centered)" } + ), + vim.keymap.set( + "n", + "cc", + "CBllbox14", + { noremap = true, silent = true, desc = "[c]reate [c]omment" } + ), + vim.keymap.set( + "v", + "cc", + "CBllbox14", + { noremap = true, silent = true, desc = "[c]reate [c]omment" } + ), + vim.keymap.set( + "n", + "cC", + "CBclbox14", + { noremap = true, silent = true, desc = "[c]reate [c]omment (C)entered" } + ), + vim.keymap.set( + "v", + "cC", + "CBclbox14", + { noremap = true, silent = true, desc = "[c]reate [c]omment (C)entered" } + ), + + vim.keymap.set( + "n", + "cl", + "CBllline8", + { noremap = true, silent = true, desc = "[c]reate comment [l]ine" } + ), + vim.keymap.set( + "n", + "cL", + "CBlcline8", + { 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" }, + { "", 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 = { + { + "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", "sm", ":ScissorsEditSnippet"), + vim.keymap.set("v", "sa", ":ScissorsAddNewSnippet"), + }, +} diff --git a/lua/pika/plugins/scissors.lua b/lua/pika/plugins/scissors.lua deleted file mode 100644 index 83bb295..0000000 --- a/lua/pika/plugins/scissors.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - { - "chrisgrieser/nvim-scissors", - lazy = false, - dependencies = { "nvim-telescope/telescope.nvim", "garymjr/nvim-snippets" }, - opts = { - snippetDir = "~/.config/nvim/snippets", - }, - }, - vim.keymap.set("n", "sm", ":ScissorsEditSnippet"), - vim.keymap.set("v", "sa", ":ScissorsAddNewSnippet"), -} diff --git a/lua/pika/plugins/slimline.lua b/lua/pika/plugins/slimline.lua deleted file mode 100644 index 07a16b0..0000000 --- a/lua/pika/plugins/slimline.lua +++ /dev/null @@ -1,64 +0,0 @@ -return { - -- Calls `require('slimline').setup({})` - "sschleemilch/slimline.nvim", - opts = { - bold = true, -- makes primary parts and mode bold - verbose_mode = false, -- Mode as single letter or as a word - style = "bg", -- or "fg". Whether highlights should be applied to bg or fg of components - mode_follow_style = true, -- Whether the mode color components should follow the style option - components = { -- Choose components and their location - left = { - "mode", - -- "path", - -- "git", - }, - center = { - "path", - "git", - }, - right = { - "diagnostics", - "filetype_lsp", - "progress", - }, - }, - spaces = { - components = " ", -- string between components - left = " ", -- string at the start of the line - right = " ", -- string at the end of the line - }, - sep = { - hide = { - first = false, -- hides the first separator - last = false, -- hides the last separator - }, - left = "", -- left separator of components - right = "", -- right separator of components - }, - hl = { - modes = { - normal = "Type", -- highlight base of modes - insert = "Function", - pending = "Boolean", - visual = "Keyword", - command = "String", - }, - base = "Comment", -- highlight of everything in in between components - primary = "Normal", -- highlight of primary parts (e.g. filename) - secondary = "Comment", -- highlight of secondary parts (e.g. filepath) - }, - icons = { - diagnostics = { - ERROR = " ", - WARN = " ", - HINT = " ", - INFO = " ", - }, - git = { - branch = "", - }, - folder = " ", - lines = " ", - }, - }, -} diff --git a/lua/pika/plugins/ui.lua b/lua/pika/plugins/ui.lua new file mode 100644 index 0000000..be74965 --- /dev/null +++ b/lua/pika/plugins/ui.lua @@ -0,0 +1,280 @@ +return { + -- ╭───────────────────────────────────────╮ + -- │ bufferline - for mistakes and stuff.. │ + -- ╰───────────────────────────────────────╯ + { + "akinsho/bufferline.nvim", + dependencies = { "echasnovski/mini.icons" }, + version = "*", + opts = { + options = { + diagnostics = "nvim_lsp", + diagnostics_update_on_event = true, -- use nvim's diagnostic handler + diagnostics_indicator = function(count, level) + local icon = level:match("error") and " " or " " + return " " .. icon .. count + end, + offsets = { { filetype = "neo-tree", text = "File Explorer", highlight = "Directory" } }, + -- ─< style >─────────────────────────────────────────────────────────────────────────── + indicator = { + icon = "▎", -- this should be omitted if indicator style is not 'icon' + style = "icon", + }, + move_wraps_at_ends = true, -- whether or not the move command "wraps" at the first or last position + separator_style = "slope", + -- ─< icons >─────────────────────────────────────────────────────────────────────────── + modified_icon = "󱞇", + left_trunc_marker = "󰬩", + right_trunc_marker = "󰬫", + themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default + close_icon = "󱄊", + buffer_close_icon = "󱄊", + show_buffer_icons = true, -- disable filetype icons for buffers + show_buffer_close_icons = true, + show_close_icon = true, + show_tab_indicators = true, + hover = { + enabled = true, + delay = 80, + reveal = { "close" }, + hide = { "nvim_lsp" }, + }, + -- You can set buffer_mode to "list" or "tabbed" based on your preference. + buffer_mode = "list", + color_icons = true, -- whether or not to add the filetype icon highlights + }, + }, + config = function(_, opts) + require("bufferline").setup(opts) + -- Remap the tab key for buffer navigation (you can adjust the keys as needed) + vim.keymap.set("n", "", "BufferLineCycleNext") + vim.keymap.set("n", "", "BufferLineCyclePrev") + end, + }, + -- ╭───────────────────────────────────╮ + -- │ cmdline - for nice command inputs │ + -- ╰───────────────────────────────────╯ + { + "VonHeikemen/fine-cmdline.nvim", + dependencies = { + { "MunifTanjim/nui.nvim" }, + }, + config = function() + require("fine-cmdline").setup({ + cmdline = { + enable_keymaps = true, + smart_history = true, + prompt = " ", + }, + popup = { + position = { + row = "10%", + col = "50%", + }, + size = { + width = "60%", + }, + border = { + style = "rounded", + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + }) + end, + vim.api.nvim_set_keymap("n", ":", "FineCmdline", { noremap = true }), + vim.keymap.set("n", "T", "FineCmdline"), + }, + + -- ╭───────────────────────────────────────╮ + -- │ barbecue - for a nice breadcrump menu │ + -- ╰───────────────────────────────────────╯ + { + "utilyre/barbecue.nvim", + name = "barbecue", + version = "*", + dependencies = { + "SmiteshP/nvim-navic", + "echasnovski/mini.icons", -- optional dependency + }, + opts = { + theme = { + -- this highlight is used to override other highlights + -- you can take advantage of its `bg` and set a background throughout your winbar + -- (e.g. basename will look like this: { fg = "#c0caf5", bold = true }) + normal = { fg = "#c0caf5" }, + + -- these highlights correspond to symbols table from config + ellipsis = { fg = "#737aa2" }, + separator = { fg = "#737aa2" }, + modified = { fg = "#737aa2" }, + + -- these highlights represent the _text_ of three main parts of barbecue + dirname = { fg = "#737aa2" }, + basename = { bold = true }, + context = {}, + + -- these highlights are used for context/navic icons + context_file = { fg = "#ac8fe4" }, + context_module = { fg = "#ac8fe4" }, + context_namespace = { fg = "#ac8fe4" }, + context_package = { fg = "#ac8fe4" }, + context_class = { fg = "#ac8fe4" }, + context_method = { fg = "#ac8fe4" }, + context_property = { fg = "#ac8fe4" }, + context_field = { fg = "#ac8fe4" }, + context_constructor = { fg = "#ac8fe4" }, + context_enum = { fg = "#ac8fe4" }, + context_interface = { fg = "#ac8fe4" }, + context_function = { fg = "#ac8fe4" }, + context_variable = { fg = "#ac8fe4" }, + context_constant = { fg = "#ac8fe4" }, + context_string = { fg = "#ac8fe4" }, + context_number = { fg = "#ac8fe4" }, + context_boolean = { fg = "#ac8fe4" }, + context_array = { fg = "#ac8fe4" }, + context_object = { fg = "#ac8fe4" }, + context_key = { fg = "#ac8fe4" }, + context_null = { fg = "#ac8fe4" }, + context_enum_member = { fg = "#ac8fe4" }, + context_struct = { fg = "#ac8fe4" }, + context_event = { fg = "#ac8fe4" }, + context_operator = { fg = "#ac8fe4" }, + context_type_parameter = { fg = "#ac8fe4" }, + }, + }, + }, + -- ╭─────────────────────────────────╮ + -- │ indentlines - nice indent lines │ + -- ╰─────────────────────────────────╯ + { + "lukas-reineke/indent-blankline.nvim", + event = { "BufReadPre", "BufNewFile" }, + main = "ibl", + opts = { + indent = { + char = "┊", + tab_char = "┊", + -- char = "│", + -- tab_char = "│", + }, + }, + }, + -- ╭────────────────────────────────────╮ + -- │ notify for excellent notifications │ + -- ╰────────────────────────────────────╯ + { + "rcarriga/nvim-notify", + config = function() + require("notify").setup({ + stages = "slide", + background_colour = "FloatShadow", + max_width = 120, + timeout = 2750, + render = "wrapped-compact", + -- Minimum/Maximum width for notification windows + minimum_width = 30, + maximum_width = 120, + + -- Function called when a new window is opened, use for changing win settings/config + on_open = nil, + + -- Function called when a window is closed + on_close = nil, + icons = { + ERROR = "", -- alternate symbol  + WARN = "", + INFO = "", + DEBUG = "", + TRACE = "", + }, + }) + vim.notify = require("notify") + end, + }, + -- ╭──────────────────────────────╮ + -- │ slimline - nice bar for nvim │ + -- ╰──────────────────────────────╯ + { + -- Calls `require('slimline').setup({})` + "sschleemilch/slimline.nvim", + opts = { + bold = true, -- makes primary parts and mode bold + verbose_mode = false, -- Mode as single letter or as a word + style = "bg", -- or "fg". Whether highlights should be applied to bg or fg of components + mode_follow_style = true, -- Whether the mode color components should follow the style option + components = { -- Choose components and their location + left = { + "mode", + -- "path", + -- "git", + }, + center = { + "path", + "git", + }, + right = { + "diagnostics", + "filetype_lsp", + "progress", + }, + }, + spaces = { + components = " ", -- string between components + left = " ", -- string at the start of the line + right = " ", -- string at the end of the line + }, + sep = { + hide = { + first = false, -- hides the first separator + last = false, -- hides the last separator + }, + left = "", -- left separator of components + right = "", -- right separator of components + }, + hl = { + modes = { + normal = "Type", -- highlight base of modes + insert = "Function", + pending = "Boolean", + visual = "Keyword", + command = "String", + }, + base = "Comment", -- highlight of everything in in between components + primary = "Normal", -- highlight of primary parts (e.g. filename) + secondary = "Comment", -- highlight of secondary parts (e.g. filepath) + }, + icons = { + diagnostics = { + ERROR = " ", + WARN = " ", + HINT = " ", + INFO = " ", + }, + git = { + branch = "", + }, + folder = " ", + lines = " ", + }, + }, + }, + + -- ╭────────────────────────────────────────╮ + -- │ which key - to know what to press next │ + -- ╰────────────────────────────────────────╯ + { + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 350 + end, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, + }, +} diff --git a/lua/pika/plugins/which-key.lua b/lua/pika/plugins/which-key.lua deleted file mode 100644 index 809447f..0000000 --- a/lua/pika/plugins/which-key.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - "folke/which-key.nvim", - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 350 - end, - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - }, -}