utils.lua 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. return {
  2. {
  3. -- <S> to add ", (... Surrounding selected text
  4. "kylechui/nvim-surround",
  5. version = "*", -- Use for stability; omit to use `main` branch for the latest features
  6. event = "VeryLazy",
  7. config = function()
  8. require("nvim-surround").setup({
  9. -- Configuration here, or leave empty to use defaults
  10. })
  11. end,
  12. },
  13. {
  14. -- Automatically add brackets by pairs
  15. "jiangmiao/auto-pairs",
  16. lazy = false,
  17. },
  18. { -- Scroll
  19. "karb94/neoscroll.nvim",
  20. config = function()
  21. require("neoscroll").setup({})
  22. end,
  23. },
  24. {
  25. "farmergreg/vim-lastplace", -- when open go to the closed position
  26. },
  27. {
  28. "nvim-tree/nvim-web-devicons",
  29. config = function()
  30. require("nvim-web-devicons").setup({
  31. -- your personnal icons can go here (to override)
  32. -- you can specify color or cterm_color instead of specifying both of them
  33. -- DevIcon will be appended to `name`
  34. override = {
  35. zsh = {
  36. icon = "",
  37. color = "#428850",
  38. cterm_color = "65",
  39. name = "Zsh",
  40. },
  41. },
  42. -- globally enable different highlight colors per icon (default to true)
  43. -- if set to false all icons will have the default icon's color
  44. color_icons = true,
  45. -- globally enable default icons (default to false)
  46. -- will get overriden by `get_icons` option
  47. default = true,
  48. -- globally enable "strict" selection of icons - icon will be looked up in
  49. -- different tables, first by filename, and if not found by extension; this
  50. -- prevents cases when file doesn't have any extension but still gets some icon
  51. -- because its name happened to match some extension (default to false)
  52. strict = true,
  53. -- same as `override` but specifically for overrides by filename
  54. -- takes effect when `strict` is true
  55. override_by_filename = {
  56. [".gitignore"] = {
  57. icon = "",
  58. color = "#f1502f",
  59. name = "Gitignore",
  60. },
  61. },
  62. -- same as `override` but specifically for overrides by extension
  63. -- takes effect when `strict` is true
  64. override_by_extension = {
  65. ["log"] = {
  66. icon = "",
  67. color = "#81e043",
  68. name = "Log",
  69. },
  70. },
  71. -- same as `override` but specifically for operating system
  72. -- takes effect when `strict` is true
  73. override_by_operating_system = {
  74. ["apple"] = {
  75. icon = "",
  76. color = "#A2AAAD",
  77. cterm_color = "248",
  78. name = "Apple",
  79. },
  80. },
  81. })
  82. -- code
  83. end,
  84. },
  85. {
  86. "j-hui/fidget.nvim",
  87. opts = {
  88. -- options
  89. },
  90. },
  91. {
  92. "stevearc/dressing.nvim",
  93. opts = {},
  94. },
  95. { "eandrju/cellular-automaton.nvim" }, -- stupid animation
  96. { url = "https://gitlab.com/HiPhish/rainbow-delimiters.nvim" }, -- rainbow delimiters
  97. {
  98. "lukas-reineke/indent-blankline.nvim",
  99. main = "ibl",
  100. opts = {},
  101. config = function()
  102. -- Config for matching colors with rainbow_delimiters
  103. local highlight = {
  104. "RainbowRed",
  105. "RainbowYellow",
  106. "RainbowBlue",
  107. "RainbowOrange",
  108. "RainbowGreen",
  109. "RainbowViolet",
  110. "RainbowCyan",
  111. }
  112. local hooks = require("ibl.hooks")
  113. -- create the highlight groups in the highlight setup hook, so they are reset
  114. -- every time the colorscheme changes
  115. hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
  116. vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
  117. vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
  118. vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
  119. vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
  120. vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
  121. vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
  122. vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
  123. end)
  124. vim.g.rainbow_delimiters = { highlight = highlight }
  125. require("ibl").setup({
  126. scope = { highlight = highlight },
  127. exclude = {
  128. filetypes = {
  129. "lspinfo",
  130. "packer",
  131. "checkhealth",
  132. "help",
  133. "man",
  134. "dashboard",
  135. "",
  136. },
  137. -- filetypes = vim.g.exclude_filetypes,
  138. },
  139. })
  140. hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
  141. end,
  142. },
  143. {
  144. -- Scrollbar
  145. "lewis6991/satellite.nvim",
  146. config = function()
  147. require("satellite").setup({
  148. current_only = false,
  149. winblend = 50,
  150. zindex = 40,
  151. excluded_filetypes = {},
  152. width = 2,
  153. handlers = {
  154. cursor = {
  155. enable = true,
  156. -- Supports any number of symbols
  157. symbols = { "⎺", "⎻", "⎼", "⎽" },
  158. -- symbols = { '⎻', '⎼' }
  159. -- Highlights:
  160. -- - SatelliteCursor (default links to NonText
  161. },
  162. search = {
  163. enable = true,
  164. -- Highlights:
  165. -- - SatelliteSearch (default links to Search)
  166. -- - SatelliteSearchCurrent (default links to SearchCurrent)
  167. },
  168. diagnostic = {
  169. enable = true,
  170. signs = { "-", "=", "≡" },
  171. min_severity = vim.diagnostic.severity.HINT,
  172. -- Highlights:
  173. -- - SatelliteDiagnosticError (default links to DiagnosticError)
  174. -- - SatelliteDiagnosticWarn (default links to DiagnosticWarn)
  175. -- - SatelliteDiagnosticInfo (default links to DiagnosticInfo)
  176. -- - SatelliteDiagnosticHint (default links to DiagnosticHint)
  177. },
  178. gitsigns = {
  179. enable = true,
  180. signs = { -- can only be a single character (multibyte is okay)
  181. add = "│",
  182. change = "│",
  183. delete = "-",
  184. },
  185. -- Highlights:
  186. -- SatelliteGitSignsAdd (default links to GitSignsAdd)
  187. -- SatelliteGitSignsChange (default links to GitSignsChange)
  188. -- SatelliteGitSignsDelete (default links to GitSignsDelete)
  189. },
  190. marks = {
  191. enable = true,
  192. show_builtins = false, -- shows the builtin marks like [ ] < >
  193. key = "m",
  194. -- Highlights:
  195. -- SatelliteMark (default links to Normal)
  196. },
  197. quickfix = {
  198. signs = { "-", "=", "≡" },
  199. -- Highlights:
  200. -- SatelliteQuickfix (default links to WarningMsg)
  201. },
  202. },
  203. })
  204. end,
  205. },
  206. }