noice.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. views = {
  55. split = {
  56. enter = true,
  57. size = "25%",
  58. win_options = {
  59. signcolumn = "no",
  60. number = false,
  61. relativenumber = false,
  62. list = false,
  63. wrap = false,
  64. },
  65. },
  66. popup = { border = { style = "rounded" } },
  67. hover = {
  68. border = { style = "rounded" },
  69. position = { row = 2, col = 2 },
  70. },
  71. mini = {
  72. timeout = 1000,
  73. position = { row = 2, col = "99%" }, -- Positions at top-right
  74. border = { style = "rounded" },
  75. win_options = {
  76. winblend = vim.api.nvim_get_option_value("winblend", { scope = "global" }),
  77. },
  78. },
  79. cmdline_popup = { border = { style = "rounded" } },
  80. confirm = {
  81. border = {
  82. style = "rounded",
  83. padding = { 0, 1 },
  84. },
  85. },
  86. },
  87. })
  88. end
  89. return M