utils.lua 6.6 KB

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