utils.lua 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. _G.map = function(mode, keys, func, opts)
  2. opts = opts or {}
  3. opts.desc = opts.desc or nil
  4. vim.keymap.set(mode, keys, func, opts)
  5. end
  6. _G.nmap = function(keys, func, opts)
  7. _G.map("n", keys, func, opts)
  8. end
  9. _G.imap = function(keys, func, opts)
  10. _G.map("i", keys, func, opts)
  11. end
  12. _G.vmap = function(keys, func, opts)
  13. _G.map("v", keys, func, opts)
  14. end
  15. _G.icons = {
  16. kind = {
  17. Array = " ",
  18. Boolean = " ",
  19. Class = " ",
  20. Color = " ",
  21. Constant = " ",
  22. Constructor = " ",
  23. Enum = " ",
  24. EnumMember = " ",
  25. Event = " ",
  26. Field = " ",
  27. File = " ",
  28. Folder = "󰉋 ",
  29. Function = " ",
  30. Interface = " ",
  31. Key = " ",
  32. Keyword = " ",
  33. Method = " ",
  34. -- Module = " ",
  35. Module = " ",
  36. Namespace = " ",
  37. Null = "󰟢 ",
  38. Number = " ",
  39. Object = " ",
  40. Operator = " ",
  41. Package = " ",
  42. Property = " ",
  43. Reference = " ",
  44. Snippet = " ",
  45. String = " ",
  46. Struct = " ",
  47. Text = " ",
  48. TypeParameter = " ",
  49. Unit = " ",
  50. Value = " ",
  51. Variable = " ",
  52. },
  53. git = {
  54. LineAdded = " ",
  55. LineModified = " ",
  56. LineRemoved = " ",
  57. FileDeleted = " ",
  58. FileIgnored = "◌",
  59. FileRenamed = " ",
  60. FileStaged = "S",
  61. FileUnmerged = "",
  62. FileUnstaged = "",
  63. FileUntracked = "U",
  64. Diff = " ",
  65. Repo = " ",
  66. Octoface = " ",
  67. Copilot = " ",
  68. Branch = "",
  69. },
  70. ui = {
  71. Message = "󰍡 ",
  72. ArrowCircleDown = "",
  73. ArrowCircleLeft = "",
  74. ArrowCircleRight = "",
  75. ArrowCircleUp = "",
  76. BoldArrowDown = "",
  77. BoldArrowLeft = "",
  78. BoldArrowRight = "",
  79. BoldArrowUp = "",
  80. BoldClose = "",
  81. BoldDividerLeft = "",
  82. BoldDividerRight = "",
  83. BoldLineLeft = "▎",
  84. BoldLineMiddle = "┃",
  85. BoldLineDashedMiddle = "┋",
  86. BookMark = "",
  87. BoxChecked = " ",
  88. Bug = " ",
  89. Stacks = "",
  90. Scopes = "",
  91. Watches = "󰂥",
  92. DebugConsole = " ",
  93. Calendar = " ",
  94. Check = "",
  95. ChevronRight = "",
  96. ChevronShortDown = "",
  97. ChevronShortLeft = "",
  98. ChevronShortRight = "",
  99. ChevronShortUp = "",
  100. Circle = " ",
  101. Close = "󰅖",
  102. CloudDownload = " ",
  103. Code = "",
  104. Comment = "",
  105. Dashboard = "",
  106. DividerLeft = "",
  107. DividerRight = "",
  108. DoubleChevronRight = "»",
  109. Ellipsis = "",
  110. EmptyFolder = " ",
  111. EmptyFolderOpen = " ",
  112. File = " ",
  113. FileSymlink = "",
  114. Files = " ",
  115. FindFile = "󰈞",
  116. FindText = "󰊄",
  117. Fire = "",
  118. Folder = "󰉋 ",
  119. FolderOpen = " ",
  120. FolderSymlink = " ",
  121. Forward = " ",
  122. Gear = " ",
  123. History = " ",
  124. Lightbulb = " ",
  125. LineLeft = "▏",
  126. LineMiddle = "│",
  127. List = " ",
  128. Lock = " ",
  129. NewFile = " ",
  130. Note = " ",
  131. Package = " ",
  132. Pencil = "󰏫 ",
  133. Plus = " ",
  134. Project = " ",
  135. Search = " ",
  136. SignIn = " ",
  137. SignOut = " ",
  138. Tab = "󰌒 ",
  139. Table = " ",
  140. Target = "󰀘 ",
  141. Telescope = "🔭",
  142. Text = " ",
  143. Tree = "",
  144. Triangle = "󰐊",
  145. TriangleShortArrowDown = "",
  146. TriangleShortArrowLeft = "",
  147. TriangleShortArrowRight = "",
  148. TriangleShortArrowUp = "",
  149. },
  150. diagnostics = {
  151. BoldError = "",
  152. Error = "",
  153. BoldWarning = "",
  154. Warning = "",
  155. BoldInformation = "",
  156. Information = "",
  157. BoldQuestion = "",
  158. Question = "",
  159. BoldHint = "",
  160. Hint = "󰌶",
  161. Debug = "",
  162. Trace = "✎",
  163. },
  164. misc = {
  165. Robot = "󰚩 ",
  166. Squirrel = " ",
  167. Tag = " ",
  168. Watch = "",
  169. Smiley = " ",
  170. Package = " ",
  171. CircuitBoard = " ",
  172. },
  173. }