248 lines
7.0 KiB
Cheetah
248 lines
7.0 KiB
Cheetah
return {
|
|
{{- if eq .chezmoi.os "openbsd" }}
|
|
-- Better `vim.notify()`
|
|
{
|
|
"rcarriga/nvim-notify",
|
|
keys = {
|
|
{
|
|
"<leader>un",
|
|
function()
|
|
require("notify").dismiss({ silent = true, pending = true })
|
|
end,
|
|
desc = "Dismiss all Notifications",
|
|
},
|
|
},
|
|
opts = {
|
|
timeout = 3000,
|
|
max_height = function()
|
|
return math.floor(vim.o.lines * 0.75)
|
|
end,
|
|
max_width = function()
|
|
return math.floor(vim.o.columns * 0.75)
|
|
end,
|
|
},
|
|
},
|
|
|
|
-- better vim.ui
|
|
{
|
|
"stevearc/dressing.nvim",
|
|
lazy = true,
|
|
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,
|
|
},
|
|
|
|
-- statusline
|
|
{
|
|
"nvim-lualine/lualine.nvim",
|
|
event = "VeryLazy",
|
|
init = function()
|
|
vim.g.lualine_laststatus = vim.o.laststatus
|
|
vim.o.laststatus = 0
|
|
end,
|
|
opts = {
|
|
icons_enabled = true,
|
|
theme = 'auto',
|
|
component_separators = '|',
|
|
section_separators = '',
|
|
},
|
|
},
|
|
|
|
-- Active indent guide and indent text objects. When you're browsing
|
|
-- code, this highlights the current level of indentation, and animates
|
|
-- the highlighting.
|
|
{
|
|
"echasnovski/mini.indentscope",
|
|
version = false, -- wait till new 0.7.0 release to put it back on semver
|
|
opts = {
|
|
-- symbol = "▏",
|
|
symbol = "│",
|
|
options = { try_as_border = true },
|
|
},
|
|
init = function()
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
pattern = {
|
|
"help",
|
|
"alpha",
|
|
"dashboard",
|
|
"neo-tree",
|
|
"Trouble",
|
|
"lazy",
|
|
"mason",
|
|
"notify",
|
|
"toggleterm",
|
|
"lazyterm",
|
|
},
|
|
callback = function()
|
|
vim.b.miniindentscope_disable = true
|
|
end,
|
|
})
|
|
end,
|
|
},
|
|
|
|
-- Displays a popup with possible key bindings of the command you started typing
|
|
{
|
|
"folke/which-key.nvim",
|
|
opts = function(_, opts)
|
|
opts.defaults["<leader>sn"] = { name = "+noice" }
|
|
end,
|
|
},
|
|
|
|
-- Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
|
|
{
|
|
"folke/noice.nvim",
|
|
event = "VeryLazy",
|
|
opts = {
|
|
lsp = {
|
|
override = {
|
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
["vim.lsp.util.stylize_markdown"] = true,
|
|
["cmp.entry.get_documentation"] = true,
|
|
},
|
|
},
|
|
routes = {
|
|
{
|
|
filter = {
|
|
event = "msg_show",
|
|
any = {
|
|
{ find = "%d+L, %d+B" },
|
|
{ find = "; after #%d+" },
|
|
{ find = "; before #%d+" },
|
|
},
|
|
},
|
|
view = "mini",
|
|
},
|
|
},
|
|
presets = {
|
|
bottom_search = true,
|
|
command_palette = true,
|
|
long_message_to_split = true,
|
|
inc_rename = true,
|
|
},
|
|
},
|
|
-- stylua: ignore
|
|
keys = {
|
|
{
|
|
"<S-Enter>",
|
|
function() require("noice").redirect(vim.fn.getcmdline()) end,
|
|
mode = "c",
|
|
desc =
|
|
"Redirect Cmdline"
|
|
},
|
|
{
|
|
"<leader>snl",
|
|
function() require("noice").cmd("last") end,
|
|
desc =
|
|
"Noice Last Message"
|
|
},
|
|
{
|
|
"<leader>snh",
|
|
function() require("noice").cmd("history") end,
|
|
desc =
|
|
"Noice History"
|
|
},
|
|
{
|
|
"<leader>sna",
|
|
function() require("noice").cmd("all") end,
|
|
desc =
|
|
"Noice All"
|
|
},
|
|
{
|
|
"<leader>snd",
|
|
function() require("noice").cmd("dismiss") end,
|
|
desc =
|
|
"Dismiss All"
|
|
},
|
|
{
|
|
"<c-f>",
|
|
function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end,
|
|
silent = true,
|
|
expr = true,
|
|
desc =
|
|
"Scroll forward",
|
|
mode = {
|
|
"i", "n", "s" }
|
|
},
|
|
{
|
|
"<c-b>",
|
|
function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end,
|
|
silent = true,
|
|
expr = true,
|
|
desc =
|
|
"Scroll backward",
|
|
mode = {
|
|
"i", "n", "s" }
|
|
},
|
|
},
|
|
},
|
|
|
|
-- -- lsp symbol navigation for lualine. This shows where
|
|
-- in the code structure you are - within functions, classes,
|
|
-- etc - in the statusline.
|
|
{
|
|
"SmiteshP/nvim-navic",
|
|
lazy = true,
|
|
opts = function()
|
|
return {
|
|
separator = " ",
|
|
highlight = true,
|
|
depth_limit = 5,
|
|
lazy_update_context = true,
|
|
}
|
|
end,
|
|
},
|
|
-- icons
|
|
{ "nvim-tree/nvim-web-devicons", lazy = true },
|
|
|
|
-- ui components
|
|
{ "MunifTanjim/nui.nvim", lazy = true },
|
|
|
|
{{ else }}
|
|
-- change lualine
|
|
{
|
|
"nvim-lualine/lualine.nvim",
|
|
event = "VeryLazy",
|
|
opts = function(_, opts)
|
|
opts.sections.lualine_b = { { "branch", icon = " " } }
|
|
end,
|
|
},
|
|
{{ end }}
|
|
{
|
|
"RRethy/vim-illuminate",
|
|
config = function()
|
|
-- change the highlight style
|
|
vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "Visual" })
|
|
vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "Visual" })
|
|
vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" })
|
|
end,
|
|
},
|
|
{
|
|
"NvChad/nvim-colorizer.lua",
|
|
opts = function(_, opts)
|
|
opts.filetypes = {
|
|
"html",
|
|
"css",
|
|
"scss",
|
|
"javascript",
|
|
"typescript",
|
|
"typescriptreact",
|
|
"javascriptreact",
|
|
"lua",
|
|
}
|
|
opts.user_default_options = {
|
|
mode = "background",
|
|
tailwind = false, -- Enable tailwind colors
|
|
}
|
|
end,
|
|
},
|
|
}
|