plugins!!!

This commit is contained in:
Christoph J. Scherr 2024-01-20 04:55:17 +01:00
parent 6a5a1c91d4
commit 4e2e019d92
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
1 changed files with 200 additions and 2 deletions

View File

@ -1,5 +1,21 @@
local overrides = require "custom.configs.overrides" local overrides = require "custom.configs.overrides"
local utils = require "core.utils" local utils = require "core.utils"
local function get_header()
-- see https://github.com/MaximilianLloyd/ascii.nvim
return {
-- The following is a customized version!
[[ ]],
[[ ]],
[[ █ ████████ █████ ███████ ████ ]],
[[ ███ ██████ █████ █████████ ██████ ]],
[[ █████ ██████████████████████ ████ ███████████████ ]],
[[ ██ ██ █████ █████████████ ████ ████████████████ ]],
[[ ████ ███████████████ █████████ ████ █████ ██████ ████ ]],
[[ ██████ ██████ ███ █████████ ████ █████ █████ ████ ]],
[[ ████████ ███████████████████ ████ ████ █████ ████ ████ ]],
[[ ]],
}
end
---@type NvPluginSpec[] ---@type NvPluginSpec[]
local plugins = { local plugins = {
@ -101,6 +117,52 @@ local plugins = {
}, },
}, },
{ "echasnovski/mini.trailspace", lazy = false, event = { "BufReadPost", "BufNewFile" }, opts = {} }, { "echasnovski/mini.trailspace", lazy = false, event = { "BufReadPost", "BufNewFile" }, opts = {} },
{
"itchyny/vim-cursorword",
event = "FileType",
init = function()
vim.g.cursorword = 0
end,
config = function()
local augroup = vim.api.nvim_create_augroup("plex_cursorword", {})
vim.api.nvim_create_autocmd("FileType", {
group = augroup,
pattern = {
"conf",
"dosini",
"json",
"markdown",
"nginx",
"text",
"yaml",
},
callback = function()
if vim.wo.diff or vim.wo.previewwindow then
vim.b.cursorword = 0
else
vim.b.cursorword = 1
end
end,
})
vim.api.nvim_create_autocmd("InsertEnter", {
group = augroup,
callback = function()
if vim.b["cursorword"] == 1 then
vim.b["cursorword"] = 0
end
end,
})
vim.api.nvim_create_autocmd("InsertLeave", {
group = augroup,
callback = function()
if vim.b["cursorword"] == 0 then
vim.b["cursorword"] = 1
end
end,
})
end,
},
{ {
"RRethy/vim-illuminate", "RRethy/vim-illuminate",
lazy = false, lazy = false,
@ -234,9 +296,9 @@ local plugins = {
}, },
{ {
"akinsho/toggleterm.nvim", "akinsho/toggleterm.nvim",
init = function () init = function()
require("core.utils").load_mappings "toggleterm" require("core.utils").load_mappings "toggleterm"
end, end,
cmd = "ToggleTerm", cmd = "ToggleTerm",
opts = { opts = {
open_mapping = false, open_mapping = false,
@ -245,6 +307,142 @@ local plugins = {
}, },
}, },
}, },
-- lazy.nvim
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
"rcarriga/nvim-notify",
},
config = function()
require("noice").setup {
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
}
end,
},
{
"goolord/alpha-nvim",
lazy = false,
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
local dash = require "alpha.themes.dashboard"
require("alpha").setup(dash.config)
end,
opts = {
header = get_header(),
},
},
{
"stevearc/dressing.nvim",
init = function()
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.select = function(...)
require("lazy").load { plugins = { "dressing.nvim" } }
return vim.ui.select(...)
end
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.input = function(...)
require("lazy").load { plugins = { "dressing.nvim" } }
return vim.ui.input(...)
end
end,
},
{
"chentoast/marks.nvim",
lazy = false,
dependencies = "lewis6991/gitsigns.nvim",
event = "FileType",
opts = {
sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 },
bookmark_1 = { sign = "󰉀" }, -- ⚐ ⚑ 󰈻 󰈼 󰈽 󰈾 󰈿 󰉀
},
},
{
"kevinhwang91/nvim-bqf",
ft = "qf",
cmd = "BqfAutoToggle",
event = "QuickFixCmdPost",
opts = {
auto_resize_height = false,
func_map = {
tab = "st",
split = "sv",
vsplit = "sg",
stoggleup = "K",
stoggledown = "J",
stogglevm = "<Space>",
ptoggleitem = "p",
ptoggleauto = "P",
ptogglemode = "zp",
pscrollup = "<C-b>",
pscrolldown = "<C-f>",
prevfile = "gk",
nextfile = "gj",
prevhist = "<S-Tab>",
nexthist = "<Tab>",
},
preview = {
auto_preview = true,
should_preview_cb = function(bufnr)
-- file size greater than 100kb can't be previewed automatically
local filename = vim.api.nvim_buf_get_name(bufnr)
local fsize = vim.fn.getfsize(filename)
if fsize > 100 * 1024 then
return false
end
return true
end,
},
},
},
{
"uga-rosa/ccc.nvim",
lazy = false,
event = "FileType",
keys = {
{ "<Leader>cp", "<cmd>CccPick<CR>", desc = "Color-picker" },
},
opts = {
highlighter = {
auto_enable = true,
lsp = true,
excludes = { "lazy", "mason", "help", "neo-tree" },
},
},
},
{
"Bekaboo/deadcolumn.nvim",
event = { "BufReadPre", "BufNewFile" },
},
} }
return plugins return plugins