From 8c9e74223521db0e4d9ea01ef22ff5368d4c2543 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 17 Mar 2025 14:46:14 +0100 Subject: [PATCH 01/67] rem: removed old and unneedet config --- init.lua | 35 ------------------ lua/pika/plugins/avante-ai.lua | 59 ------------------------------- lua/pika/plugins/cmd-line.lua | 41 --------------------- lua/pika/plugins/colorschemes.lua | 23 ------------ 4 files changed, 158 deletions(-) delete mode 100644 lua/pika/plugins/avante-ai.lua delete mode 100644 lua/pika/plugins/cmd-line.lua 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/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/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/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 = { From 600a7163fa6a65cc9442d09b560377fbeb572918 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 17 Mar 2025 15:04:08 +0100 Subject: [PATCH 02/67] restructure: removed unneedet plugins and made structured files for it --- lua/pika/plugins/autopairs.lua | 30 --- lua/pika/plugins/barbecue.lua | 55 ------ lua/pika/plugins/bufferline.lua | 49 ----- lua/pika/plugins/colorizer.lua | 72 ------- lua/pika/plugins/comment-box.lua | 40 ---- lua/pika/plugins/comment.lua | 19 -- lua/pika/plugins/flash.lua | 15 -- lua/pika/plugins/grug-far.lua | 22 --- lua/pika/plugins/indent-blankline.lua | 13 -- lua/pika/plugins/notify.lua | 29 --- lua/pika/plugins/qol.lua | 263 ++++++++++++++++++++++++++ lua/pika/plugins/scissors.lua | 12 -- lua/pika/plugins/slimline.lua | 64 ------- lua/pika/plugins/ui.lua | 245 ++++++++++++++++++++++++ lua/pika/plugins/which-key.lua | 13 -- 15 files changed, 508 insertions(+), 433 deletions(-) delete mode 100644 lua/pika/plugins/autopairs.lua delete mode 100644 lua/pika/plugins/barbecue.lua delete mode 100644 lua/pika/plugins/bufferline.lua delete mode 100644 lua/pika/plugins/colorizer.lua delete mode 100644 lua/pika/plugins/comment-box.lua delete mode 100644 lua/pika/plugins/comment.lua delete mode 100644 lua/pika/plugins/flash.lua delete mode 100644 lua/pika/plugins/grug-far.lua delete mode 100644 lua/pika/plugins/indent-blankline.lua delete mode 100644 lua/pika/plugins/notify.lua create mode 100644 lua/pika/plugins/qol.lua delete mode 100644 lua/pika/plugins/scissors.lua delete mode 100644 lua/pika/plugins/slimline.lua create mode 100644 lua/pika/plugins/ui.lua delete mode 100644 lua/pika/plugins/which-key.lua 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/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/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/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..969fe37 --- /dev/null +++ b/lua/pika/plugins/ui.lua @@ -0,0 +1,245 @@ +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, + }, + + -- ╭───────────────────────────────────────╮ + -- │ 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 - }, -} From 37c84420c111f92e45126ba0156dbe41ecf9c440 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 17 Mar 2025 15:14:06 +0100 Subject: [PATCH 03/67] restructure: removed some files, addet qol and ui for better distinguishability --- lua/pika/plugins/autopairs.lua | 30 -- lua/pika/plugins/barbecue.lua | 55 ---- lua/pika/plugins/bufferline.lua | 49 --- lua/pika/plugins/cmd-line.lua | 41 --- lua/pika/plugins/colorizer.lua | 72 ----- lua/pika/plugins/comment-box.lua | 40 --- lua/pika/plugins/comment.lua | 19 -- lua/pika/plugins/flash.lua | 15 - lua/pika/plugins/grug-far.lua | 22 -- lua/pika/plugins/indent-blankline.lua | 13 - lua/pika/plugins/{ => lsp}/nvim-cmp.lua | 0 .../nvim-treesitter-text-objects.lua | 0 lua/pika/plugins/{ => lsp}/treesitter.lua | 0 lua/pika/plugins/notify.lua | 29 -- lua/pika/plugins/qol.lua | 263 +++++++++++++++ lua/pika/plugins/scissors.lua | 12 - lua/pika/plugins/slimline.lua | 64 ---- lua/pika/plugins/surround.lua | 6 - lua/pika/plugins/ui.lua | 302 ++++++++++++++++++ lua/pika/plugins/which-key.lua | 13 - 20 files changed, 565 insertions(+), 480 deletions(-) delete mode 100644 lua/pika/plugins/autopairs.lua delete mode 100644 lua/pika/plugins/barbecue.lua delete mode 100644 lua/pika/plugins/bufferline.lua delete mode 100644 lua/pika/plugins/cmd-line.lua delete mode 100644 lua/pika/plugins/colorizer.lua delete mode 100644 lua/pika/plugins/comment-box.lua delete mode 100644 lua/pika/plugins/comment.lua delete mode 100644 lua/pika/plugins/flash.lua delete mode 100644 lua/pika/plugins/grug-far.lua delete mode 100644 lua/pika/plugins/indent-blankline.lua rename lua/pika/plugins/{ => lsp}/nvim-cmp.lua (100%) rename lua/pika/plugins/{ => lsp}/nvim-treesitter-text-objects.lua (100%) rename lua/pika/plugins/{ => lsp}/treesitter.lua (100%) delete mode 100644 lua/pika/plugins/notify.lua create mode 100644 lua/pika/plugins/qol.lua delete mode 100644 lua/pika/plugins/scissors.lua delete mode 100644 lua/pika/plugins/slimline.lua delete mode 100644 lua/pika/plugins/surround.lua create mode 100644 lua/pika/plugins/ui.lua delete mode 100644 lua/pika/plugins/which-key.lua 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/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/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/nvim-cmp.lua b/lua/pika/plugins/lsp/nvim-cmp.lua similarity index 100% rename from lua/pika/plugins/nvim-cmp.lua rename to lua/pika/plugins/lsp/nvim-cmp.lua diff --git a/lua/pika/plugins/nvim-treesitter-text-objects.lua b/lua/pika/plugins/lsp/nvim-treesitter-text-objects.lua similarity index 100% rename from lua/pika/plugins/nvim-treesitter-text-objects.lua rename to lua/pika/plugins/lsp/nvim-treesitter-text-objects.lua diff --git a/lua/pika/plugins/treesitter.lua b/lua/pika/plugins/lsp/treesitter.lua similarity index 100% rename from lua/pika/plugins/treesitter.lua rename to lua/pika/plugins/lsp/treesitter.lua 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/surround.lua b/lua/pika/plugins/surround.lua deleted file mode 100644 index 77f5073..0000000 --- a/lua/pika/plugins/surround.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "kylechui/nvim-surround", - event = { "BufReadPre", "BufNewFile" }, - version = "*", -- Use for stability; omit to use `main` branch for the latest features - config = true, -} diff --git a/lua/pika/plugins/ui.lua b/lua/pika/plugins/ui.lua new file mode 100644 index 0000000..6215f69 --- /dev/null +++ b/lua/pika/plugins/ui.lua @@ -0,0 +1,302 @@ +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", + }, + }, + hooks = { + before_mount = function(input) + -- code + end, + after_mount = function(input) + -- code + end, + set_keymaps = function(imap, feedkeys) + -- code + end, + }, + }) + end, + }, + + -- ╭───────────────────────────────────────╮ + -- │ 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 = "│", + }, + }, + }, + + -- ╭──────────────────╮ + -- │ markdown plugins │ + -- ╰──────────────────╯ + { + "MeanderingProgrammer/render-markdown.nvim", + opts = {}, + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite + dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.icons" }, -- if you use standalone mini plugins + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons + }, + + -- ╭────────────────────────────────────╮ + -- │ 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 - }, -} From 51a6f4f2497528820855c7ef3f8830e0438b2078 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 17 Mar 2025 17:43:31 +0100 Subject: [PATCH 04/67] add: addet keymap to insert command output directly --- lua/pika/core/keymaps.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index 633eb1c..0a54da3 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -61,3 +61,22 @@ map("n", "R", [[:%s/\<\>//gI]]) -- window management map("n", "sv", "v", { desc = "Split window vertically" }) -- split window vertically map("n", "sh", "s", { desc = "Split window horizontally" }) -- split window horizontally + +vim.keymap.set({ "n", "v" }, "tt", function() + -- Frage den Shell-Command ab + vim.ui.input({ prompt = "Shell Command: " }, function(cmd) + if cmd == nil or cmd == "" then + return + end + + local handle = io.popen(cmd) + local result = handle:read("*a") + handle:close() + + local lines = vim.split(result, "\n", { trimempty = true }) + + -- Einfügen an Cursor-Position + local row, col = unpack(vim.api.nvim_win_get_cursor(0)) + vim.api.nvim_buf_set_lines(0, row, row, false, lines) + end) +end, { desc = "Insert Shell Output at Cursor" }) From c163136c6f047804e8455285ae61bf90dc7f687e Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 17 Mar 2025 18:16:22 +0100 Subject: [PATCH 05/67] . --- lua/pika/core/keymaps.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index 0a54da3..e24df43 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -62,20 +62,24 @@ map("n", "R", [[:%s/\<\>//gI]]) map("n", "sv", "v", { desc = "Split window vertically" }) -- split window vertically map("n", "sh", "s", { desc = "Split window horizontally" }) -- split window horizontally -vim.keymap.set({ "n", "v" }, "tt", function() +vim.keymap.set({ "n", "i" }, "tt", function() -- Frage den Shell-Command ab vim.ui.input({ prompt = "Shell Command: " }, function(cmd) if cmd == nil or cmd == "" then return end - local handle = io.popen(cmd) - local result = handle:read("*a") - handle:close() + local result = vim.fn.system(cmd) + local exit_code = vim.v.shell_error + + if exit_code ~= 0 then + vim.notify("Shell Error:\n" .. result, vim.log.levels.ERROR, { title = "Shell Command Failed" }) + return + end local lines = vim.split(result, "\n", { trimempty = true }) - -- Einfügen an Cursor-Position + -- Insert at cursor position local row, col = unpack(vim.api.nvim_win_get_cursor(0)) vim.api.nvim_buf_set_lines(0, row, row, false, lines) end) From 2d8f9c127b9573271e4c043f8156a3c31194e422 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 17 Mar 2025 18:54:25 +0100 Subject: [PATCH 06/67] fix: addet keymaps for cmdline directly into the plugin file --- lua/pika/core/keymaps.lua | 4 ---- lua/pika/plugins/ui.lua | 24 +++++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index e24df43..6f205cd 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/ui.lua b/lua/pika/plugins/ui.lua index 6215f69..797645d 100644 --- a/lua/pika/plugins/ui.lua +++ b/lua/pika/plugins/ui.lua @@ -82,19 +82,21 @@ return { 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, - }, + -- hooks = { + -- before_mount = function(input) + -- -- code + -- end, + -- after_mount = function(input) + -- -- code + -- end, + -- set_keymaps = function(imap, feedkeys) + -- -- code + -- end, + -- }, }) end, + vim.api.nvim_set_keymap("n", ":", "FineCmdline", { noremap = true }), + vim.keymap.set("n", "T", "FineCmdline"), }, -- ╭───────────────────────────────────────╮ From d803c6ad5342f2609f01527b1d0e3efed9b4553d Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 17 Mar 2025 18:57:09 +0100 Subject: [PATCH 07/67] fix: addet keymaps for cmdline directly into the plugin file --- lua/pika/core/keymaps.lua | 4 ---- lua/pika/plugins/ui.lua | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) 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/ui.lua b/lua/pika/plugins/ui.lua index 969fe37..be74965 100644 --- a/lua/pika/plugins/ui.lua +++ b/lua/pika/plugins/ui.lua @@ -51,6 +51,41 @@ return { 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 │ From 5bebc11dcbd60e145fac25b0fc828f3bc2cdb3c3 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 20 Mar 2025 18:37:24 +0100 Subject: [PATCH 08/67] fix: gitsigns line --- lua/pika/plugins/git.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pika/plugins/git.lua b/lua/pika/plugins/git.lua index ace065d..b6cfc5c 100644 --- a/lua/pika/plugins/git.lua +++ b/lua/pika/plugins/git.lua @@ -174,7 +174,7 @@ return { signs_staged_enable = true, signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` numhl = true, -- Toggle with `:Gitsigns toggle_numhl` - linehl = true, -- Toggle with `:Gitsigns toggle_linehl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` watch_gitdir = { follow_files = true, From 6822a716853ba9a8d2345a3583000ca378b22653 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 22 Mar 2025 10:57:30 +0100 Subject: [PATCH 09/67] fix: when using cursor or vscode, use only keymap settings, else use everything --- init.lua | 81 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/init.lua b/init.lua index 68f2a4d..13aae1b 100644 --- a/init.lua +++ b/init.lua @@ -1,44 +1,53 @@ -require("pika.core") -require("pika.lazy") +if vim.g.vscode then + require("pika.core") +else + require("pika.core") + require("pika.lazy") --- ─< Call the function to set the desired colorscheme >──────────────────────────────── --- ╭──────────────────────────────────────────────────────╮ --- │ themes are under ./lua/pika/plugins/colorschemes.lua │ --- ╰──────────────────────────────────────────────────────╯ + -- ─< Call the function to set the desired colorscheme >──────────────────────────────── + -- ╭──────────────────────────────────────────────────────╮ + -- │ themes are under ./lua/pika/plugins/colorschemes.lua │ + -- ╰──────────────────────────────────────────────────────╯ -vim.cmd.colorscheme("oldschool") + 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 }) + -- 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 + 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") + -- 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") + -- 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 - - 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 From cc73f3754df54d2138cc14df12571158432474f0 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 23 Mar 2025 13:02:12 +0100 Subject: [PATCH 10/67] made it not transparent --- lua/pika/plugins/colorschemes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index d977b29..d18bdd8 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -49,7 +49,7 @@ return { name = "cyberdream", lazy = false, opts = { - transparent = true, + transparent = false, hide_fillchars = true, terminal_colors = true, }, From b2214571048854dbed7f8660cfbce77470c96689 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 24 Mar 2025 15:41:29 +0100 Subject: [PATCH 11/67] feat: inline insert if only one line --- lua/pika/core/keymaps.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index 6f205cd..69fc905 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -77,6 +77,13 @@ vim.keymap.set({ "n", "i" }, "tt", function() -- Insert at cursor position local row, col = unpack(vim.api.nvim_win_get_cursor(0)) - vim.api.nvim_buf_set_lines(0, row, row, false, lines) + if #lines == 1 then + -- Insert inline if the result is a single line + local current_line = vim.api.nvim_get_current_line() + local new_line = current_line:sub(1, col) .. lines[1] .. current_line:sub(col + 1) + vim.api.nvim_set_current_line(new_line) + else + vim.api.nvim_buf_set_lines(0, row, row, false, lines) + end end) end, { desc = "Insert Shell Output at Cursor" }) From 96b01584c5c31bbb08e731125e1f8b7462a4b358 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 27 Mar 2025 10:09:00 +0100 Subject: [PATCH 12/67] change: changed from nvimcmp to blinkcmp in one file with lsp configs (have two files for either blink or nvim-cmp) --- lua/pika/plugins/lsp/blink-cmp.lua | 440 ++++++++++++++++++ lua/pika/plugins/lsp/lspconfig.lua | 132 ------ .../lsp/{nvim-cmp.lua => nvim-cmp.lua.bak} | 132 ++++++ 3 files changed, 572 insertions(+), 132 deletions(-) create mode 100644 lua/pika/plugins/lsp/blink-cmp.lua delete mode 100644 lua/pika/plugins/lsp/lspconfig.lua rename lua/pika/plugins/lsp/{nvim-cmp.lua => nvim-cmp.lua.bak} (51%) diff --git a/lua/pika/plugins/lsp/blink-cmp.lua b/lua/pika/plugins/lsp/blink-cmp.lua new file mode 100644 index 0000000..a0e3b74 --- /dev/null +++ b/lua/pika/plugins/lsp/blink-cmp.lua @@ -0,0 +1,440 @@ +return { + -- ╭───────────╮ + -- │ blink.cmp │ + -- ╰───────────╯ + { + "saghen/blink.cmp", + -- optional: provides snippets for the snippet source + dependencies = { "rafamadriz/friendly-snippets" }, + + -- use a release tag to download pre-built binaries + version = "1.*", + -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust + -- build = 'cargo build --release', + -- If you use nix, you can build from source using latest nightly rust with: + -- build = 'nix run .#build-plugin', + + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) + -- 'super-tab' for mappings similar to vscode (tab to accept) + -- 'enter' for enter to accept + -- 'none' for no mappings + -- + -- All presets have the following mappings: + -- C-space: Open menu or open docs if already open + -- C-n/C-p or Up/Down: Select next/previous item + -- C-e: Hide menu + -- C-k: Toggle signature help (if signature.enabled = true) + -- + -- See :h blink-cmp-config-keymap for defining your own keymap + keymap = { + -- set to 'none' to disable the 'default' preset + preset = "super-tab", + + [""] = { "select_prev", "fallback" }, + [""] = { "select_next", "fallback" }, + [""] = { "hide", "fallback" }, + + -- disable a keymap from the preset + [""] = {}, + [""] = {}, + [""] = {}, + + -- show with a list of providers + -- [""] = { + -- function(cmp) + -- cmp.show({ providers = { "snippets" } }) + -- end, + -- }, + + -- control whether the next command will be run when using a function + -- [""] = { + -- function(cmp) + -- if some_condition then + -- return + -- end -- runs the next command + -- return true -- doesn't run the next command + -- end, + -- "select_next", + -- }, + }, + + appearance = { + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- Adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", + + highlight_ns = vim.api.nvim_create_namespace("blink_cmp"), + -- Sets the fallback highlight groups to nvim-cmp's highlight groups + -- Useful for when your theme doesn't support blink.cmp + -- Will be removed in a future release + + use_nvim_cmp_as_default = true, + }, + + -- (Default) Only show the documentation popup when manually triggered + completion = { + documentation = { + auto_show = false, + auto_show_delay_ms = 230, + update_delay_ms = 50, + treesitter_highlighting = false, + draw = function(opts) + opts.default_implementation() + end, + window = { + min_width = 16, + max_width = 80, + max_height = 24, + border = "padded", -- Defaults to `vim.o.winborder` on nvim 0.11+ or 'padded' when not defined/<=0.10 + winblend = 0, + winhighlight = "Normal:BlinkCmpDoc,FloatBorder:BlinkCmpDocBorder,EndOfBuffer:BlinkCmpDoc", + -- Note that the gutter will be disabled when border ~= 'none' + scrollbar = true, + }, + }, + ghost_text = { + enabled = true, + show_with_selection = true, + show_without_selection = true, + show_with_menu = true, + show_without_menu = true, + }, + + -- ─────────────────────────────────< mini-icons config >────────────────────────────── + menu = { + draw = { + columns = { { "kind_icon" }, { "label", gap = 1 } }, + components = { + label = { + text = function(ctx) + return require("colorful-menu").blink_components_text(ctx) + end, + highlight = function(ctx) + return require("colorful-menu").blink_components_highlight(ctx) + end, + }, + kind_icon = { + text = function(ctx) + local kind_icon, _, _ = require("mini.icons").get("lsp", ctx.kind) + return kind_icon + end, + -- (optional) use highlights from mini.icons + highlight = function(ctx) + local _, hl, _ = require("mini.icons").get("lsp", ctx.kind) + return hl + end, + }, + + -- kind = { + -- -- (optional) use highlights from mini.icons + -- highlight = function(ctx) + -- local _, hl, _ = require("mini.icons").get("lsp", ctx.kind) + -- return hl + -- end, + -- }, + }, + }, + }, + }, + + -- Default list of enabled providers defined so that you can extend it + -- elsewhere in your config, without redefining it, due to `opts_extend` + sources = { + default = { "lsp", "path", "snippets", "buffer" }, + }, + + -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance + -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, + -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` + -- + -- See the fuzzy documentation for more information + fuzzy = { implementation = "prefer_rust" }, + }, + opts_extend = { "sources.default" }, + }, + + -- ─────────────────────────────────< colorful menu.nvim >───────────────────────────────── + { + "xzbdmw/colorful-menu.nvim", + opts = { + { + ls = { + lua_ls = { + -- Maybe you want to dim arguments a bit. + arguments_hl = "@comment", + }, + gopls = { + -- By default, we render variable/function's type in the right most side, + -- to make them not to crowd together with the original label. + + -- when true: + -- foo *Foo + -- ast "go/ast" + + -- when false: + -- foo *Foo + -- ast "go/ast" + align_type_to_right = true, + -- When true, label for field and variable will format like "foo: Foo" + -- instead of go's original syntax "foo Foo". If align_type_to_right is + -- true, this option has no effect. + add_colon_before_type = false, + -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36 + preserve_type_when_truncate = true, + }, + -- for lsp_config or typescript-tools + ts_ls = { + -- false means do not include any extra info, + -- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42 + extra_info_hl = "@comment", + }, + vtsls = { + -- false means do not include any extra info, + -- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42 + extra_info_hl = "@comment", + }, + ["rust-analyzer"] = { + -- Such as (as Iterator), (use std::io). + extra_info_hl = "@comment", + -- Similar to the same setting of gopls. + align_type_to_right = true, + -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36 + preserve_type_when_truncate = true, + }, + clangd = { + -- Such as "From ". + extra_info_hl = "@comment", + -- Similar to the same setting of gopls. + align_type_to_right = true, + -- the hl group of leading dot of "•std::filesystem::permissions(..)" + import_dot_hl = "@comment", + -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36 + preserve_type_when_truncate = true, + }, + zls = { + -- Similar to the same setting of gopls. + align_type_to_right = true, + }, + roslyn = { + extra_info_hl = "@comment", + }, + dartls = { + extra_info_hl = "@comment", + }, + -- The same applies to pyright/pylance + basedpyright = { + -- It is usually import path such as "os" + extra_info_hl = "@comment", + }, + -- If true, try to highlight "not supported" languages. + fallback = true, + -- this will be applied to label description for unsupport languages + fallback_extra_info_hl = "@comment", + }, + -- If the built-in logic fails to find a suitable highlight group for a label, + -- this highlight is applied to the label. + fallback_highlight = "@variable", + -- If provided, the plugin truncates the final displayed text to + -- this width (measured in display cells). Any highlights that extend + -- beyond the truncation point are ignored. When set to a float + -- between 0 and 1, it'll be treated as percentage of the width of + -- the window: math.floor(max_width * vim.api.nvim_win_get_width(0)) + -- Default 60. + max_width = 60, + }, + }, + -- config = function() + -- -- You don't need to set these options. + -- require("colorful-menu").setup({ + -- ls = { + -- lua_ls = { + -- -- Maybe you want to dim arguments a bit. + -- arguments_hl = "@comment", + -- }, + -- gopls = { + -- -- By default, we render variable/function's type in the right most side, + -- -- to make them not to crowd together with the original label. + -- + -- -- when true: + -- -- foo *Foo + -- -- ast "go/ast" + -- + -- -- when false: + -- -- foo *Foo + -- -- ast "go/ast" + -- align_type_to_right = true, + -- -- When true, label for field and variable will format like "foo: Foo" + -- -- instead of go's original syntax "foo Foo". If align_type_to_right is + -- -- true, this option has no effect. + -- add_colon_before_type = false, + -- -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36 + -- preserve_type_when_truncate = true, + -- }, + -- -- for lsp_config or typescript-tools + -- ts_ls = { + -- -- false means do not include any extra info, + -- -- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42 + -- extra_info_hl = "@comment", + -- }, + -- vtsls = { + -- -- false means do not include any extra info, + -- -- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42 + -- extra_info_hl = "@comment", + -- }, + -- ["rust-analyzer"] = { + -- -- Such as (as Iterator), (use std::io). + -- extra_info_hl = "@comment", + -- -- Similar to the same setting of gopls. + -- align_type_to_right = true, + -- -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36 + -- preserve_type_when_truncate = true, + -- }, + -- clangd = { + -- -- Such as "From ". + -- extra_info_hl = "@comment", + -- -- Similar to the same setting of gopls. + -- align_type_to_right = true, + -- -- the hl group of leading dot of "•std::filesystem::permissions(..)" + -- import_dot_hl = "@comment", + -- -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36 + -- preserve_type_when_truncate = true, + -- }, + -- zls = { + -- -- Similar to the same setting of gopls. + -- align_type_to_right = true, + -- }, + -- roslyn = { + -- extra_info_hl = "@comment", + -- }, + -- dartls = { + -- extra_info_hl = "@comment", + -- }, + -- -- The same applies to pyright/pylance + -- basedpyright = { + -- -- It is usually import path such as "os" + -- extra_info_hl = "@comment", + -- }, + -- -- If true, try to highlight "not supported" languages. + -- fallback = true, + -- -- this will be applied to label description for unsupport languages + -- fallback_extra_info_hl = "@comment", + -- }, + -- -- If the built-in logic fails to find a suitable highlight group for a label, + -- -- this highlight is applied to the label. + -- fallback_highlight = "@variable", + -- -- If provided, the plugin truncates the final displayed text to + -- -- this width (measured in display cells). Any highlights that extend + -- -- beyond the truncation point are ignored. When set to a float + -- -- between 0 and 1, it'll be treated as percentage of the width of + -- -- the window: math.floor(max_width * vim.api.nvim_win_get_width(0)) + -- -- Default 60. + -- max_width = 60, + -- }) + -- end, + }, + -- ╭───────────╮ + -- │ lspconfig │ + -- ╰───────────╯ + { + "neovim/nvim-lspconfig", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + { "saghen/blink.cmp" }, + { "antosha417/nvim-lsp-file-operations", config = true }, + { "folke/neodev.nvim", opts = {} }, + }, + + config = function() + local lspconfig = require("lspconfig") + local capabilities = require("blink.cmp").get_lsp_capabilities() + local mason_lspconfig = require("mason-lspconfig") + + -- Change the Diagnostic symbols in the sign column (gutter) + -- (not in youtube nvim video) + local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) + end + + mason_lspconfig.setup_handlers({ + function(server_name) + lspconfig[server_name].setup({ + capabilities = capabilities, + }) + end, + ["svelte"] = function() + lspconfig["svelte"].setup({ + capabilities = capabilities, + on_attach = function(client, bufnr) + vim.api.nvim_create_autocmd("BufWritePost", { + pattern = { "*.js", "*.ts" }, + callback = function(ctx) + client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match }) + end, + }) + end, + }) + end, + ["graphql"] = function() + lspconfig["graphql"].setup({ + capabilities = capabilities, + filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" }, + }) + end, + ["emmet_ls"] = function() + lspconfig["emmet_ls"].setup({ + capabilities = capabilities, + filetypes = { + "html", + "typescriptreact", + "javascriptreact", + "css", + "sass", + "scss", + "less", + "svelte", + }, + }) + end, + ["lua_ls"] = function() + lspconfig["lua_ls"].setup({ + capabilities = capabilities, + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + completion = { + callSnippet = "Replace", + }, + }, + }, + }) + end, + ["cssls"] = function() + lspconfig["cssls"].setup({ + capabilities = capabilities, + filetypes = { "css", "scss" }, + }) + end, + ["intelephense"] = function() + lspconfig["intelephense"].setup({ + capabilities = capabilities, + filetypes = { "php", "blade.php" }, + }) + end, + -- ["tsserver"] = function() + -- -- Replace tsserver with typescript-language-server + -- lspconfig["typescript-language-server"].setup({ + -- capabilities = capabilities, + -- filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact" }, + -- }) + -- end, + }) + end, + }, +} diff --git a/lua/pika/plugins/lsp/lspconfig.lua b/lua/pika/plugins/lsp/lspconfig.lua deleted file mode 100644 index 4b68229..0000000 --- a/lua/pika/plugins/lsp/lspconfig.lua +++ /dev/null @@ -1,132 +0,0 @@ -return { - "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile" }, - dependencies = { - { - "hrsh7th/nvim-cmp", - dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" }, - }, - { "antosha417/nvim-lsp-file-operations", config = true }, - { "folke/neodev.nvim", opts = {} }, - }, - - config = function() - local lspconfig = require("lspconfig") - local mason_lspconfig = require("mason-lspconfig") - local cmp_nvim_lsp = require("cmp_nvim_lsp") - local keymap = vim.keymap - - vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("UserLspConfig", {}), - callback = function(ev) - -- Buffer local mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local opts = { buffer = ev.buf, silent = true } - - opts.desc = "See available code actions" - keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection - - opts.desc = "Smart rename" - keymap.set("n", "rn", vim.lsp.buf.rename, opts) -- smart rename - - opts.desc = "Show buffer diagnostics" - keymap.set("n", "D", "Telescope diagnostics bufnr=0", opts) -- show diagnostics for file - - opts.desc = "Show line diagnostics" - keymap.set("n", "d", vim.diagnostic.open_float, opts) -- show diagnostics for line - - opts.desc = "Show documentation for what is under cursor" - keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor - - opts.desc = "Restart LSP" - keymap.set("n", "rs", ":LspRestart", opts) -- mapping to restart lsp if necessary - end, - }) - -- used to enable autocompletion (assign to every lsp server config) - local capabilities = cmp_nvim_lsp.default_capabilities() - - -- Change the Diagnostic symbols in the sign column (gutter) - -- (not in youtube nvim video) - local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } - for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) - end - - mason_lspconfig.setup_handlers({ - function(server_name) - lspconfig[server_name].setup({ - capabilities = capabilities, - }) - end, - ["svelte"] = function() - lspconfig["svelte"].setup({ - capabilities = capabilities, - on_attach = function(client, bufnr) - vim.api.nvim_create_autocmd("BufWritePost", { - pattern = { "*.js", "*.ts" }, - callback = function(ctx) - client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match }) - end, - }) - end, - }) - end, - ["graphql"] = function() - lspconfig["graphql"].setup({ - capabilities = capabilities, - filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" }, - }) - end, - ["emmet_ls"] = function() - lspconfig["emmet_ls"].setup({ - capabilities = capabilities, - filetypes = { - "html", - "typescriptreact", - "javascriptreact", - "css", - "sass", - "scss", - "less", - "svelte", - }, - }) - end, - ["lua_ls"] = function() - lspconfig["lua_ls"].setup({ - capabilities = capabilities, - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - completion = { - callSnippet = "Replace", - }, - }, - }, - }) - end, - ["cssls"] = function() - lspconfig["cssls"].setup({ - capabilities = capabilities, - filetypes = { "css", "scss" }, - }) - end, - ["intelephense"] = function() - lspconfig["intelephense"].setup({ - capabilities = capabilities, - filetypes = { "php", "blade.php" }, - }) - end, - -- ["tsserver"] = function() - -- -- Replace tsserver with typescript-language-server - -- lspconfig["typescript-language-server"].setup({ - -- capabilities = capabilities, - -- filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact" }, - -- }) - -- end, - }) - end, -} diff --git a/lua/pika/plugins/lsp/nvim-cmp.lua b/lua/pika/plugins/lsp/nvim-cmp.lua.bak similarity index 51% rename from lua/pika/plugins/lsp/nvim-cmp.lua rename to lua/pika/plugins/lsp/nvim-cmp.lua.bak index 704a168..6b3c862 100644 --- a/lua/pika/plugins/lsp/nvim-cmp.lua +++ b/lua/pika/plugins/lsp/nvim-cmp.lua.bak @@ -136,4 +136,136 @@ return { -- }) -- end, -- }, + { + "neovim/nvim-lspconfig", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + { + "hrsh7th/nvim-cmp", + dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" }, + }, + { "antosha417/nvim-lsp-file-operations", config = true }, + { "folke/neodev.nvim", opts = {} }, + }, + + config = function() + local lspconfig = require("lspconfig") + local mason_lspconfig = require("mason-lspconfig") + local cmp_nvim_lsp = require("cmp_nvim_lsp") + local keymap = vim.keymap + + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("UserLspConfig", {}), + callback = function(ev) + -- Buffer local mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local opts = { buffer = ev.buf, silent = true } + + opts.desc = "See available code actions" + keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection + + opts.desc = "Smart rename" + keymap.set("n", "rn", vim.lsp.buf.rename, opts) -- smart rename + + opts.desc = "Show buffer diagnostics" + keymap.set("n", "D", "Telescope diagnostics bufnr=0", opts) -- show diagnostics for file + + opts.desc = "Show line diagnostics" + keymap.set("n", "d", vim.diagnostic.open_float, opts) -- show diagnostics for line + + opts.desc = "Show documentation for what is under cursor" + keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor + + opts.desc = "Restart LSP" + keymap.set("n", "rs", ":LspRestart", opts) -- mapping to restart lsp if necessary + end, + }) + -- used to enable autocompletion (assign to every lsp server config) + local capabilities = cmp_nvim_lsp.default_capabilities() + + -- Change the Diagnostic symbols in the sign column (gutter) + -- (not in youtube nvim video) + local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) + end + + mason_lspconfig.setup_handlers({ + function(server_name) + lspconfig[server_name].setup({ + capabilities = capabilities, + }) + end, + ["svelte"] = function() + lspconfig["svelte"].setup({ + capabilities = capabilities, + on_attach = function(client, bufnr) + vim.api.nvim_create_autocmd("BufWritePost", { + pattern = { "*.js", "*.ts" }, + callback = function(ctx) + client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match }) + end, + }) + end, + }) + end, + ["graphql"] = function() + lspconfig["graphql"].setup({ + capabilities = capabilities, + filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" }, + }) + end, + ["emmet_ls"] = function() + lspconfig["emmet_ls"].setup({ + capabilities = capabilities, + filetypes = { + "html", + "typescriptreact", + "javascriptreact", + "css", + "sass", + "scss", + "less", + "svelte", + }, + }) + end, + ["lua_ls"] = function() + lspconfig["lua_ls"].setup({ + capabilities = capabilities, + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + completion = { + callSnippet = "Replace", + }, + }, + }, + }) + end, + ["cssls"] = function() + lspconfig["cssls"].setup({ + capabilities = capabilities, + filetypes = { "css", "scss" }, + }) + end, + ["intelephense"] = function() + lspconfig["intelephense"].setup({ + capabilities = capabilities, + filetypes = { "php", "blade.php" }, + }) + end, + -- ["tsserver"] = function() + -- -- Replace tsserver with typescript-language-server + -- lspconfig["typescript-language-server"].setup({ + -- capabilities = capabilities, + -- filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact" }, + -- }) + -- end, + }) + end, + }, } From 87e484ef9f82dc95ef019094bad219c0c9c433cc Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 27 Mar 2025 10:56:27 +0100 Subject: [PATCH 13/67] wip --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 13aae1b..0fc3d1c 100644 --- a/init.lua +++ b/init.lua @@ -9,7 +9,7 @@ else -- │ themes are under ./lua/pika/plugins/colorschemes.lua │ -- ╰──────────────────────────────────────────────────────╯ - vim.cmd.colorscheme("oldschool") + vim.cmd.colorscheme("eldritch") -- Keybind for saving clipboard screenshot and inserting a Markdown link vim.api.nvim_set_keymap( From b42f54d0c560ed03847d72b2a90ef7e5679829c4 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 27 Mar 2025 11:23:56 +0100 Subject: [PATCH 14/67] some blink changes --- lua/pika/plugins/lsp/blink-cmp.lua | 155 +++++++++++++++++++++++++++-- 1 file changed, 149 insertions(+), 6 deletions(-) diff --git a/lua/pika/plugins/lsp/blink-cmp.lua b/lua/pika/plugins/lsp/blink-cmp.lua index a0e3b74..0660cd0 100644 --- a/lua/pika/plugins/lsp/blink-cmp.lua +++ b/lua/pika/plugins/lsp/blink-cmp.lua @@ -10,7 +10,7 @@ return { -- use a release tag to download pre-built binaries version = "1.*", -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust - -- build = 'cargo build --release', + -- build = "cargo build --release", -- If you use nix, you can build from source using latest nightly rust with: -- build = 'nix run .#build-plugin', @@ -76,6 +76,72 @@ return { -- (Default) Only show the documentation popup when manually triggered completion = { + keyword = { range = "full" }, + trigger = { + -- When true, will prefetch the completion items when entering insert mode + prefetch_on_insert = false, + + -- When false, will not show the completion window automatically when in a snippet + show_in_snippet = true, + + -- When true, will show the completion window after typing any of alphanumerics, `-` or `_` + show_on_keyword = true, + + -- When true, will show the completion window after typing a trigger character + show_on_trigger_character = true, + + -- LSPs can indicate when to show the completion window via trigger characters + -- however, some LSPs (i.e. tsserver) return characters that would essentially + -- always show the window. We block these by default. + show_on_blocked_trigger_characters = { " ", "\n", "\t" }, + -- You can also block per filetype with a function: + -- show_on_blocked_trigger_characters = function(ctx) + -- if vim.bo.filetype == "markdown" then + -- return { " ", "\n", "\t", ".", "/", "(", "[" } + -- end + -- return { " ", "\n", "\t" } + -- end, + + -- When both this and show_on_trigger_character are true, will show the completion window + -- when the cursor comes after a trigger character after accepting an item + show_on_accept_on_trigger_character = true, + + -- When both this and show_on_trigger_character are true, will show the completion window + -- when the cursor comes after a trigger character when entering insert mode + show_on_insert_on_trigger_character = true, + + -- List of trigger characters (on top of `show_on_blocked_trigger_characters`) that won't trigger + -- the completion window when the cursor comes after a trigger character when + -- entering insert mode/accepting an item + show_on_x_blocked_trigger_characters = { "'", '"', "(" }, + -- or a function, similar to show_on_blocked_trigger_character + }, + list = { + -- Maximum number of items to display + max_items = 128, + + selection = { + -- When `true`, will automatically select the first item in the completion list + preselect = true, + -- preselect = function(ctx) return vim.bo.filetype ~= 'markdown' end, + + -- When `true`, inserts the completion item automatically when selecting it + -- You may want to bind a key to the `cancel` command (default ) when using this option, + -- which will both undo the selection and hide the completion menu + auto_insert = true, + -- auto_insert = function(ctx) return vim.bo.filetype ~= 'markdown' end + }, + + cycle = { + -- When `true`, calling `select_next` at the _bottom_ of the completion list + -- will select the _first_ completion item. + from_bottom = true, + -- When `true`, calling `select_prev` at the _top_ of the completion list + -- will select the _last_ completion item. + from_top = true, + }, + }, + documentation = { auto_show = false, auto_show_delay_ms = 230, @@ -98,15 +164,40 @@ return { ghost_text = { enabled = true, show_with_selection = true, - show_without_selection = true, + show_without_selection = false, show_with_menu = true, - show_without_menu = true, + show_without_menu = false, }, - -- ─────────────────────────────────< mini-icons config >────────────────────────────── menu = { + enabled = true, + min_width = 16, + max_height = 10, + border = nil, -- Defaults to `vim.o.winborder` on nvim 0.11+ + winblend = 0, + winhighlight = "Normal:BlinkCmpMenu,FloatBorder:BlinkCmpMenuBorder,CursorLine:BlinkCmpMenuSelection,Search:None", + -- Keep the cursor X lines away from the top/bottom of the window + scrolloff = 2, + -- Note that the gutter will be disabled when border ~= 'none' + scrollbar = true, + -- Which directions to show the window, + -- falling back to the next direction when there's not enough space + direction_priority = { "s", "n" }, + + -- Whether to automatically show the window when new completion items are available + auto_show = true, + draw = { - columns = { { "kind_icon" }, { "label", gap = 1 } }, + -- Aligns the keyword you've typed to a component in the menu + align_to = "label", -- or 'none' to disable, or 'cursor' to align to the cursor + -- Left and right padding, optionally { left, right } for different padding on each side + padding = 1, + -- Gap between columns + gap = 2, + -- Use treesitter to highlight the label text for the given list of sources + -- treesitter = {}, + treesitter = { "lsp" }, + columns = { { "kind_icon" }, { "label", "label_description", gap = 1 } }, components = { label = { text = function(ctx) @@ -135,6 +226,30 @@ return { -- return hl -- end, -- }, + + label_description = { + width = { max = 30 }, + text = function(ctx) + return ctx.label_description + end, + highlight = "BlinkCmpLabelDescription", + }, + + source_name = { + width = { max = 30 }, + text = function(ctx) + return ctx.source_name + end, + highlight = "BlinkCmpSource", + }, + + source_id = { + width = { max = 30 }, + text = function(ctx) + return ctx.source_id + end, + highlight = "BlinkCmpSource", + }, }, }, }, @@ -146,12 +261,40 @@ return { default = { "lsp", "path", "snippets", "buffer" }, }, + -- snippets = { preset = "default" | "luasnip" }, + -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` -- -- See the fuzzy documentation for more information - fuzzy = { implementation = "prefer_rust" }, + fuzzy = { + implementation = "prefer_rust", + + -- Frecency tracks the most recently/frequently used items and boosts the score of the item + -- Note, this does not apply when using the Lua implementation. + use_frecency = true, + + -- Proximity bonus boosts the score of items matching nearby words + -- Note, this does not apply when using the Lua implementation. + use_proximity = true, + + -- UNSAFE!! When enabled, disables the lock and fsync when writing to the frecency database. This should only be used on unsupported platforms (i.e. alpine termux) + -- Note, this does not apply when using the Lua implementation. + use_unsafe_no_lock = false, + sorts = { + -- (optionally) always prioritize exact matches + -- 'exact', + + -- pass a function for custom behavior + -- function(item_a, item_b) + -- return item_a.score > item_b.score + -- end, + + "score", + "sort_text", + }, + }, }, opts_extend = { "sources.default" }, }, From c4441f11ea4a7b1dfbed480c35b34a8a2cb0747c Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 27 Mar 2025 12:27:44 +0100 Subject: [PATCH 15/67] cmp actions --- lua/pika/plugins/lsp/blink-cmp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pika/plugins/lsp/blink-cmp.lua b/lua/pika/plugins/lsp/blink-cmp.lua index 0660cd0..e871cdd 100644 --- a/lua/pika/plugins/lsp/blink-cmp.lua +++ b/lua/pika/plugins/lsp/blink-cmp.lua @@ -66,7 +66,7 @@ return { -- Adjusts spacing to ensure icons are aligned nerd_font_variant = "mono", - highlight_ns = vim.api.nvim_create_namespace("blink_cmp"), + -- highlight_ns = vim.api.nvim_create_namespace("nvim-cmp"), -- Sets the fallback highlight groups to nvim-cmp's highlight groups -- Useful for when your theme doesn't support blink.cmp -- Will be removed in a future release From 8b92b4140c87f54cf04a8256f62c1d087e865094 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 27 Mar 2025 17:23:57 +0100 Subject: [PATCH 16/67] add: astroluma colorscheme --- lua/pika/plugins/colorschemes.lua | 73 ++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index d18bdd8..7411b9a 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -14,6 +14,77 @@ return { { "pauchiner/pastelnight.nvim" }, { "ptdewey/darkearth-nvim" }, { "marko-cerovac/material.nvim" }, + { + "AstroNvim/astrotheme", + opts = { + { + palette = "astrodark", -- String of the default palette to use when calling `:colorscheme astrotheme` + background = { -- :h background, palettes to use when using the core vim background colors + light = "astrolight", + dark = "astrodark", + }, + + style = { + transparent = false, -- Bool value, toggles transparency. + inactive = true, -- Bool value, toggles inactive window color. + float = true, -- Bool value, toggles floating windows background colors. + neotree = true, -- Bool value, toggles neo-trees background color. + border = true, -- Bool value, toggles borders. + title_invert = true, -- Bool value, swaps text and background colors. + italic_comments = true, -- Bool value, toggles italic comments. + simple_syntax_colors = true, -- Bool value, simplifies the amounts of colors used for syntax highlighting. + }, + + termguicolors = true, -- Bool value, toggles if termguicolors are set by AstroTheme. + + terminal_color = true, -- Bool value, toggles if terminal_colors are set by AstroTheme. + + plugin_default = "auto", -- Sets how all plugins will be loaded + -- "auto": Uses lazy / packer enabled plugins to load highlights. + -- true: Enables all plugins highlights. + -- false: Disables all plugins. + + plugins = { -- Allows for individual plugin overrides using plugin name and value from above. + ["bufferline.nvim"] = false, + }, + + palettes = { + global = { -- Globally accessible palettes, theme palettes take priority. + my_grey = "#ebebeb", + my_color = "#ffffff", + }, + astrodark = { -- Extend or modify astrodarks palette colors + ui = { + red = "#800010", -- Overrides astrodarks red UI color + accent = "#CC83E3", -- Changes the accent color of astrodark. + }, + syntax = { + cyan = "#800010", -- Overrides astrodarks cyan syntax color + comments = "#CC83E3", -- Overrides astrodarks comment color. + }, + my_color = "#000000", -- Overrides global.my_color + }, + }, + + highlights = { + global = { -- Add or modify hl groups globally, theme specific hl groups take priority. + modify_hl_groups = function(hl, c) + hl.PluginColor4 = { fg = c.my_grey, bg = c.none } + end, + ["@String"] = { fg = "#ff00ff", bg = "NONE" }, + }, + astrodark = { + -- first parameter is the highlight table and the second parameter is the color palette table + modify_hl_groups = function(hl, c) -- modify_hl_groups function allows you to modify hl groups, + hl.Comment.fg = c.my_color + hl.Comment.italic = true + end, + ["@String"] = { fg = "#ff00ff", bg = "NONE" }, + }, + }, + }, + }, + }, -- { -- "ferdinandrau/lavish.nvim", -- opts = { @@ -34,7 +105,7 @@ return { styles = { -- Style to be applied to different syntax groups -- Value is any valid attr-list value for `:help nvim_set_hl` - comments = { italic = true }, + comments = { italic = false }, keywords = { italic = true }, functions = { bold = true }, variables = { bold = true }, From 3f4c4206c6bdce1651f82e65733765a8f10825c2 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 27 Mar 2025 23:43:29 +0100 Subject: [PATCH 17/67] add: astroluma colorscheme --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 0fc3d1c..1b15708 100644 --- a/init.lua +++ b/init.lua @@ -9,7 +9,7 @@ else -- │ themes are under ./lua/pika/plugins/colorschemes.lua │ -- ╰──────────────────────────────────────────────────────╯ - vim.cmd.colorscheme("eldritch") + vim.cmd.colorscheme("astrodark") -- Keybind for saving clipboard screenshot and inserting a Markdown link vim.api.nvim_set_keymap( From a0dfeda2884a55e6a9f034d7bf2fb980f68530e5 Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 1 Apr 2025 21:37:13 +0200 Subject: [PATCH 18/67] =?UTF-8?q?=EF=80=99=20update:=20submodules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets b/snippets index e7f703e..7eaeb1e 160000 --- a/snippets +++ b/snippets @@ -1 +1 @@ -Subproject commit e7f703ecb74d00eeea817b0b677c8715bdc23521 +Subproject commit 7eaeb1e40883a0478d50fd01cc91083f4b079f0e From 0b4f56979799903a85bf78d6ac6c1644e3ffd8b6 Mon Sep 17 00:00:00 2001 From: piecka Date: Wed, 2 Apr 2025 16:27:42 +0200 Subject: [PATCH 19/67] addet functions.sh to source from when in terminal input mode --- functions.sh | 3 ++ lua/pika/core/keymaps.lua | 73 +++++++++++++++++++++++++-------------- 2 files changed, 51 insertions(+), 25 deletions(-) create mode 100644 functions.sh diff --git a/functions.sh b/functions.sh new file mode 100644 index 0000000..26455bf --- /dev/null +++ b/functions.sh @@ -0,0 +1,3 @@ +get_ip() { + ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1 +} diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index 69fc905..f753647 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -58,32 +58,55 @@ map("n", "R", [[:%s/\<\>//gI]]) map("n", "sv", "v", { desc = "Split window vertically" }) -- split window vertically map("n", "sh", "s", { desc = "Split window horizontally" }) -- split window horizontally -vim.keymap.set({ "n", "i" }, "tt", function() - -- Frage den Shell-Command ab - vim.ui.input({ prompt = "Shell Command: " }, function(cmd) - if cmd == nil or cmd == "" then - return - end +-- ─< Set path to your shell functions file (update this to your actual path) >───────── +local shell_script_path = vim.fs.joinpath(vim.fn.stdpath("config") .. "/functions.sh") - local result = vim.fn.system(cmd) - local exit_code = vim.v.shell_error +-- ─< Add this before the keymap definition to check for file existence >─────────────── +if vim.uv.fs_stat(shell_script_path) then -- Check if file exists + -- inserts shell commands (sources ~/.config/nvim/functions.sh to source predefined functions) + vim.keymap.set({ "n", "i" }, "tt", function() + vim.ui.input({ prompt = "Shell Command: " }, function(input_cmd) + if not input_cmd or input_cmd == "" then + return + end - if exit_code ~= 0 then - vim.notify("Shell Error:\n" .. result, vim.log.levels.ERROR, { title = "Shell Command Failed" }) - return - end + -- Construct the command to source your functions and execute + local full_cmd = string.format( + "source %s && %s", -- Uses POSIX-compliant '&&' to fail if source fails + vim.fn.shellescape(shell_script_path), + input_cmd + ) - local lines = vim.split(result, "\n", { trimempty = true }) + -- Execute in bash to ensure function availability + local result = vim.fn.system({ "bash", "--norc", "--noprofile", "-c", full_cmd }) + local exit_code = vim.v.shell_error - -- Insert at cursor position - local row, col = unpack(vim.api.nvim_win_get_cursor(0)) - if #lines == 1 then - -- Insert inline if the result is a single line - local current_line = vim.api.nvim_get_current_line() - local new_line = current_line:sub(1, col) .. lines[1] .. current_line:sub(col + 1) - vim.api.nvim_set_current_line(new_line) - else - vim.api.nvim_buf_set_lines(0, row, row, false, lines) - end - end) -end, { desc = "Insert Shell Output at Cursor" }) + -- Handle errors + if exit_code ~= 0 then + vim.notify( + "Error (" .. exit_code .. "):\n" .. result, + vim.log.levels.ERROR, + { title = "Command Failed" } + ) + return + end + + -- Process output + local lines = vim.split(result:gsub("\n$", ""), "\n") + + -- Insert at cursor position + local row, col = unpack(vim.api.nvim_win_get_cursor(0)) + if #lines == 1 then + vim.api.nvim_set_current_line( + vim.api.nvim_get_current_line():sub(1, col) + .. lines[1] + .. vim.api.nvim_get_current_line():sub(col + 1) + ) + else + vim.api.nvim_buf_set_lines(0, row, row, false, lines) + end + end) + end, { desc = "Insert Shell Output (with functions)" }) +else + vim.notify("Shell functions file not found: " .. shell_script_path, vim.log.levels.WARN) +end From 20bc140a7638170e57abbceeabdd2ca44f36e846 Mon Sep 17 00:00:00 2001 From: pika Date: Wed, 2 Apr 2025 17:49:15 +0200 Subject: [PATCH 20/67] addet folkes todo comments for really nice comments - thanks folke --- init.lua | 2 +- lua/pika/plugins/colorschemes.lua | 12 +++------ lua/pika/plugins/explorer.lua | 38 +++++++++++++------------- lua/pika/plugins/qol.lua | 17 ++++++++++++ lua/pika/plugins/telescope.lua | 44 +++++++++++++------------------ 5 files changed, 60 insertions(+), 53 deletions(-) diff --git a/init.lua b/init.lua index 1b15708..cbd3f1a 100644 --- a/init.lua +++ b/init.lua @@ -9,7 +9,7 @@ else -- │ themes are under ./lua/pika/plugins/colorschemes.lua │ -- ╰──────────────────────────────────────────────────────╯ - vim.cmd.colorscheme("astrodark") + vim.cmd.colorscheme("rose-pine-moon") -- Keybind for saving clipboard screenshot and inserting a Markdown link vim.api.nvim_set_keymap( diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index 7411b9a..1cac46b 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -1,19 +1,15 @@ return { - { "folke/tokyonight.nvim" }, - { "fynnfluegge/monet.nvim", name = "monet" }, - { "L-Colombo/oldschool.nvim", config = "true" }, + -- { "folke/tokyonight.nvim" }, -- { "catppuccin/nvim", name = "catppuccin" }, -- { "EdenEast/nightfox.nvim" }, -- { "DanWlker/primeppuccin", name = "primeppuccin" }, - -- { "rose-pine/neovim", name = "rose-pine" }, + { "fynnfluegge/monet.nvim", name = "monet" }, + { "L-Colombo/oldschool.nvim", config = "true" }, + { "rose-pine/neovim", name = "rose-pine" }, { "AlexvZyl/nordic.nvim" }, { "eldritch-theme/eldritch.nvim" }, - -- { "sainnhe/sonokai" }, { "samharju/synthweave.nvim" }, - { "sainnhe/gruvbox-material" }, - { "pauchiner/pastelnight.nvim" }, { "ptdewey/darkearth-nvim" }, - { "marko-cerovac/material.nvim" }, { "AstroNvim/astrotheme", opts = { diff --git a/lua/pika/plugins/explorer.lua b/lua/pika/plugins/explorer.lua index 6791427..25d33c4 100644 --- a/lua/pika/plugins/explorer.lua +++ b/lua/pika/plugins/explorer.lua @@ -1,20 +1,20 @@ return { -- ─< neotree - fallback >──────────────────────────────────────────────────────────────────────── - { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information - }, - vim.keymap.set("n", "e", ":Neotree toggle"), - vim.keymap.set("n", "Ee", ":Neotree left"), - vim.keymap.set("n", "Ef", ":Neotree float"), - vim.keymap.set("n", "Eg", ":Neotree git_status float"), - vim.keymap.set("n", "Eb", ":Neotree buffers position=top"), - }, + -- { + -- "nvim-neo-tree/neo-tree.nvim", + -- branch = "v3.x", + -- dependencies = { + -- "nvim-lua/plenary.nvim", + -- "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + -- "MunifTanjim/nui.nvim", + -- -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information + -- }, + -- vim.keymap.set("n", "e", ":Neotree toggle"), + -- vim.keymap.set("n", "Ee", ":Neotree left"), + -- vim.keymap.set("n", "Ef", ":Neotree float"), + -- vim.keymap.set("n", "Eg", ":Neotree git_status float"), + -- vim.keymap.set("n", "Eb", ":Neotree buffers position=top"), + -- }, ---@type LazySpec { @@ -29,16 +29,16 @@ return { -- }, { -- Open in the current working directory - "Lf", + "tLf", "Yazi cwd", - desc = "Open the file manager in nvim's working directory", + desc = "Terminal - Open yazi in nvim's working directory", }, { -- NOTE: this requires a version of yazi that includes -- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18 - "lf", + "tlf", "Yazi toggle", - desc = "Resume the last yazi session", + desc = "Terminal - Resume the last yazi session", }, }, ---@type YaziConfig diff --git a/lua/pika/plugins/qol.lua b/lua/pika/plugins/qol.lua index c012d60..2e39595 100644 --- a/lua/pika/plugins/qol.lua +++ b/lua/pika/plugins/qol.lua @@ -138,6 +138,23 @@ return { ), }, + -- ─< INFO: Those comments are really great! >────────────────────────────────────────── + -- ─────────────────────< NOTE: And they can be pretty satisfying... >───────────────────── + -- ╭──────────────────────────────────────╮ + -- │ WARN: Also they can change in color! │ + -- ╰──────────────────────────────────────╯ + { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + keywords = { + NOTE = { icon = " ", color = "hint" }, + INFO = { icon = " ", color = "info" }, + WARNING = { icon = " ", color = "warning", alt = { "WARN" } }, + }, + }, + }, + -- ╭───────────╮ -- │ colorizer │ -- ╰───────────╯ diff --git a/lua/pika/plugins/telescope.lua b/lua/pika/plugins/telescope.lua index 0656a2b..c6c80d1 100644 --- a/lua/pika/plugins/telescope.lua +++ b/lua/pika/plugins/telescope.lua @@ -25,38 +25,32 @@ return { telescope.load_extension("fzf") - -- set keymaps + -- ─< set keymaps >───────────────────────────────────────────────────────────────────── local map = vim.keymap.set -- for conciseness - - -- Telescope mappings - map("n", "sf", "Telescope find_files", { noremap = true, silent = true, desc = "Find Files" }) - map("n", "sw", "Telescope live_grep", { noremap = true, silent = true, desc = "Search Word" }) - map("n", "", "Telescope buffers", { noremap = true, silent = true, desc = "Buffers" }) local builtin = require("telescope.builtin") - - map("n", "sn", function() - builtin.find_files({ cwd = vim.fn.stdpath("config") }) - end, { desc = "[S]earch [N]eovim files" }) - map("n", "ff", builtin.find_files, { desc = "[S]earch [F]iles" }) - map("n", "sh", builtin.help_tags, { desc = "[S]earch [H]elp" }) - map("n", "sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" }) - map("n", "sg", builtin.live_grep, { desc = "[S]earch by [G]rep" }) - map("n", "sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" }) - -- map("n", "sr", builtin.resume, { desc = "[S]earch [R]esume" }) - map("n", "s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) - map("n", "", builtin.buffers, { desc = "[ ] Find existing buffers" }) - map("n", "sR", function() - require("telescope.builtin").oldfiles() - end) + -- ─────────────────────────────────< Telescope mappings >───────────────────────────────── map("n", "T", "Telescope colorscheme") - map("n", "q", vim.cmd.q) + + map("n", "ff", "Telescope find_files", { noremap = true, silent = true, desc = "Find Files" }) + -- map("n", "ff", builtin.find_files, { desc = "Find Files" }) + map("n", "fw", "Telescope live_grep", { noremap = true, silent = true, desc = "Find Word" }) + -- map("n", "fw", builtin.live_grep, { desc = "Find word" }) + -- map("n", "fb", "Telescope buffers", { noremap = true, silent = true, desc = "Find Buffers" }) + map("n", "", builtin.buffers, { desc = "[ ] Find existing buffers" }) + map("n", "fn", function() + builtin.find_files({ cwd = vim.fn.stdpath("config") }) + end, { desc = "Find Neovim files" }) + map("n", "fh", builtin.help_tags, { desc = "Find Help" }) + map("n", "fk", builtin.keymaps, { desc = "Find Keymaps" }) + map("n", "fd", builtin.diagnostics, { desc = "Find Diagnostics" }) + map("n", "fo", builtin.oldfiles, { desc = "Find old/Recent Files" }) -- Additional custom mappings map("n", "/", function() builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown()) - end, { desc = "[/] Fuzzily search in current buffer" }) - map("n", "s/", function() + end, { desc = "Search in current buffer" }) + map("n", "f/", function() builtin.live_grep({ grep_open_files = true, prompt_title = "Live Grep in Open Files" }) - end, { desc = "[S]earch [/] in Open Files" }) + end, { desc = "Search in Open Files" }) end, } From 977f0ef3ede2802f279d7323627b3f20e4532bba Mon Sep 17 00:00:00 2001 From: pika Date: Wed, 2 Apr 2025 17:54:56 +0200 Subject: [PATCH 21/67] addet proper file disable without renaming --- lua/pika/plugins/lsp/blink-cmp.lua | 4 ++++ lua/pika/plugins/lsp/{nvim-cmp.lua.bak => nvim-cmp.lua} | 6 ++++++ 2 files changed, 10 insertions(+) rename lua/pika/plugins/lsp/{nvim-cmp.lua.bak => nvim-cmp.lua} (98%) diff --git a/lua/pika/plugins/lsp/blink-cmp.lua b/lua/pika/plugins/lsp/blink-cmp.lua index e871cdd..be08b5e 100644 --- a/lua/pika/plugins/lsp/blink-cmp.lua +++ b/lua/pika/plugins/lsp/blink-cmp.lua @@ -1,3 +1,7 @@ +-- if true then return {} end +-- WARNING: If this line is true, then the plugin will NOT get sourced! +-- NOTE: Has to be commented out if blink should be used + return { -- ╭───────────╮ -- │ blink.cmp │ diff --git a/lua/pika/plugins/lsp/nvim-cmp.lua.bak b/lua/pika/plugins/lsp/nvim-cmp.lua similarity index 98% rename from lua/pika/plugins/lsp/nvim-cmp.lua.bak rename to lua/pika/plugins/lsp/nvim-cmp.lua index 6b3c862..0149837 100644 --- a/lua/pika/plugins/lsp/nvim-cmp.lua.bak +++ b/lua/pika/plugins/lsp/nvim-cmp.lua @@ -1,3 +1,9 @@ +if true then + return {} +end +-- WARNING: If this line is true, then the plugin will NOT get sourced! +-- NOTE: Has to be commented out if blink should be used + return { { "hrsh7th/nvim-cmp", From ffbdf9e4bb35cf4d183261f3018e47d25861c2a2 Mon Sep 17 00:00:00 2001 From: pika Date: Wed, 2 Apr 2025 18:04:58 +0200 Subject: [PATCH 22/67] addet terminal as a custom file --- lua/pika/core/custom/terminalcmd.lua | 52 +++++++++++++++++++++++++++ lua/pika/core/init.lua | 1 + lua/pika/core/keymaps.lua | 53 ---------------------------- 3 files changed, 53 insertions(+), 53 deletions(-) create mode 100644 lua/pika/core/custom/terminalcmd.lua diff --git a/lua/pika/core/custom/terminalcmd.lua b/lua/pika/core/custom/terminalcmd.lua new file mode 100644 index 0000000..7d07e55 --- /dev/null +++ b/lua/pika/core/custom/terminalcmd.lua @@ -0,0 +1,52 @@ +-- ─< Set path to your shell functions file (update this to your actual path) >───────── +local shell_script_path = vim.fs.joinpath(vim.fn.stdpath("config") .. "/functions.sh") + +-- ─< Add this before the keymap definition to check for file existence >─────────────── +if vim.uv.fs_stat(shell_script_path) then -- Check if file exists + -- inserts shell commands (sources ~/.config/nvim/functions.sh to source predefined functions) + vim.keymap.set({ "n", "i" }, "tt", function() + vim.ui.input({ prompt = "Shell Command: " }, function(input_cmd) + if not input_cmd or input_cmd == "" then + return + end + + -- Construct the command to source your functions and execute + local full_cmd = string.format( + "source %s && %s", -- Uses POSIX-compliant '&&' to fail if source fails + vim.fn.shellescape(shell_script_path), + input_cmd + ) + + -- Execute in bash to ensure function availability + local result = vim.fn.system({ "bash", "--norc", "--noprofile", "-c", full_cmd }) + local exit_code = vim.v.shell_error + + -- Handle errors + if exit_code ~= 0 then + vim.notify( + "Error (" .. exit_code .. "):\n" .. result, + vim.log.levels.ERROR, + { title = "Command Failed" } + ) + return + end + + -- Process output + local lines = vim.split(result:gsub("\n$", ""), "\n") + + -- Insert at cursor position + local row, col = unpack(vim.api.nvim_win_get_cursor(0)) + if #lines == 1 then + vim.api.nvim_set_current_line( + vim.api.nvim_get_current_line():sub(1, col) + .. lines[1] + .. vim.api.nvim_get_current_line():sub(col + 1) + ) + else + vim.api.nvim_buf_set_lines(0, row, row, false, lines) + end + end) + end, { desc = "Insert Shell Output (with functions)" }) +else + vim.notify("Shell functions file not found: " .. shell_script_path, vim.log.levels.WARN) +end diff --git a/lua/pika/core/init.lua b/lua/pika/core/init.lua index 3ab7175..4e41d6e 100644 --- a/lua/pika/core/init.lua +++ b/lua/pika/core/init.lua @@ -1,2 +1,3 @@ require("pika.core.options") require("pika.core.keymaps") +require("pika.core.custom.terminalcmd") diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index f753647..57203c8 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -57,56 +57,3 @@ map("n", "R", [[:%s/\<\>//gI]]) -- window management map("n", "sv", "v", { desc = "Split window vertically" }) -- split window vertically map("n", "sh", "s", { desc = "Split window horizontally" }) -- split window horizontally - --- ─< Set path to your shell functions file (update this to your actual path) >───────── -local shell_script_path = vim.fs.joinpath(vim.fn.stdpath("config") .. "/functions.sh") - --- ─< Add this before the keymap definition to check for file existence >─────────────── -if vim.uv.fs_stat(shell_script_path) then -- Check if file exists - -- inserts shell commands (sources ~/.config/nvim/functions.sh to source predefined functions) - vim.keymap.set({ "n", "i" }, "tt", function() - vim.ui.input({ prompt = "Shell Command: " }, function(input_cmd) - if not input_cmd or input_cmd == "" then - return - end - - -- Construct the command to source your functions and execute - local full_cmd = string.format( - "source %s && %s", -- Uses POSIX-compliant '&&' to fail if source fails - vim.fn.shellescape(shell_script_path), - input_cmd - ) - - -- Execute in bash to ensure function availability - local result = vim.fn.system({ "bash", "--norc", "--noprofile", "-c", full_cmd }) - local exit_code = vim.v.shell_error - - -- Handle errors - if exit_code ~= 0 then - vim.notify( - "Error (" .. exit_code .. "):\n" .. result, - vim.log.levels.ERROR, - { title = "Command Failed" } - ) - return - end - - -- Process output - local lines = vim.split(result:gsub("\n$", ""), "\n") - - -- Insert at cursor position - local row, col = unpack(vim.api.nvim_win_get_cursor(0)) - if #lines == 1 then - vim.api.nvim_set_current_line( - vim.api.nvim_get_current_line():sub(1, col) - .. lines[1] - .. vim.api.nvim_get_current_line():sub(col + 1) - ) - else - vim.api.nvim_buf_set_lines(0, row, row, false, lines) - end - end) - end, { desc = "Insert Shell Output (with functions)" }) -else - vim.notify("Shell functions file not found: " .. shell_script_path, vim.log.levels.WARN) -end From bef9661e9c512b5acb1f6c874dcc3877f2b18398 Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 4 Apr 2025 18:52:12 +0200 Subject: [PATCH 23/67] changed to nvim-cmp and addet yet another ai plugin --- lua/pika/plugins/{avante-ai.lua => ai.lua} | 10 ++++++++++ lua/pika/plugins/lsp/blink-cmp.lua | 2 +- lua/pika/plugins/lsp/nvim-cmp.lua | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) rename lua/pika/plugins/{avante-ai.lua => ai.lua} (92%) diff --git a/lua/pika/plugins/avante-ai.lua b/lua/pika/plugins/ai.lua similarity index 92% rename from lua/pika/plugins/avante-ai.lua rename to lua/pika/plugins/ai.lua index 682a95f..acc498e 100644 --- a/lua/pika/plugins/avante-ai.lua +++ b/lua/pika/plugins/ai.lua @@ -1,4 +1,5 @@ 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. @@ -56,4 +57,13 @@ return { ft = { "markdown", "Avante" }, }, }, +}, +{ + "olimorris/codecompanion.nvim", + config = true, + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, +}, } diff --git a/lua/pika/plugins/lsp/blink-cmp.lua b/lua/pika/plugins/lsp/blink-cmp.lua index be08b5e..a7f5ea4 100644 --- a/lua/pika/plugins/lsp/blink-cmp.lua +++ b/lua/pika/plugins/lsp/blink-cmp.lua @@ -1,4 +1,4 @@ --- if true then return {} end +if true then return {} end -- WARNING: If this line is true, then the plugin will NOT get sourced! -- NOTE: Has to be commented out if blink should be used diff --git a/lua/pika/plugins/lsp/nvim-cmp.lua b/lua/pika/plugins/lsp/nvim-cmp.lua index 0149837..c8f0e5d 100644 --- a/lua/pika/plugins/lsp/nvim-cmp.lua +++ b/lua/pika/plugins/lsp/nvim-cmp.lua @@ -1,6 +1,6 @@ -if true then - return {} -end +-- if true then +-- return {} +-- end -- WARNING: If this line is true, then the plugin will NOT get sourced! -- NOTE: Has to be commented out if blink should be used From 25790de5b42df3608ce0347f5fb7cc0182506a47 Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 4 Apr 2025 21:52:00 +0200 Subject: [PATCH 24/67] addet ai again --- .gitignore | 1 + lua/pika/plugins/ai.lua | 112 ++++++++++++++--------------- lua/pika/plugins/lsp/blink-cmp.lua | 5 +- lua/pika/plugins/lsp/nvim-cmp.lua | 6 +- 4 files changed, 60 insertions(+), 64 deletions(-) diff --git a/.gitignore b/.gitignore index 55d79fe..eed252c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ lazy-lock.json cd-project.nvim.json +custom/ diff --git a/lua/pika/plugins/ai.lua b/lua/pika/plugins/ai.lua index acc498e..1864ce1 100644 --- a/lua/pika/plugins/ai.lua +++ b/lua/pika/plugins/ai.lua @@ -1,69 +1,61 @@ 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.) + { + "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, + -- 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, }, - -- 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" }, + { + -- Make sure to set this up properly if you have lazy=true + "MeanderingProgrammer/render-markdown.nvim", + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, }, - ft = { "markdown", "Avante" }, }, }, -}, -{ - "olimorris/codecompanion.nvim", - config = true, - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - }, -}, } diff --git a/lua/pika/plugins/lsp/blink-cmp.lua b/lua/pika/plugins/lsp/blink-cmp.lua index a7f5ea4..1603997 100644 --- a/lua/pika/plugins/lsp/blink-cmp.lua +++ b/lua/pika/plugins/lsp/blink-cmp.lua @@ -1,4 +1,6 @@ -if true then return {} end +-- if true then +-- return {} +-- end -- WARNING: If this line is true, then the plugin will NOT get sourced! -- NOTE: Has to be commented out if blink should be used @@ -33,6 +35,7 @@ return { -- C-k: Toggle signature help (if signature.enabled = true) -- -- See :h blink-cmp-config-keymap for defining your own keymap + cmdline = { sources = { "cmdline" } }, keymap = { -- set to 'none' to disable the 'default' preset preset = "super-tab", diff --git a/lua/pika/plugins/lsp/nvim-cmp.lua b/lua/pika/plugins/lsp/nvim-cmp.lua index c8f0e5d..0149837 100644 --- a/lua/pika/plugins/lsp/nvim-cmp.lua +++ b/lua/pika/plugins/lsp/nvim-cmp.lua @@ -1,6 +1,6 @@ --- if true then --- return {} --- end +if true then + return {} +end -- WARNING: If this line is true, then the plugin will NOT get sourced! -- NOTE: Has to be commented out if blink should be used From 89322b376a48b4b6d2c89e68f3b692f399a2d439 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 5 Apr 2025 00:19:19 +0200 Subject: [PATCH 25/67] wip --- lua/pika/core/keymaps.lua | 18 ++++++++++++++++-- lua/pika/plugins/custom.lua | 7 +++++++ lua/pika/plugins/ui.lua | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 lua/pika/plugins/custom.lua diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index 57203c8..1ecd19c 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -51,9 +51,23 @@ map("n", "q", vim.cmd.q) map("n", "s", vim.cmd.w) map("n", "", vim.cmd.w) --- ─< rename word under cursor >─────────────────────────────────────────────────────────── -map("n", "R", [[:%s/\<\>//gI]]) +-- Visual mode: Indent selected lines +map("v", "", ">gv", { desc = "Indent and keep selection" }) +map("v", "", "sv", "v", { desc = "Split window vertically" }) -- split window vertically map("n", "sh", "s", { desc = "Split window horizontally" }) -- split window horizontally + +-- ──────────────────────────────< rename word under cursor >────────────────────────────── +-- map("n", "R", [[:%s/\<\>//gI]]) +-- ──────────────────────< Enhanced word renaming in current buffer >────────────────────── +-- -- Minimal working version +vim.keymap.set({ "n", "x" }, "R", function() + local text = vim.fn.mode() == "n" and vim.fn.expand("") or vim.fn.trim(vim.fn.getreg('"')) + vim.ui.input({ prompt = "Replace: ", default = text }, function(input) + if input and input ~= text then + vim.cmd(("keeppatterns %%s/%s/%s/g"):format(vim.pesc(text), vim.pesc(input))) + end + end) +end, { desc = "Rename in buffer" }) diff --git a/lua/pika/plugins/custom.lua b/lua/pika/plugins/custom.lua new file mode 100644 index 0000000..2f2d350 --- /dev/null +++ b/lua/pika/plugins/custom.lua @@ -0,0 +1,7 @@ +return { + dir = "~/.config/nvim/lua/pika/plugins/custom/terminals.nvim", + opts = { + visible_lines = 3, + }, + vim.keymap.set("n", "td", ""), +} diff --git a/lua/pika/plugins/ui.lua b/lua/pika/plugins/ui.lua index 797645d..5236ba4 100644 --- a/lua/pika/plugins/ui.lua +++ b/lua/pika/plugins/ui.lua @@ -171,6 +171,7 @@ return { -- char = "│", -- tab_char = "│", }, + scope = { enabled = true }, }, }, From 741556792bd684f00112fa5b546278f1e282ce28 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 5 Apr 2025 10:51:29 +0200 Subject: [PATCH 26/67] some plugin changes and visual optimisations --- lua/pika/core/keymaps.lua | 29 ++++++++++++-------- lua/pika/core/options.lua | 5 ++-- lua/pika/lazy.lua | 41 ++++++++++++++-------------- lua/pika/plugins/dashboard.lua | 14 +++++----- lua/pika/plugins/lsp/mason.lua | 6 ++++ lua/pika/plugins/mini.lua | 36 ++++++++++++++++++++++-- lua/pika/plugins/qol.lua | 39 +++++++++++++------------- lua/pika/plugins/ui.lua | 50 +++++++++++++++++++++++++--------- 8 files changed, 143 insertions(+), 77 deletions(-) diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index 1ecd19c..c48cd1b 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -1,5 +1,7 @@ +-- INFO: Maps leader to 'space' vim.g.mapleader = " " +-- TIP: Unmap keymaps -- ─< lua/keymaps.lua >───────────────────────────────────────────────────────────────── local nomap = vim.keymap.set nomap("i", "", "") @@ -8,17 +10,16 @@ nomap("n", "q", "") nomap("v", "q", "") nomap("v", "S", "") +-- INFO: vim.keymap.set with map() local map = vim.keymap.set map("n", "", "nohlsearch") -- ─< Comment >───────────────────────────────────────────────────────────────────────── +-- INFO: makes instant comments, no plugin needet map("n", "", "gcc", { desc = "comment toggle", remap = true }) map("v", "", "gc", { desc = "comment toggle", remap = true }) --- ─< Terminal >──────────────────────────────────────────────────────────────────────── -map("t", "", "", { desc = "terminal escape terminal mode" }) - -- ─< Movement while in "insert"-mode >───────────────────────────────────────────────── map("i", "", "^i", { desc = "move beginning of line" }) map("i", "", "", { desc = "move end of line" }) @@ -28,10 +29,9 @@ map("i", "", "", { desc = "move down" }) map("i", "", "", { desc = "move up" }) map("n", ";", ":", { desc = "CMD enter command mode" }) -map("i", "jk", "") -map("i", "", "") -map("n", "", "") -map("v", "", "") + +-- CTRL-C for escape +map({ "i", "n", "v" }, "", "") map("n", "x", "bd!") @@ -48,22 +48,27 @@ map("n", "k", "", { desc = "Move focus to the upper window" }) -- map("n", "p", vim.cmd.Ex) map("n", "q", vim.cmd.q) +map("n", "Q", "q!") map("n", "s", vim.cmd.w) map("n", "", vim.cmd.w) -- Visual mode: Indent selected lines -map("v", "", ">gv", { desc = "Indent and keep selection" }) -map("v", "", "", ">gv", { desc = "Indent and keep selection" }) +-- map("v", "", "sv", "v", { desc = "Split window vertically" }) -- split window vertically map("n", "sh", "s", { desc = "Split window horizontally" }) -- split window horizontally +-- ─< Terminal >──────────────────────────────────────────────────────────────────────── +-- NOTE: This is only for terminal mode +map("t", "", "", { desc = "terminal escape terminal mode" }) + -- ──────────────────────────────< rename word under cursor >────────────────────────────── -- map("n", "R", [[:%s/\<\>//gI]]) --- ──────────────────────< Enhanced word renaming in current buffer >────────────────────── --- -- Minimal working version -vim.keymap.set({ "n", "x" }, "R", function() +-- ───────────────< Enhanced word under cursor renaming in current buffer >──────────── +map({ "n", "x" }, "R", function() local text = vim.fn.mode() == "n" and vim.fn.expand("") or vim.fn.trim(vim.fn.getreg('"')) vim.ui.input({ prompt = "Replace: ", default = text }, function(input) if input and input ~= text then diff --git a/lua/pika/core/options.lua b/lua/pika/core/options.lua index fa3fc11..47fe86c 100644 --- a/lua/pika/core/options.lua +++ b/lua/pika/core/options.lua @@ -53,7 +53,8 @@ o.laststatus = 3 o.swapfile = false -- Disable the tilde on empty lines -o.fillchars = { eob = " " } +-- enable slimline bubble chain ( )----( ) +o.fillchars = { eob = " ", stl = "─" } -- SudaRead automatic if file is inaccessible vim.g.suda_smart_edit = 1 @@ -77,7 +78,7 @@ vim.cmd([[ if vim.g.neovide then -- vim.g.neovide_transparency = 0.35 - vim.g.neovide_transparency = 1 + vim.g.neovide_opacity = 1 vim.g.neovide_theme = "dark" vim.g.neovide_refresh_rate = 90 vim.g.neovide_cursor_vfx_mode = "torpedo" diff --git a/lua/pika/lazy.lua b/lua/pika/lazy.lua index d56a156..dae8236 100644 --- a/lua/pika/lazy.lua +++ b/lua/pika/lazy.lua @@ -1,17 +1,17 @@ -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) @@ -23,14 +23,13 @@ vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ - spec = { - -- import your plugins - { import = "pika.plugins" }, - { import = "pika.plugins.lsp" }, - }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "nord" } }, - -- automatically check for plugin updates - checker = { enabled = true }, + spec = { + -- import your plugins + { import = "pika.plugins" }, + { import = "pika.plugins.lsp" }, + }, + -- Configure any other settings here. See the documentation for more details. + ui = { backdrop = 100 }, + -- automatically check for plugin updates + checker = { enabled = true }, }) diff --git a/lua/pika/plugins/dashboard.lua b/lua/pika/plugins/dashboard.lua index 1646807..96e3de6 100644 --- a/lua/pika/plugins/dashboard.lua +++ b/lua/pika/plugins/dashboard.lua @@ -116,13 +116,13 @@ return { "folke/persistence.nvim", event = "BufReadPre", opts = {}, - -- stylua: ignore - keys = { - { "qs", function() require("persistence").load() end, desc = "Restore Session" }, - { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, - { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, - { "db", ":Dashboard", desc = "Dashboard"} - }, + -- stylua: ignore + keys = { + -- { "qs", function() require("persistence").load() end, desc = "Restore Session" }, + -- { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, + -- { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, + { "db", ":Dashboard", desc = "Dashboard"} + }, }, }, } diff --git a/lua/pika/plugins/lsp/mason.lua b/lua/pika/plugins/lsp/mason.lua index d5fcf86..1fec2fe 100644 --- a/lua/pika/plugins/lsp/mason.lua +++ b/lua/pika/plugins/lsp/mason.lua @@ -4,6 +4,9 @@ return { "williamboman/mason-lspconfig.nvim", "WhoIsSethDaniel/mason-tool-installer.nvim", }, + -- opts = { + -- + -- } config = function() -- import mason local mason = require("mason") @@ -46,6 +49,9 @@ return { }) mason_tool_installer.setup({ + function(server_name) -- default handler (optional) + require("lspconfig")[server_name].setup({}) + end, ensure_installed = { "shfmt", "prettier", diff --git a/lua/pika/plugins/mini.lua b/lua/pika/plugins/mini.lua index e3bca6d..59d6091 100644 --- a/lua/pika/plugins/mini.lua +++ b/lua/pika/plugins/mini.lua @@ -1,22 +1,52 @@ return { + -- INFO: -- mini-ai for a and i selections or other --> vin" for visual in next "" { "echasnovski/mini.ai", - version = "false", + version = "*", opts = {}, }, + -- TIP: -- ─< mini-surround for surrounding words or lines with "" or () or '' etc.. >────────── { "echasnovski/mini.surround", - version = "false", + version = "*", opts = {}, }, + -- Move any selection in any direction + { + "echasnovski/mini.move", + version = "*", + opts = { + -- Module mappings. Use `''` (empty string) to disable one. + mappings = { + -- Move visual selection in Visual mode. Defaults are Alt (Meta) + hjkl. + left = "", + right = "", + down = "", + up = "", + + line_left = "", + line_right = "", + line_down = "", + line_up = "", + -- Move current line in Normal mode + }, + + -- Options which control moving behavior + options = { + -- Automatically reindent selection during linewise vertical move + reindent_linewise = true, + }, + }, + }, + -- ─< miniIcons >─────────────────────────────────────────────────────────────────────── { "echasnovski/mini.icons", - version = "false", + version = "*", opts = {}, lazy = true, specs = { diff --git a/lua/pika/plugins/qol.lua b/lua/pika/plugins/qol.lua index 2e39595..558aad0 100644 --- a/lua/pika/plugins/qol.lua +++ b/lua/pika/plugins/qol.lua @@ -138,7 +138,7 @@ return { ), }, - -- ─< INFO: Those comments are really great! >────────────────────────────────────────── + -- ─< ERROR: Those comments are really great! >────────────────────────────────────────── -- ─────────────────────< NOTE: And they can be pretty satisfying... >───────────────────── -- ╭──────────────────────────────────────╮ -- │ WARN: Also they can change in color! │ @@ -148,8 +148,9 @@ return { dependencies = { "nvim-lua/plenary.nvim" }, opts = { keywords = { - NOTE = { icon = " ", color = "hint" }, - INFO = { icon = " ", color = "info" }, + NOTE = { icon = " ", color = "hint", alt = { "TIP" } }, + INFO = { icon = " ", color = "info", alt = { "INFORMATION" } }, + ERROR = { icon = " ", color = "error", alt = { "ERR" } }, WARNING = { icon = " ", color = "warning", alt = { "WARN" } }, }, }, @@ -200,7 +201,7 @@ return { enable_named_colors = true, ---Highlight tailwind colors, e.g. 'bg-blue-500' - enable_tailwind = false, + enable_tailwind = true, ---Set custom colors ---Label must be properly escaped with '%' to adhere to `string.gmatch` @@ -219,21 +220,21 @@ return { -- ╭──────────────────────────────────────╮ -- │ 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" }, - }, - }, + -- { + -- "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) │ diff --git a/lua/pika/plugins/ui.lua b/lua/pika/plugins/ui.lua index 5236ba4..385326d 100644 --- a/lua/pika/plugins/ui.lua +++ b/lua/pika/plugins/ui.lua @@ -23,19 +23,19 @@ return { 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 = "󰬫", + 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 = "󱄊", + 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, + delay = 30, reveal = { "close" }, hide = { "nvim_lsp" }, }, @@ -217,6 +217,7 @@ return { }) vim.notify = require("notify") end, + vim.keymap.set("n", "tn", "Telescope notify", { desc = "Telescope show Notifications" }), }, -- ╭──────────────────────────────╮ -- │ slimline - nice bar for nvim │ @@ -229,9 +230,37 @@ return { 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 + spaces = { + components = "─", + left = "─", + right = "─", + }, + configs = { + path = { + hl = { + primary = "Define", + }, + }, + git = { + hl = { + primary = "Function", + }, + }, + diagnostics = { + hl = { + primary = "Statement", + }, + }, + filetype_lsp = { + hl = { + primary = "String", + }, + }, + }, components = { -- Choose components and their location left = { "mode", + "progress", -- "path", -- "git", }, @@ -245,11 +274,6 @@ return { "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 @@ -293,8 +317,8 @@ return { "folke/which-key.nvim", event = "VeryLazy", init = function() - vim.o.timeout = true - vim.o.timeoutlen = 350 + vim.o.timeout = false + vim.o.timeoutlen = 0 end, opts = { -- your configuration comes here From aa324a3cc035fd3de8d82eb771b0d7ab59383c40 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 5 Apr 2025 12:15:07 +0200 Subject: [PATCH 27/67] nvim todo changes --- lua/pika/plugins/qol.lua | 6 +++--- lua/pika/plugins/ui.lua | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/pika/plugins/qol.lua b/lua/pika/plugins/qol.lua index 558aad0..86c0096 100644 --- a/lua/pika/plugins/qol.lua +++ b/lua/pika/plugins/qol.lua @@ -149,9 +149,9 @@ return { opts = { keywords = { NOTE = { icon = " ", color = "hint", alt = { "TIP" } }, - INFO = { icon = " ", color = "info", alt = { "INFORMATION" } }, - ERROR = { icon = " ", color = "error", alt = { "ERR" } }, - WARNING = { icon = " ", color = "warning", alt = { "WARN" } }, + INFO = { icon = " ", color = "info", alt = { "INFORMATION", "IMPORTANT" } }, + ERROR = { icon = " ", color = "error", alt = { "ERR", "CAUTIOIN" } }, + WARNING = { icon = " ", color = "warning", alt = { "WARN", "WHY" } }, }, }, }, diff --git a/lua/pika/plugins/ui.lua b/lua/pika/plugins/ui.lua index 385326d..2013457 100644 --- a/lua/pika/plugins/ui.lua +++ b/lua/pika/plugins/ui.lua @@ -219,6 +219,7 @@ return { end, vim.keymap.set("n", "tn", "Telescope notify", { desc = "Telescope show Notifications" }), }, + -- ╭──────────────────────────────╮ -- │ slimline - nice bar for nvim │ -- ╰──────────────────────────────╯ From acc5c649f39642e00e8579d7dfe068b3671e8a9c Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 5 Apr 2025 13:33:39 +0200 Subject: [PATCH 28/67] changes for the config --- init.lua | 40 ----- lua/pika/core/init.lua | 2 + lua/pika/core/options.lua | 5 +- lua/pika/plugins/git.lua | 306 +++++++++++++++++++------------------- 4 files changed, 162 insertions(+), 191 deletions(-) diff --git a/init.lua b/init.lua index cbd3f1a..b057c40 100644 --- a/init.lua +++ b/init.lua @@ -10,44 +10,4 @@ else -- ╰──────────────────────────────────────────────────────╯ vim.cmd.colorscheme("rose-pine-moon") - - -- 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 end diff --git a/lua/pika/core/init.lua b/lua/pika/core/init.lua index 4e41d6e..f020bcd 100644 --- a/lua/pika/core/init.lua +++ b/lua/pika/core/init.lua @@ -1,3 +1,5 @@ require("pika.core.options") require("pika.core.keymaps") +require("pika.core.custom") require("pika.core.custom.terminalcmd") +require("pika.core.custom.hugopaste") diff --git a/lua/pika/core/options.lua b/lua/pika/core/options.lua index 47fe86c..3d78ec5 100644 --- a/lua/pika/core/options.lua +++ b/lua/pika/core/options.lua @@ -54,7 +54,10 @@ o.swapfile = false -- Disable the tilde on empty lines -- enable slimline bubble chain ( )----( ) -o.fillchars = { eob = " ", stl = "─" } +o.fillchars = { + eob = " ", + -- stl = "─", +} -- SudaRead automatic if file is inaccessible vim.g.suda_smart_edit = 1 diff --git a/lua/pika/plugins/git.lua b/lua/pika/plugins/git.lua index b6cfc5c..33c4271 100644 --- a/lua/pika/plugins/git.lua +++ b/lua/pika/plugins/git.lua @@ -1,156 +1,162 @@ return { { - "tanvirtin/vgit.nvim", - dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons" }, - -- Lazy loading on 'VimEnter' event is necessary. - event = "VimEnter", - config = function() - require("vgit").setup( - -- keymaps = { - -- ["n "] = { - -- function() - -- require("vgit").hunk_up() - -- end, - -- desc = "VGit Hunk Up", - -- }, - -- ["n "] = { - -- function() - -- require("vgit").hunk_down() - -- end, - -- desc = "VGit Hunk Down", - -- }, - -- ["n gs"] = { - -- function() - -- require("vgit").buffer_hunk_stage() - -- end, - -- desc = "VGit Stage Hunk", - -- }, - -- ["n gr"] = { - -- function() - -- require("vgit").buffer_hunk_reset() - -- end, - -- desc = "VGit Reset Hunk", - -- }, - -- ["n gp"] = { - -- function() - -- require("vgit").buffer_hunk_preview() - -- end, - -- desc = "VGit Preview Hunk", - -- }, - -- ["n gb"] = { - -- function() - -- require("vgit").buffer_blame_preview() - -- end, - -- desc = "VGit Blame Preview", - -- }, - -- ["n gf"] = { - -- function() - -- require("vgit").buffer_diff_preview() - -- end, - -- desc = "VGit Diff Preview", - -- }, - -- ["n gh"] = { - -- function() - -- require("vgit").buffer_history_preview() - -- end, - -- desc = "VGit History Preview", - -- }, - -- ["n gu"] = { - -- function() - -- require("vgit").buffer_reset() - -- end, - -- desc = "VGit Reset Buffer", - -- }, - -- ["n gcm"] = { - -- function() - -- require("vgit").project_commit_preview() - -- end, - -- desc = "VGit Commit Preview", - -- }, - -- ["n gcc"] = { - -- function() - -- require("vgit").project_commits_preview() - -- end, - -- desc = "VGit Commits Preview", - -- }, - -- ["n gcl"] = { - -- function() - -- require("vgit").project_logs_preview() - -- end, - -- desc = "VGit Logs Preview", - -- }, - -- ["n gd"] = { - -- function() - -- require("vgit").project_diff_preview() - -- end, - -- desc = "VGit Project Diff", - -- }, - -- ["n gx"] = { - -- function() - -- require("vgit").toggle_diff_preference() - -- end, - -- desc = "VGit Toggle Diff Preference", - -- }, - -- }, - ) - end, - - vim.keymap.set("n", "", function() - require("vgit").hunk_up() - end, { desc = "VGit Hunk Up" }), - - vim.keymap.set("n", "", function() - require("vgit").hunk_down() - end, { desc = "VGit Hunk Down" }), - - vim.keymap.set("n", "gs", function() - require("vgit").buffer_hunk_stage() - end, { desc = "VGit Stage Hunk" }), - - vim.keymap.set("n", "gr", function() - require("vgit").buffer_hunk_reset() - end, { desc = "VGit Reset Hunk" }), - - vim.keymap.set("n", "gp", function() - require("vgit").buffer_hunk_preview() - end, { desc = "VGit Preview Hunk" }), - - vim.keymap.set("n", "gb", function() - require("vgit").buffer_blame_preview() - end, { desc = "VGit Blame Preview" }), - - vim.keymap.set("n", "gf", function() - require("vgit").buffer_diff_preview() - end, { desc = "VGit Diff Preview" }), - - vim.keymap.set("n", "gh", function() - require("vgit").buffer_history_preview() - end, { desc = "VGit History Preview" }), - - vim.keymap.set("n", "gu", function() - require("vgit").buffer_reset() - end, { desc = "VGit Reset Buffer" }), - - vim.keymap.set("n", "gcm", function() - require("vgit").project_commit_preview() - end, { desc = "VGit Commit Preview" }), - - vim.keymap.set("n", "gcc", function() - require("vgit").project_commits_preview() - end, { desc = "VGit Commits Preview" }), - - vim.keymap.set("n", "gcl", function() - require("vgit").project_logs_preview() - end, { desc = "VGit Logs Preview" }), - - vim.keymap.set("n", "gd", function() - require("vgit").project_diff_preview() - end, { desc = "VGit Project Diff" }), - - vim.keymap.set("n", "gx", function() - require("vgit").toggle_diff_preference() - end, { desc = "VGit Toggle Diff Preference" }), + "sindrets/diffview.nvim", + opts = {}, + vim.keymap.set("n", "gd", "DiffviewOpen", { desc = "Git DiffviewOpen" }), + vim.keymap.set("n", "gc", "DiffviewClose", { desc = "Git DiffviewClose" }), }, + -- { + -- "tanvirtin/vgit.nvim", + -- dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons" }, + -- -- Lazy loading on 'VimEnter' event is necessary. + -- event = "VimEnter", + -- config = function() + -- require("vgit").setup( + -- -- keymaps = { + -- -- ["n "] = { + -- -- function() + -- -- require("vgit").hunk_up() + -- -- end, + -- -- desc = "VGit Hunk Up", + -- -- }, + -- -- ["n "] = { + -- -- function() + -- -- require("vgit").hunk_down() + -- -- end, + -- -- desc = "VGit Hunk Down", + -- -- }, + -- -- ["n gs"] = { + -- -- function() + -- -- require("vgit").buffer_hunk_stage() + -- -- end, + -- -- desc = "VGit Stage Hunk", + -- -- }, + -- -- ["n gr"] = { + -- -- function() + -- -- require("vgit").buffer_hunk_reset() + -- -- end, + -- -- desc = "VGit Reset Hunk", + -- -- }, + -- -- ["n gp"] = { + -- -- function() + -- -- require("vgit").buffer_hunk_preview() + -- -- end, + -- -- desc = "VGit Preview Hunk", + -- -- }, + -- -- ["n gb"] = { + -- -- function() + -- -- require("vgit").buffer_blame_preview() + -- -- end, + -- -- desc = "VGit Blame Preview", + -- -- }, + -- -- ["n gf"] = { + -- -- function() + -- -- require("vgit").buffer_diff_preview() + -- -- end, + -- -- desc = "VGit Diff Preview", + -- -- }, + -- -- ["n gh"] = { + -- -- function() + -- -- require("vgit").buffer_history_preview() + -- -- end, + -- -- desc = "VGit History Preview", + -- -- }, + -- -- ["n gu"] = { + -- -- function() + -- -- require("vgit").buffer_reset() + -- -- end, + -- -- desc = "VGit Reset Buffer", + -- -- }, + -- -- ["n gcm"] = { + -- -- function() + -- -- require("vgit").project_commit_preview() + -- -- end, + -- -- desc = "VGit Commit Preview", + -- -- }, + -- -- ["n gcc"] = { + -- -- function() + -- -- require("vgit").project_commits_preview() + -- -- end, + -- -- desc = "VGit Commits Preview", + -- -- }, + -- -- ["n gcl"] = { + -- -- function() + -- -- require("vgit").project_logs_preview() + -- -- end, + -- -- desc = "VGit Logs Preview", + -- -- }, + -- -- ["n gd"] = { + -- -- function() + -- -- require("vgit").project_diff_preview() + -- -- end, + -- -- desc = "VGit Project Diff", + -- -- }, + -- -- ["n gx"] = { + -- -- function() + -- -- require("vgit").toggle_diff_preference() + -- -- end, + -- -- desc = "VGit Toggle Diff Preference", + -- -- }, + -- -- }, + -- ) + -- end, + -- + -- vim.keymap.set("n", "", function() + -- require("vgit").hunk_up() + -- end, { desc = "VGit Hunk Up" }), + -- + -- vim.keymap.set("n", "", function() + -- require("vgit").hunk_down() + -- end, { desc = "VGit Hunk Down" }), + -- + -- vim.keymap.set("n", "gs", function() + -- require("vgit").buffer_hunk_stage() + -- end, { desc = "VGit Stage Hunk" }), + -- + -- vim.keymap.set("n", "gr", function() + -- require("vgit").buffer_hunk_reset() + -- end, { desc = "VGit Reset Hunk" }), + -- + -- vim.keymap.set("n", "gp", function() + -- require("vgit").buffer_hunk_preview() + -- end, { desc = "VGit Preview Hunk" }), + -- + -- vim.keymap.set("n", "gb", function() + -- require("vgit").buffer_blame_preview() + -- end, { desc = "VGit Blame Preview" }), + -- + -- vim.keymap.set("n", "gf", function() + -- require("vgit").buffer_diff_preview() + -- end, { desc = "VGit Diff Preview" }), + -- + -- vim.keymap.set("n", "gh", function() + -- require("vgit").buffer_history_preview() + -- end, { desc = "VGit History Preview" }), + -- + -- vim.keymap.set("n", "gu", function() + -- require("vgit").buffer_reset() + -- end, { desc = "VGit Reset Buffer" }), + -- + -- vim.keymap.set("n", "gcm", function() + -- require("vgit").project_commit_preview() + -- end, { desc = "VGit Commit Preview" }), + -- + -- vim.keymap.set("n", "gcc", function() + -- require("vgit").project_commits_preview() + -- end, { desc = "VGit Commits Preview" }), + -- + -- vim.keymap.set("n", "gcl", function() + -- require("vgit").project_logs_preview() + -- end, { desc = "VGit Logs Preview" }), + -- + -- vim.keymap.set("n", "gd", function() + -- require("vgit").project_diff_preview() + -- end, { desc = "VGit Project Diff" }), + -- + -- vim.keymap.set("n", "gx", function() + -- require("vgit").toggle_diff_preference() + -- end, { desc = "VGit Toggle Diff Preference" }), + -- }, { "lewis6991/gitsigns.nvim", From 3af369e397c6ad1259a29f685c547d3ce9960675 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 5 Apr 2025 18:50:52 +0200 Subject: [PATCH 29/67] addet lualine becouse slimline has compatability issues --- lua/pika/plugins/ui.lua | 210 +++++++++++++++++++++++----------------- 1 file changed, 123 insertions(+), 87 deletions(-) diff --git a/lua/pika/plugins/ui.lua b/lua/pika/plugins/ui.lua index 2013457..81adb22 100644 --- a/lua/pika/plugins/ui.lua +++ b/lua/pika/plugins/ui.lua @@ -220,96 +220,132 @@ return { vim.keymap.set("n", "tn", "Telescope notify", { desc = "Telescope show Notifications" }), }, + -- ╭────────────────────────────────╮ + -- │ lualine - another bar for nvim │ + -- ╰────────────────────────────────╯ + { + "nvim-lualine/lualine.nvim", + opts = { + options = { + theme = bubbles_theme, + component_separators = "", + section_separators = { left = "", right = "" }, + }, + sections = { + lualine_a = { { "mode", separator = { left = "" }, right_padding = 4 } }, + lualine_b = { "filename", "branch" }, + lualine_c = { + "%=", + "cwd", + }, + lualine_x = {}, + lualine_y = { "filetype", "progress" }, + lualine_z = { + { "location", separator = { right = "" }, left_padding = 4 }, + }, + }, + inactive_sections = { + lualine_a = { "filename" }, + lualine_b = {}, + lualine_c = {}, + lualine_x = {}, + lualine_y = {}, + lualine_z = { "location" }, + }, + tabline = {}, + extensions = {}, + }, + }, + -- ╭──────────────────────────────╮ -- │ 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 - spaces = { - components = "─", - left = "─", - right = "─", - }, - configs = { - path = { - hl = { - primary = "Define", - }, - }, - git = { - hl = { - primary = "Function", - }, - }, - diagnostics = { - hl = { - primary = "Statement", - }, - }, - filetype_lsp = { - hl = { - primary = "String", - }, - }, - }, - components = { -- Choose components and their location - left = { - "mode", - "progress", - -- "path", - -- "git", - }, - center = { - "path", - "git", - }, - right = { - "diagnostics", - "filetype_lsp", - "progress", - }, - }, - 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 = " ", - }, - }, - }, + -- { + -- "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 + -- spaces = { + -- components = "─", + -- left = "─", + -- right = "─", + -- }, + -- configs = { + -- path = { + -- hl = { + -- primary = "Define", + -- }, + -- }, + -- git = { + -- hl = { + -- primary = "Function", + -- }, + -- }, + -- diagnostics = { + -- hl = { + -- primary = "Statement", + -- }, + -- }, + -- filetype_lsp = { + -- hl = { + -- primary = "String", + -- }, + -- }, + -- }, + -- components = { -- Choose components and their location + -- left = { + -- "mode", + -- "progress", + -- -- "path", + -- -- "git", + -- }, + -- center = { + -- "path", + -- "git", + -- }, + -- right = { + -- "diagnostics", + -- "filetype_lsp", + -- "progress", + -- }, + -- }, + -- 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 │ From d5652f6685d7938ab6eaeed166b19a62991f9fc8 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 7 Apr 2025 12:48:18 +0200 Subject: [PATCH 30/67] typo and changed grep text for w(ord) --- lua/pika/plugins/dashboard.lua | 2 +- lua/pika/plugins/qol.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/pika/plugins/dashboard.lua b/lua/pika/plugins/dashboard.lua index 96e3de6..51c7f37 100644 --- a/lua/pika/plugins/dashboard.lua +++ b/lua/pika/plugins/dashboard.lua @@ -55,7 +55,7 @@ return { end, desc = " Find Text", icon = " ", - key = "g", + key = "w", }, { action = function() diff --git a/lua/pika/plugins/qol.lua b/lua/pika/plugins/qol.lua index 86c0096..95d2da7 100644 --- a/lua/pika/plugins/qol.lua +++ b/lua/pika/plugins/qol.lua @@ -150,7 +150,7 @@ return { keywords = { NOTE = { icon = " ", color = "hint", alt = { "TIP" } }, INFO = { icon = " ", color = "info", alt = { "INFORMATION", "IMPORTANT" } }, - ERROR = { icon = " ", color = "error", alt = { "ERR", "CAUTIOIN" } }, + ERROR = { icon = " ", color = "error", alt = { "ERR", "CAUTION" } }, WARNING = { icon = " ", color = "warning", alt = { "WARN", "WHY" } }, }, }, From 2e23a2116f78a9d47259e46f01a9a20c3913f467 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 7 Apr 2025 12:48:51 +0200 Subject: [PATCH 31/67] removed neodev becouse of deprication? --- lua/pika/plugins/lsp/blink-cmp.lua | 2 +- lua/pika/plugins/lsp/nvim-cmp.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/pika/plugins/lsp/blink-cmp.lua b/lua/pika/plugins/lsp/blink-cmp.lua index 1603997..495ac0f 100644 --- a/lua/pika/plugins/lsp/blink-cmp.lua +++ b/lua/pika/plugins/lsp/blink-cmp.lua @@ -494,7 +494,7 @@ return { dependencies = { { "saghen/blink.cmp" }, { "antosha417/nvim-lsp-file-operations", config = true }, - { "folke/neodev.nvim", opts = {} }, + -- { "folke/neodev.nvim", opts = {} }, }, config = function() diff --git a/lua/pika/plugins/lsp/nvim-cmp.lua b/lua/pika/plugins/lsp/nvim-cmp.lua index 0149837..26a7868 100644 --- a/lua/pika/plugins/lsp/nvim-cmp.lua +++ b/lua/pika/plugins/lsp/nvim-cmp.lua @@ -151,7 +151,7 @@ return { dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" }, }, { "antosha417/nvim-lsp-file-operations", config = true }, - { "folke/neodev.nvim", opts = {} }, + -- { "folke/neodev.nvim", opts = {} }, }, config = function() From 67d22af38e6a5bfc51df238d092eba2b85d79cbf Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 10 Apr 2025 10:15:43 +0200 Subject: [PATCH 32/67] addet quotes to the dashboard --- lua/pika/plugins/dashboard.lua | 40 ++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/lua/pika/plugins/dashboard.lua b/lua/pika/plugins/dashboard.lua index 51c7f37..d1298eb 100644 --- a/lua/pika/plugins/dashboard.lua +++ b/lua/pika/plugins/dashboard.lua @@ -1,4 +1,12 @@ return { + { + "RileyGabrielson/inspire.nvim", + config = function() + require("inspire").setup({ + mode = "random", + }) + end, + }, { "nvimdev/dashboard-nvim", lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin. @@ -22,7 +30,14 @@ return { ██████ █████████████████████ ████ █████ █████ ████ ██████ ]] - logo = string.rep("\n", 8) .. logo .. "\n\n" + local inspire = require("inspire") + local quote = inspire.get_quote() + local centered_quote_lines = inspire.center_text(quote.text, quote.author, 52, 8, 52) + + -- Convert the table of lines to a single string with newlines + local centered_quote_str = table.concat(centered_quote_lines, "\n") + + logo = string.rep("\n", 8) .. logo .. "\n\n" .. centered_quote_str .. "\n\n" local opts = { theme = "doom", @@ -113,16 +128,19 @@ return { return opts end, dependencies = { - "folke/persistence.nvim", - event = "BufReadPre", - opts = {}, - -- stylua: ignore - keys = { - -- { "qs", function() require("persistence").load() end, desc = "Restore Session" }, - -- { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, - -- { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, - { "db", ":Dashboard", desc = "Dashboard"} - }, + { + "folke/persistence.nvim", + event = "BufReadPre", + opts = {}, + -- stylua: ignore + keys = { + -- { "qs", function() require("persistence").load() end, desc = "Restore Session" }, + -- { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, + -- { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, + { "db", ":Dashboard", desc = "Dashboard"}, + { "dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"}, + }, + }, }, }, } From 49cd9c66bed42caccbd933068d76229a54e45589 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 10 Apr 2025 10:21:56 +0200 Subject: [PATCH 33/67] addet icons to the dashboard --- lua/pika/plugins/dashboard.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lua/pika/plugins/dashboard.lua b/lua/pika/plugins/dashboard.lua index d1298eb..fc09786 100644 --- a/lua/pika/plugins/dashboard.lua +++ b/lua/pika/plugins/dashboard.lua @@ -52,16 +52,21 @@ return { require("telescope.builtin").find_files() end, desc = " Find File", - icon = " ", + icon = " ", key = "f", }, - { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, + { + action = "ene | startinsert", + desc = " New File", + icon = " ", + key = "n", + }, { action = function() require("telescope.builtin").oldfiles() end, desc = " Recent Files", - icon = " ", + icon = " ", key = "r", }, { @@ -69,7 +74,7 @@ return { require("telescope.builtin").live_grep() end, desc = " Find Text", - icon = " ", + icon = "󱄽 ", key = "w", }, { @@ -77,13 +82,13 @@ return { require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") }) end, desc = " Search Neovim files", - icon = " ", + icon = " ", key = "c", }, { action = 'lua require("persistence").load()', desc = " Restore Session", - icon = " ", + icon = " ", key = "s", }, -- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, @@ -93,7 +98,7 @@ return { vim.api.nvim_input("qa") end, desc = " Quit", - icon = " ", + icon = "󰅘 ", key = "q", }, }, From f62470d43c8a44508abb28ffbcbf308fdaa429b8 Mon Sep 17 00:00:00 2001 From: piecka Date: Thu, 10 Apr 2025 11:08:13 +0200 Subject: [PATCH 34/67] addet some goodies --- lua/pika/core/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index c48cd1b..1c7fcde 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -53,7 +53,7 @@ map("n", "s", vim.cmd.w) map("n", "", vim.cmd.w) -- Visual mode: Indent selected lines --- INFO: got removed becouse of the mini-move plugin +-- INFO: got removed because of the mini-move plugin -- map("v", "", ">gv", { desc = "Indent and keep selection" }) -- map("v", "", " Date: Thu, 10 Apr 2025 11:19:28 +0200 Subject: [PATCH 35/67] addet custom configs --- .gitignore | 2 +- lua/pika/core/custom/hugopaste.lua | 34 +++++++++++++++++++++ lua/pika/core/custom/init.lua | 13 +++++++++ lua/pika/plugins/colorschemes.lua | 47 +++++++++++++++--------------- 4 files changed, 71 insertions(+), 25 deletions(-) create mode 100644 lua/pika/core/custom/hugopaste.lua create mode 100644 lua/pika/core/custom/init.lua diff --git a/.gitignore b/.gitignore index eed252c..9b945f4 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ lazy-lock.json cd-project.nvim.json -custom/ +# custom/ diff --git a/lua/pika/core/custom/hugopaste.lua b/lua/pika/core/custom/hugopaste.lua new file mode 100644 index 0000000..02b21b7 --- /dev/null +++ b/lua/pika/core/custom/hugopaste.lua @@ -0,0 +1,34 @@ +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 + +-- Keybind for saving clipboard screenshot and inserting a Markdown link +vim.api.nvim_set_keymap("n", "ps", ":lua SaveScreenshotAndInsertLink()", { noremap = true, silent = true }) diff --git a/lua/pika/core/custom/init.lua b/lua/pika/core/custom/init.lua new file mode 100644 index 0000000..215237a --- /dev/null +++ b/lua/pika/core/custom/init.lua @@ -0,0 +1,13 @@ +vim.api.nvim_create_autocmd("TermOpen", { + group = vim.api.nvim_create_augroup("custom-term-open", { clear = true }), + callback = function() + vim.opt.number = false + vim.opt.relativenumber = false + end, +}) + +vim.keymap.set("n", "ts", function() + vim.cmd.new() + vim.cmd.term() + vim.api.nvim_win_set_height(0, 15) +end) diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index 1cac46b..f71e803 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -1,10 +1,9 @@ return { -- { "folke/tokyonight.nvim" }, - -- { "catppuccin/nvim", name = "catppuccin" }, - -- { "EdenEast/nightfox.nvim" }, - -- { "DanWlker/primeppuccin", name = "primeppuccin" }, + { "catppuccin/nvim", name = "catppuccin" }, + { "EdenEast/nightfox.nvim" }, { "fynnfluegge/monet.nvim", name = "monet" }, - { "L-Colombo/oldschool.nvim", config = "true" }, + { "L-Colombo/oldschool.nvim", config = true }, { "rose-pine/neovim", name = "rose-pine" }, { "AlexvZyl/nordic.nvim" }, { "eldritch-theme/eldritch.nvim" }, @@ -91,26 +90,26 @@ return { -- }, -- }, -- }, - { - "neko-night/nvim", - lazy = false, - -- priority = 1000, - opts = { - transparent = false, -- Enable this to disable setting the background color - terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim - styles = { - -- Style to be applied to different syntax groups - -- Value is any valid attr-list value for `:help nvim_set_hl` - comments = { italic = false }, - keywords = { italic = true }, - functions = { bold = true }, - variables = { bold = true }, - -- Background styles. Can be "dark", "transparent" or "normal" - sidebars = "dark", -- style for sidebars, see below - floats = "dark", -- style for floating windows - }, - }, - }, + -- { + -- "neko-night/nvim", + -- lazy = false, + -- -- priority = 1000, + -- opts = { + -- transparent = false, -- Enable this to disable setting the background color + -- terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim + -- styles = { + -- -- Style to be applied to different syntax groups + -- -- Value is any valid attr-list value for `:help nvim_set_hl` + -- comments = { italic = false }, + -- keywords = { italic = true }, + -- functions = { bold = true }, + -- variables = { bold = true }, + -- -- Background styles. Can be "dark", "transparent" or "normal" + -- sidebars = "dark", -- style for sidebars, see below + -- floats = "dark", -- style for floating windows + -- }, + -- }, + -- }, { "scottmckendry/cyberdream.nvim", name = "cyberdream", From c795da7aef3c9308abbdeab536db59797bb00d51 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 10 Apr 2025 11:20:59 +0200 Subject: [PATCH 36/67] made custom.lua not source anymore --- lua/pika/plugins/{custom.lua => custom.lua.bak} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lua/pika/plugins/{custom.lua => custom.lua.bak} (100%) diff --git a/lua/pika/plugins/custom.lua b/lua/pika/plugins/custom.lua.bak similarity index 100% rename from lua/pika/plugins/custom.lua rename to lua/pika/plugins/custom.lua.bak From 44c88a1bb15f3254f52da537fa1401de48a8f04e Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 21 Apr 2025 17:10:58 +0200 Subject: [PATCH 37/67] . --- lua/pika/plugins/colorschemes.lua | 149 +++++++++++++++++------------- 1 file changed, 83 insertions(+), 66 deletions(-) diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index f71e803..2fedc7a 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -10,77 +10,94 @@ return { { "samharju/synthweave.nvim" }, { "ptdewey/darkearth-nvim" }, { - "AstroNvim/astrotheme", + "wtfox/jellybeans.nvim", + lazy = false, opts = { - { - palette = "astrodark", -- String of the default palette to use when calling `:colorscheme astrotheme` - background = { -- :h background, palettes to use when using the core vim background colors - light = "astrolight", - dark = "astrodark", - }, - - style = { - transparent = false, -- Bool value, toggles transparency. - inactive = true, -- Bool value, toggles inactive window color. - float = true, -- Bool value, toggles floating windows background colors. - neotree = true, -- Bool value, toggles neo-trees background color. - border = true, -- Bool value, toggles borders. - title_invert = true, -- Bool value, swaps text and background colors. - italic_comments = true, -- Bool value, toggles italic comments. - simple_syntax_colors = true, -- Bool value, simplifies the amounts of colors used for syntax highlighting. - }, - - termguicolors = true, -- Bool value, toggles if termguicolors are set by AstroTheme. - - terminal_color = true, -- Bool value, toggles if terminal_colors are set by AstroTheme. - - plugin_default = "auto", -- Sets how all plugins will be loaded - -- "auto": Uses lazy / packer enabled plugins to load highlights. - -- true: Enables all plugins highlights. - -- false: Disables all plugins. - - plugins = { -- Allows for individual plugin overrides using plugin name and value from above. - ["bufferline.nvim"] = false, - }, - - palettes = { - global = { -- Globally accessible palettes, theme palettes take priority. - my_grey = "#ebebeb", - my_color = "#ffffff", - }, - astrodark = { -- Extend or modify astrodarks palette colors - ui = { - red = "#800010", -- Overrides astrodarks red UI color - accent = "#CC83E3", -- Changes the accent color of astrodark. - }, - syntax = { - cyan = "#800010", -- Overrides astrodarks cyan syntax color - comments = "#CC83E3", -- Overrides astrodarks comment color. - }, - my_color = "#000000", -- Overrides global.my_color - }, - }, - - highlights = { - global = { -- Add or modify hl groups globally, theme specific hl groups take priority. - modify_hl_groups = function(hl, c) - hl.PluginColor4 = { fg = c.my_grey, bg = c.none } - end, - ["@String"] = { fg = "#ff00ff", bg = "NONE" }, - }, - astrodark = { - -- first parameter is the highlight table and the second parameter is the color palette table - modify_hl_groups = function(hl, c) -- modify_hl_groups function allows you to modify hl groups, - hl.Comment.fg = c.my_color - hl.Comment.italic = true - end, - ["@String"] = { fg = "#ff00ff", bg = "NONE" }, - }, - }, + style = "dark", -- "dark" or "light" + transparent = false, + italics = true, + flat_ui = true, -- toggles "flat UI" for pickers + palette = nil, -- specify a palette variant: nil (default/"vibrant") or "jellybeans_muted" + plugins = { + all = false, + auto = true, -- will read lazy.nvim and apply the colors for plugins that are installed }, + -- on_highlights = function(highlights, colors) end, + -- on_colors = function(colors) end, }, }, -- { + -- "AstroNvim/astrotheme", + -- opts = { + -- { + -- palette = "astrodark", -- String of the default palette to use when calling `:colorscheme astrotheme` + -- background = { -- :h background, palettes to use when using the core vim background colors + -- light = "astrolight", + -- dark = "astrodark", + -- }, + -- + -- style = { + -- transparent = false, -- Bool value, toggles transparency. + -- inactive = true, -- Bool value, toggles inactive window color. + -- float = true, -- Bool value, toggles floating windows background colors. + -- neotree = true, -- Bool value, toggles neo-trees background color. + -- border = true, -- Bool value, toggles borders. + -- title_invert = true, -- Bool value, swaps text and background colors. + -- italic_comments = true, -- Bool value, toggles italic comments. + -- simple_syntax_colors = true, -- Bool value, simplifies the amounts of colors used for syntax highlighting. + -- }, + -- + -- termguicolors = true, -- Bool value, toggles if termguicolors are set by AstroTheme. + -- + -- terminal_color = true, -- Bool value, toggles if terminal_colors are set by AstroTheme. + -- + -- plugin_default = "auto", -- Sets how all plugins will be loaded + -- -- "auto": Uses lazy / packer enabled plugins to load highlights. + -- -- true: Enables all plugins highlights. + -- -- false: Disables all plugins. + -- + -- plugins = { -- Allows for individual plugin overrides using plugin name and value from above. + -- ["bufferline.nvim"] = false, + -- }, + -- + -- palettes = { + -- global = { -- Globally accessible palettes, theme palettes take priority. + -- my_grey = "#ebebeb", + -- my_color = "#ffffff", + -- }, + -- astrodark = { -- Extend or modify astrodarks palette colors + -- ui = { + -- red = "#800010", -- Overrides astrodarks red UI color + -- accent = "#CC83E3", -- Changes the accent color of astrodark. + -- }, + -- syntax = { + -- cyan = "#800010", -- Overrides astrodarks cyan syntax color + -- comments = "#CC83E3", -- Overrides astrodarks comment color. + -- }, + -- my_color = "#000000", -- Overrides global.my_color + -- }, + -- }, + -- + -- highlights = { + -- global = { -- Add or modify hl groups globally, theme specific hl groups take priority. + -- modify_hl_groups = function(hl, c) + -- hl.PluginColor4 = { fg = c.my_grey, bg = c.none } + -- end, + -- ["@String"] = { fg = "#ff00ff", bg = "NONE" }, + -- }, + -- astrodark = { + -- -- first parameter is the highlight table and the second parameter is the color palette table + -- modify_hl_groups = function(hl, c) -- modify_hl_groups function allows you to modify hl groups, + -- hl.Comment.fg = c.my_color + -- hl.Comment.italic = true + -- end, + -- ["@String"] = { fg = "#ff00ff", bg = "NONE" }, + -- }, + -- }, + -- }, + -- }, + -- }, + -- { -- "ferdinandrau/lavish.nvim", -- opts = { -- style = { From ead25405028614cea39e3448229b1ee6c9299ca9 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 4 May 2025 17:43:36 +0200 Subject: [PATCH 38/67] . --- init.lua | 2 +- lua/pika/plugins/colorschemes.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index b057c40..083b5dd 100644 --- a/init.lua +++ b/init.lua @@ -9,5 +9,5 @@ else -- │ themes are under ./lua/pika/plugins/colorschemes.lua │ -- ╰──────────────────────────────────────────────────────╯ - vim.cmd.colorscheme("rose-pine-moon") + vim.cmd.colorscheme("tokyonight") end diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index 2fedc7a..109f230 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -1,5 +1,5 @@ return { - -- { "folke/tokyonight.nvim" }, + { "folke/tokyonight.nvim" }, { "catppuccin/nvim", name = "catppuccin" }, { "EdenEast/nightfox.nvim" }, { "fynnfluegge/monet.nvim", name = "monet" }, From 27622c55c0d953395b7fa4eb4ba8fe6b4c5db613 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 5 May 2025 17:50:29 +0200 Subject: [PATCH 39/67] some changes for the better --- lua/pika/plugins/ai.lua | 4 + lua/pika/plugins/dashboard.lua | 4 + lua/pika/plugins/git.lua | 4 + lua/pika/plugins/qol.lua | 2 +- lua/pika/plugins/snacks.lua | 383 +++++++++++++++++++++++++++++++++ lua/pika/plugins/telescope.lua | 5 + lua/pika/plugins/ui.lua | 60 +++--- 7 files changed, 431 insertions(+), 31 deletions(-) create mode 100644 lua/pika/plugins/snacks.lua diff --git a/lua/pika/plugins/ai.lua b/lua/pika/plugins/ai.lua index 1864ce1..10ab26a 100644 --- a/lua/pika/plugins/ai.lua +++ b/lua/pika/plugins/ai.lua @@ -1,3 +1,7 @@ +if true then + return {} +end +-- WARNING: If this line is true, then the plugin will NOT get sourced! return { { "yetone/avante.nvim", diff --git a/lua/pika/plugins/dashboard.lua b/lua/pika/plugins/dashboard.lua index fc09786..1a283f8 100644 --- a/lua/pika/plugins/dashboard.lua +++ b/lua/pika/plugins/dashboard.lua @@ -1,3 +1,7 @@ +if true then + return {} +end +-- WARNING: If this line is true, then the plugin will NOT get sourced! return { { "RileyGabrielson/inspire.nvim", diff --git a/lua/pika/plugins/git.lua b/lua/pika/plugins/git.lua index 33c4271..cfcdb24 100644 --- a/lua/pika/plugins/git.lua +++ b/lua/pika/plugins/git.lua @@ -1,3 +1,7 @@ +if true then + return {} +end +-- WARNING: If this line is true, then the plugin will NOT get sourced! return { { "sindrets/diffview.nvim", diff --git a/lua/pika/plugins/qol.lua b/lua/pika/plugins/qol.lua index 95d2da7..cc60817 100644 --- a/lua/pika/plugins/qol.lua +++ b/lua/pika/plugins/qol.lua @@ -269,7 +269,7 @@ return { { "chrisgrieser/nvim-scissors", lazy = false, - dependencies = { "nvim-telescope/telescope.nvim", "garymjr/nvim-snippets" }, + dependencies = { "garymjr/nvim-snippets" }, -- "nvim-telescope/telescope.nvim" 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 }, diff --git a/lua/pika/plugins/snacks.lua b/lua/pika/plugins/snacks.lua new file mode 100644 index 0000000..8cf246a --- /dev/null +++ b/lua/pika/plugins/snacks.lua @@ -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 + { + "sf", + function() + Snacks.picker.smart() + end, + desc = "Smart Find Files", + }, + { + "", + function() + Snacks.picker.buffers() + end, + desc = "Buffers", + }, + { + "/", + function() + Snacks.picker.grep() + end, + desc = "Grep", + }, + { + ":", + function() + Snacks.picker.command_history() + end, + desc = "Command History", + }, + { + "n", + function() + Snacks.picker.notifications() + end, + desc = "Notification History", + }, + -- { + -- "e", + -- function() + -- Snacks.explorer() + -- end, + -- desc = "File Explorer", + -- }, + -- find + -- { + -- "fb", + -- function() + -- Snacks.picker.buffers() + -- end, + -- desc = "Buffers", + -- }, + { + "fc", + function() + Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) + end, + desc = "Find Config File", + }, + { + "ff", + function() + Snacks.picker.files() + end, + desc = "Find Files", + }, + { + "fg", + function() + Snacks.picker.git_files() + end, + desc = "Find Git Files", + }, + { + "fp", + function() + Snacks.picker.projects() + end, + desc = "Projects", + }, + { + "fr", + function() + Snacks.picker.recent() + end, + desc = "Recent", + }, + -- git + { + "gb", + function() + Snacks.picker.git_branches() + end, + desc = "Git Branches", + }, + { + "gl", + function() + Snacks.picker.git_log() + end, + desc = "Git Log", + }, + { + "gL", + function() + Snacks.picker.git_log_line() + end, + desc = "Git Log Line", + }, + { + "gs", + function() + Snacks.picker.git_status() + end, + desc = "Git Status", + }, + { + "gS", + function() + Snacks.picker.git_stash() + end, + desc = "Git Stash", + }, + { + "gd", + function() + Snacks.picker.git_diff() + end, + desc = "Git Diff (Hunks)", + }, + { + "gf", + function() + Snacks.picker.git_log_file() + end, + desc = "Git Log File", + }, + -- Grep + { + "sg", + function() + Snacks.picker.grep() + end, + desc = "Grep", + }, + { + "sw", + function() + Snacks.picker.grep_word() + end, + desc = "Visual selection or word", + mode = { "n", "x" }, + }, + { + "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 + { + "z", + function() + Snacks.zen() + end, + desc = "Toggle Zen Mode", + }, + { + "Z", + function() + Snacks.zen.zoom() + end, + desc = "Toggle Zoom", + }, + { + "n", + function() + Snacks.notifier.show_history() + end, + desc = "Notification History", + }, + { + "cR", + function() + Snacks.rename.rename_file() + end, + desc = "Rename File", + }, + { + "gB", + function() + Snacks.gitbrowse() + end, + desc = "Git Browse", + mode = { "n", "v" }, + }, + { + "gg", + function() + Snacks.lazygit() + end, + desc = "Lazygit", + }, + { + "un", + function() + Snacks.notifier.hide() + end, + desc = "Dismiss All Notifications", + }, + { + "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("us") + Snacks.toggle.option("wrap", { name = "Wrap" }):map("uw") + Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("uL") + Snacks.toggle.diagnostics():map("ud") + Snacks.toggle.line_number():map("ul") + Snacks.toggle + .option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }) + :map("uc") + Snacks.toggle.treesitter():map("uT") + Snacks.toggle + .option("background", { off = "light", on = "dark", name = "Dark Background" }) + :map("ub") + Snacks.toggle.inlay_hints():map("uh") + Snacks.toggle.indent():map("ug") + Snacks.toggle.dim():map("uD") + end, + }) + end, + dependencies = { + { + "folke/persistence.nvim", + event = "BufReadPre", + opts = {}, + -- stylua: ignore + keys = { + -- { "qs", function() require("persistence").load() end, desc = "Restore Session" }, + -- { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, + -- { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, + { "db", ":Dashboard", desc = "Dashboard"}, + { "dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"}, + }, + }, + }, +} diff --git a/lua/pika/plugins/telescope.lua b/lua/pika/plugins/telescope.lua index c6c80d1..ac08c76 100644 --- a/lua/pika/plugins/telescope.lua +++ b/lua/pika/plugins/telescope.lua @@ -1,3 +1,8 @@ +if true then + return {} +end +-- WARNING: If this line is true, then the plugin will NOT get sourced! +-- return { "nvim-telescope/telescope.nvim", branch = "0.1.x", diff --git a/lua/pika/plugins/ui.lua b/lua/pika/plugins/ui.lua index 81adb22..36baed2 100644 --- a/lua/pika/plugins/ui.lua +++ b/lua/pika/plugins/ui.lua @@ -189,36 +189,36 @@ return { -- ╭────────────────────────────────────╮ -- │ 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, - vim.keymap.set("n", "tn", "Telescope notify", { desc = "Telescope show 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, + -- vim.keymap.set("n", "tn", "Telescope notify", { desc = "Telescope show Notifications" }), + -- }, -- ╭────────────────────────────────╮ -- │ lualine - another bar for nvim │ From ecfee809a2d2979495758a4703134e2ecd929ccd Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 11 May 2025 13:13:37 +0200 Subject: [PATCH 40/67] =?UTF-8?q?=EF=80=99=20update:=20submodules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets b/snippets index 7eaeb1e..8a403ac 160000 --- a/snippets +++ b/snippets @@ -1 +1 @@ -Subproject commit 7eaeb1e40883a0478d50fd01cc91083f4b079f0e +Subproject commit 8a403ac2b2489f522761eb284fc16a4dceb33da1 From 1a7402cb8df2ea7ed28b0eaad11173885be00794 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 11 May 2025 16:31:58 +0200 Subject: [PATCH 41/67] addet random functions --- functions.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions.sh b/functions.sh index 26455bf..6a7d8ba 100644 --- a/functions.sh +++ b/functions.sh @@ -1,3 +1,7 @@ get_ip() { ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1 } + +random() { + openssl rand -hex "${1:-32}" +} From e2a9688d5994f6a8b22a34219208816abf0034fa Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 13 May 2025 10:22:24 +0200 Subject: [PATCH 42/67] =?UTF-8?q?=EF=80=99=20update:=20submodules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 083b5dd..863e603 100644 --- a/init.lua +++ b/init.lua @@ -9,5 +9,5 @@ else -- │ themes are under ./lua/pika/plugins/colorschemes.lua │ -- ╰──────────────────────────────────────────────────────╯ - vim.cmd.colorscheme("tokyonight") + vim.cmd.colorscheme("rose-pine") end From 9327d7cf0df74148f1c6b59420f0b30b0b500e39 Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 13 May 2025 10:23:05 +0200 Subject: [PATCH 43/67] =?UTF-8?q?=EF=80=99=20update:=20submodules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets b/snippets index 8a403ac..929f26d 160000 --- a/snippets +++ b/snippets @@ -1 +1 @@ -Subproject commit 8a403ac2b2489f522761eb284fc16a4dceb33da1 +Subproject commit 929f26d76e87910f3ee76f3f8643fa2ee2e9b428 From 38d9610d927e265f18237081cd2a886870b0c5ae Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 16 May 2025 09:03:43 +0200 Subject: [PATCH 44/67] wip --- lua/pika/plugins/colorschemes.lua | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index 109f230..245327e 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -5,27 +5,22 @@ return { { "fynnfluegge/monet.nvim", name = "monet" }, { "L-Colombo/oldschool.nvim", config = true }, { "rose-pine/neovim", name = "rose-pine" }, - { "AlexvZyl/nordic.nvim" }, - { "eldritch-theme/eldritch.nvim" }, - { "samharju/synthweave.nvim" }, - { "ptdewey/darkearth-nvim" }, + { "zootedb0t/citruszest.nvim" }, + -- { "AlexvZyl/nordic.nvim" }, + -- { "eldritch-theme/eldritch.nvim" }, { - "wtfox/jellybeans.nvim", + "cdmill/neomodern.nvim", lazy = false, - opts = { - style = "dark", -- "dark" or "light" - transparent = false, - italics = true, - flat_ui = true, -- toggles "flat UI" for pickers - palette = nil, -- specify a palette variant: nil (default/"vibrant") or "jellybeans_muted" - plugins = { - all = false, - auto = true, -- will read lazy.nvim and apply the colors for plugins that are installed - }, - -- on_highlights = function(highlights, colors) end, - -- on_colors = function(colors) end, - }, + priority = 1000, + config = function() + require("neomodern").setup({ + -- optional configuration here + }) + require("neomodern").load() + end, }, + -- { "samharju/synthweave.nvim" }, + -- { "ptdewey/darkearth-nvim" }, -- { -- "AstroNvim/astrotheme", -- opts = { From 9bb5cee85a0e81eb516503dadff492031aa101f2 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 17 May 2025 11:12:42 +0200 Subject: [PATCH 45/67] config update --- init.lua | 2 +- lua/pika/plugins/git.lua | 18 +++++++++--------- snippets | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 863e603..f53ad1d 100644 --- a/init.lua +++ b/init.lua @@ -9,5 +9,5 @@ else -- │ themes are under ./lua/pika/plugins/colorschemes.lua │ -- ╰──────────────────────────────────────────────────────╯ - vim.cmd.colorscheme("rose-pine") + vim.cmd.colorscheme("duskfox") end diff --git a/lua/pika/plugins/git.lua b/lua/pika/plugins/git.lua index cfcdb24..b431146 100644 --- a/lua/pika/plugins/git.lua +++ b/lua/pika/plugins/git.lua @@ -1,14 +1,14 @@ -if true then - return {} -end +-- if true then +-- return {} +-- end -- WARNING: If this line is true, then the plugin will NOT get sourced! return { - { - "sindrets/diffview.nvim", - opts = {}, - vim.keymap.set("n", "gd", "DiffviewOpen", { desc = "Git DiffviewOpen" }), - vim.keymap.set("n", "gc", "DiffviewClose", { desc = "Git DiffviewClose" }), - }, + -- { + -- "sindrets/diffview.nvim", + -- opts = {}, + -- vim.keymap.set("n", "gd", "DiffviewOpen", { desc = "Git DiffviewOpen" }), + -- vim.keymap.set("n", "gc", "DiffviewClose", { desc = "Git DiffviewClose" }), + -- }, -- { -- "tanvirtin/vgit.nvim", -- dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons" }, diff --git a/snippets b/snippets index 929f26d..bab1817 160000 --- a/snippets +++ b/snippets @@ -1 +1 @@ -Subproject commit 929f26d76e87910f3ee76f3f8643fa2ee2e9b428 +Subproject commit bab181730c06bfc8880832dd3d14fcb032d1538b From 27802ca45d738d1a92ca78fbc414b38cc773c78a Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 17 May 2025 11:15:51 +0200 Subject: [PATCH 46/67] wip --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5e77df0..bcc8c4f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ This is my current neovim configuration. It uses [lazy.nvim](https://github.com/folke/lazy.nvim) as the packagemanager.
-My config is relatively simple structured. If you want to add a plugin, just create a .lua file in the lua/pika/plugin/ path, inside a require{} table. +My config is relatively simple structured. If you want to add a plugin, just create a .lua file in the `lua/pika/plugin/` path, inside a `require{}` table. > [!TIP] > pika is my username, so feel free to change this to your needs. @@ -12,12 +12,19 @@ My config is relatively simple structured. If you want to add a plugin, just cre > To install neovim 0.9.0 or higher, you can run the following. > > ```bash -> bash -c "$(curl -sSL https://git.k4li.de/pika/scripts/raw/branch/main/bash/installs/neovim.sh)" +> curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh | bash +> ``` + +> [!TIP] +> You can run the script silently, via.. +> +> ```bash +> curl -fsSL https://... | bash -s -- [ --silent | -s ] > ``` --- -For installation, just git clone this repo to your $HOME/.config/ folder. +For config-installation, just git clone this repo to your $HOME/.config/ folder. ```bash git clone --depth=1 https://git.k4li.de/dotfiles/nvim.git $HOME/.config/nvim/ @@ -28,5 +35,5 @@ git clone --depth=1 https://git.k4li.de/dotfiles/nvim.git $HOME/.config/nvim/ Colorscheme-plugins are defined in [colorschemes.lua](lua/pika/plugins/colorschemes.lua) > [!TIP] -> default theme is `monet`
+> default theme is `duskfox`
> you can change the theme in the colorscheme function in the [init.lua](./init.lua) From 76beceb1d73d624ad306a81bb92b610c36b711ec Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 17 May 2025 11:18:28 +0200 Subject: [PATCH 47/67] wip --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bcc8c4f..35a186a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -This is my current neovim configuration. It uses [lazy.nvim](https://github.com/folke/lazy.nvim) as the packagemanager.
-My config is relatively simple structured. If you want to add a plugin, just create a .lua file in the `lua/pika/plugin/` path, inside a `require{}` table. +This is my current neovim configuration. It uses [lazy.nvim](https://github.com/folke/lazy.nvim) as the packagemanager. > [!TIP] > pika is my username, so feel free to change this to your needs. @@ -30,10 +29,20 @@ For config-installation, just git clone this repo to your $HOME/.config/ folder. git clone --depth=1 https://git.k4li.de/dotfiles/nvim.git $HOME/.config/nvim/ ``` +> Prefetch the config with `nvim --headless +q` and enjoy the config + +--- + ## configuration -Colorscheme-plugins are defined in [colorschemes.lua](lua/pika/plugins/colorschemes.lua) +- Colorscheme-plugins are defined in [colorschemes.lua](lua/pika/plugins/colorschemes.lua) > [!TIP] > default theme is `duskfox`
> you can change the theme in the colorscheme function in the [init.lua](./init.lua) + +--- + +- Plugin configuration and adding your own + +My config is relatively simple structured. If you want to add a plugin, just create a .lua file in the `lua/pika/plugin/` path, inside a `require{}` table. From 8bc64e844a48691987028f3e74512bc2d330bb46 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 17 May 2025 11:22:33 +0200 Subject: [PATCH 48/67] wip --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 35a186a..7f908cd 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ This is my current neovim configuration. It uses [lazy.nvim](https://github.com/ > [!CAUTION] > You're neovim version has to be >=0.9.0
> If you're not sure what version you have, type `nvim --version`
-> To install neovim 0.9.0 or higher, you can run the following. +> To build neovim from source, you can run the following. +> This script should cover [most linux distros](https://git.k4li.de/scripts/installs/raw/branch/main/distros.sh "This is a neat description?") > > ```bash > curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh | bash From d4c15d31ddee27f821bbab8be1fb4085145dd2e4 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 17 May 2025 11:23:48 +0200 Subject: [PATCH 49/67] wip --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f908cd..678580f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This is my current neovim configuration. It uses [lazy.nvim](https://github.com/ > You're neovim version has to be >=0.9.0
> If you're not sure what version you have, type `nvim --version`
> To build neovim from source, you can run the following. -> This script should cover [most linux distros](https://git.k4li.de/scripts/installs/raw/branch/main/distros.sh "This is a neat description?") +> This script should cover [most linux distros](https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh "This script is used to detect the linux distros for installing the dependencies and building from source") > > ```bash > curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh | bash From 0e1ebe53ab76184082cbc99d180435a1c0ea9987 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 17 May 2025 11:25:38 +0200 Subject: [PATCH 50/67] wip --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 678580f..6d347b3 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ This is my current neovim configuration. It uses [lazy.nvim](https://github.com/ ## installation > [!CAUTION] -> You're neovim version has to be >=0.9.0
+> You're neovim version has to be >=0.10.0
> If you're not sure what version you have, type `nvim --version`
-> To build neovim from source, you can run the following. +> To build neovim from source, you can run the following.
> This script should cover [most linux distros](https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh "This script is used to detect the linux distros for installing the dependencies and building from source") > > ```bash -> curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh | bash +> curl -fsSL [https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh](https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh) | bash > ``` > [!TIP] From d0348502da7340f06729dba6cde9472420c05417 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 17 May 2025 11:34:42 +0200 Subject: [PATCH 51/67] wip --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d347b3..7641d68 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This is my current neovim configuration. It uses [lazy.nvim](https://github.com/ > This script should cover [most linux distros](https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh "This script is used to detect the linux distros for installing the dependencies and building from source") > > ```bash -> curl -fsSL [https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh](https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh) | bash +> curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh | bash > ``` > [!TIP] @@ -46,4 +46,11 @@ git clone --depth=1 https://git.k4li.de/dotfiles/nvim.git $HOME/.config/nvim/ - Plugin configuration and adding your own -My config is relatively simple structured. If you want to add a plugin, just create a .lua file in the `lua/pika/plugin/` path, inside a `require{}` table. +My config is relatively simple structured. If you want to add a plugin, just create a `.lua` file in the `lua/pika/plugin/` path which has the plugin code inside a `require{}` table. + +```plugin.lua +require{ + "/", -- <- usually the git username/repo, can also be a full link to external git repo + opts = {}, -- <- put in your plugin configuration content. The opts = {}, calls `require("").setup({})` +} +``` From 6814b4ec874718fe25461473e4694d0a986085fa Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 17 May 2025 11:37:48 +0200 Subject: [PATCH 52/67] wip --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7641d68..c3f2144 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,10 @@ This is my current neovim configuration. It uses [lazy.nvim](https://github.com/ For config-installation, just git clone this repo to your $HOME/.config/ folder. ```bash -git clone --depth=1 https://git.k4li.de/dotfiles/nvim.git $HOME/.config/nvim/ +git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim.git $HOME/.config/nvim/ ``` +> The `--recursive` flag is for pulling down the snippets submodule, since this is used in more neovim configs
> Prefetch the config with `nvim --headless +q` and enjoy the config --- From 5ecd3ed7caa2158c0ac6b7c6a238316b21707709 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 17 May 2025 21:12:06 +0200 Subject: [PATCH 53/67] wip --- lua/pika/plugins/init.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lua/pika/plugins/init.lua b/lua/pika/plugins/init.lua index be46c0d..32f48f9 100644 --- a/lua/pika/plugins/init.lua +++ b/lua/pika/plugins/init.lua @@ -1,12 +1,30 @@ return { "nvim-lua/plenary.nvim", -- lua functions that many plugins use - "christoomey/vim-tmux-navigator", -- tmux & split window navigation "dstein64/nvim-scrollview", "folke/lsp-colors.nvim", "jghauser/mkdir.nvim", "jghauser/follow-md-links.nvim", "lambdalisue/vim-suda", + { + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + "TmuxNavigatorProcessList", + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + { "", "TmuxNavigatePrevious" }, + }, + }, + { "rachartier/tiny-devicons-auto-colors.nvim", dependencies = { From 90fbec4c47fb899e5a11b2bf5766b16d0894c529 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 18 May 2025 13:13:45 +0200 Subject: [PATCH 54/67] =?UTF-8?q?=EF=80=99=20update:=20submodules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets b/snippets index bab1817..8bb9360 160000 --- a/snippets +++ b/snippets @@ -1 +1 @@ -Subproject commit bab181730c06bfc8880832dd3d14fcb032d1538b +Subproject commit 8bb9360cb29c803622741293baddd9c0ebdd7116 From a91160e0bd96c6ea76a26c9d2ac30e7152664115 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 19 May 2025 17:50:06 +0200 Subject: [PATCH 55/67] lua/pika/plugins/colorschemes.lua --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f53ad1d..ca9ef11 100644 --- a/init.lua +++ b/init.lua @@ -9,5 +9,5 @@ else -- │ themes are under ./lua/pika/plugins/colorschemes.lua │ -- ╰──────────────────────────────────────────────────────╯ - vim.cmd.colorscheme("duskfox") + vim.cmd.colorscheme("tokyodark") end From 72bb801cf8ff1f017e1c2833a552b86b3bf099f5 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 19 May 2025 17:50:15 +0200 Subject: [PATCH 56/67] lua/pika/plugins/colorschemes.lua --- lua/pika/plugins/colorschemes.lua | 217 +++++++++++++----------------- lua/pika/plugins/snacks.lua | 12 ++ 2 files changed, 108 insertions(+), 121 deletions(-) diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index 245327e..79ed408 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -1,127 +1,88 @@ return { - { "folke/tokyonight.nvim" }, - { "catppuccin/nvim", name = "catppuccin" }, - { "EdenEast/nightfox.nvim" }, - { "fynnfluegge/monet.nvim", name = "monet" }, - { "L-Colombo/oldschool.nvim", config = true }, - { "rose-pine/neovim", name = "rose-pine" }, - { "zootedb0t/citruszest.nvim" }, - -- { "AlexvZyl/nordic.nvim" }, - -- { "eldritch-theme/eldritch.nvim" }, + -- ╭───────────────╮ + -- │ common themes │ + -- ╰───────────────╯ + -- ╭──────────────────╮ + -- │ tokyonight/-dark │ + -- ╰──────────────────╯ + -- { "folke/tokyonight.nvim" }, { - "cdmill/neomodern.nvim", - lazy = false, - priority = 1000, - config = function() - require("neomodern").setup({ - -- optional configuration here - }) - require("neomodern").load() - end, + "tiagovla/tokyodark.nvim", + opts = { + terminal_colors = true, -- enable terminal colors + transparent_background = false, -- set background to transparent + gamma = 1.00, -- adjust the brightness of the theme + styles = { + comments = { italic = false }, -- style for comments + keywords = { italic = true }, -- style for keywords + identifiers = { italic = true }, -- style for identifiers + functions = {}, -- style for functions + variables = { bold = true }, -- style for variables + }, + custom_highlights = {} or function(highlights, palette) + return {} + end, -- extend highlights + custom_palette = {} or function(palette) + return {} + end, -- extend palette + }, }, - -- { "samharju/synthweave.nvim" }, - -- { "ptdewey/darkearth-nvim" }, - -- { - -- "AstroNvim/astrotheme", - -- opts = { - -- { - -- palette = "astrodark", -- String of the default palette to use when calling `:colorscheme astrotheme` - -- background = { -- :h background, palettes to use when using the core vim background colors - -- light = "astrolight", - -- dark = "astrodark", - -- }, - -- - -- style = { - -- transparent = false, -- Bool value, toggles transparency. - -- inactive = true, -- Bool value, toggles inactive window color. - -- float = true, -- Bool value, toggles floating windows background colors. - -- neotree = true, -- Bool value, toggles neo-trees background color. - -- border = true, -- Bool value, toggles borders. - -- title_invert = true, -- Bool value, swaps text and background colors. - -- italic_comments = true, -- Bool value, toggles italic comments. - -- simple_syntax_colors = true, -- Bool value, simplifies the amounts of colors used for syntax highlighting. - -- }, - -- - -- termguicolors = true, -- Bool value, toggles if termguicolors are set by AstroTheme. - -- - -- terminal_color = true, -- Bool value, toggles if terminal_colors are set by AstroTheme. - -- - -- plugin_default = "auto", -- Sets how all plugins will be loaded - -- -- "auto": Uses lazy / packer enabled plugins to load highlights. - -- -- true: Enables all plugins highlights. - -- -- false: Disables all plugins. - -- - -- plugins = { -- Allows for individual plugin overrides using plugin name and value from above. - -- ["bufferline.nvim"] = false, - -- }, - -- - -- palettes = { - -- global = { -- Globally accessible palettes, theme palettes take priority. - -- my_grey = "#ebebeb", - -- my_color = "#ffffff", - -- }, - -- astrodark = { -- Extend or modify astrodarks palette colors - -- ui = { - -- red = "#800010", -- Overrides astrodarks red UI color - -- accent = "#CC83E3", -- Changes the accent color of astrodark. - -- }, - -- syntax = { - -- cyan = "#800010", -- Overrides astrodarks cyan syntax color - -- comments = "#CC83E3", -- Overrides astrodarks comment color. - -- }, - -- my_color = "#000000", -- Overrides global.my_color - -- }, - -- }, - -- - -- highlights = { - -- global = { -- Add or modify hl groups globally, theme specific hl groups take priority. - -- modify_hl_groups = function(hl, c) - -- hl.PluginColor4 = { fg = c.my_grey, bg = c.none } - -- end, - -- ["@String"] = { fg = "#ff00ff", bg = "NONE" }, - -- }, - -- astrodark = { - -- -- first parameter is the highlight table and the second parameter is the color palette table - -- modify_hl_groups = function(hl, c) -- modify_hl_groups function allows you to modify hl groups, - -- hl.Comment.fg = c.my_color - -- hl.Comment.italic = true - -- end, - -- ["@String"] = { fg = "#ff00ff", bg = "NONE" }, - -- }, - -- }, - -- }, - -- }, - -- }, - -- { - -- "ferdinandrau/lavish.nvim", - -- opts = { - -- style = { - -- italic_comments = false, - -- italic_strings = false, - -- transparent = false, - -- }, - -- }, - -- }, - -- { - -- "neko-night/nvim", - -- lazy = false, - -- -- priority = 1000, - -- opts = { - -- transparent = false, -- Enable this to disable setting the background color - -- terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim - -- styles = { - -- -- Style to be applied to different syntax groups - -- -- Value is any valid attr-list value for `:help nvim_set_hl` - -- comments = { italic = false }, - -- keywords = { italic = true }, - -- functions = { bold = true }, - -- variables = { bold = true }, - -- -- Background styles. Can be "dark", "transparent" or "normal" - -- sidebars = "dark", -- style for sidebars, see below - -- floats = "dark", -- style for floating windows - -- }, - -- }, - -- }, + + -- ╭────────────╮ + -- │ catppuccin │ + -- ╰────────────╯ + -- { "catppuccin/nvim", name = "catppuccin" }, + { + "catppuccin/nvim", + name = "catppuccin", + opts = { + term_colors = true, + transparent_background = false, + styles = { + comments = {}, + conditionals = {}, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + }, + -- color_overrides = { + -- mocha = { + -- base = "#101010", + -- mantle = "#101010", + -- crust = "#202020", + -- }, + -- }, + integrations = { + telescope = { + enabled = true, + -- style = "nvchad", + }, + dropbar = { + enabled = true, + color_mode = true, + }, + }, + }, + }, + + -- ╭───────────╮ + -- │ rose-pine │ + -- ╰───────────╯ + { "rose-pine/neovim", name = "rose-pine" }, + + -- ╭───────────────────────────╮ + -- │ nordic (monet is similar) │ + -- ╰───────────────────────────╯ + -- { "AlexvZyl/nordic.nvim" }, + { "fynnfluegge/monet.nvim", name = "monet" }, + + -- { "eldritch-theme/eldritch.nvim" }, { "scottmckendry/cyberdream.nvim", name = "cyberdream", @@ -132,6 +93,20 @@ return { terminal_colors = true, }, }, + + -- ╭───────────────────────────╮ + -- │ nice dark oldschool theme │ + -- ╰───────────────────────────╯ + { "L-Colombo/oldschool.nvim", config = true }, + + -- ╭────────────╮ + -- │ theme sets │ + -- ╰────────────╯ + { "EdenEast/nightfox.nvim" }, + + -- ╭─────────────────────╮ + -- │ gruvbox alternative │ + -- ╰─────────────────────╯ { "ribru17/bamboo.nvim", opts = { diff --git a/lua/pika/plugins/snacks.lua b/lua/pika/plugins/snacks.lua index 8cf246a..90ab751 100644 --- a/lua/pika/plugins/snacks.lua +++ b/lua/pika/plugins/snacks.lua @@ -118,6 +118,17 @@ return { -- end, -- desc = "Buffers", -- }, + + -- both of the next two bindings are the same, just for different keymaps + -- ─< find [N]eovim config >──────────────────────────────────────────────────────────── + { + "fn", + function() + Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) + end, + desc = "Find Config File", + }, + -- ─< find neovim [C]onfig >──────────────────────────────────────────────────────────── { "fc", function() @@ -125,6 +136,7 @@ return { end, desc = "Find Config File", }, + { "ff", function() From f31cff14daf1b6c7c5e04808d08c8a2545d4e39a Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 19 May 2025 17:50:35 +0200 Subject: [PATCH 57/67] =?UTF-8?q?=EF=80=99=20update:=20submodules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets b/snippets index 8bb9360..4af5735 160000 --- a/snippets +++ b/snippets @@ -1 +1 @@ -Subproject commit 8bb9360cb29c803622741293baddd9c0ebdd7116 +Subproject commit 4af57355e220288c7e5eac5a4f3a95951c212d66 From bcdd3cdbd7a58cc3f8ac536b0b99167e808b4c43 Mon Sep 17 00:00:00 2001 From: pika Date: Wed, 21 May 2025 17:43:07 +0200 Subject: [PATCH 58/67] wip --- lua/pika/plugins/colorschemes.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index 79ed408..afbab25 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -11,13 +11,13 @@ return { opts = { terminal_colors = true, -- enable terminal colors transparent_background = false, -- set background to transparent - gamma = 1.00, -- adjust the brightness of the theme + gamma = 0.90, -- adjust the brightness of the theme styles = { comments = { italic = false }, -- style for comments keywords = { italic = true }, -- style for keywords identifiers = { italic = true }, -- style for identifiers - functions = {}, -- style for functions variables = { bold = true }, -- style for variables + functions = {}, -- style for functions }, custom_highlights = {} or function(highlights, palette) return {} From ac80409bb994f32a60d401b75f999eeec8f92a64 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 2 Jun 2025 12:46:09 +0200 Subject: [PATCH 59/67] wip --- init.lua | 8 + lua/pika/core/keymaps.lua | 21 +- lua/pika/plugins/colorschemes.lua | 2 +- lua/pika/plugins/explorer.lua | 4 +- lua/pika/plugins/lsp/blink-cmp.lua | 324 +++++++++++++++++++---------- lua/pika/plugins/lsp/mason.lua | 10 +- lua/pika/plugins/markdown.lua | 27 ++- lua/pika/plugins/qol.lua | 5 + lua/pika/plugins/snacks.lua | 27 ++- snippets | 2 +- 10 files changed, 292 insertions(+), 138 deletions(-) diff --git a/init.lua b/init.lua index ca9ef11..c3d199f 100644 --- a/init.lua +++ b/init.lua @@ -10,4 +10,12 @@ else -- ╰──────────────────────────────────────────────────────╯ vim.cmd.colorscheme("tokyodark") + + vim.opt.formatoptions:append("c") -- Auto-wrap comments + vim.opt.formatoptions:append("r") -- Auto-insert comment leader on Enter + vim.opt.formatoptions:append("o") -- Auto-insert comment leader with 'o'/'O' + vim.opt.formatoptions:append("q") -- Allow formatting of comments with 'gq' + vim.opt.formatoptions:remove("t") -- Don't auto-wrap text (only comments) + + vim.opt.textwidth = 80 end diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index 1c7fcde..350391b 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -9,6 +9,8 @@ nomap("n", "", "") nomap("n", "q", "") nomap("v", "q", "") nomap("v", "S", "") +-- nomap("n", "sh", "s", { desc = "Split window horizontally" }) -- spli map("t", "", "", { desc = "terminal escape terminal mode" }) -- ──────────────────────────────< rename word under cursor >────────────────────────────── --- map("n", "R", [[:%s/\<\>//gI]]) +map("n", "R", [[:%s/\<\>//gI]]) +map("v", "R", [[:%s/\<\>//gI]]) -- ───────────────< Enhanced word under cursor renaming in current buffer >──────────── -map({ "n", "x" }, "R", function() - local text = vim.fn.mode() == "n" and vim.fn.expand("") or vim.fn.trim(vim.fn.getreg('"')) - vim.ui.input({ prompt = "Replace: ", default = text }, function(input) - if input and input ~= text then - vim.cmd(("keeppatterns %%s/%s/%s/g"):format(vim.pesc(text), vim.pesc(input))) - end - end) -end, { desc = "Rename in buffer" }) +-- map({ "n", "x" }, "R", function() +-- local text = vim.fn.mode() == "n" and vim.fn.expand("") or vim.fn.trim(vim.fn.getreg('"')) +-- vim.ui.input({ prompt = "Replace: ", default = text }, function(input) +-- if input and input ~= text then +-- vim.cmd(("keeppatterns %%s/%s/%s/g"):format(vim.pesc(text), vim.pesc(input))) +-- end +-- end) +-- end, { desc = "Rename in buffer" }) diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index afbab25..1db882b 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -16,7 +16,7 @@ return { comments = { italic = false }, -- style for comments keywords = { italic = true }, -- style for keywords identifiers = { italic = true }, -- style for identifiers - variables = { bold = true }, -- style for variables + variables = { bold = true, underline = false }, -- style for variables functions = {}, -- style for functions }, custom_highlights = {} or function(highlights, palette) diff --git a/lua/pika/plugins/explorer.lua b/lua/pika/plugins/explorer.lua index 25d33c4..16f06f9 100644 --- a/lua/pika/plugins/explorer.lua +++ b/lua/pika/plugins/explorer.lua @@ -29,14 +29,14 @@ return { -- }, { -- Open in the current working directory - "tLf", + "tlf", "Yazi cwd", desc = "Terminal - Open yazi in nvim's working directory", }, { -- NOTE: this requires a version of yazi that includes -- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18 - "tlf", + "tLf", "Yazi toggle", desc = "Terminal - Resume the last yazi session", }, diff --git a/lua/pika/plugins/lsp/blink-cmp.lua b/lua/pika/plugins/lsp/blink-cmp.lua index 495ac0f..b5e5dd1 100644 --- a/lua/pika/plugins/lsp/blink-cmp.lua +++ b/lua/pika/plugins/lsp/blink-cmp.lua @@ -42,12 +42,11 @@ return { [""] = { "select_prev", "fallback" }, [""] = { "select_next", "fallback" }, - [""] = { "hide", "fallback" }, + [""] = { "hide", "fallback" }, -- disable a keymap from the preset [""] = {}, [""] = {}, - [""] = {}, -- show with a list of providers -- [""] = { @@ -79,6 +78,38 @@ return { -- Will be removed in a future release use_nvim_cmp_as_default = true, + kind_icons = { + Text = "󰉿", + Method = "󰊕", + Function = "󰊕", + Constructor = "󰒓", + + Field = "󰜢", + Variable = "󰆦", + Property = "󰖷", + + Class = "󱡠", + Interface = "󱡠", + Struct = "󱡠", + Module = "󰅩", + + Unit = "󰪚", + Value = "󰦨", + Enum = "󰦨", + EnumMember = "󰦨", + + Keyword = "󰻾", + Constant = "󰏿", + + Snippet = "󱄽", + Color = "󰏘", + File = "󰈔", + Reference = "󰬲", + Folder = "󰉋", + Event = "󱐋", + Operator = "󰪚", + TypeParameter = "󰬛", + }, }, -- (Default) Only show the documentation popup when manually triggered @@ -127,26 +158,26 @@ return { -- Maximum number of items to display max_items = 128, - selection = { - -- When `true`, will automatically select the first item in the completion list - preselect = true, - -- preselect = function(ctx) return vim.bo.filetype ~= 'markdown' end, + -- selection = { + -- -- When `true`, will automatically select the first item in the completion list + -- preselect = true, + -- -- preselect = function(ctx) return vim.bo.filetype ~= 'markdown' end, + -- + -- -- When `true`, inserts the completion item automatically when selecting it + -- -- You may want to bind a key to the `cancel` command (default ) when using this option, + -- -- which will both undo the selection and hide the completion menu + -- auto_insert = true, + -- -- auto_insert = function(ctx) return vim.bo.filetype ~= 'markdown' end + -- }, - -- When `true`, inserts the completion item automatically when selecting it - -- You may want to bind a key to the `cancel` command (default ) when using this option, - -- which will both undo the selection and hide the completion menu - auto_insert = true, - -- auto_insert = function(ctx) return vim.bo.filetype ~= 'markdown' end - }, - - cycle = { - -- When `true`, calling `select_next` at the _bottom_ of the completion list - -- will select the _first_ completion item. - from_bottom = true, - -- When `true`, calling `select_prev` at the _top_ of the completion list - -- will select the _last_ completion item. - from_top = true, - }, + -- cycle = { + -- -- When `true`, calling `select_next` at the _bottom_ of the completion list + -- -- will select the _first_ completion item. + -- from_bottom = true, + -- -- When `true`, calling `select_prev` at the _top_ of the completion list + -- -- will select the _last_ completion item. + -- from_top = true, + -- }, }, documentation = { @@ -496,95 +527,174 @@ return { { "antosha417/nvim-lsp-file-operations", config = true }, -- { "folke/neodev.nvim", opts = {} }, }, - - config = function() - local lspconfig = require("lspconfig") - local capabilities = require("blink.cmp").get_lsp_capabilities() - local mason_lspconfig = require("mason-lspconfig") - - -- Change the Diagnostic symbols in the sign column (gutter) - -- (not in youtube nvim video) - local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } - for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) - end - - mason_lspconfig.setup_handlers({ - function(server_name) - lspconfig[server_name].setup({ - capabilities = capabilities, - }) - end, - ["svelte"] = function() - lspconfig["svelte"].setup({ - capabilities = capabilities, - on_attach = function(client, bufnr) - vim.api.nvim_create_autocmd("BufWritePost", { - pattern = { "*.js", "*.ts" }, - callback = function(ctx) - client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match }) - end, - }) - end, - }) - end, - ["graphql"] = function() - lspconfig["graphql"].setup({ - capabilities = capabilities, - filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" }, - }) - end, - ["emmet_ls"] = function() - lspconfig["emmet_ls"].setup({ - capabilities = capabilities, - filetypes = { - "html", - "typescriptreact", - "javascriptreact", - "css", - "sass", - "scss", - "less", - "svelte", - }, - }) - end, - ["lua_ls"] = function() - lspconfig["lua_ls"].setup({ - capabilities = capabilities, - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - completion = { - callSnippet = "Replace", + opts = { + servers = { + lua_ls = { + function() + lspconfig["lua_ls"].setup({ + capabilities = capabilities, + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + completion = { + callSnippet = "Replace", + }, }, }, + }) + end, + }, + bashls = {}, + }, + }, + config = function(_, opts) + -- local lspconfig = require("lspconfig") + -- for server, config in pairs(opts.servers) do + -- -- passing config.capabilities to blink.cmp merges with the capabilities in your + -- -- `opts[server].capabilities, if you've defined it + -- config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities) + -- lspconfig[server].setup(config) + -- end + local servers = { + html = {}, + awk_ls = {}, + shfmt = { + filetypes = { + "ab", + }, + }, + bashls = { + filetypes = { + "bash", + "sh", + "zsh", + }, + }, + lua_ls = { + -- capabilities = capabilities, + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + completion = { + callSnippet = "Replace", + }, }, - }) - end, - ["cssls"] = function() - lspconfig["cssls"].setup({ - capabilities = capabilities, - filetypes = { "css", "scss" }, - }) - end, - ["intelephense"] = function() - lspconfig["intelephense"].setup({ - capabilities = capabilities, - filetypes = { "php", "blade.php" }, - }) - end, - -- ["tsserver"] = function() - -- -- Replace tsserver with typescript-language-server - -- lspconfig["typescript-language-server"].setup({ - -- capabilities = capabilities, - -- filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact" }, - -- }) - -- end, - }) + }, + }, + + pyright = { + settings = { + python = { + analysis = { + autoSearchPaths = true, + typeCheckingMode = "basic", + }, + }, + }, + }, + } + + for name, opts in pairs(servers) do + vim.lsp.enable(name) -- nvim v0.11.0 or above required + vim.lsp.config(name, opts) -- nvim v0.11.0 or above required + end end, + + -- CAUTION: + -- old config + -- + -- config = function() + -- local lspconfig = require("lspconfig") + -- local capabilities = require("blink.cmp").get_lsp_capabilities() + -- local mason_lspconfig = require("mason-lspconfig") + -- + -- -- Change the Diagnostic symbols in the sign column (gutter) + -- -- (not in youtube nvim video) + -- local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } + -- for type, icon in pairs(signs) do + -- local hl = "DiagnosticSign" .. type + -- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) + -- end + -- + -- mason_lspconfig.setup_handlers({ + -- function(server_name) + -- lspconfig[server_name].setup({ + -- capabilities = capabilities, + -- }) + -- end, + -- ["svelte"] = function() + -- lspconfig["svelte"].setup({ + -- capabilities = capabilities, + -- on_attach = function(client, bufnr) + -- vim.api.nvim_create_autocmd("BufWritePost", { + -- pattern = { "*.js", "*.ts" }, + -- callback = function(ctx) + -- client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match }) + -- end, + -- }) + -- end, + -- }) + -- end, + -- ["graphql"] = function() + -- lspconfig["graphql"].setup({ + -- capabilities = capabilities, + -- filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" }, + -- }) + -- end, + -- ["emmet_ls"] = function() + -- lspconfig["emmet_ls"].setup({ + -- capabilities = capabilities, + -- filetypes = { + -- "html", + -- "typescriptreact", + -- "javascriptreact", + -- "css", + -- "sass", + -- "scss", + -- "less", + -- "svelte", + -- }, + -- }) + -- end, + -- ["lua_ls"] = function() + -- lspconfig["lua_ls"].setup({ + -- capabilities = capabilities, + -- settings = { + -- Lua = { + -- diagnostics = { + -- globals = { "vim" }, + -- }, + -- completion = { + -- callSnippet = "Replace", + -- }, + -- }, + -- }, + -- }) + -- end, + -- ["cssls"] = function() + -- lspconfig["cssls"].setup({ + -- capabilities = capabilities, + -- filetypes = { "css", "scss" }, + -- }) + -- end, + -- ["intelephense"] = function() + -- lspconfig["intelephense"].setup({ + -- capabilities = capabilities, + -- filetypes = { "php", "blade.php" }, + -- }) + -- end, + -- -- ["tsserver"] = function() + -- -- -- Replace tsserver with typescript-language-server + -- -- lspconfig["typescript-language-server"].setup({ + -- -- capabilities = capabilities, + -- -- filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact" }, + -- -- }) + -- -- end, + -- }) + -- end, }, } diff --git a/lua/pika/plugins/lsp/mason.lua b/lua/pika/plugins/lsp/mason.lua index 1fec2fe..42b6964 100644 --- a/lua/pika/plugins/lsp/mason.lua +++ b/lua/pika/plugins/lsp/mason.lua @@ -4,9 +4,6 @@ return { "williamboman/mason-lspconfig.nvim", "WhoIsSethDaniel/mason-tool-installer.nvim", }, - -- opts = { - -- - -- } config = function() -- import mason local mason = require("mason") @@ -54,13 +51,14 @@ return { end, ensure_installed = { "shfmt", + "shellcheck", + "bashls", "prettier", "stylua", - "blade-formatter", "html-lsp", - "docker-compose-language-service", "pylint", - "eslint_d", + -- "eslint_d", + -- "blade-formatter", }, }) end, diff --git a/lua/pika/plugins/markdown.lua b/lua/pika/plugins/markdown.lua index bd9ae9a..5207a7b 100644 --- a/lua/pika/plugins/markdown.lua +++ b/lua/pika/plugins/markdown.lua @@ -1,9 +1,20 @@ -return{ -{ - 'MeanderingProgrammer/render-markdown.nvim', - opts = {}, - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite - dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons -}, +return { + { + "MeanderingProgrammer/render-markdown.nvim", + opts = {}, + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite + dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.icons" }, -- if you use standalone mini plugins + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons + }, + + -- install with yarn or npm + { + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + build = "cd app && yarn install", + init = function() + vim.g.mkdp_filetypes = { "markdown" } + end, + ft = { "markdown" }, + }, } diff --git a/lua/pika/plugins/qol.lua b/lua/pika/plugins/qol.lua index cc60817..4af2800 100644 --- a/lua/pika/plugins/qol.lua +++ b/lua/pika/plugins/qol.lua @@ -278,4 +278,9 @@ return { vim.keymap.set("n", "sm", ":ScissorsEditSnippet"), vim.keymap.set("v", "sa", ":ScissorsAddNewSnippet"), }, + + { + "gbprod/substitute.nvim", + opts = {}, + }, } diff --git a/lua/pika/plugins/snacks.lua b/lua/pika/plugins/snacks.lua index 90ab751..8ca0cc2 100644 --- a/lua/pika/plugins/snacks.lua +++ b/lua/pika/plugins/snacks.lua @@ -12,23 +12,26 @@ return { ---@class snacks.animate.Config ---@field easing? snacks.animate.easing|snacks.animate.easing.Fn animate = { - enabled = true, + enabled = false, ---@type snacks.animate.Duration|number duration = 4, -- ms per step easing = "linear", - fps = 60, -- frames per second. Global setting for all animations + fps = 90, -- frames per second. Global setting for all animations }, notifier = { enabled = true }, indent = { enabled = true }, toggle = { enabled = true }, scroll = { enabled = true }, + ---@class snacks.dashboard.Config + ---@field enabled? boolean + ---@field sections snacks.dashboard.Section + ---@field formats table dashboard = { row = nil, col = nil, pane_gap = 2, enabled = true, - -- example = "pokemon", sections = { { section = "header" }, { @@ -378,6 +381,22 @@ return { }) end, dependencies = { + { + "RileyGabrielson/inspire.nvim", + config = function() + require("inspire").setup({ + -- 'daily' or 'random' + mode = "daily", + + -- Override the default quotes + quotes = { + { text = "My First Custom Quote", author = "Me" }, + { text = "My Second Custom Quote", author = "Myself" }, + { text = "My Third Custom Quote", author = "and I" }, + }, + }) + end, + }, { "folke/persistence.nvim", event = "BufReadPre", @@ -388,7 +407,7 @@ return { -- { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, -- { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, { "db", ":Dashboard", desc = "Dashboard"}, - { "dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"}, + { "dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"}, }, }, }, diff --git a/snippets b/snippets index 4af5735..a0c3c9a 160000 --- a/snippets +++ b/snippets @@ -1 +1 @@ -Subproject commit 4af57355e220288c7e5eac5a4f3a95951c212d66 +Subproject commit a0c3c9af7cbe51960ddb5ed6513a9618284f8a76 From 3436721ba4a12814f02e4a13449e7fb37963bc08 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 8 Jun 2025 12:03:12 +0200 Subject: [PATCH 60/67] wip --- lua/pika/plugins/lsp/blink-cmp.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/pika/plugins/lsp/blink-cmp.lua b/lua/pika/plugins/lsp/blink-cmp.lua index b5e5dd1..d3ca927 100644 --- a/lua/pika/plugins/lsp/blink-cmp.lua +++ b/lua/pika/plugins/lsp/blink-cmp.lua @@ -563,6 +563,7 @@ return { shfmt = { filetypes = { "ab", + "bash", }, }, bashls = { @@ -585,7 +586,12 @@ return { }, }, }, - + misspell = { + filetypes = { + "md", + "markdown", + }, + }, pyright = { settings = { python = { From 07541bfe9512bec6194ab6813d75e35abc911067 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 8 Jun 2025 12:03:20 +0200 Subject: [PATCH 61/67] wip --- snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets b/snippets index a0c3c9a..46204c4 160000 --- a/snippets +++ b/snippets @@ -1 +1 @@ -Subproject commit a0c3c9af7cbe51960ddb5ed6513a9618284f8a76 +Subproject commit 46204c46e73040adc381ed792500f7c5b2c194ea From 8f2b2e9c463780adbea4fd97276a1c3b1d032feb Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 8 Jun 2025 12:03:44 +0200 Subject: [PATCH 62/67] wip --- lua/pika/plugins/markdown.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/pika/plugins/markdown.lua b/lua/pika/plugins/markdown.lua index 5207a7b..eafbfef 100644 --- a/lua/pika/plugins/markdown.lua +++ b/lua/pika/plugins/markdown.lua @@ -16,5 +16,7 @@ return { vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, + + vim.keymap.set("n", "md", "MarkdownPreviewToggle", { desc = "MarkDown preview" }), }, } From 7bd56631c187dafe06d8433c608d5f25f460d8d4 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 8 Jun 2025 12:08:32 +0200 Subject: [PATCH 63/67] changed colorscheme --- init.lua | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/init.lua b/init.lua index c3d199f..6c32d96 100644 --- a/init.lua +++ b/init.lua @@ -9,13 +9,6 @@ else -- │ themes are under ./lua/pika/plugins/colorschemes.lua │ -- ╰──────────────────────────────────────────────────────╯ - vim.cmd.colorscheme("tokyodark") - - vim.opt.formatoptions:append("c") -- Auto-wrap comments - vim.opt.formatoptions:append("r") -- Auto-insert comment leader on Enter - vim.opt.formatoptions:append("o") -- Auto-insert comment leader with 'o'/'O' - vim.opt.formatoptions:append("q") -- Allow formatting of comments with 'gq' - vim.opt.formatoptions:remove("t") -- Don't auto-wrap text (only comments) - - vim.opt.textwidth = 80 + -- vim.cmd.colorscheme("tokyodark") + vim.cmd.colorscheme("bamboo") end From ec159b66e89993158ddd86405ba49a507fe66295 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 8 Jun 2025 12:08:44 +0200 Subject: [PATCH 64/67] wip --- lua/pika/core/options.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/pika/core/options.lua b/lua/pika/core/options.lua index 3d78ec5..9e11994 100644 --- a/lua/pika/core/options.lua +++ b/lua/pika/core/options.lua @@ -8,6 +8,14 @@ o.number = true -- Minimal number of screen lines to keep above and below the cursor. o.scrolloff = 8 +o.formatoptions:append("c") -- Auto-wrap comments +o.formatoptions:append("r") -- Auto-insert comment leader on Enter +o.formatoptions:append("o") -- Auto-insert comment leader with 'o'/'O' +o.formatoptions:append("q") -- Allow formatting of comments with 'gq' +o.formatoptions:remove("t") -- Don't auto-wrap text (only comments) + +o.textwidth = 80 + -- tabs & indentation o.tabstop = 2 -- 2 spaces for tabs (prettier default) o.shiftwidth = 2 -- 2 spaces for indent width From f7764fd7b2664cc9ccaba9a51a813b7aa0cd8843 Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 13 Jun 2025 14:08:40 +0200 Subject: [PATCH 65/67] removed inspire as its not used --- lua/pika/plugins/snacks.lua | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lua/pika/plugins/snacks.lua b/lua/pika/plugins/snacks.lua index 8ca0cc2..a9f0e6b 100644 --- a/lua/pika/plugins/snacks.lua +++ b/lua/pika/plugins/snacks.lua @@ -381,22 +381,22 @@ return { }) end, dependencies = { - { - "RileyGabrielson/inspire.nvim", - config = function() - require("inspire").setup({ - -- 'daily' or 'random' - mode = "daily", - - -- Override the default quotes - quotes = { - { text = "My First Custom Quote", author = "Me" }, - { text = "My Second Custom Quote", author = "Myself" }, - { text = "My Third Custom Quote", author = "and I" }, - }, - }) - end, - }, + -- { + -- "RileyGabrielson/inspire.nvim", + -- config = function() + -- require("inspire").setup({ + -- -- 'daily' or 'random' + -- mode = "daily", + -- + -- -- Override the default quotes + -- quotes = { + -- { text = "My First Custom Quote", author = "Me" }, + -- { text = "My Second Custom Quote", author = "Myself" }, + -- { text = "My Third Custom Quote", author = "and I" }, + -- }, + -- }) + -- end, + -- }, { "folke/persistence.nvim", event = "BufReadPre", From 1dd2406de3631fa06bb5acb6909eefaef65eda15 Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 13 Jun 2025 14:44:01 +0200 Subject: [PATCH 66/67] wip --- lua/pika/plugins/qol.lua | 17 ----------------- lua/pika/plugins/snacks.lua | 7 ++++--- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/lua/pika/plugins/qol.lua b/lua/pika/plugins/qol.lua index 4af2800..f3ae165 100644 --- a/lua/pika/plugins/qol.lua +++ b/lua/pika/plugins/qol.lua @@ -244,23 +244,6 @@ return { 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 │ diff --git a/lua/pika/plugins/snacks.lua b/lua/pika/plugins/snacks.lua index a9f0e6b..afcf0d9 100644 --- a/lua/pika/plugins/snacks.lua +++ b/lua/pika/plugins/snacks.lua @@ -17,12 +17,13 @@ return { duration = 4, -- ms per step easing = "linear", - fps = 90, -- frames per second. Global setting for all animations + fps = 75, -- frames per second. Global setting for all animations }, notifier = { enabled = true }, indent = { enabled = true }, toggle = { enabled = true }, scroll = { enabled = true }, + ---@class snacks.dashboard.Config ---@field enabled? boolean ---@field sections snacks.dashboard.Section @@ -406,8 +407,8 @@ return { -- { "qs", function() require("persistence").load() end, desc = "Restore Session" }, -- { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, -- { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, - { "db", ":Dashboard", desc = "Dashboard"}, - { "dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"}, + { "db", ":Dashboard", desc = "Dashboard" }, + -- { "dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"}, }, }, }, From e2e9bd2504df6038dac4d67e086da1e484b05a47 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 22 Jun 2025 18:32:24 +0200 Subject: [PATCH 67/67] some changes --- init.lua | 2 +- lua/pika/plugins/colorschemes.lua | 84 ++++++++++- lua/pika/plugins/init.lua | 2 + lua/pika/plugins/ui.lua | 230 ++++++++++++++---------------- 4 files changed, 196 insertions(+), 122 deletions(-) diff --git a/init.lua b/init.lua index 6c32d96..5488b6b 100644 --- a/init.lua +++ b/init.lua @@ -10,5 +10,5 @@ else -- ╰──────────────────────────────────────────────────────╯ -- vim.cmd.colorscheme("tokyodark") - vim.cmd.colorscheme("bamboo") + vim.cmd.colorscheme("rose-pine") end diff --git a/lua/pika/plugins/colorschemes.lua b/lua/pika/plugins/colorschemes.lua index 1db882b..dae1135 100644 --- a/lua/pika/plugins/colorschemes.lua +++ b/lua/pika/plugins/colorschemes.lua @@ -1,4 +1,5 @@ return { + { "SethBarberee/challenger-deep.nvim" }, -- ╭───────────────╮ -- │ common themes │ -- ╰───────────────╯ @@ -74,7 +75,88 @@ return { -- ╭───────────╮ -- │ rose-pine │ -- ╰───────────╯ - { "rose-pine/neovim", name = "rose-pine" }, + { + "rose-pine/neovim", + name = "rose-pine", + opts = { + variant = "moon", -- auto, main, moon, or dawn + dark_variant = "moon", -- main, moon, or dawn + dim_inactive_windows = false, + extend_background_behind_borders = true, + + enable = { + terminal = true, + legacy_highlights = true, -- Improve compatibility for previous versions of Neovim + migrations = true, -- Handle deprecated options automatically + }, + + styles = { + bold = true, + italic = true, + transparency = false, + }, + + groups = { + border = "muted", + link = "iris", + panel = "surface", + + error = "love", + hint = "iris", + info = "foam", + note = "pine", + todo = "rose", + warn = "gold", + + git_add = "foam", + git_change = "rose", + git_delete = "love", + git_dirty = "rose", + git_ignore = "muted", + git_merge = "iris", + git_rename = "pine", + git_stage = "iris", + git_text = "rose", + git_untracked = "subtle", + + h1 = "iris", + h2 = "foam", + h3 = "rose", + h4 = "gold", + h5 = "pine", + h6 = "foam", + }, + + palette = { + -- Override the builtin palette per variant + -- moon = { + -- base = '#18191a', + -- overlay = '#363738', + -- }, + }, + + -- NOTE: Highlight groups are extended (merged) by default. Disable this + -- per group via `inherit = false` + highlight_groups = { + -- INFO: + -- leafy search + CurSearch = { fg = "base", bg = "leaf", inherit = false }, + Search = { fg = "text", bg = "leaf", blend = 20, inherit = false }, + }, + + before_highlight = function(group, highlight, palette) + -- Disable all undercurls + -- if highlight.undercurl then + -- highlight.undercurl = false + -- end + -- + -- Change palette colour + -- if highlight.fg == palette.pine then + -- highlight.fg = palette.foam + -- end + end, + }, + }, -- ╭───────────────────────────╮ -- │ nordic (monet is similar) │ diff --git a/lua/pika/plugins/init.lua b/lua/pika/plugins/init.lua index 32f48f9..410d938 100644 --- a/lua/pika/plugins/init.lua +++ b/lua/pika/plugins/init.lua @@ -35,4 +35,6 @@ return { require("tiny-devicons-auto-colors").setup() end, }, + + { "someguy0555/snake.nvim" }, } diff --git a/lua/pika/plugins/ui.lua b/lua/pika/plugins/ui.lua index 36baed2..bbc5d2e 100644 --- a/lua/pika/plugins/ui.lua +++ b/lua/pika/plugins/ui.lua @@ -223,129 +223,119 @@ return { -- ╭────────────────────────────────╮ -- │ lualine - another bar for nvim │ -- ╰────────────────────────────────╯ - { - "nvim-lualine/lualine.nvim", - opts = { - options = { - theme = bubbles_theme, - component_separators = "", - section_separators = { left = "", right = "" }, - }, - sections = { - lualine_a = { { "mode", separator = { left = "" }, right_padding = 4 } }, - lualine_b = { "filename", "branch" }, - lualine_c = { - "%=", - "cwd", - }, - lualine_x = {}, - lualine_y = { "filetype", "progress" }, - lualine_z = { - { "location", separator = { right = "" }, left_padding = 4 }, - }, - }, - inactive_sections = { - lualine_a = { "filename" }, - lualine_b = {}, - lualine_c = {}, - lualine_x = {}, - lualine_y = {}, - lualine_z = { "location" }, - }, - tabline = {}, - extensions = {}, - }, - }, - + -- { + -- "nvim-lualine/lualine.nvim", + -- opts = { + -- options = { + -- theme = bubbles_theme, + -- component_separators = "", + -- section_separators = { left = "", right = "" }, + -- }, + -- sections = { + -- lualine_a = { { "mode", separator = { left = "" }, right_padding = 4 } }, + -- lualine_b = { "filename", "branch" }, + -- lualine_c = { + -- "%=", + -- "cwd", + -- }, + -- lualine_x = {}, + -- lualine_y = { "filetype", "progress" }, + -- lualine_z = { + -- { "location", separator = { right = "" }, left_padding = 4 }, + -- }, + -- }, + -- inactive_sections = { + -- lualine_a = { "filename" }, + -- lualine_b = {}, + -- lualine_c = {}, + -- lualine_x = {}, + -- lualine_y = {}, + -- lualine_z = { "location" }, + -- }, + -- tabline = {}, + -- extensions = {}, + -- }, + -- }, -- ╭──────────────────────────────╮ -- │ slimline - nice bar for nvim │ -- ╰──────────────────────────────╯ - -- { - -- "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 - -- spaces = { - -- components = "─", - -- left = "─", - -- right = "─", - -- }, - -- configs = { - -- path = { - -- hl = { - -- primary = "Define", - -- }, - -- }, - -- git = { - -- hl = { - -- primary = "Function", - -- }, - -- }, - -- diagnostics = { - -- hl = { - -- primary = "Statement", - -- }, - -- }, - -- filetype_lsp = { - -- hl = { - -- primary = "String", - -- }, - -- }, - -- }, - -- components = { -- Choose components and their location - -- left = { - -- "mode", - -- "progress", - -- -- "path", - -- -- "git", - -- }, - -- center = { - -- "path", - -- "git", - -- }, - -- right = { - -- "diagnostics", - -- "filetype_lsp", - -- "progress", - -- }, - -- }, - -- 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 = " ", - -- }, - -- }, - -- }, + { + "sschleemilch/slimline.nvim", + -- INFO: pure + -- + -- opts = { + -- style = "fg", + -- bold = true, + -- hl = { + -- secondary = "Comment", + -- }, + -- configs = { + -- mode = { + -- hl = { + -- normal = "Comment", + -- insert = "Normal", + -- pending = "Normal", + -- visual = "Normal", + -- command = "Normal", + -- }, + -- }, + -- path = { + -- hl = { + -- primary = "Label", + -- }, + -- }, + -- git = { + -- hl = { + -- primary = "Function", + -- }, + -- }, + -- filetype_lsp = { + -- hl = { + -- primary = "String", + -- }, + -- }, + -- }, + -- }, + -- INFO: rainbow + -- + opts = { + style = "bg", + configs = { + path = { + hl = { + primary = "Define", + }, + }, + git = { + hl = { + primary = "Function", + }, + }, + filetype_lsp = { + hl = { + primary = "String", + }, + }, + }, + }, + -- INFO: slashes + -- + -- opts = { + -- spaces = { + -- components = "", + -- left = "", + -- right = "", + -- }, + -- sep = { + -- hide = { + -- first = true, + -- last = true, + -- }, + -- left = "", + -- right = "", + -- }, + -- }, + }, -- ╭────────────────────────────────────────╮ -- │ which key - to know what to press next │