🐛 fix(nvim): rewrite of a lot of the config style, options and plugins

new terminal, telescope plugins moved into telescope.lua for eassier management and a lot more
This commit is contained in:
Sergio Laín 2023-10-16 12:46:37 +02:00
parent ce2a9fca53
commit 2cce8ffdc8
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
50 changed files with 740 additions and 785 deletions

View file

@ -10,6 +10,7 @@
"lazyvim.plugins.extras.lang.go", "lazyvim.plugins.extras.lang.go",
"lazyvim.plugins.extras.lang.java", "lazyvim.plugins.extras.lang.java",
"lazyvim.plugins.extras.lang.json", "lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.omnisharp", "lazyvim.plugins.extras.lang.omnisharp",
"lazyvim.plugins.extras.lang.python", "lazyvim.plugins.extras.lang.python",
"lazyvim.plugins.extras.lang.rust", "lazyvim.plugins.extras.lang.rust",

View file

@ -15,56 +15,56 @@ local function map(mode, lhs, rhs, opts)
end end
end end
map( -- map(
"n", -- "n",
"<leader>xs", -- "<leader>xs",
":FloatermNew --disposable --name=duaroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> dua i<CR>", -- ":FloatermNew --disposable --name=duaroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> dua i<CR>",
{ desc = "Workspace Size (root dir)" } -- { desc = "Workspace Size (root dir)" }
) -- )
--
-- map(
-- "n",
-- "<leader>xS",
-- ":FloatermNew --disposable --name=duabuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> dua i<CR>",
-- { desc = "Workspace Size (cwd)" }
-- )
--
-- map(
-- "n",
-- "<leader>fx",
-- ":FloatermNew --disposable --name=xplrroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> xplr<CR>",
-- { desc = "Xplr (root dir)" }
-- )
--
-- map(
-- "n",
-- "<leader>fX",
-- ":FloatermNew --disposable --name=xplrbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> xplr<CR>",
-- { desc = "Xplr (cwd)" }
-- )
--
-- map(
-- "n",
-- "<leader>gg",
-- ":FloatermNew --disposable --name=lazygitroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> lazygit<CR>",
-- { desc = "Lazygit (root dir)" }
-- )
--
-- map(
-- "n",
-- "<leader>gG",
-- ":FloatermNew --disposable --name=lazygitbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> lazygit<CR>",
-- { desc = "Lazygit (cwd)" }
-- )
--
-- map(
-- "n",
-- "<leader>fd",
-- ":FloatermNew --disposable --name=lazydocker --opener=edit --titleposition=center --height=0.85 --width=0.85 lazydocker<CR>",
-- { desc = "Lazydocker" }
-- )
map( -- map("n", "<leader>T", ":Telescope floaterm<CR>", { desc = "Terminals" })
"n",
"<leader>xS",
":FloatermNew --disposable --name=duabuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> dua i<CR>",
{ desc = "Workspace Size (cwd)" }
)
map(
"n",
"<leader>fx",
":FloatermNew --disposable --name=xplrroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> xplr<CR>",
{ desc = "Xplr (root dir)" }
)
map(
"n",
"<leader>fX",
":FloatermNew --disposable --name=xplrbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> xplr<CR>",
{ desc = "Xplr (cwd)" }
)
map(
"n",
"<leader>gg",
":FloatermNew --disposable --name=lazygitroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> lazygit<CR>",
{ desc = "Lazygit (root dir)" }
)
map(
"n",
"<leader>gG",
":FloatermNew --disposable --name=lazygitbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> lazygit<CR>",
{ desc = "Lazygit (cwd)" }
)
map(
"n",
"<leader>fd",
":FloatermNew --disposable --name=lazydocker --opener=edit --titleposition=center --height=0.85 --width=0.85 lazydocker<CR>",
{ desc = "Lazydocker" }
)
map("n", "<leader>T", ":Telescope floaterm<CR>", { desc = "Terminals" })
map("n", "<leader>sz", ":Telescope zoxide list<CR>", { desc = "Zoxide" }) map("n", "<leader>sz", ":Telescope zoxide list<CR>", { desc = "Zoxide" })
@ -78,24 +78,18 @@ map("n", "<leader>sI", ":Gitignore<CR>", { desc = "Gitignore" })
map("n", "<leader>cC", ":ConformInfo<CR>", { desc = "Conform Info" }) map("n", "<leader>cC", ":ConformInfo<CR>", { desc = "Conform Info" })
map("n", "<leader>um", ":MarkdownPreviewToggle<CR>", { desc = "Toggle Markdown Preview" }) -- map(
-- "n",
map( -- "<leader>ft",
"n", -- ":FloatermNew --name=termroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root><CR>",
"<leader>ft", -- { desc = "New Terminal (root dir)" }
":FloatermNew --name=termroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root><CR>", -- )
{ desc = "New Terminal (root dir)" } -- map(
) -- "n",
map( -- "<leader>fT",
"n", -- ":FloatermNew --name=termcwd --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer><CR>",
"<leader>fT", -- { desc = "New Terminal (cwd)" }
":FloatermNew --name=termcwd --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer><CR>", -- )
{ desc = "New Terminal (cwd)" }
)
map("n", "<c-Return>", ":FloatermToggle<CR>", { desc = "Toggle Terminal" })
map("t", "<C-Return>", "<C-\\><C-n><C-\\><C-n>:FloatermToggle<CR>", { desc = "Toggle Terminal", nowait = true })
vim.keymap.set("n", "<leader>gU", vim.cmd.UndotreeToggle, { noremap = true, silent = true, desc = "Toggle Undotree" })
vim.keymap.set("n", "<C-c>", "<cmd>PickColor<cr>", { noremap = true, silent = true, desc = "Pick Color" }) vim.keymap.set("n", "<C-c>", "<cmd>PickColor<cr>", { noremap = true, silent = true, desc = "Pick Color" })
vim.keymap.set("i", "<C-c>", "<cmd>PickColorInsert<cr>", { noremap = true, silent = true, desc = "Pick Color" }) vim.keymap.set("i", "<C-c>", "<cmd>PickColorInsert<cr>", { noremap = true, silent = true, desc = "Pick Color" })
@ -118,35 +112,35 @@ vim.keymap.set(
vim.api.nvim_set_keymap( vim.api.nvim_set_keymap(
"n", "n",
"<leader>cps", "<leader>cPs",
"<cmd>lua require('package-info').show({ force = true })<cr>", "<cmd>lua require('package-info').show({ force = true })<cr>",
{ silent = true, noremap = true, desc = "Show Package Versions" } { silent = true, noremap = true, desc = "Show Package Versions" }
) )
vim.api.nvim_set_keymap( vim.api.nvim_set_keymap(
"n", "n",
"<leader>cpu", "<leader>cPu",
"<cmd>lua require('package-info').update()<cr>", "<cmd>lua require('package-info').update()<cr>",
{ silent = true, noremap = true, desc = "Update Package" } { silent = true, noremap = true, desc = "Update Package" }
) )
vim.api.nvim_set_keymap( vim.api.nvim_set_keymap(
"n", "n",
"<leader>cpr", "<leader>cPr",
"<cmd>lua require('package-info').delete()<cr>", "<cmd>lua require('package-info').delete()<cr>",
{ silent = true, noremap = true, desc = "Remove Package" } { silent = true, noremap = true, desc = "Remove Package" }
) )
vim.api.nvim_set_keymap( vim.api.nvim_set_keymap(
"n", "n",
"<leader>cpv", "<leader>cPv",
"<cmd>lua require('package-info').change_version()<cr>", "<cmd>lua require('package-info').change_version()<cr>",
{ silent = true, noremap = true, desc = "Change Package Version" } { silent = true, noremap = true, desc = "Change Package Version" }
) )
vim.api.nvim_set_keymap( vim.api.nvim_set_keymap(
"n", "n",
"<leader>cpn", "<leader>cPn",
"<cmd>lua require('package-info').install()<cr>", "<cmd>lua require('package-info').install()<cr>",
{ silent = true, noremap = true, desc = "Install New Dependency" } { silent = true, noremap = true, desc = "Install New Dependency" }
) )

View file

@ -99,6 +99,9 @@ vim.api.nvim_set_var("terminal_color_15", "#B8C0E0")
vim.opt.shell = "fish" vim.opt.shell = "fish"
vim.o.winwidth = 10
vim.o.winminwidth = 10
vim.o.equalalways = false
-- vim.opt.shiftwidth = 4 -- vim.opt.shiftwidth = 4
-- vim.opt.tabstop = 4 -- vim.opt.tabstop = 4
-- vim.opt.smartindent = true -- vim.opt.smartindent = true

View file

@ -2,8 +2,7 @@ return {
{ {
"aznhe21/actions-preview.nvim", "aznhe21/actions-preview.nvim",
event = "BufRead", event = "BufRead",
config = function() opts = {
require("actions-preview").setup({
telescope = { telescope = {
sorting_strategy = "ascending", sorting_strategy = "ascending",
layout_strategy = "vertical", layout_strategy = "vertical",
@ -17,7 +16,6 @@ return {
end, end,
}, },
}, },
}) },
end,
}, },
} }

