Compare commits

..

3 commits

28 changed files with 506 additions and 1548 deletions

1
.gitignore vendored
View file

@ -15,4 +15,3 @@
lazy-lock.json lazy-lock.json
cd-project.nvim.json cd-project.nvim.json
# custom/

View file

@ -1,3 +0,0 @@
get_ip() {
ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1
}

View file

@ -1,13 +1,9 @@
if vim.g.vscode then require("pika.core")
require("pika.core") require("pika.lazy")
else
require("pika.core")
require("pika.lazy")
-- ─< Call the function to set the desired colorscheme >──────────────────────────────── -- ─< Call the function to set the desired colorscheme >────────────────────────────────
-- ╭──────────────────────────────────────────────────────╮ -- ╭──────────────────────────────────────────────────────╮
-- │ themes are under ./lua/pika/plugins/colorschemes.lua │ -- │ themes are under ./lua/pika/plugins/colorschemes.lua │
-- ╰──────────────────────────────────────────────────────╯ -- ╰──────────────────────────────────────────────────────╯
vim.cmd.colorscheme("rose-pine-moon") vim.cmd.colorscheme("oldschool")
end

View file

@ -1,34 +0,0 @@
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", "<leader>ps", ":lua SaveScreenshotAndInsertLink()<CR>", { noremap = true, silent = true })

View file

@ -1,13 +0,0 @@
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", "<leader>ts", function()
vim.cmd.new()
vim.cmd.term()
vim.api.nvim_win_set_height(0, 15)
end)

View file

@ -1,52 +0,0 @@
-- ─< 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" }, "<leader>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

View file

@ -1,5 +1,2 @@
require("pika.core.options") require("pika.core.options")
require("pika.core.keymaps") require("pika.core.keymaps")
require("pika.core.custom")
require("pika.core.custom.terminalcmd")
require("pika.core.custom.hugopaste")

View file

