utils.lua 6.4 KB

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