View file

@ -21,8 +21,8 @@ return {
vim.keymap.set("n", "<C-r>", "<cmd>AutolistRecalculate<cr>") vim.keymap.set("n", "<C-r>", "<cmd>AutolistRecalculate<cr>")
-- cycle list types with dot-repeat -- cycle list types with dot-repeat
vim.keymap.set("n", "<leader>cn", require("autolist").cycle_next_dr, { expr = true }) vim.keymap.set("n", "].", require("autolist").cycle_next_dr, { desc = "Next List Type", expr = true })
vim.keymap.set("n", "<leader>cp", require("autolist").cycle_prev_dr, { expr = true }) vim.keymap.set("n", "[.", require("autolist").cycle_prev_dr, { desc = "Prev List Type", expr = true })
-- if you don't want dot-repeat -- if you don't want dot-repeat
-- vim.keymap.set("n", "<leader>cn", "<cmd>AutolistCycleNext<cr>") -- vim.keymap.set("n", "<leader>cn", "<cmd>AutolistCycleNext<cr>")

View file

@ -1,14 +1,12 @@
return { return {
{ {
"HampusHauffman/block.nvim", "HampusHauffman/block.nvim",
keys = { { "<leader>ub", ":Block<CR>", desc = "Toggle Block" } }, keys = { { "<leader>ub", "<cmd>Block<CR>", desc = "Toggle Block" } },
config = function() opts = {
require("block").setup({
percent = 0.9, percent = 0.9,
depth = 4, depth = 4,
colors = nil, colors = nil,
automatic = false, automatic = false,
}) },
end,
}, },
} }

View file

@ -2,13 +2,11 @@ return {
{ {
"declancm/cinnamon.nvim", "declancm/cinnamon.nvim",
event = "VeryLazy", event = "VeryLazy",
config = function() opts = {
require("cinnamon").setup({
default_keymaps = true, default_keymaps = true,
extra_keymaps = true, extra_keymaps = true,
extended_keymaps = true, extended_keymaps = true,
override_keymaps = true, override_keymaps = true,
}) },
end,
}, },
} }

