ui.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. return {
  2. {
  3. "nvim-neo-tree/neo-tree.nvim",
  4. opts = {
  5. filesystem = {
  6. filtered_items = {
  7. hide_dotfiles = false,
  8. hide_gitignored = false,
  9. },
  10. },
  11. window = {
  12. position = "left",
  13. width = 30,
  14. mapping_options = {
  15. noremap = true,
  16. nowait = true,
  17. },
  18. },
  19. },
  20. config = function(_, opts)
  21. require("neo-tree").setup(opts)
  22. -- Neotree 打开逻辑已移到 autocmds.lua,这里不再重复
  23. end,
  24. },
  25. {
  26. "akinsho/bufferline.nvim",
  27. event = "VeryLazy",
  28. opts = {
  29. options = {
  30. mode = "buffers", -- set to "tabs" to only show tabpages instead
  31. numbers = "ordinal",
  32. close_command = function(bufnr) vim.api.nvim_buf_delete(bufnr, { force = true }) end,
  33. right_mouse_command = function(bufnr) vim.api.nvim_buf_delete(bufnr, { force = true }) end,
  34. left_mouse_command = "buffer",
  35. middle_mouse_command = nil,
  36. indicator = {
  37. style = "icon",
  38. icon = "▎",
  39. },
  40. buffer_close_icon = "󰅖",
  41. modified_icon = "●",
  42. close_icon = "",
  43. left_trunc_marker = "",
  44. right_trunc_marker = "",
  45. max_name_length = 18,
  46. max_prefix_length = 15,
  47. tab_size = 18,
  48. truncate_names = true,
  49. color_icons = true,
  50. show_buffer_icons = true,
  51. show_buffer_close_icons = true,
  52. show_close_icon = true,
  53. show_tab_indicators = true,
  54. persist_buffer_sort = true,
  55. separator_style = "thin",
  56. enforce_regular_tabs = false,
  57. always_show_bufferline = true,
  58. hover = {
  59. enabled = true,
  60. delay = 200,
  61. reveal = {'close'}
  62. },
  63. sort_by = 'insert_after_current',
  64. },
  65. },
  66. config = function(_, opts)
  67. require("bufferline").setup(opts)
  68. end,
  69. },
  70. }