@ -1,7 +1,5 @@
-- INFO: Maps leader to 'space'
vim.g.mapleader = " " vim.g.mapleader = " "
-- TIP: Unmap keymaps
-- ─< lua/keymaps.lua >───────────────────────────────────────────────────────────────── -- ─< lua/keymaps.lua >─────────────────────────────────────────────────────────────────
local nomap = vim.keymap.set local nomap = vim.keymap.set
nomap("i", "<C-k>", "") nomap("i", "<C-k>", "")
@ -10,16 +8,17 @@ nomap("n", "q", "")
nomap("v", "q", "") nomap("v", "q", "")
nomap("v", "<leader>S", "") nomap("v", "<leader>S", "")
-- INFO: vim.keymap.set with map()
local map = vim.keymap.set local map = vim.keymap.set
map("n", "<Esc>", "<cmd>nohlsearch<CR>") map("n", "<Esc>", "<cmd>nohlsearch<CR>")
-- ─< Comment >───────────────────────────────────────────────────────────────────────── -- ─< Comment >─────────────────────────────────────────────────────────────────────────
-- INFO: makes instant comments, no plugin needet
map("n", "<S-c>", "gcc", { desc = "comment toggle", remap = true }) map("n", "<S-c>", "gcc", { desc = "comment toggle", remap = true })
map("v", "<S-c>", "gc", { desc = "comment toggle", remap = true }) map("v", "<S-c>", "gc", { desc = "comment toggle", remap = true })
-- ─< Terminal >────────────────────────────────────────────────────────────────────────
map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })
-- ─< Movement while in "insert"-mode >───────────────────────────────────────────────── -- ─< Movement while in "insert"-mode >─────────────────────────────────────────────────
map("i", "<C-b>", "<ESC>^i", { desc = "move beginning of line" }) map("i", "<C-b>", "<ESC>^i", { desc = "move beginning of line" })
map("i", "<C-e>", "<End>", { desc = "move end of line" }) map("i", "<C-e>", "<End>", { desc = "move end of line" })
@ -29,9 +28,10 @@ map("i", "<C-j>", "<Down>", { desc = "move down" })
map("i", "<C-k>", "<Up>", { desc = "move up" }) map("i", "<C-k>", "<Up>", { desc = "move up" })
map("n", ";", ":", { desc = "CMD enter command mode" }) map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
-- CTRL-C for escape map("i", "<C-c>", "<ESC>")
map({ "i", "n", "v" }, "<C-c>", "<ESC>") map("n", "<C-c>", "<ESC>")
map("v", "<C-c>", "<ESC>")
map("n", "<leader>x", "<cmd>bd!<CR>") map("n", "<leader>x", "<cmd>bd!<CR>")
@ -48,31 +48,12 @@ map("n", "<leader>k", "<C-w><C-k>", { desc = "Move focus to the upper window" })
-- map("n", "<leader>p", vim.cmd.Ex) -- map("n", "<leader>p", vim.cmd.Ex)
map("n", "<leader>q", vim.cmd.q) map("n", "<leader>q", vim.cmd.q)
map("n", "<leader>Q", "<cmd>q!<CR>")
map("n", "<leader>s", vim.cmd.w) map("n", "<leader>s", vim.cmd.w)
map("n", "<C-s>", vim.cmd.w) map("n", "<C-s>", vim.cmd.w)
-- Visual mode: Indent selected lines -- ─< rename word under cursor >───────────────────────────────────────────────────────────
-- INFO: got removed because of the mini-move plugin map("n", "<leader>R", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- map("v", "<Tab>", ">gv", { desc = "Indent and keep selection" })
-- map("v", "<S-Tab>", "<gv", { desc = "Unindent and keep selection" })
-- window management -- window management
map("n", "<leader>sv", "<C-w>v", { desc = "Split window vertically" }) -- split window vertically map("n", "<leader>sv", "<C-w>v", { desc = "Split window vertically" }) -- split window vertically
map("n", "<leader>sh", "<C-w>s", { desc = "Split window horizontally" }) -- split window horizontally map("n", "<leader>sh", "<C-w>s", { desc = "Split window horizontally" }) -- split window horizontally
-- ─< Terminal >────────────────────────────────────────────────────────────────────────
-- NOTE: This is only for terminal mode
map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })
-- ──────────────────────────────< rename word under cursor >──────────────────────────────
-- map("n", "<leader>R", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- ───────────────< Enhanced word under cursor renaming in current buffer >────────────
map({ "n", "x" }, "<leader>R", function()
local text = vim.fn.mode() == "n" and vim.fn.expand("<cword>") 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" })

View file

@ -53,11 +53,7 @@ o.laststatus = 3
o.swapfile = false o.swapfile = false
-- Disable the tilde on empty lines -- Disable the tilde on empty lines
-- enable slimline bubble chain ( )----( ) o.fillchars = { eob = " " }
o.fillchars = {
eob = " ",
-- stl = "─",
}
-- SudaRead automatic if file is inaccessible -- SudaRead automatic if file is inaccessible
vim.g.suda_smart_edit = 1 vim.g.suda_smart_edit = 1
@ -81,7 +77,7 @@ vim.cmd([[
if vim.g.neovide then if vim.g.neovide then
-- vim.g.neovide_transparency = 0.35 -- vim.g.neovide_transparency = 0.35
vim.g.neovide_opacity = 1 vim.g.neovide_transparency = 1
vim.g.neovide_theme = "dark" vim.g.neovide_theme = "dark"
vim.g.neovide_refresh_rate = 90 vim.g.neovide_refresh_rate = 90
vim.g.neovide_cursor_vfx_mode = "torpedo" vim.g.neovide_cursor_vfx_mode = "torpedo"

View file

@ -1,17 +1,17 @@
-- Bootstrap lazy.nvim -- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git" local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({ vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" }, { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" }, { out, "WarningMsg" },
{ "\nPress any key to exit..." }, { "\nPress any key to exit..." },
}, true, {}) }, true, {})
vim.fn.getchar() vim.fn.getchar()
os.exit(1) os.exit(1)
end end
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
@ -23,13 +23,14 @@ vim.g.maplocalleader = "\\"
-- Setup lazy.nvim -- Setup lazy.nvim
require("lazy").setup({ require("lazy").setup({
spec = { spec = {
-- import your plugins -- import your plugins
{ import = "pika.plugins" }, { import = "pika.plugins" },
{ import = "pika.plugins.lsp" }, { import = "pika.plugins.lsp" },
}, },
-- Configure any other settings here. See the documentation for more details. -- Configure any other settings here. See the documentation for more details.
ui = { backdrop = 100 }, -- colorscheme that will be used when installing plugins.
-- automatically check for plugin updates install = { colorscheme = { "nord" } },
checker = { enabled = true }, -- automatically check for plugin updates
checker = { enabled = true },
}) })

View file

@ -1,61 +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" },
},
},
},
}

View file