View file

@ -2,8 +2,7 @@ return {
{ {
"ziontee113/color-picker.nvim", "ziontee113/color-picker.nvim",
cmd = { "PickColor", "PickColorInsert" }, cmd = { "PickColor", "PickColorInsert" },
config = function() opts = {
require("color-picker").setup({
["icons"] = { "", "" }, ["icons"] = { "", "" },
["border"] = "rounded", -- none | single | double | rounded | solid | shadow ["border"] = "rounded", -- none | single | double | rounded | solid | shadow
["keymap"] = { -- mapping example: ["keymap"] = { -- mapping example:
@ -13,7 +12,6 @@ return {
["background_highlight_group"] = "Normal", -- default ["background_highlight_group"] = "Normal", -- default
["border_highlight_group"] = "FloatBorder", -- default ["border_highlight_group"] = "FloatBorder", -- default
["text_highlight_group"] = "Normal", --default ["text_highlight_group"] = "Normal", --default
}) },
end,
}, },
} }

View file

@ -25,7 +25,7 @@ return {
lua = { "stylua" }, lua = { "stylua" },
fish = { "fish_indent" }, fish = { "fish_indent" },
sh = { "shfmt", "shellharden" }, sh = { "shfmt", "shellharden" },
python = { "isort", "black" }, python = { "black" },
bash = { "shfmt", "shellharden" }, bash = { "shfmt", "shellharden" },
javascript = { { "prettierd", "prettier", "rustywind" } }, javascript = { { "prettierd", "prettier", "rustywind" } },
javascriptreact = { { "prettierd", "prettier", "rustywind" } }, javascriptreact = { { "prettierd", "prettier", "rustywind" } },
@ -39,6 +39,7 @@ return {
css = { { "prettierd", "prettier", "stylelint" } }, css = { { "prettierd", "prettier", "stylelint" } },
scss = { { "prettierd", "prettier", "stylelint" } }, scss = { { "prettierd", "prettier", "stylelint" } },
less = { { "prettierd", "prettier", "stylelint" } }, less = { { "prettierd", "prettier", "stylelint" } },
markdown = { { "prettierd", "prettier" } },
}, },
-- LazyVim will merge the options you set here with builtin formatters. -- LazyVim will merge the options you set here with builtin formatters.
-- You can also define any custom formatters here. -- You can also define any custom formatters here.

View file

@ -4,7 +4,10 @@ return {
dependencies = { dependencies = {
"kristijanhusak/vim-dadbod-ui", "kristijanhusak/vim-dadbod-ui",
"kristijanhusak/vim-dadbod-completion", "kristijanhusak/vim-dadbod-completion",
"jsborjesson/vim-uppercase-sql",
}, },
cmd = { "DBUI", "DBUIToggle" },
ft = "sql",
opts = { opts = {
db_competion = function() db_competion = function()
require("cmp").setup.buffer({ sources = { { name = "vim-dadbod-completion" } } }) require("cmp").setup.buffer({ sources = { { name = "vim-dadbod-completion" } } })

View file

@ -1,75 +0,0 @@
return {
{
"glepnir/dashboard-nvim",
event = "VimEnter",
opts = function()
local logo = [[
]]
-- local logo = [[
-- ▄ ▄
-- ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄
-- █ ▄ █▄█ ▄▄▄ █ █▄█ █ █
-- ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █
-- ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄
-- █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄
-- ▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █
-- █▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █
-- █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█
-- ]]
logo = string.rep("\n", 8) .. logo .. "\n\n"
local opts = {
theme = "doom",
hide = {
-- this is taken care of by lualine
-- enabling this messes up the actual laststatus setting after loading a file
statusline = false,
},
config = {
header = vim.split(logo, "\n"),
center = {
{ action = "Telescope find_files", desc = " Find file", icon = "", key = "f" },
{ action = "ene | startinsert", desc = " New file", icon = "", key = "n" },
{ action = "Telescope oldfiles", desc = " Recent files", icon = "", key = "r" },
{ action = "Telescope live_grep", desc = " Find text", icon = "", key = "g" },
{ action = "e $MYVIMRC", desc = " Config", icon = "", key = "c" },
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "", key = "s" },
{ action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" },
{ action = "qa", desc = " Quit", icon = "", key = "q" },
},
footer = function()
local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
end,
},
}
for _, button in ipairs(opts.config.center) do
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
end
-- close Lazy and re-open when the dashboard is ready
if vim.o.filetype == "lazy" then
vim.cmd.close()
vim.api.nvim_create_autocmd("User", {
pattern = "DashboardLoaded",
callback = function()
require("lazy").show()
end,
})
end
return opts
end,
},
}

View file

@ -6,8 +6,6 @@ return {
{ "<Leader>gdo", "<cmd>DiffviewOpen<CR>", desc = "Open Diff View" }, { "<Leader>gdo", "<cmd>DiffviewOpen<CR>", desc = "Open Diff View" },
{ "<Leader>gdc", "<cmd>DiffviewClose<CR>", desc = "Close Diff View" }, { "<Leader>gdc", "<cmd>DiffviewClose<CR>", desc = "Close Diff View" },
}, },
config = function() opts = {},
require("diffview").setup()
end,
}, },
} }

