utils.lua 6.1 KB

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