🐛 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:
parent
ce2a9fca53
commit
2cce8ffdc8
50 changed files with 740 additions and 785 deletions
|
@ -10,6 +10,7 @@
|
|||
"lazyvim.plugins.extras.lang.go",
|
||||
"lazyvim.plugins.extras.lang.java",
|
||||
"lazyvim.plugins.extras.lang.json",
|
||||
"lazyvim.plugins.extras.lang.markdown",
|
||||
"lazyvim.plugins.extras.lang.omnisharp",
|
||||
"lazyvim.plugins.extras.lang.python",
|
||||
"lazyvim.plugins.extras.lang.rust",
|
||||
|
|
|
@ -15,56 +15,56 @@ local function map(mode, lhs, rhs, opts)
|
|||
end
|
||||
end
|
||||
|
||||
map(
|
||||
"n",
|
||||
"<leader>xs",
|
||||
":FloatermNew --disposable --name=duaroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> dua i<CR>",
|
||||
{ desc = "Workspace Size (root dir)" }
|
||||
)
|
||||
-- map(
|
||||
-- "n",
|
||||
-- "<leader>xs",
|
||||
-- ":FloatermNew --disposable --name=duaroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> dua i<CR>",
|
||||
-- { 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(
|
||||
"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>T", ":Telescope floaterm<CR>", { desc = "Terminals" })
|
||||
|
||||
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>um", ":MarkdownPreviewToggle<CR>", { desc = "Toggle Markdown Preview" })
|
||||
|
||||
map(
|
||||
"n",
|
||||
"<leader>ft",
|
||||
":FloatermNew --name=termroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root><CR>",
|
||||
{ desc = "New Terminal (root dir)" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<leader>fT",
|
||||
":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" })
|
||||
-- map(
|
||||
-- "n",
|
||||
-- "<leader>ft",
|
||||
-- ":FloatermNew --name=termroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root><CR>",
|
||||
-- { desc = "New Terminal (root dir)" }
|
||||
-- )
|
||||
-- map(
|
||||
-- "n",
|
||||
-- "<leader>fT",
|
||||
-- ":FloatermNew --name=termcwd --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer><CR>",
|
||||
-- { desc = "New Terminal (cwd)" }
|
||||
-- )
|
||||
|
||||
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" })
|
||||
|
@ -118,35 +112,35 @@ vim.keymap.set(
|
|||
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>cps",
|
||||
"<leader>cPs",
|
||||
"<cmd>lua require('package-info').show({ force = true })<cr>",
|
||||
{ silent = true, noremap = true, desc = "Show Package Versions" }
|
||||
)
|
||||
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>cpu",
|
||||
"<leader>cPu",
|
||||
"<cmd>lua require('package-info').update()<cr>",
|
||||
{ silent = true, noremap = true, desc = "Update Package" }
|
||||
)
|
||||
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>cpr",
|
||||
"<leader>cPr",
|
||||
"<cmd>lua require('package-info').delete()<cr>",
|
||||
{ silent = true, noremap = true, desc = "Remove Package" }
|
||||
)
|
||||
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>cpv",
|
||||
"<leader>cPv",
|
||||
"<cmd>lua require('package-info').change_version()<cr>",
|
||||
{ silent = true, noremap = true, desc = "Change Package Version" }
|
||||
)
|
||||
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>cpn",
|
||||
"<leader>cPn",
|
||||
"<cmd>lua require('package-info').install()<cr>",
|
||||
{ silent = true, noremap = true, desc = "Install New Dependency" }
|
||||
)
|
||||
|
|
|
@ -99,6 +99,9 @@ vim.api.nvim_set_var("terminal_color_15", "#B8C0E0")
|
|||
|
||||
vim.opt.shell = "fish"
|
||||
|
||||
vim.o.winwidth = 10
|
||||
vim.o.winminwidth = 10
|
||||
vim.o.equalalways = false
|
||||
-- vim.opt.shiftwidth = 4
|
||||
-- vim.opt.tabstop = 4
|
||||
-- vim.opt.smartindent = true
|
||||
|
|
|
@ -2,8 +2,7 @@ return {
|
|||
{
|
||||
"aznhe21/actions-preview.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("actions-preview").setup({
|
||||
opts = {
|
||||
telescope = {
|
||||
sorting_strategy = "ascending",
|
||||
layout_strategy = "vertical",
|
||||
|
@ -17,7 +16,6 @@ return {
|
|||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ return {
|
|||
vim.keymap.set("n", "<C-r>", "<cmd>AutolistRecalculate<cr>")
|
||||
|
||||
-- cycle list types with dot-repeat
|
||||
vim.keymap.set("n", "<leader>cn", require("autolist").cycle_next_dr, { expr = true })
|
||||
vim.keymap.set("n", "<leader>cp", require("autolist").cycle_prev_dr, { expr = true })
|
||||
vim.keymap.set("n", "].", require("autolist").cycle_next_dr, { desc = "Next List Type", expr = true })
|
||||
vim.keymap.set("n", "[.", require("autolist").cycle_prev_dr, { desc = "Prev List Type", expr = true })
|
||||
|
||||
-- if you don't want dot-repeat
|
||||
-- vim.keymap.set("n", "<leader>cn", "<cmd>AutolistCycleNext<cr>")
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
return {
|
||||
{
|
||||
"HampusHauffman/block.nvim",
|
||||
keys = { { "<leader>ub", ":Block<CR>", desc = "Toggle Block" } },
|
||||
config = function()
|
||||
require("block").setup({
|
||||
keys = { { "<leader>ub", "<cmd>Block<CR>", desc = "Toggle Block" } },
|
||||
opts = {
|
||||
percent = 0.9,
|
||||
depth = 4,
|
||||
colors = nil,
|
||||
automatic = false,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,13 +2,11 @@ return {
|
|||
{
|
||||
"declancm/cinnamon.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("cinnamon").setup({
|
||||
opts = {
|
||||
default_keymaps = true,
|
||||
extra_keymaps = true,
|
||||
extended_keymaps = true,
|
||||
override_keymaps = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,8 +2,7 @@ return {
|
|||
{
|
||||
"ziontee113/color-picker.nvim",
|
||||
cmd = { "PickColor", "PickColorInsert" },
|
||||
config = function()
|
||||
require("color-picker").setup({
|
||||
opts = {
|
||||
["icons"] = { "ﱢ", "" },
|
||||
["border"] = "rounded", -- none | single | double | rounded | solid | shadow
|
||||
["keymap"] = { -- mapping example:
|
||||
|
@ -13,7 +12,6 @@ return {
|
|||
["background_highlight_group"] = "Normal", -- default
|
||||
["border_highlight_group"] = "FloatBorder", -- default
|
||||
["text_highlight_group"] = "Normal", --default
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ return {
|
|||
lua = { "stylua" },
|
||||
fish = { "fish_indent" },
|
||||
sh = { "shfmt", "shellharden" },
|
||||
python = { "isort", "black" },
|
||||
python = { "black" },
|
||||
bash = { "shfmt", "shellharden" },
|
||||
javascript = { { "prettierd", "prettier", "rustywind" } },
|
||||
javascriptreact = { { "prettierd", "prettier", "rustywind" } },
|
||||
|
@ -39,6 +39,7 @@ return {
|
|||
css = { { "prettierd", "prettier", "stylelint" } },
|
||||
scss = { { "prettierd", "prettier", "stylelint" } },
|
||||
less = { { "prettierd", "prettier", "stylelint" } },
|
||||
markdown = { { "prettierd", "prettier" } },
|
||||
},
|
||||
-- LazyVim will merge the options you set here with builtin formatters.
|
||||
-- You can also define any custom formatters here.
|
||||
|
|
|
@ -4,7 +4,10 @@ return {
|
|||
dependencies = {
|
||||
"kristijanhusak/vim-dadbod-ui",
|
||||
"kristijanhusak/vim-dadbod-completion",
|
||||
"jsborjesson/vim-uppercase-sql",
|
||||
},
|
||||
cmd = { "DBUI", "DBUIToggle" },
|
||||
ft = "sql",
|
||||
opts = {
|
||||
db_competion = function()
|
||||
require("cmp").setup.buffer({ sources = { { name = "vim-dadbod-completion" } } })
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
}
|
|
@ -6,8 +6,6 @@ return {
|
|||
{ "<Leader>gdo", "<cmd>DiffviewOpen<CR>", desc = "Open Diff View" },
|
||||
{ "<Leader>gdc", "<cmd>DiffviewClose<CR>", desc = "Close Diff View" },
|
||||
},
|
||||
config = function()
|
||||
require("diffview").setup()
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,8 +2,12 @@ return {
|
|||
{
|
||||
"Bekaboo/dropbar.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("dropbar").setup()
|
||||
end,
|
||||
opts = {
|
||||
sources = {
|
||||
terminal = {
|
||||
name = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,12 +2,10 @@ return {
|
|||
{
|
||||
"dnlhc/glance.nvim",
|
||||
cmd = { "Glance" },
|
||||
config = function()
|
||||
require("glance").setup({
|
||||
opts = {
|
||||
border = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,10 +2,8 @@ return {
|
|||
{
|
||||
"tzachar/highlight-undo.nvim",
|
||||
event = "BufReadPost",
|
||||
config = function()
|
||||
require("highlight-undo").setup({
|
||||
opts = {
|
||||
duration = 700,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,8 +2,7 @@ return {
|
|||
{
|
||||
"kosayoda/nvim-lightbulb",
|
||||
event = "BufReadPre",
|
||||
config = function()
|
||||
require("nvim-lightbulb").setup({
|
||||
opts = {
|
||||
sign = {
|
||||
enabled = false,
|
||||
priority = 10,
|
||||
|
@ -17,7 +16,6 @@ return {
|
|||
enabled = false,
|
||||
text = "💡",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ return {
|
|||
fish = { "fish" },
|
||||
markdown = { "markdownlint" },
|
||||
python = { "pylint" },
|
||||
yaml = { "yamllint" },
|
||||
dockerfile = { "hadolint" },
|
||||
css = { "stylelint" },
|
||||
sass = { "stylelint" },
|
||||
|
|
|
@ -2,8 +2,6 @@ return {
|
|||
{
|
||||
"VidocqH/lsp-lens.nvim",
|
||||
event = "BufReadPost",
|
||||
config = function()
|
||||
require("lsp-lens").setup()
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ return {
|
|||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch" },
|
||||
lualine_c = {
|
||||
Util.lualine.root_dir(),
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
|
@ -45,9 +46,7 @@ return {
|
|||
},
|
||||
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||
{
|
||||
function()
|
||||
return Util.root.pretty_path()
|
||||
end,
|
||||
Util.lualine.pretty_path(),
|
||||
},
|
||||
-- stylua: ignore
|
||||
{
|
||||
|
@ -88,6 +87,16 @@ return {
|
|||
modified = icons.git.modified,
|
||||
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 = {
|
||||
|
|
|
@ -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" },
|
||||
},
|
||||
}
|
11
.config/nvim/lua/plugins/markdown-preview.lua.bak
Normal file
11
.config/nvim/lua/plugins/markdown-preview.lua.bak
Normal 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" },
|
||||
},
|
||||
}
|
|
@ -5,38 +5,6 @@ return {
|
|||
opts = {
|
||||
snippet_engine = "luasnip",
|
||||
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 = {
|
||||
{
|
||||
|
|
|
@ -2,8 +2,6 @@ return {
|
|||
{
|
||||
"nacro90/numb.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("numb").setup({})
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -3,8 +3,7 @@ return {
|
|||
"vuki656/package-info.nvim",
|
||||
requires = "MunifTanjim/nui.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("package-info").setup({
|
||||
opts = {
|
||||
colors = {
|
||||
up_to_date = "#3C4048", -- Text color for up to date 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
|
||||
-- provided one, if nothing is provided it will use `yarn`
|
||||
package_manager = "npm",
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -7,10 +7,8 @@ return {
|
|||
{ "<leader>dbc", "<cmd>PBSetConditionalBreakpoint<cr>", desc = "Set Conditional Breakpoint" },
|
||||
{ "<leader>dbb", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" },
|
||||
},
|
||||
config = function()
|
||||
require("persistent-breakpoints").setup({
|
||||
opts = {
|
||||
load_breakpoints_event = { "BufReadPost" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ return {
|
|||
"HiPhish/rainbow-delimiters.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("rainbow-delimiters.setup")(opts)
|
||||
require("rainbow-delimiters.setup").setup({ opts })
|
||||
end,
|
||||
opts = {
|
||||
highlight = {
|
||||
|
|
|
@ -5,9 +5,7 @@ return {
|
|||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter" },
|
||||
},
|
||||
config = function()
|
||||
require("refactoring").setup()
|
||||
end,
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>Rs", function() require("telescope").extensions.refactoring.refactors() end, mode = { "v" }, desc = "Refactor Options", },
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
return {
|
||||
{
|
||||
"bennypowers/nvim-regexplainer",
|
||||
config = function()
|
||||
require("regexplainer").setup()
|
||||
end,
|
||||
opts = {},
|
||||
event = "BufReadPost",
|
||||
requires = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
},
|
||||
|
|
|
@ -2,9 +2,8 @@ return {
|
|||
{
|
||||
"lewis6991/satellite.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("satellite").setup({
|
||||
current_only = false,
|
||||
opts = {
|
||||
current_only = true,
|
||||
winblend = 50,
|
||||
zindex = 40,
|
||||
excluded_filetypes = {},
|
||||
|
@ -59,7 +58,6 @@ return {
|
|||
-- SatelliteQuickfix (default links to WarningMsg)
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -4,10 +4,10 @@ return {
|
|||
build = "./kitty/install-kittens.bash",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<A-h>", 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" },
|
||||
{ "<A-k>", 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-Left>", function() require("smart-splits").resize_left() end, desc = "Resize left", mode = "n" },
|
||||
{ "<C-A-Down>", function() require("smart-splits").resize_down() end, desc = "Resize down", mode = "n" },
|
||||
{ "<C-A-Up>", function() require("smart-splits").resize_up() end, desc = "Resize up", 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-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" },
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"dawsers/telescope-floaterm.nvim",
|
||||
opts = {},
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("telescope").load_extension("floaterm")
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -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,
|
||||
},
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"tsakirist/telescope-lazy.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("telescope").load_extension("lazy")
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"benfowler/telescope-luasnip.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("telescope").load_extension("luasnip")
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"debugloop/telescope-undo.nvim",
|
||||
opts = {},
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("telescope").load_extension("undo")
|
||||
end,
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"jvgrootveld/telescope-zoxide",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("telescope").load_extension("zoxide")
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -17,6 +17,75 @@ return {
|
|||
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 = {
|
||||
{
|
||||
|
@ -97,7 +166,7 @@ return {
|
|||
{ "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Jump to Mark" },
|
||||
{ "<leader>so", "<cmd>Telescope vim_options<cr>", desc = "Options" },
|
||||
{ "<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",
|
||||
Util.telescope("grep_string", { word_match = "-w" }),
|
||||
|
|
38
.config/nvim/lua/plugins/toggleterm.lua
Normal file
38
.config/nvim/lua/plugins/toggleterm.lua
Normal 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" },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -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" },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -2,7 +2,7 @@ return {
|
|||
{
|
||||
"folke/twilight.nvim",
|
||||
cmd = "Twilight",
|
||||
keys = { { "<leader>ut", "<cmd>Twilight<cr>", desc = "Toggle Twilight" } },
|
||||
keys = { { "<leader>uZ", "<cmd>Twilight<cr>", desc = "Toggle Twilight" } },
|
||||
opts = {
|
||||
{
|
||||
dimming = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
{
|
||||
"mbbill/undotree",
|
||||
cmd = "UndotreeToggle",
|
||||
event = "BufReadPost",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -3,10 +3,8 @@ return {
|
|||
"axieax/urlview.nvim",
|
||||
cmd = { "UrlView" },
|
||||
keys = { { "<leader>su", "<cmd>UrlView<cr>", desc = "Search Urls" } },
|
||||
config = function()
|
||||
require("urlview").setup({
|
||||
opts = {
|
||||
default_picker = "telescope",
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ return {
|
|||
["<leader>w"] = { name = "+windows" },
|
||||
["<leader>x"] = { name = "+diagnostics/quickfix" },
|
||||
["<leader>cc"] = { name = "+compile" },
|
||||
["<leader>cp"] = { name = "+packages" },
|
||||
["<leader>cP"] = { name = "+packages" },
|
||||
["<leader>gd"] = { name = "+diff" },
|
||||
["<leader>gw"] = { name = "+worktrees" },
|
||||
["<leader>cR"] = { name = "+refactor" },
|
||||
|
|
100
.config/nvim/lua/plugins/winbar.lua.bak
Normal file
100
.config/nvim/lua/plugins/winbar.lua.bak
Normal 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
|
|
@ -11,11 +11,6 @@ return {
|
|||
{ "<leader>wh", "<cmd>WindowsMaximizeHorizontally<cr>", desc = "Horizontal Zoom" },
|
||||
{ "<leader>we", "<cmd>WindowsEqualize<cr>", desc = "Equalize Zoom" },
|
||||
},
|
||||
config = function()
|
||||
vim.o.winwidth = 10
|
||||
vim.o.winminwidth = 10
|
||||
vim.o.equalalways = false
|
||||
require("windows").setup()
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue