lualine.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. local status, lualine = pcall(require, "lualine")
  2. if not status then
  3. vim.notify("没有找到 lualine")
  4. return
  5. end
  6. lualine.setup({
  7. options = {
  8. -- 指定皮肤
  9. -- https://github.com/nvim-lualine/lualine.nvim/blob/master/THEMES.md
  10. theme = "tokyonight",
  11. -- 分割线
  12. component_separators = {
  13. left = "|",
  14. right = "|",
  15. },
  16. -- https://github.com/ryanoasis/powerline-extra-symbols
  17. section_separators = {
  18. left = " ",
  19. right = "",
  20. },
  21. globalstatus = true,
  22. },
  23. extensions = { "nvim-tree" },
  24. sections = {
  25. lualine_c = {
  26. "filename",
  27. {
  28. "lsp_progress",
  29. spinner_symbols = { " ", " ", " ", " ", " ", " " },
  30. },
  31. },
  32. lualine_x = {
  33. "filesize",
  34. {
  35. "fileformat",
  36. -- symbols = {
  37. -- unix = '', -- e712
  38. -- dos = '', -- e70f
  39. -- mac = '', -- e711
  40. -- },
  41. symbols = {
  42. unix = "LF",
  43. dos = "CRLF",
  44. mac = "CR",
  45. },
  46. },
  47. "encoding",
  48. "filetype",
  49. },
  50. },
  51. })