noice.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. local M = {
  2. "folke/noice.nvim",
  3. event = "VeryLazy",
  4. dependencies = {
  5. "MunifTanjim/nui.nvim",
  6. },
  7. }
  8. M.config = function()
  9. local noice = require("noice")
  10. noice.setup({
  11. routes = {
  12. {
  13. filter = {
  14. event = "msg_show",
  15. any = {
  16. { find = "%d+L, %d+B" },
  17. { find = "; after #%d+" },
  18. { find = "; before #%d+" },
  19. { find = "%d fewer lines" },
  20. { find = "%d more lines" },
  21. },
  22. },
  23. opts = { skip = true },
  24. },
  25. },
  26. lsp = {
  27. progress = { enabled = true },
  28. override = {
  29. ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
  30. ["vim.lsp.util.stylize_markdown"] = true,
  31. ["cmp.entry.get_documentation"] = true,
  32. },
  33. hover = { silent = true },
  34. signature = {
  35. auto_open = { throttle = vim.api.nvim_get_option_value("updatetime", { scope = "global" }) },
  36. },
  37. },
  38. cmdline = {
  39. format = {
  40. cmdline = { icon = "" },
  41. search_down = { icon = " " },
  42. search_up = { icon = " " },
  43. },
  44. },
  45. messages = {
  46. enabled = false,
  47. },
  48. popupmenu = { enabled = true },
  49. presets = {
  50. bottom_search = true,
  51. long_message_to_split = true,
  52. lsp_doc_border = true,
  53. },
  54. throttle = 0,
  55. views = {
  56. split = {
  57. enter = true,
  58. size = "25%",
  59. win_options = {
  60. signcolumn = "no",
  61. number = false,
  62. relativenumber = false,
  63. list = false,
  64. wrap = false,
  65. },
  66. },
  67. popup = { border = { style = "rounded" } },
  68. hover = {
  69. border = { style = "rounded" },
  70. position = { row = 2, col = 2 },
  71. },
  72. mini = {
  73. timeout = 1000,
  74. position = { row = 2, col = "99%" }, -- Positions at top-right
  75. border = { style = "rounded" },
  76. win_options = {
  77. winblend = vim.api.nvim_get_option_value("winblend", { scope = "global" }),
  78. },
  79. },
  80. cmdline_popup = { border = { style = "rounded" } },
  81. confirm = {
  82. border = {
  83. style = "rounded",
  84. padding = { 0, 1 },
  85. },
  86. },
  87. },
  88. })
  89. end
  90. return M