View file

@ -2,8 +2,12 @@ return {
{ {
"Bekaboo/dropbar.nvim", "Bekaboo/dropbar.nvim",
event = "BufRead", event = "BufRead",
config = function() opts = {
require("dropbar").setup() sources = {
end, terminal = {
name = "",
},
},
},
}, },
} }

View file

@ -2,12 +2,10 @@ return {
{ {
"dnlhc/glance.nvim", "dnlhc/glance.nvim",
cmd = { "Glance" }, cmd = { "Glance" },
config = function() opts = {
require("glance").setup({
border = { border = {
enable = true, enable = true,
}, },
}) },
end,
}, },
} }

View file

@ -2,10 +2,8 @@ return {
{ {
"tzachar/highlight-undo.nvim", "tzachar/highlight-undo.nvim",
event = "BufReadPost", event = "BufReadPost",
config = function() opts = {
require("highlight-undo").setup({
duration = 700, duration = 700,
}) },
end,
}, },
} }

View file

@ -2,8 +2,7 @@ return {
{ {
"kosayoda/nvim-lightbulb", "kosayoda/nvim-lightbulb",
event = "BufReadPre", event = "BufReadPre",
config = function() opts = {
require("nvim-lightbulb").setup({
sign = { sign = {
enabled = false, enabled = false,
priority = 10, priority = 10,
@ -17,7 +16,6 @@ return {
enabled = false, enabled = false,
text = "💡", text = "💡",
}, },
}) },
end,
}, },
} }

View file

@ -9,7 +9,6 @@ return {
fish = { "fish" }, fish = { "fish" },
markdown = { "markdownlint" }, markdown = { "markdownlint" },
python = { "pylint" }, python = { "pylint" },
yaml = { "yamllint" },
dockerfile = { "hadolint" }, dockerfile = { "hadolint" },
css = { "stylelint" }, css = { "stylelint" },
sass = { "stylelint" }, sass = { "stylelint" },

View file

@ -2,8 +2,6 @@ return {
{ {
"VidocqH/lsp-lens.nvim", "VidocqH/lsp-lens.nvim",
event = "BufReadPost", event = "BufReadPost",
config = function() opts = {},
require("lsp-lens").setup()
end,
}, },
} }

View file