@ -1,123 +1,34 @@
return { return {
-- { "folke/tokyonight.nvim" }, { "folke/tokyonight.nvim" },
{ "catppuccin/nvim", name = "catppuccin" },
{ "EdenEast/nightfox.nvim" },
{ "fynnfluegge/monet.nvim", name = "monet" }, { "fynnfluegge/monet.nvim", name = "monet" },
{ "L-Colombo/oldschool.nvim", config = true }, { "L-Colombo/oldschool.nvim", config = "true" },
{ "rose-pine/neovim", name = "rose-pine" }, -- { "catppuccin/nvim", name = "catppuccin" },
-- { "EdenEast/nightfox.nvim" },
-- { "DanWlker/primeppuccin", name = "primeppuccin" },
-- { "rose-pine/neovim", name = "rose-pine" },
{ "AlexvZyl/nordic.nvim" }, { "AlexvZyl/nordic.nvim" },
{ "eldritch-theme/eldritch.nvim" }, { "eldritch-theme/eldritch.nvim" },
-- { "sainnhe/sonokai" },
{ "samharju/synthweave.nvim" }, { "samharju/synthweave.nvim" },
{ "ptdewey/darkearth-nvim" }, { "marko-cerovac/material.nvim" },
{ {
"AstroNvim/astrotheme", "neko-night/nvim",
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
-- },
-- },
-- },
{
"scottmckendry/cyberdream.nvim",
name = "cyberdream",
lazy = false, lazy = false,
-- priority = 1000,
opts = { opts = {
transparent = false, transparent = false, -- Enable this to disable setting the background color
hide_fillchars = true, terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
terminal_colors = true, styles = {
-- Style to be applied to different syntax groups
-- Value is any valid attr-list value for `:help nvim_set_hl`
comments = { italic = true },
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
},
}, },
}, },
{ {

View file

@ -1,7 +0,0 @@
return {
dir = "~/.config/nvim/lua/pika/plugins/custom/terminals.nvim",
opts = {
visible_lines = 3,
},
vim.keymap.set("n", "<leader>td", ""),
}

View file

@ -1,12 +1,4 @@
return { return {
{
"RileyGabrielson/inspire.nvim",
config = function()
require("inspire").setup({
mode = "random",
})
end,
},
{ {
"nvimdev/dashboard-nvim", "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. lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin.
@ -30,14 +22,7 @@ return {
]] ]]
local inspire = require("inspire") logo = string.rep("\n", 8) .. logo .. "\n\n"
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 = { local opts = {
theme = "doom", theme = "doom",
@ -52,21 +37,16 @@ return {
require("telescope.builtin").find_files() require("telescope.builtin").find_files()
end, end,
desc = " Find File", desc = " Find File",
icon = " ", icon = " ",
key = "f", key = "f",
}, },
{ { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
action = "ene | startinsert",
desc = " New File",
icon = "",
key = "n",
},
{ {
action = function() action = function()
require("telescope.builtin").oldfiles() require("telescope.builtin").oldfiles()
end, end,
desc = " Recent Files", desc = " Recent Files",
icon = " ", icon = " ",
key = "r", key = "r",
}, },
{ {
@ -74,21 +54,21 @@ return {
require("telescope.builtin").live_grep() require("telescope.builtin").live_grep()
end, end,
desc = " Find Text", desc = " Find Text",
icon = "󱄽 ", icon = " ",
key = "w", key = "g",
}, },
{ {
action = function() action = function()
require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") }) require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") })
end, end,
desc = " Search Neovim files", desc = " Search Neovim files",
icon = " ", icon = " ",
key = "c", key = "c",
}, },
{ {
action = 'lua require("persistence").load()', action = 'lua require("persistence").load()',
desc = " Restore Session", desc = " Restore Session",
icon = " ", icon = " ",
key = "s", key = "s",
}, },
-- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, -- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
@ -98,7 +78,7 @@ return {
vim.api.nvim_input("<cmd>qa<cr>") vim.api.nvim_input("<cmd>qa<cr>")
end, end,
desc = " Quit", desc = " Quit",
icon = "󰅘 ", icon = " ",
key = "q", key = "q",
}, },
}, },
@ -133,19 +113,16 @@ return {
return opts return opts
end, end,
dependencies = { dependencies = {
{ "folke/persistence.nvim",
"folke/persistence.nvim", event = "BufReadPre",
event = "BufReadPre", opts = {},
opts = {}, -- stylua: ignore
-- stylua: ignore keys = {
keys = { { "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },
-- { "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" }, { "<leader>ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
-- { "<leader>ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, { "<leader>qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" },
-- { "<leader>qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, { "<leader>db", "<cmd>:Dashboard<CR>", desc = "Dashboard"}
{ "<leader>db", "<cmd>:Dashboard<CR>", desc = "Dashboard"}, },
{ "<leader>dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"},
},
},
}, },
}, },
} }

View file

@ -1,20 +1,20 @@
return { return {
-- ─< neotree - fallback >──────────────────────────────────────────────────────────────────────── -- ─< neotree - fallback >────────────────────────────────────────────────────────────────────────
-- { {
-- "nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",
-- branch = "v3.x", branch = "v3.x",
-- dependencies = { dependencies = {
-- "nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
-- "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
-- "MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
-- -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
-- }, },
-- vim.keymap.set("n", "<leader>e", "<CMD>:Neotree toggle<CR>"), vim.keymap.set("n", "<leader>e", "<CMD>:Neotree toggle<CR>"),
-- vim.keymap.set("n", "<leader>Ee", "<CMD>:Neotree left<CR>"), vim.keymap.set("n", "<leader>Ee", "<CMD>:Neotree left<CR>"),
-- vim.keymap.set("n", "<leader>Ef", "<CMD>:Neotree float<CR>"), vim.keymap.set("n", "<leader>Ef", "<CMD>:Neotree float<CR>"),
-- vim.keymap.set("n", "<leader>Eg", "<CMD>:Neotree git_status float<CR>"), vim.keymap.set("n", "<leader>Eg", "<CMD>:Neotree git_status float<CR>"),
-- vim.keymap.set("n", "<leader>Eb", "<CMD>:Neotree buffers position=top<CR>"), vim.keymap.set("n", "<leader>Eb", "<CMD>:Neotree buffers position=top<CR>"),
-- }, },
---@type LazySpec ---@type LazySpec
{ {
@ -29,16 +29,16 @@ return {
-- }, -- },
{ {
-- Open in the current working directory -- Open in the current working directory
"<leader>tLf", "<leader>Lf",
"<cmd>Yazi cwd<cr>", "<cmd>Yazi cwd<cr>",
desc = "Terminal - Open yazi in nvim's working directory", desc = "Open the file manager in nvim's working directory",
}, },
{ {
-- NOTE: this requires a version of yazi that includes -- NOTE: this requires a version of yazi that includes
-- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18 -- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18
"<leader>tlf", "<leader>lf",
"<cmd>Yazi toggle<cr>", "<cmd>Yazi toggle<cr>",
desc = "Terminal - Resume the last yazi session", desc = "Resume the last yazi session",
}, },
}, },
---@type YaziConfig ---@type YaziConfig

View file

@ -1,162 +1,156 @@
return { return {
{ {
"sindrets/diffview.nvim", "tanvirtin/vgit.nvim",
opts = {}, dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons" },
vim.keymap.set("n", "<leader>gd", "<CMD>DiffviewOpen<CR>", { desc = "Git DiffviewOpen" }), -- Lazy loading on 'VimEnter' event is necessary.
vim.keymap.set("n", "<leader>gc", "<CMD>DiffviewClose<CR>", { desc = "Git DiffviewClose" }), event = "VimEnter",
config = function()
require("vgit").setup(
-- keymaps = {
-- ["n <C-k>"] = {
-- function()
-- require("vgit").hunk_up()
-- end,
-- desc = "VGit Hunk Up",
-- },
-- ["n <C-j>"] = {
-- function()
-- require("vgit").hunk_down()
-- end,
-- desc = "VGit Hunk Down",
-- },
-- ["n <leader>gs"] = {
-- function()
-- require("vgit").buffer_hunk_stage()
-- end,
-- desc = "VGit Stage Hunk",
-- },
-- ["n <leader>gr"] = {
-- function()
-- require("vgit").buffer_hunk_reset()
-- end,
-- desc = "VGit Reset Hunk",
-- },
-- ["n <leader>gp"] = {
-- function()
-- require("vgit").buffer_hunk_preview()
-- end,
-- desc = "VGit Preview Hunk",
-- },
-- ["n <leader>gb"] = {
-- function()
-- require("vgit").buffer_blame_preview()
-- end,
-- desc = "VGit Blame Preview",
-- },
-- ["n <leader>gf"] = {
-- function()
-- require("vgit").buffer_diff_preview()
-- end,
-- desc = "VGit Diff Preview",
-- },
-- ["n <leader>gh"] = {
-- function()
-- require("vgit").buffer_history_preview()
-- end,
-- desc = "VGit History Preview",
-- },
-- ["n <leader>gu"] = {
-- function()
-- require("vgit").buffer_reset()
-- end,
-- desc = "VGit Reset Buffer",
-- },
-- ["n <leader>gcm"] = {
-- function()
-- require("vgit").project_commit_preview()
-- end,
-- desc = "VGit Commit Preview",
-- },
-- ["n <leader>gcc"] = {
-- function()
-- require("vgit").project_commits_preview()
-- end,
-- desc = "VGit Commits Preview",
-- },
-- ["n <leader>gcl"] = {
-- function()
-- require("vgit").project_logs_preview()
-- end,
-- desc = "VGit Logs Preview",
-- },
-- ["n <leader>gd"] = {
-- function()
-- require("vgit").project_diff_preview()
-- end,
-- desc = "VGit Project Diff",
-- },
-- ["n <leader>gx"] = {
-- function()
-- require("vgit").toggle_diff_preference()
-- end,
-- desc = "VGit Toggle Diff Preference",
-- },
-- },
)
end,
vim.keymap.set("n", "<C-k>", function()
require("vgit").hunk_up()
end, { desc = "VGit Hunk Up" }),
vim.keymap.set("n", "<C-j>", function()
require("vgit").hunk_down()
end, { desc = "VGit Hunk Down" }),
vim.keymap.set("n", "<leader>gs", function()
require("vgit").buffer_hunk_stage()
end, { desc = "VGit Stage Hunk" }),
vim.keymap.set("n", "<leader>gr", function()
require("vgit").buffer_hunk_reset()
end, { desc = "VGit Reset Hunk" }),
vim.keymap.set("n", "<leader>gp", function()
require("vgit").buffer_hunk_preview()
end, { desc = "VGit Preview Hunk" }),
vim.keymap.set("n", "<leader>gb", function()
require("vgit").buffer_blame_preview()
end, { desc = "VGit Blame Preview" }),
vim.keymap.set("n", "<leader>gf", function()
require("vgit").buffer_diff_preview()
end, { desc = "VGit Diff Preview" }),
vim.keymap.set("n", "<leader>gh", function()
require("vgit").buffer_history_preview()
end, { desc = "VGit History Preview" }),
vim.keymap.set("n", "<leader>gu", function()
require("vgit").buffer_reset()
end, { desc = "VGit Reset Buffer" }),
vim.keymap.set("n", "<leader>gcm", function()
require("vgit").project_commit_preview()
end, { desc = "VGit Commit Preview" }),
vim.keymap.set("n", "<leader>gcc", function()
require("vgit").project_commits_preview()
end, { desc = "VGit Commits Preview" }),
vim.keymap.set("n", "<leader>gcl", function()
require("vgit").project_logs_preview()
end, { desc = "VGit Logs Preview" }),
vim.keymap.set("n", "<leader>gd", function()
require("vgit").project_diff_preview()
end, { desc = "VGit Project Diff" }),
vim.keymap.set("n", "<leader>gx", function()
require("vgit").toggle_diff_preference()
end, { desc = "VGit Toggle Diff Preference" }),
}, },
-- {
-- "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 <C-k>"] = {
-- -- function()
-- -- require("vgit").hunk_up()
-- -- end,
-- -- desc = "VGit Hunk Up",
-- -- },
-- -- ["n <C-j>"] = {
-- -- function()
-- -- require("vgit").hunk_down()
-- -- end,
-- -- desc = "VGit Hunk Down",
-- -- },
-- -- ["n <leader>gs"] = {
-- -- function()
-- -- require("vgit").buffer_hunk_stage()
-- -- end,
-- -- desc = "VGit Stage Hunk",
-- -- },
-- -- ["n <leader>gr"] = {
-- -- function()
-- -- require("vgit").buffer_hunk_reset()
-- -- end,
-- -- desc = "VGit Reset Hunk",
-- -- },
-- -- ["n <leader>gp"] = {
-- -- function()
-- -- require("vgit").buffer_hunk_preview()
-- -- end,
-- -- desc = "VGit Preview Hunk",
-- -- },
-- -- ["n <leader>gb"] = {
-- -- function()
-- -- require("vgit").buffer_blame_preview()
-- -- end,
-- -- desc = "VGit Blame Preview",
-- -- },
-- -- ["n <leader>gf"] = {
-- -- function()
-- -- require("vgit").buffer_diff_preview()
-- -- end,
-- -- desc = "VGit Diff Preview",
-- -- },
-- -- ["n <leader>gh"] = {
-- -- function()
-- -- require("vgit").buffer_history_preview()
-- -- end,
-- -- desc = "VGit History Preview",
-- -- },
-- -- ["n <leader>gu"] = {
-- -- function()
-- -- require("vgit").buffer_reset()
-- -- end,
-- -- desc = "VGit Reset Buffer",
-- -- },
-- -- ["n <leader>gcm"] = {
-- -- function()
-- -- require("vgit").project_commit_preview()
-- -- end,
-- -- desc = "VGit Commit Preview",
-- -- },
-- -- ["n <leader>gcc"] = {
-- -- function()
-- -- require("vgit").project_commits_preview()
-- -- end,
-- -- desc = "VGit Commits Preview",
-- -- },
-- -- ["n <leader>gcl"] = {
-- -- function()
-- -- require("vgit").project_logs_preview()
-- -- end,
-- -- desc = "VGit Logs Preview",
-- -- },
-- -- ["n <leader>gd"] = {
-- -- function()
-- -- require("vgit").project_diff_preview()
-- -- end,
-- -- desc = "VGit Project Diff",
-- -- },
-- -- ["n <leader>gx"] = {
-- -- function()
-- -- require("vgit").toggle_diff_preference()
-- -- end,
-- -- desc = "VGit Toggle Diff Preference",
-- -- },
-- -- },
-- )
-- end,
--
-- vim.keymap.set("n", "<C-k>", function()
-- require("vgit").hunk_up()
-- end, { desc = "VGit Hunk Up" }),
--
-- vim.keymap.set("n", "<C-j>", function()
-- require("vgit").hunk_down()
-- end, { desc = "VGit Hunk Down" }),
--
-- vim.keymap.set("n", "<leader>gs", function()
-- require("vgit").buffer_hunk_stage()
-- end, { desc = "VGit Stage Hunk" }),
--
-- vim.keymap.set("n", "<leader>gr", function()
-- require("vgit").buffer_hunk_reset()
-- end, { desc = "VGit Reset Hunk" }),
--
-- vim.keymap.set("n", "<leader>gp", function()
-- require("vgit").buffer_hunk_preview()
-- end, { desc = "VGit Preview Hunk" }),
--
-- vim.keymap.set("n", "<leader>gb", function()
-- require("vgit").buffer_blame_preview()
-- end, { desc = "VGit Blame Preview" }),
--
-- vim.keymap.set("n", "<leader>gf", function()
-- require("vgit").buffer_diff_preview()
-- end, { desc = "VGit Diff Preview" }),
--
-- vim.keymap.set("n", "<leader>gh", function()
-- require("vgit").buffer_history_preview()
-- end, { desc = "VGit History Preview" }),
--
-- vim.keymap.set("n", "<leader>gu", function()
-- require("vgit").buffer_reset()
-- end, { desc = "VGit Reset Buffer" }),
--
-- vim.keymap.set("n", "<leader>gcm", function()
-- require("vgit").project_commit_preview()
-- end, { desc = "VGit Commit Preview" }),
--
-- vim.keymap.set("n", "<leader>gcc", function()
-- require("vgit").project_commits_preview()
-- end, { desc = "VGit Commits Preview" }),
--
-- vim.keymap.set("n", "<leader>gcl", function()
-- require("vgit").project_logs_preview()
-- end, { desc = "VGit Logs Preview" }),
--
-- vim.keymap.set("n", "<leader>gd", function()
-- require("vgit").project_diff_preview()
-- end, { desc = "VGit Project Diff" }),
--
-- vim.keymap.set("n", "<leader>gx", function()
-- require("vgit").toggle_diff_preference()
-- end, { desc = "VGit Toggle Diff Preference" }),
-- },
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
@ -180,7 +174,7 @@ return {
signs_staged_enable = true, signs_staged_enable = true,
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = true, -- Toggle with `:Gitsigns toggle_numhl` numhl = true, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl` linehl = true, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = { watch_gitdir = {
follow_files = true, follow_files = true,

View file

@ -1,590 +0,0 @@
-- 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 │
-- ╰───────────╯
{
"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
cmdline = { sources = { "cmdline" } },
keymap = {
-- set to 'none' to disable the 'default' preset
preset = "super-tab",
["<C-k>"] = { "select_prev", "fallback" },
["<C-j>"] = { "select_next", "fallback" },
["<C-q>"] = { "hide", "fallback" },
-- disable a keymap from the preset
["<C-e>"] = {},
["<C-p>"] = {},
["<C-n>"] = {},
-- show with a list of providers
-- ["<C-space>"] = {
-- function(cmp)
-- cmp.show({ providers = { "snippets" } })
-- end,
-- },
-- control whether the next command will be run when using a function
-- ["<C-n>"] = {
-- 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("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
use_nvim_cmp_as_default = true,
},
-- (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 <C-e>) 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,
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 = false,
show_with_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 = {
-- 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)
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,
-- },
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",
},
},
},
},
},
-- 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" },
},
-- 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",
-- 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" },
},
-- ─────────────────────────────────< 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 <stdio.h>".
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 <stdio.h>".
-- 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,
},
}

View file

@ -0,0 +1,132 @@
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" }, "<leader>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", "<leader>rn", vim.lsp.buf.rename, opts) -- smart rename
opts.desc = "Show buffer diagnostics"
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) -- show diagnostics for file
opts.desc = "Show line diagnostics"
keymap.set("n", "<leader>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", "<leader>rs", ":LspRestart<CR>", 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,
}

View file

@ -4,9 +4,6 @@ return {
"williamboman/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim", "WhoIsSethDaniel/mason-tool-installer.nvim",
}, },
-- opts = {
--
-- }
config = function() config = function()
-- import mason -- import mason
local mason = require("mason") local mason = require("mason")
@ -49,9 +46,6 @@ return {
}) })
mason_tool_installer.setup({ mason_tool_installer.setup({
function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup({})
end,
ensure_installed = { ensure_installed = {
"shfmt", "shfmt",
"prettier", "prettier",

View file

@ -1,52 +1,22 @@
return { return {
-- INFO:
-- mini-ai for a and i selections or other --> vin" for visual in next "" -- mini-ai for a and i selections or other --> vin" for visual in next ""
{ {
"echasnovski/mini.ai", "echasnovski/mini.ai",
version = "*", version = "false",
opts = {}, opts = {},
}, },
-- TIP:
-- ─< mini-surround for surrounding words or lines with "" or () or '' etc.. >────────── -- ─< mini-surround for surrounding words or lines with "" or () or '' etc.. >──────────
{ {
"echasnovski/mini.surround", "echasnovski/mini.surround",
version = "*", version = "false",
opts = {}, 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 = "<S-Tab>",
right = "<Tab>",
down = "<S-j>",
up = "<S-k>",
line_left = "<S-h>",
line_right = "<S-l>",
line_down = "<S-j>",
line_up = "<S-k>",
-- Move current line in Normal mode
},
-- Options which control moving behavior
options = {
-- Automatically reindent selection during linewise vertical move
reindent_linewise = true,
},
},
},
-- ─< miniIcons >─────────────────────────────────────────────────────────────────────── -- ─< miniIcons >───────────────────────────────────────────────────────────────────────
{ {
"echasnovski/mini.icons", "echasnovski/mini.icons",
version = "*", version = "false",
opts = {}, opts = {},
lazy = true, lazy = true,
specs = { specs = {

View file

@ -1,9 +1,3 @@
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 { return {
{ {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
@ -142,136 +136,4 @@ return {
-- }) -- })
-- end, -- 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" }, "<leader>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", "<leader>rn", vim.lsp.buf.rename, opts) -- smart rename
opts.desc = "Show buffer diagnostics"
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) -- show diagnostics for file
opts.desc = "Show line diagnostics"
keymap.set("n", "<leader>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", "<leader>rs", ":LspRestart<CR>", 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,
},
} }

View file

@ -138,24 +138,6 @@ return {
), ),
}, },
-- ─< ERROR: 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", alt = { "TIP" } },
INFO = { icon = "", color = "info", alt = { "INFORMATION", "IMPORTANT" } },
ERROR = { icon = "", color = "error", alt = { "ERR", "CAUTION" } },
WARNING = { icon = "", color = "warning", alt = { "WARN", "WHY" } },
},
},
},
-- ╭───────────╮ -- ╭───────────╮
-- │ colorizer │ -- │ colorizer │
-- ╰───────────╯ -- ╰───────────╯
@ -201,7 +183,7 @@ return {
enable_named_colors = true, enable_named_colors = true,
---Highlight tailwind colors, e.g. 'bg-blue-500' ---Highlight tailwind colors, e.g. 'bg-blue-500'
enable_tailwind = true, enable_tailwind = false,
---Set custom colors ---Set custom colors
---Label must be properly escaped with '%' to adhere to `string.gmatch` ---Label must be properly escaped with '%' to adhere to `string.gmatch`
@ -220,21 +202,21 @@ return {
-- ╭──────────────────────────────────────╮ -- ╭──────────────────────────────────────╮
-- │ flash - to navigate more efficiently │ -- │ flash - to navigate more efficiently │
-- ╰──────────────────────────────────────╯ -- ╰──────────────────────────────────────╯
-- { {
-- "folke/flash.nvim", "folke/flash.nvim",
-- event = "VeryLazy", event = "VeryLazy",
-- vscode = true, vscode = true,
-- -- @type Flash.Config -- @type Flash.Config
-- -- opts = {}, opts = {},
-- -- stylua: ignore -- stylua: ignore
-- keys = { keys = {
-- { "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, { "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" }, { "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", function() require("flash").remote() end, desc = "Remote Flash" },
-- { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
-- { "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, { "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
-- }, },
-- }, },
-- ╭──────────────────────────────╮ -- ╭──────────────────────────────╮
-- │ renaming (also project wide) │ -- │ renaming (also project wide) │

View file

@ -0,0 +1,6 @@
return {
"kylechui/nvim-surround",
event = { "BufReadPre", "BufNewFile" },
version = "*", -- Use for stability; omit to use `main` branch for the latest features
config = true,
}

View file

@ -25,32 +25,38 @@ return {
telescope.load_extension("fzf") telescope.load_extension("fzf")
-- ─< set keymaps >───────────────────────────────────────────────────────────────────── -- set keymaps
local map = vim.keymap.set -- for conciseness local map = vim.keymap.set -- for conciseness
local builtin = require("telescope.builtin")
-- ─────────────────────────────────< Telescope mappings >─────────────────────────────────
map("n", "<leader>T", "<cmd>Telescope colorscheme<CR>")
map("n", "<leader>ff", "<cmd>Telescope find_files<CR>", { noremap = true, silent = true, desc = "Find Files" }) -- Telescope mappings
-- map("n", "<leader>ff", builtin.find_files, { desc = "Find Files" }) map("n", "<leader>sf", "<cmd>Telescope find_files<CR>", { noremap = true, silent = true, desc = "Find Files" })
map("n", "<leader>fw", "<cmd>Telescope live_grep<CR>", { noremap = true, silent = true, desc = "Find Word" }) map("n", "<leader>sw", "<cmd>Telescope live_grep<CR>", { noremap = true, silent = true, desc = "Search Word" })
-- map("n", "<leader>fw", builtin.live_grep, { desc = "Find word" }) map("n", "<leader><leader>", "<cmd>Telescope buffers<CR>", { noremap = true, silent = true, desc = "Buffers" })
-- map("n", "<leader>fb", "<cmd>Telescope buffers<CR>", { noremap = true, silent = true, desc = "Find Buffers" }) local builtin = require("telescope.builtin")
map("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
map("n", "<leader>fn", function() map("n", "<leader>sn", function()
builtin.find_files({ cwd = vim.fn.stdpath("config") }) builtin.find_files({ cwd = vim.fn.stdpath("config") })
end, { desc = "Find Neovim files" }) end, { desc = "[S]earch [N]eovim files" })
map("n", "<leader>fh", builtin.help_tags, { desc = "Find Help" }) map("n", "<leader>ff", builtin.find_files, { desc = "[S]earch [F]iles" })
map("n", "<leader>fk", builtin.keymaps, { desc = "Find Keymaps" }) map("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
map("n", "<leader>fd", builtin.diagnostics, { desc = "Find Diagnostics" }) map("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
map("n", "<leader>fo", builtin.oldfiles, { desc = "Find old/Recent Files" }) map("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
map("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
-- map("n", "<leader>sr", builtin.resume, { desc = "[S]earch [R]esume" })
map("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
map("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
map("n", "<leader>sR", function()
require("telescope.builtin").oldfiles()
end)
map("n", "<leader>T", "<cmd>Telescope colorscheme<CR>")
map("n", "<leader>q", vim.cmd.q)
-- Additional custom mappings -- Additional custom mappings
map("n", "<leader>/", function() map("n", "<leader>/", function()
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown()) builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown())
end, { desc = "Search in current buffer" }) end, { desc = "[/] Fuzzily search in current buffer" })
map("n", "<leader>f/", function() map("n", "<leader>s/", function()
builtin.live_grep({ grep_open_files = true, prompt_title = "Live Grep in Open Files" }) builtin.live_grep({ grep_open_files = true, prompt_title = "Live Grep in Open Files" })
end, { desc = "Search in Open Files" }) end, { desc = "[S]earch [/] in Open Files" })
end, end,
} }

View file

@ -23,19 +23,19 @@ return {
move_wraps_at_ends = true, -- whether or not the move command "wraps" at the first or last position move_wraps_at_ends = true, -- whether or not the move command "wraps" at the first or last position
separator_style = "slope", separator_style = "slope",
-- ─< icons >─────────────────────────────────────────────────────────────────────────── -- ─< icons >───────────────────────────────────────────────────────────────────────────
modified_icon = "󱞇 ", modified_icon = "󱞇",
left_trunc_marker = "󰬩 ", left_trunc_marker = "󰬩",
right_trunc_marker = "󰬫 ", right_trunc_marker = "󰬫",
themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default
close_icon = "󱄊 ", close_icon = "󱄊",
buffer_close_icon = "󱄊 ", buffer_close_icon = "󱄊",
show_buffer_icons = true, -- disable filetype icons for buffers show_buffer_icons = true, -- disable filetype icons for buffers
show_buffer_close_icons = true, show_buffer_close_icons = true,
show_close_icon = true, show_close_icon = true,
show_tab_indicators = true, show_tab_indicators = true,
hover = { hover = {
enabled = true, enabled = true,
delay = 30, delay = 80,
reveal = { "close" }, reveal = { "close" },
hide = { "nvim_lsp" }, hide = { "nvim_lsp" },
}, },
@ -51,7 +51,6 @@ return {
vim.keymap.set("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<CR>") vim.keymap.set("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<CR>")
end, end,
}, },
-- ╭───────────────────────────────────╮ -- ╭───────────────────────────────────╮
-- │ cmdline - for nice command inputs │ -- │ cmdline - for nice command inputs │
-- ╰───────────────────────────────────╯ -- ╰───────────────────────────────────╯
@ -82,17 +81,6 @@ return {
winhighlight = "Normal:Normal,FloatBorder:FloatBorder", 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, end,
vim.api.nvim_set_keymap("n", ":", "<cmd>FineCmdline<CR>", { noremap = true }), vim.api.nvim_set_keymap("n", ":", "<cmd>FineCmdline<CR>", { noremap = true }),
@ -171,21 +159,8 @@ return {
-- char = "│", -- char = "│",
-- tab_char = "│", -- tab_char = "│",
}, },
scope = { enabled = true },
}, },
}, },
-- ╭──────────────────╮
-- │ 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 │ -- │ notify for excellent notifications │
-- ╰────────────────────────────────────╯ -- ╰────────────────────────────────────╯
@ -217,135 +192,74 @@ return {
}) })
vim.notify = require("notify") vim.notify = require("notify")
end, end,
vim.keymap.set("n", "<leader>tn", "<cmd>Telescope notify<CR>", { 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 │ -- │ slimline - nice bar for nvim │
-- ╰──────────────────────────────╯ -- ╰──────────────────────────────╯
-- { {
-- "sschleemilch/slimline.nvim", -- Calls `require('slimline').setup({})`
-- opts = { "sschleemilch/slimline.nvim",
-- bold = true, -- makes primary parts and mode bold opts = {
-- verbose_mode = false, -- Mode as single letter or as a word bold = true, -- makes primary parts and mode bold
-- style = "bg", -- or "fg". Whether highlights should be applied to bg or fg of components verbose_mode = false, -- Mode as single letter or as a word
-- mode_follow_style = true, -- Whether the mode color components should follow the style option style = "bg", -- or "fg". Whether highlights should be applied to bg or fg of components
-- spaces = { mode_follow_style = true, -- Whether the mode color components should follow the style option
-- components = "─", components = { -- Choose components and their location
-- left = "─", left = {
-- right = "─", "mode",
-- }, -- "path",
-- configs = { -- "git",
-- path = { },
-- hl = { center = {
-- primary = "Define", "path",
-- }, "git",
-- }, },
-- git = { right = {
-- hl = { "diagnostics",
-- primary = "Function", "filetype_lsp",
-- }, "progress",
-- }, },
-- diagnostics = { },
-- hl = { spaces = {
-- primary = "Statement", components = " ", -- string between components
-- }, left = " ", -- string at the start of the line
-- }, right = " ", -- string at the end of the line
-- filetype_lsp = { },
-- hl = { sep = {
-- primary = "String", hide = {
-- }, first = false, -- hides the first separator
-- }, last = false, -- hides the last separator
-- }, },
-- components = { -- Choose components and their location left = "", -- left separator of components
-- left = { right = "", -- right separator of components
-- "mode", },
-- "progress", hl = {
-- -- "path", modes = {
-- -- "git", normal = "Type", -- highlight base of modes
-- }, insert = "Function",
-- center = { pending = "Boolean",
-- "path", visual = "Keyword",
-- "git", command = "String",
-- }, },
-- right = { base = "Comment", -- highlight of everything in in between components
-- "diagnostics", primary = "Normal", -- highlight of primary parts (e.g. filename)
-- "filetype_lsp", secondary = "Comment", -- highlight of secondary parts (e.g. filepath)
-- "progress", },
-- }, icons = {
-- }, diagnostics = {
-- sep = { ERROR = "",
-- hide = { WARN = "",
-- first = false, -- hides the first separator HINT = "",
-- last = false, -- hides the last separator INFO = "",
-- }, },
-- left = "", -- left separator of components git = {
-- right = "", -- right separator of components branch = "",
-- }, },
-- hl = { folder = "",
-- modes = { lines = "",
-- 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 │ -- │ which key - to know what to press next │
@ -354,8 +268,8 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
event = "VeryLazy", event = "VeryLazy",
init = function() init = function()
vim.o.timeout = false vim.o.timeout = true
vim.o.timeoutlen = 0 vim.o.timeoutlen = 350
end, end,
opts = { opts = {
-- your configuration comes here -- your configuration comes here

@ -1 +1 @@
Subproject commit 7eaeb1e40883a0478d50fd01cc91083f4b079f0e Subproject commit e7f703ecb74d00eeea817b0b677c8715bdc23521