177 lines
3.3 KiB
Lua
177 lines
3.3 KiB
Lua
return {
|
|
{
|
|
-- better imputs
|
|
"stevearc/dressing.nvim",
|
|
opts = {
|
|
input = {
|
|
-- handle by noice
|
|
enabled = false,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"folke/noice.nvim",
|
|
event = "VeryLazy",
|
|
dependencies = {
|
|
"MunifTanjim/nui.nvim",
|
|
"rcarriga/nvim-notify",
|
|
},
|
|
opts = {
|
|
presets = {
|
|
bottom_search = true,
|
|
long_message_to_split = true,
|
|
inc_rename = true,
|
|
lsp_doc_border = true,
|
|
},
|
|
lsp = {
|
|
override = {
|
|
-- override the default lsp markdown formatter with Noice
|
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
-- override the lsp markdown formatter with Noice
|
|
["vim.lsp.util.stylize_markdown"] = true,
|
|
-- override cmp documentation with Noice (needs the other options to work)
|
|
["cmp.entry.get_documentation"] = true,
|
|
},
|
|
message = {
|
|
view = "mini",
|
|
view_search = false,
|
|
},
|
|
progress = {
|
|
view = "mini_left"
|
|
}
|
|
},
|
|
routes = {
|
|
{
|
|
filter = {
|
|
event = "msg_show",
|
|
kind = "",
|
|
find = "written",
|
|
},
|
|
opts = { skip = true },
|
|
},
|
|
{
|
|
filter = {
|
|
event = "notify",
|
|
min_height = 15
|
|
},
|
|
view = 'popup'
|
|
},
|
|
{
|
|
filter = {
|
|
event = "notify",
|
|
kind = "info"
|
|
},
|
|
view = 'mini'
|
|
},
|
|
},
|
|
views = {
|
|
notify = {
|
|
merge = true
|
|
},
|
|
cmdline_popup = {
|
|
position = {
|
|
row = 5,
|
|
col = "50%",
|
|
},
|
|
size = {
|
|
width = 60,
|
|
height = "auto",
|
|
},
|
|
},
|
|
popupmenu = {
|
|
relative = "editor",
|
|
position = {
|
|
row = 8,
|
|
col = "50%",
|
|
},
|
|
size = {
|
|
width = 60,
|
|
height = 10,
|
|
},
|
|
border = {
|
|
style = "rounded",
|
|
padding = { 0, 1 },
|
|
},
|
|
win_options = {
|
|
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
|
|
},
|
|
},
|
|
mini_left = {
|
|
backend = "mini",
|
|
relative = "editor",
|
|
align = "left",
|
|
timeout = 2000,
|
|
reverse = true,
|
|
focusable = false,
|
|
position = {
|
|
row = -1,
|
|
col = 0,
|
|
},
|
|
size = {
|
|
width = "auto",
|
|
height = "auto",
|
|
max_height = 10,
|
|
},
|
|
border = {
|
|
style = "none",
|
|
},
|
|
zindex = 60,
|
|
win_options = {
|
|
winbar = "",
|
|
foldenable = false,
|
|
winblend = 30,
|
|
winhighlight = {
|
|
Normal = "NoiceMini",
|
|
IncSearch = "",
|
|
CurSearch = "",
|
|
Search = "",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
-- stylua: ignore
|
|
keys = {
|
|
{
|
|
"<S-Enter>",
|
|
function() require("noice").redirect(vim.fn.getcmdline()) end,
|
|
mode = "c",
|
|
desc =
|
|
"Redirect Cmdline"
|
|
},
|
|
{
|
|
"<leader>um",
|
|
function() require("noice").cmd("last") end,
|
|
desc =
|
|
"Messages last"
|
|
},
|
|
{
|
|
"<leader>uM",
|
|
function() require("noice").cmd("history") end,
|
|
desc =
|
|
"Messages all"
|
|
},
|
|
{ "<leader>uX", function() require("noice").cmd("dismiss") end, desc = "Message dismiss all" },
|
|
{
|
|
"<c-d>",
|
|
function() if not require("noice.lsp").scroll(4) then return "<c-d>" end end,
|
|
silent = true,
|
|
expr = true,
|
|
desc =
|
|
"Scroll forward",
|
|
mode = {
|
|
"i", "n", "s" }
|
|
},
|
|
{
|
|
"<c-u>",
|
|
function() if not require("noice.lsp").scroll(-4) then return "<c-u>" end end,
|
|
silent = true,
|
|
expr = true,
|
|
desc =
|
|
"Scroll backward",
|
|
mode = {
|
|
"i", "n", "s" }
|
|
},
|
|
},
|
|
}
|
|
}
|