utils.lua 7.0 KB

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