@ -34,6 +34,7 @@ return {
lualine_a = { "mode" }, lualine_a = { "mode" },
lualine_b = { "branch" }, lualine_b = { "branch" },
lualine_c = { lualine_c = {
Util.lualine.root_dir(),
{ {
"diagnostics", "diagnostics",
symbols = { symbols = {
@ -45,9 +46,7 @@ return {
}, },
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
{ {
function() Util.lualine.pretty_path(),
return Util.root.pretty_path()
end,
}, },
-- stylua: ignore -- stylua: ignore
{ {
@ -88,6 +87,16 @@ return {
modified = icons.git.modified, modified = icons.git.modified,
removed = icons.git.removed, removed = icons.git.removed,
}, },
source = function()
local gitsigns = vim.b.gitsigns_status_dict
if gitsigns then
return {
added = gitsigns.added,
modified = gitsigns.changed,
removed = gitsigns.removed,
}
end
end,
}, },
}, },
lualine_y = { lualine_y = {

View file

@ -1,11 +0,0 @@
return {
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && yarn install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown" },
},
}

View file

@ -0,0 +1,11 @@
return {
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && npx --yes yarn install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown" },
},
}

View file

@ -5,38 +5,6 @@ return {
opts = { opts = {
snippet_engine = "luasnip", snippet_engine = "luasnip",
enabled = true, enabled = true,
languages = {
lua = {
template = {
annotation_convention = "ldoc",
},
},
python = {
template = {
annotation_convention = "google_docstrings",
},
},
rust = {
template = {
annotation_convention = "rustdoc",
},
},
javascript = {
template = {
annotation_convention = "jsdoc",
},
},
typescript = {
template = {
annotation_convention = "tsdoc",
},
},
typescriptreact = {
template = {
annotation_convention = "tsdoc",
},
},
},
}, },
keys = { keys = {
{ {

View file

@ -2,8 +2,6 @@ return {
{ {
"nacro90/numb.nvim", "nacro90/numb.nvim",
event = "BufRead", event = "BufRead",
config = function() opts = {},
require("numb").setup({})
end,
}, },
} }

View file

@ -3,8 +3,7 @@ return {
"vuki656/package-info.nvim", "vuki656/package-info.nvim",
requires = "MunifTanjim/nui.nvim", requires = "MunifTanjim/nui.nvim",
event = "BufRead", event = "BufRead",
config = function() opts = {
require("package-info").setup({
colors = { colors = {
up_to_date = "#3C4048", -- Text color for up to date dependency virtual text up_to_date = "#3C4048", -- Text color for up to date dependency virtual text
outdated = "#d19a66", -- Text color for outdated dependency virtual text outdated = "#d19a66", -- Text color for outdated dependency virtual text
@ -24,7 +23,6 @@ return {
-- `yarn.lock` or `package-lock.json`. If none are found it will use the -- `yarn.lock` or `package-lock.json`. If none are found it will use the
-- provided one, if nothing is provided it will use `yarn` -- provided one, if nothing is provided it will use `yarn`
package_manager = "npm", package_manager = "npm",
}) },
end,
}, },
} }

View file

@ -7,10 +7,8 @@ return {
{ "<leader>dbc", "<cmd>PBSetConditionalBreakpoint<cr>", desc = "Set Conditional Breakpoint" }, { "<leader>dbc", "<cmd>PBSetConditionalBreakpoint<cr>", desc = "Set Conditional Breakpoint" },
{ "<leader>dbb", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" }, { "<leader>dbb", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" },
}, },
config = function() opts = {
require("persistent-breakpoints").setup({
load_breakpoints_event = { "BufReadPost" }, load_breakpoints_event = { "BufReadPost" },
}) },
end,
}, },
} }

View file

@ -3,7 +3,7 @@ return {
"HiPhish/rainbow-delimiters.nvim", "HiPhish/rainbow-delimiters.nvim",
event = "VeryLazy", event = "VeryLazy",
config = function(_, opts) config = function(_, opts)
require("rainbow-delimiters.setup")(opts) require("rainbow-delimiters.setup").setup({ opts })
end, end,
opts = { opts = {
highlight = { highlight = {

View file

@ -5,9 +5,7 @@ return {
{ "nvim-lua/plenary.nvim" }, { "nvim-lua/plenary.nvim" },
{ "nvim-treesitter/nvim-treesitter" }, { "nvim-treesitter/nvim-treesitter" },
}, },
config = function() opts = {},
require("refactoring").setup()
end,
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>Rs", function() require("telescope").extensions.refactoring.refactors() end, mode = { "v" }, desc = "Refactor Options", }, { "<leader>Rs", function() require("telescope").extensions.refactoring.refactors() end, mode = { "v" }, desc = "Refactor Options", },

View file

@ -1,12 +1,9 @@
return { return {
{ {
"bennypowers/nvim-regexplainer", "bennypowers/nvim-regexplainer",
config = function() opts = {},
require("regexplainer").setup()
end,
event = "BufReadPost", event = "BufReadPost",
requires = { requires = {
"nvim-treesitter/nvim-treesitter",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
}, },
}, },

View file

@ -2,9 +2,8 @@ return {
{ {
"lewis6991/satellite.nvim", "lewis6991/satellite.nvim",
event = "BufRead", event = "BufRead",
config = function() opts = {
require("satellite").setup({ current_only = true,
current_only = false,
winblend = 50, winblend = 50,
zindex = 40, zindex = 40,
excluded_filetypes = {}, excluded_filetypes = {},
@ -59,7 +58,6 @@ return {
-- SatelliteQuickfix (default links to WarningMsg) -- SatelliteQuickfix (default links to WarningMsg)
}, },
}, },
}) },
end,
}, },
} }

View file

@ -4,10 +4,10 @@ return {
build = "./kitty/install-kittens.bash", build = "./kitty/install-kittens.bash",
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<A-h>", function() require("smart-splits").resize_left() end, desc = "Resize left", mode = "n" }, { "<C-A-Left>", function() require("smart-splits").resize_left() end, desc = "Resize left", mode = "n" },
{ "<A-j>", function() require("smart-splits").resize_down() end, desc = "Resize down", mode = "n" }, { "<C-A-Down>", function() require("smart-splits").resize_down() end, desc = "Resize down", mode = "n" },
{ "<A-k>", function() require("smart-splits").resize_up() end, desc = "Resize up", mode = "n" }, { "<C-A-Up>", function() require("smart-splits").resize_up() end, desc = "Resize up", mode = "n" },
{ "<A-l>", function() require("smart-splits").resize_right() end, desc = "Resize right", mode = "n" }, { "<C-A-Right>", function() require("smart-splits").resize_right() end, desc = "Resize right", mode = "n" },
{ "<C-h>", function() require("smart-splits").move_cursor_left() end, desc = "Move cursor left", mode = "n" }, { "<C-h>", function() require("smart-splits").move_cursor_left() end, desc = "Move cursor left", mode = "n" },
{ "<C-j>", function() require("smart-splits").move_cursor_down() end, desc = "Move cursor down", mode = "n" }, { "<C-j>", function() require("smart-splits").move_cursor_down() end, desc = "Move cursor down", mode = "n" },
{ "<C-k>", function() require("smart-splits").move_cursor_up() end, desc = "Move cursor up", mode = "n" }, { "<C-k>", function() require("smart-splits").move_cursor_up() end, desc = "Move cursor up", mode = "n" },

View file

@ -1,26 +0,0 @@
return {
{
"prochri/telescope-all-recent.nvim",
event = "VeryLazy",
config = function()
require("telescope-all-recent").setup({
pickers = {
["workspaces.nvim#workspaces"] = {
disable = false,
sorting = "frecency",
},
["project.nvim#projects"] = {
disable = false,
sorting = "frecency",
},
["yanky.nvim#yank_history"] = {
disable = true,
},
["zoxide.nvim#zoxide"] = {
disable = true,
},
},
})
end,
},
}

View file

@ -1,10 +0,0 @@
return {
{
"dawsers/telescope-floaterm.nvim",
opts = {},
event = "VeryLazy",
config = function(_, opts)
require("telescope").load_extension("floaterm")
end,
},
}

View file

@ -1,10 +0,0 @@
return {
{
"piersolenski/telescope-import.nvim",
requires = "nvim-telescope/telescope.nvim",
event = "VeryLazy",
config = function(_, opts)
require("telescope").load_extension("import")
end,
},
}

View file

@ -1,9 +0,0 @@
return {
{
"tsakirist/telescope-lazy.nvim",
event = "VeryLazy",
config = function()
require("telescope").load_extension("lazy")
end,
},
}

View file

@ -1,9 +0,0 @@
return {
{
"benfowler/telescope-luasnip.nvim",
event = "VeryLazy",
config = function()
require("telescope").load_extension("luasnip")
end,
},
}

View file

@ -1,10 +0,0 @@
return {
{
"debugloop/telescope-undo.nvim",
opts = {},
event = "VeryLazy",
config = function(_, opts)
require("telescope").load_extension("undo")
end,
}
}

View file

@ -1,9 +0,0 @@
return {
{
"jvgrootveld/telescope-zoxide",
event = "VeryLazy",
config = function()
require("telescope").load_extension("zoxide")
end,
},
}

View file

@ -17,6 +17,75 @@ return {
end) end)
end, end,
}, },
{
"debugloop/telescope-undo.nvim",
opts = {},
event = "VeryLazy",
config = function(_, opts)
Util.on_load("telescope.nvim", function()
require("telescope").load_extension("undo")
end)
end,
},
{
"prochri/telescope-all-recent.nvim",
event = "VeryLazy",
opts = {
pickers = {
["workspaces.nvim#workspaces"] = {
disable = false,
sorting = "frecency",
},
["project.nvim#projects"] = {
disable = false,
sorting = "frecency",
},
["yanky.nvim#yank_history"] = {
disable = true,
},
["zoxide.nvim#zoxide"] = {
disable = true,
},
},
},
},
{
"benfowler/telescope-luasnip.nvim",
event = "VeryLazy",
config = function()
Util.on_load("telescope.nvim", function()
require("telescope").load_extension("luasnip")
end)
end,
},
{
"piersolenski/telescope-import.nvim",
requires = "nvim-telescope/telescope.nvim",
event = "VeryLazy",
config = function(_, opts)
Util.on_load("telescope.nvim", function()
require("telescope").load_extension("import")
end)
end,
},
{
"jvgrootveld/telescope-zoxide",
event = "VeryLazy",
config = function()
Util.on_load("telescope.nvim", function()
require("telescope").load_extension("zoxide")
end)
end,
},
{
"tsakirist/telescope-lazy.nvim",
event = "VeryLazy",
config = function()
Util.on_load("telescope.nvim", function()
require("telescope").load_extension("lazy")
end)
end,
},
}, },
keys = { keys = {
{ {
@ -97,7 +166,7 @@ return {
{ "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Jump to Mark" }, { "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Jump to Mark" },
{ "<leader>so", "<cmd>Telescope vim_options<cr>", desc = "Options" }, { "<leader>so", "<cmd>Telescope vim_options<cr>", desc = "Options" },
{ "<leader>sR", "<cmd>Telescope resume<cr>", desc = "Resume" }, { "<leader>sR", "<cmd>Telescope resume<cr>", desc = "Resume" },
{ "<leader>gu", "<cmd>Telescope undo<cr>", desc = "Telescope Undotree" }, { "<leader>cu", "<cmd>Telescope undo<cr>", desc = "Undotree" },
{ {
"<leader>sw", "<leader>sw",
Util.telescope("grep_string", { word_match = "-w" }), Util.telescope("grep_string", { word_match = "-w" }),

View file

@ -0,0 +1,38 @@
return {
{
"akinsho/nvim-toggleterm.lua",
cmd = "ToggleTerm",
opts = {
-- size can be a number or function which is passed the current terminal
size = 20,
open_mapping = [[<c-\>]],
hide_numbers = true, -- hide the number column in toggleterm buffers
shade_filetypes = {},
shade_terminals = true,
start_in_insert = true,
insert_mappings = true, -- whether or not the open mapping applies in insert mode
persist_size = true,
persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered
direction = "float",
close_on_exit = false, -- close the terminal window when the process exits
shell = "/bin/fish", -- change the default shell
auto_scroll = true, -- automatically scroll to the bottom on terminal output
-- This field is only relevant if direction is set to 'float'
float_opts = {
-- The border key is *almost* the same as 'nvim_win_open'
-- see :h nvim_win_open for details on borders however
-- the 'curved' border is a custom border type
-- not natively supported but implemented in this plugin.
-- border = 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
border = "curved",
-- width = <value>,
-- height = <value>,
winblend = 3,
highlights = { border = "Normal", background = "Normal" },
},
},
keys = {
{ [[<c-\>]], "<cmd>ToggleTerm<CR>", mode = "n", desc = "Toggle terminal" },
},
},
}

View file

@ -1,38 +0,0 @@
return {
{
"akinsho/nvim-toggleterm.lua",
cmd = "ToggleTerm",
opts = {
-- size can be a number or function which is passed the current terminal
size = 20,
open_mapping = [[<c-return>]],
hide_numbers = true, -- hide the number column in toggleterm buffers
shade_filetypes = {},
start_in_insert = true,
insert_mappings = true, -- whether or not the open mapping applies in insert mode
persist_size = true,
persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered
direction = "float",
close_on_exit = true, -- close the terminal window when the process exits
shell = "/bin/fish", -- change the default shell
auto_scroll = true, -- automatically scroll to the bottom on terminal output
-- This field is only relevant if direction is set to 'float'
float_opts = {
-- The border key is *almost* the same as 'nvim_win_open'
-- see :h nvim_win_open for details on borders however
-- the 'curved' border is a custom border type
-- not natively supported but implemented in this plugin.
-- border = 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
border = "curved",
-- width = <value>,
-- height = <value>,
winblend = 3,
highlights = { border = "Normal", background = "Normal" },
},
},
keys = {
{ "<c-Return>", "<cmd>ToggleTerm<CR>", mode = "n", desc = "Toggle terminal" },
{ "<c-Return>", "<C-\\><C-n><C-\\><C-n>:FloatermToggle<CR>", mode = "t", desc = "Toggle terminal" },
},
},
}

View file

@ -2,7 +2,7 @@ return {
{ {
"folke/twilight.nvim", "folke/twilight.nvim",
cmd = "Twilight", cmd = "Twilight",
keys = { { "<leader>ut", "<cmd>Twilight<cr>", desc = "Toggle Twilight" } }, keys = { { "<leader>uZ", "<cmd>Twilight<cr>", desc = "Toggle Twilight" } },
opts = { opts = {
{ {
dimming = { dimming = {

View file

@ -1,6 +1,6 @@
return { return {
{ {
"mbbill/undotree", "mbbill/undotree",
cmd = "UndotreeToggle", event = "BufReadPost",
}, },
} }

View file

@ -3,10 +3,8 @@ return {
"axieax/urlview.nvim", "axieax/urlview.nvim",
cmd = { "UrlView" }, cmd = { "UrlView" },
keys = { { "<leader>su", "<cmd>UrlView<cr>", desc = "Search Urls" } }, keys = { { "<leader>su", "<cmd>UrlView<cr>", desc = "Search Urls" } },
config = function() opts = {
require("urlview").setup({
default_picker = "telescope", default_picker = "telescope",
}) },
end,
}, },
} }

View file

@ -23,7 +23,7 @@ return {
["<leader>w"] = { name = "+windows" }, ["<leader>w"] = { name = "+windows" },
["<leader>x"] = { name = "+diagnostics/quickfix" }, ["<leader>x"] = { name = "+diagnostics/quickfix" },
["<leader>cc"] = { name = "+compile" }, ["<leader>cc"] = { name = "+compile" },
["<leader>cp"] = { name = "+packages" }, ["<leader>cP"] = { name = "+packages" },
["<leader>gd"] = { name = "+diff" }, ["<leader>gd"] = { name = "+diff" },
["<leader>gw"] = { name = "+worktrees" }, ["<leader>gw"] = { name = "+worktrees" },
["<leader>cR"] = { name = "+refactor" }, ["<leader>cR"] = { name = "+refactor" },

View file

@ -0,0 +1,100 @@
local M = {}
M.winbar_filetype_exclude = {
"help",
"startify",
"dashboard",
"packer",
"neogitstatus",
"neo-tree",
"Trouble",
"alpha",
"lir",
"Outline",
"spectre_panel",
"toggleterm",
}
local get_filename = function()
local filename = vim.fn.expand("%:t")
local extension = vim.fn.expand("%:e")
local f = require("user.functions")
if not f.isempty(filename) then
local file_icon, file_icon_color =
require("nvim-web-devicons").get_icon_color(filename, extension, { default = true })
local hl_group = "FileIconColor" .. extension
vim.api.nvim_set_hl(0, hl_group, { fg = file_icon_color })
if f.isempty(file_icon) then
file_icon = ""
file_icon_color = ""
end
return " " .. "%#" .. hl_group .. "#" .. file_icon .. "%*" .. " " .. "%#LineNr#" .. filename .. "%*"
end
end
local get_gps = function()
local status_gps_ok, gps = pcall(require, "nvim-gps")
if not status_gps_ok then
return ""
end
local status_ok, gps_location = pcall(gps.get_location, {})
if not status_ok then
return ""
end
if not gps.is_available() or gps_location == "error" then
return ""
end
if not require("user.functions").isempty(gps_location) then
return require("user.icons").ui.ChevronRight .. " " .. gps_location
else
return ""
end
end
local excludes = function()
if vim.tbl_contains(M.winbar_filetype_exclude, vim.bo.filetype) then
vim.opt_local.winbar = nil
return true
end
return false
end
M.get_winbar = function()
if excludes() then
return
end
local f = require("user.functions")
local value = get_filename()
local gps_added = false
if not f.isempty(value) then
local gps_value = get_gps()
value = value .. " " .. gps_value
if not f.isempty(gps_value) then
gps_added = true
end
end
if not f.isempty(value) and f.get_buf_option("mod") then
local mod = "%#LineNr#" .. require("user.icons").ui.Circle .. "%*"
if gps_added then
value = value .. " " .. mod
else
value = value .. mod
end
end
local status_ok, _ = pcall(vim.api.nvim_set_option_value, "winbar", value, { scope = "local" })
if not status_ok then
return
end
end
return M

View file

@ -11,11 +11,6 @@ return {
{ "<leader>wh", "<cmd>WindowsMaximizeHorizontally<cr>", desc = "Horizontal Zoom" }, { "<leader>wh", "<cmd>WindowsMaximizeHorizontally<cr>", desc = "Horizontal Zoom" },
{ "<leader>we", "<cmd>WindowsEqualize<cr>", desc = "Equalize Zoom" }, { "<leader>we", "<cmd>WindowsEqualize<cr>", desc = "Equalize Zoom" },
}, },
config = function() opts = {},
vim.o.winwidth = 10
vim.o.winminwidth = 10
vim.o.equalalways = false
require("windows").setup()
end,
}, },
} }