mirror of
				https://github.com/marianozunino/nvim.git
				synced 2025-10-29 20:00:41 -03:00 
			
		
		
		
	chore: some qol crap
This commit is contained in:
		
							parent
							
								
									867159343a
								
							
						
					
					
						commit
						94cc7bed34
					
				
					 34 changed files with 433 additions and 598 deletions
				
			
		
							
								
								
									
										6
									
								
								.luarc.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.luarc.json
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | ||||||
|  | { | ||||||
|  |     "diagnostics.globals": [ | ||||||
|  |         "Snacks" | ||||||
|  |     ] | ||||||
|  | } | ||||||
|  | 
 | ||||||
							
								
								
									
										4
									
								
								init.lua
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								init.lua
									
										
									
									
									
								
							|  | @ -1,3 +1,7 @@ | ||||||
|  | -- Fuck off with the warnings... | ||||||
|  | ---@diagnostic disable-next-line: duplicate-set-field | ||||||
|  | vim.deprecate = function() end | ||||||
|  | 
 | ||||||
| require("globals") | require("globals") | ||||||
| require("config.options") | require("config.options") | ||||||
| require("config.remap") | require("config.remap") | ||||||
|  |  | ||||||
|  | @ -1,56 +1,55 @@ | ||||||
| { | { | ||||||
|   "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, |   "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, | ||||||
|   "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, |   "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, | ||||||
|   "alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, |   "blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" }, | ||||||
|   "blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" }, |  | ||||||
|   "chezmoi.nvim": { "branch": "main", "commit": "3f72cffa2d18aaec884502443bae37226f3decd2" }, |  | ||||||
|   "cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" }, |   "cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" }, | ||||||
|   "codeium.vim": { "branch": "main", "commit": "000de972de76f357c03da14f4f8dd9a969d4fe8c" }, |   "conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" }, | ||||||
|   "conform.nvim": { "branch": "master", "commit": "b1a75324ddf96b7bb84963a297b1ed334db087c0" }, |   "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, | ||||||
|   "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, |  | ||||||
|   "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, |   "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, | ||||||
|   "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, |   "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, | ||||||
|   "fzf-lua": { "branch": "main", "commit": "caee13203d6143d691710c34f85ad6441fe3f535" }, |   "fzf-lua": { "branch": "main", "commit": "b11467c3fbfe48e4a815e4909f5c4e5b413ce6d0" }, | ||||||
|   "gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" }, |   "gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" }, | ||||||
|   "gitsigns.nvim": { "branch": "main", "commit": "3c76f7fabac723aa682365ef782f88a83ccdb4ac" }, |   "gitsigns.nvim": { "branch": "main", "commit": "ee28ba3e70ecea811b8f6d7b51d81976e94b121c" }, | ||||||
|   "go.nvim": { "branch": "master", "commit": "0d426e87227dd14584881ecc595c173121456111" }, |   "go.nvim": { "branch": "master", "commit": "fbceaf55e18e9e473f289df008d6b508a479fbf8" }, | ||||||
|   "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, |  | ||||||
|   "knap": { "branch": "main", "commit": "7db44d0bb760120142cc1e8f43e44976de59c2f6" }, |   "knap": { "branch": "main", "commit": "7db44d0bb760120142cc1e8f43e44976de59c2f6" }, | ||||||
|   "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, |   "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, | ||||||
|   "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, |   "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, | ||||||
|   "lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" }, |  | ||||||
|   "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, |   "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, | ||||||
|   "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, |   "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, | ||||||
|  |   "mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" }, | ||||||
|   "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, |   "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, | ||||||
|   "mini.ai": { "branch": "main", "commit": "978ffc65c6b513fde9ef075326d34d89197f1ea5" }, |   "mini.ai": { "branch": "main", "commit": "e139eb1101beb0250fea322f8c07a42f0f175688" }, | ||||||
|   "mini.icons": { "branch": "main", "commit": "86a633f0dffcfd80110bac86681dbf4b5c37ba5c" }, |   "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, | ||||||
|   "mini.surround": { "branch": "main", "commit": "97796f68a8698d9b63ac3927da0d0bf5c3a0876b" }, |   "mini.statusline": { "branch": "main", "commit": "e331175f10d9f400b42523b3890841aba202ce16" }, | ||||||
|   "neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" }, |   "mini.surround": { "branch": "main", "commit": "5aab42fcdcf31fa010f012771eda5631c077840a" }, | ||||||
|   "nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" }, |   "nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" }, | ||||||
|   "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, |  | ||||||
|   "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, |  | ||||||
|   "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, |   "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, | ||||||
|   "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" }, |   "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" }, | ||||||
|   "nvim-lint": { "branch": "master", "commit": "93b8040115c9114dac1047311763bef275e752dc" }, |   "nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" }, | ||||||
|   "nvim-lspconfig": { "branch": "master", "commit": "ff6471d4f837354d8257dfa326b031dd8858b16e" }, |   "nvim-lspconfig": { "branch": "master", "commit": "94d0fec9135719e046903bbbbf8f39e3d3436d4e" }, | ||||||
|   "nvim-spectre": { "branch": "master", "commit": "ddd7383e856a7c939cb4f5143278fe041bbb8cb9" }, |   "nvim-spectre": { "branch": "master", "commit": "197150cd3f30eeb1b3fd458339147533d91ac385" }, | ||||||
|   "nvim-treesitter": { "branch": "master", "commit": "9be6836ebeb88a536055bf1ce0961eef68da4bc6" }, |   "nvim-treesitter": { "branch": "master", "commit": "94ea4f436d2b59c80f02e293466c374584f03b8c" }, | ||||||
|   "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, |   "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, | ||||||
|   "oil.nvim": { "branch": "master", "commit": "302bbaceeafc690e6419e0c8296e804d60cb9446" }, |   "nvim-ufo": { "branch": "main", "commit": "cac999ec9f6302d2fd4ad8a846bf8f731af6e7cf" }, | ||||||
|  |   "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, | ||||||
|  |   "oil.nvim": { "branch": "master", "commit": "685cdb4ffa74473d75a1b97451f8654ceeab0f4a" }, | ||||||
|   "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, |   "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, | ||||||
|   "pretty-fold.nvim": { "branch": "master", "commit": "1eb18f228972e86b7b8f5ef33ca8091e53fb1e49" }, |   "presenterm.nvim": { "branch": "main", "commit": "2db942337aeeca99e33f627459df2264b3987634" }, | ||||||
|   "render-markdown.nvim": { "branch": "main", "commit": "a020c88e9552b50916a78dec9eeb4656c6391e6d" }, |   "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, | ||||||
|   "schemastore.nvim": { "branch": "main", "commit": "e659e0c6ca06727ed898aaaeea3850f528898684" }, |   "quicker.nvim": { "branch": "master", "commit": "1798be71cdcb15fb84fa8054148a56e17fd391dc" }, | ||||||
|  |   "render-markdown.nvim": { "branch": "main", "commit": "bd5657594bf1a96b04f900c87e8d74226a54d832" }, | ||||||
|  |   "schemastore.nvim": { "branch": "main", "commit": "442901b78dca4da1078b32e25e1afb32460e0082" }, | ||||||
|  |   "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, | ||||||
|   "suda.vim": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" }, |   "suda.vim": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" }, | ||||||
|   "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, |   "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, | ||||||
|   "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, |   "typst-preview.nvim": { "branch": "master", "commit": "2503b188cd2a17ce44fdd21a944a93335e935215" }, | ||||||
|   "typescript-tools.nvim": { "branch": "master", "commit": "e0887c1e336edbb01243e9f1e60d74b0bc0a2bed" }, |  | ||||||
|   "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, |   "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, | ||||||
|   "vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" }, |   "vim-dadbod": { "branch": "master", "commit": "fa31d0ffeebaa59cf97a81e7f92194cced54a13f" }, | ||||||
|   "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, |   "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, | ||||||
|   "vim-dadbod-ui": { "branch": "master", "commit": "685e75b34ee0e12f92ec4507ea8bb7f1aaa936e5" }, |   "vim-dadbod-ui": { "branch": "master", "commit": "460432301a5cb280ea265ddfa15c9f3dcd1d26b7" }, | ||||||
|   "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, |   "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, | ||||||
|   "vim-hugo": { "branch": "master", "commit": "324fb8c7371d31701349c1192e25a0bdcf9898f8" }, |   "vim-hugo": { "branch": "master", "commit": "324fb8c7371d31701349c1192e25a0bdcf9898f8" }, | ||||||
|   "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, |   "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, | ||||||
|   "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } |   "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, | ||||||
|  |   "windsurf.vim": { "branch": "main", "commit": "272c6e2755e8faa90e26bcdcd9fde6b9e61751ea" } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,7 +1,6 @@ | ||||||
| -- Create autogroups first | -- Create autogroups first | ||||||
| local MZuninoGroup = vim.api.nvim_create_augroup("mzunino", {}) | local MZuninoGroup = vim.api.nvim_create_augroup("mzunino", {}) | ||||||
| local yank_group = vim.api.nvim_create_augroup("HighlightYank", {}) | local yank_group = vim.api.nvim_create_augroup("HighlightYank", {}) | ||||||
| local bigfile_group = vim.api.nvim_create_augroup("bigfile", {}) |  | ||||||
| 
 | 
 | ||||||
| -- Set bigfile size threshold | -- Set bigfile size threshold | ||||||
| vim.g.bigfile_size = 1024 * 1024 * 1.5 -- 1.5 MB | vim.g.bigfile_size = 1024 * 1024 * 1.5 -- 1.5 MB | ||||||
|  | @ -50,15 +49,3 @@ vim.filetype.add({ | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
| }) | }) | ||||||
| 
 |  | ||||||
| -- Bigfile handling |  | ||||||
| vim.api.nvim_create_autocmd("FileType", { |  | ||||||
|   group = bigfile_group, |  | ||||||
|   pattern = "bigfile", |  | ||||||
|   callback = function(ev) |  | ||||||
|     vim.b.minianimate_disable = true |  | ||||||
|     vim.schedule(function() |  | ||||||
|       vim.bo[ev.buf].syntax = vim.filetype.match({ buf = ev.buf }) or "" |  | ||||||
|     end) |  | ||||||
|   end, |  | ||||||
| }) |  | ||||||
|  |  | ||||||
							
								
								
									
										39
									
								
								lua/config/lsp/vtsls.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								lua/config/lsp/vtsls.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,39 @@ | ||||||
|  | return { | ||||||
|  |   -- explicitly add default filetypes, so that we can extend | ||||||
|  |   -- them in related extras | ||||||
|  |   filetypes = { | ||||||
|  |     "javascript", | ||||||
|  |     "javascriptreact", | ||||||
|  |     "javascript.jsx", | ||||||
|  |     "typescript", | ||||||
|  |     "typescriptreact", | ||||||
|  |     "typescript.tsx", | ||||||
|  |   }, | ||||||
|  |   settings = { | ||||||
|  |     complete_function_calls = true, | ||||||
|  |     vtsls = { | ||||||
|  |       enableMoveToFileCodeAction = true, | ||||||
|  |       autoUseWorkspaceTsdk = true, | ||||||
|  |       experimental = { | ||||||
|  |         maxInlayHintLength = 30, | ||||||
|  |         completion = { | ||||||
|  |           enableServerSideFuzzyMatch = true, | ||||||
|  |         }, | ||||||
|  |       }, | ||||||
|  |     }, | ||||||
|  |     typescript = { | ||||||
|  |       updateImportsOnFileMove = { enabled = "always" }, | ||||||
|  |       suggest = { | ||||||
|  |         completeFunctionCalls = true, | ||||||
|  |       }, | ||||||
|  |       inlayHints = { | ||||||
|  |         enumMemberValues = { enabled = true }, | ||||||
|  |         functionLikeReturnTypes = { enabled = true }, | ||||||
|  |         parameterNames = { enabled = "literals" }, | ||||||
|  |         parameterTypes = { enabled = true }, | ||||||
|  |         propertyDeclarationTypes = { enabled = true }, | ||||||
|  |         variableTypes = { enabled = false }, | ||||||
|  |       }, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | @ -39,9 +39,9 @@ end, { desc = "Quit all" }) | ||||||
| 
 | 
 | ||||||
| -- create a user command to save without formatting :noa w | -- create a user command to save without formatting :noa w | ||||||
| vim.api.nvim_create_user_command("W", function() | vim.api.nvim_create_user_command("W", function() | ||||||
|   -- if buffer is empty, don't save |  | ||||||
|   if vim.fn.empty(vim.fn.expand("%:t")) == 1 then |   if vim.fn.empty(vim.fn.expand("%:t")) == 1 then | ||||||
|     return vim.notify("Buffer is empty, not saving", vim.log.levels.ERROR) |     Snacks.notifier.notify("Buffer is empty, not saving", vim.log.levels.ERROR) | ||||||
|  |     return | ||||||
|   end |   end | ||||||
|   vim.api.nvim_command("noa w") |   vim.api.nvim_command("noa w") | ||||||
| end, { nargs = 0, desc = "Save without formatting" }) | end, { nargs = 0, desc = "Save without formatting" }) | ||||||
|  |  | ||||||
|  | @ -15,3 +15,13 @@ end | ||||||
| _G.vmap = function(keys, func, opts) | _G.vmap = function(keys, func, opts) | ||||||
|   _G.map("v", keys, func, opts) |   _G.map("v", keys, func, opts) | ||||||
| end | end | ||||||
|  | 
 | ||||||
|  | _G.dd = function(...) | ||||||
|  |   Snacks.debug.inspect(...) | ||||||
|  | end | ||||||
|  | 
 | ||||||
|  | _G.bt = function() | ||||||
|  |   Snacks.debug.backtrace() | ||||||
|  | end | ||||||
|  | 
 | ||||||
|  | vim.print = _G.dd | ||||||
|  |  | ||||||
|  | @ -1,13 +1,10 @@ | ||||||
| local M = { | local M = { | ||||||
|   "Exafunction/codeium.vim", |   "Exafunction/windsurf.vim", | ||||||
|   cmd = "Codeium", |  | ||||||
|   keys = { |  | ||||||
|     { "<leader>ce", "<cmd>Codeium Toggle<cr>", desc = "Codeium Enable" }, |  | ||||||
|   }, |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| M.config = function() | M.config = function() | ||||||
|   vim.g.codeium_disable_bindings = 1 |   vim.g.codeium_disable_bindings = 1 | ||||||
|  |   vim.g.codeium_enabled = 0 | ||||||
| 
 | 
 | ||||||
|   imap("<C-g>", function() |   imap("<C-g>", function() | ||||||
|     return vim.fn["codeium#Accept"]() |     return vim.fn["codeium#Accept"]() | ||||||
|  | @ -24,6 +21,11 @@ M.config = function() | ||||||
|   imap("<c-x>", function() |   imap("<c-x>", function() | ||||||
|     return vim.fn["codeium#Clear"]() |     return vim.fn["codeium#Clear"]() | ||||||
|   end, { expr = true, silent = true, desc = "[codeium] Clear" }) |   end, { expr = true, silent = true, desc = "[codeium] Clear" }) | ||||||
|  | 
 | ||||||
|  |   nmap("<leader>ce", function() | ||||||
|  |     vim.cmd("Codeium Toggle") | ||||||
|  |     Snacks.notifier.notify("Codeium " .. (vim.g.codeium_enabled == 1 and "enabled" or "disabled")) | ||||||
|  |   end, { expr = true, silent = true, desc = "[codeium] Toggle" }) | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| return M | return M | ||||||
|  |  | ||||||
|  | @ -1,31 +0,0 @@ | ||||||
| local M = { |  | ||||||
|   "lukas-reineke/indent-blankline.nvim", |  | ||||||
|   main = "ibl", |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| M.config = function() |  | ||||||
|   require("ibl").setup({ |  | ||||||
|     indent = { |  | ||||||
|       char = "│", |  | ||||||
|       tab_char = "│", |  | ||||||
|     }, |  | ||||||
|     scope = { enabled = false }, |  | ||||||
|     exclude = { |  | ||||||
|       filetypes = { |  | ||||||
|         "help", |  | ||||||
|         "alpha", |  | ||||||
|         "dashboard", |  | ||||||
|         "neo-tree", |  | ||||||
|         "Trouble", |  | ||||||
|         "trouble", |  | ||||||
|         "lazy", |  | ||||||
|         "mason", |  | ||||||
|         "notify", |  | ||||||
|         "toggleterm", |  | ||||||
|         "lazyterm", |  | ||||||
|       }, |  | ||||||
|     }, |  | ||||||
|   }) |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| return M |  | ||||||
|  | @ -1,31 +0,0 @@ | ||||||
| return { |  | ||||||
|   "xvzc/chezmoi.nvim", |  | ||||||
|   dependencies = { "nvim-lua/plenary.nvim" }, |  | ||||||
|   config = function() |  | ||||||
|     require("chezmoi").setup({ |  | ||||||
|       -- your configurations |  | ||||||
|       edit = { |  | ||||||
|         watch = true, -- Set true to automatically apply on save. |  | ||||||
|         force = true, -- Set true to force apply. Works only when watch = true. |  | ||||||
|       }, |  | ||||||
|       notification = { |  | ||||||
|         on_open = true, -- vim.notify when start editing chezmoi-managed file. |  | ||||||
|         on_apply = true, -- vim.notify on apply. |  | ||||||
|       }, |  | ||||||
|     }) |  | ||||||
| 
 |  | ||||||
|     vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { |  | ||||||
|       pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/*" }, |  | ||||||
|       callback = function() |  | ||||||
|         -- invoke with vim.schedule() for better startup time |  | ||||||
|         vim.schedule(require("chezmoi.commands.__edit").watch) |  | ||||||
|       end, |  | ||||||
|     }) |  | ||||||
| 
 |  | ||||||
|     -- Auto-apply chezmoi changes |  | ||||||
|     vim.api.nvim_create_autocmd("BufWritePost", { |  | ||||||
|       pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/*" }, |  | ||||||
|       command = [[silent! !chezmoi apply --source-path "%"]], |  | ||||||
|     }) |  | ||||||
|   end, |  | ||||||
| } |  | ||||||
|  | @ -1,8 +1,11 @@ | ||||||
| local M = { | local M = { | ||||||
|   "saghen/blink.cmp", |   "saghen/blink.cmp", | ||||||
|   dependencies = { "L3MON4D3/LuaSnip", version = "v2.*" }, |   dependencies = { | ||||||
| 
 |     "nvim-lua/plenary.nvim", | ||||||
|   version = "v1.*", |     { "L3MON4D3/LuaSnip", version = "v2.*" }, | ||||||
|  |     "folke/lazydev.nvim", | ||||||
|  |   }, | ||||||
|  |   version = "*", | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| M.config = function() | M.config = function() | ||||||
|  | @ -26,19 +29,22 @@ M.config = function() | ||||||
|       nerd_font_variant = "mono", |       nerd_font_variant = "mono", | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     snippets = { preset = "luasnip" }, |     snippets = { | ||||||
|  |       preset = "luasnip", | ||||||
|  |     }, | ||||||
| 
 | 
 | ||||||
|     sources = { |     sources = { | ||||||
|       default = { "lsp", "path", "snippets", "buffer", "dadbod" }, |       default = { "lsp", "path", "snippets", "buffer", "dadbod", "lazydev" }, | ||||||
|       providers = { |       providers = { | ||||||
|         dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, |         dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, | ||||||
|  |         lazydev = { module = "lazydev.integrations.blink", score_offset = 100 }, | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     signature = { |     signature = { | ||||||
|       enabled = true, |       enabled = true, | ||||||
|       window = { |       window = { | ||||||
|         border = "single", |         border = "rounded", | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|  | @ -50,7 +56,7 @@ M.config = function() | ||||||
|         }, |         }, | ||||||
|       }, |       }, | ||||||
|       menu = { |       menu = { | ||||||
|         border = "single", |         border = "rounded", | ||||||
|         draw = { |         draw = { | ||||||
|           components = { |           components = { | ||||||
|             kind_icon = { |             kind_icon = { | ||||||
|  | @ -70,6 +76,10 @@ M.config = function() | ||||||
|           return ctx.mode ~= "default" |           return ctx.mode ~= "default" | ||||||
|         end, |         end, | ||||||
|       }, |       }, | ||||||
|  |       documentation = { | ||||||
|  |         auto_show = true, | ||||||
|  |         auto_show_delay_ms = 200, | ||||||
|  |       }, | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     fuzzy = { |     fuzzy = { | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ local M = { | ||||||
| M.config = function() | M.config = function() | ||||||
|   vim.g.db_ui_use_nerd_fonts = 1 |   vim.g.db_ui_use_nerd_fonts = 1 | ||||||
|   -- g:db_ui_save_location |   -- g:db_ui_save_location | ||||||
|   vim.g.db_ui_save_location = "~/Sync/saved_queries" |   vim.g.db_ui_save_location = "~/Sync/Work/Stuzo/queries" | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| return M | return M | ||||||
|  |  | ||||||
|  | @ -1,59 +1,69 @@ | ||||||
| local M = { | local M = { | ||||||
|   "folke/trouble.nvim", |   "stevearc/quicker.nvim", | ||||||
|   branch = "main", |   -- Set plugin to load on VimEnter instead of FileType qf to ensure diagnostics are configured early | ||||||
|  |   event = { "VimEnter" }, | ||||||
|  |   -- Add an explicit dependency for diagnostics loading | ||||||
|  |   dependencies = { "nvim-lspconfig" }, -- Assuming you're using nvim-lspconfig | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| local function setup_keymaps(trouble) | -- Move sign registration outside of the config function to ensure it runs early | ||||||
|   -- Diagnostic navigation | local function register_diagnostic_signs() | ||||||
|   nmap("[d", function() |   -- Define diagnostic sign icons | ||||||
|     vim.diagnostic.jump({ count = -1, float = true }) |   local sign_icons = { | ||||||
|   end, { desc = "Previous diagnostic" }) |     [vim.diagnostic.severity.ERROR] = "", -- Alternative error symbol | ||||||
|  |     [vim.diagnostic.severity.WARN] = "", -- Alternative warning | ||||||
|  |     [vim.diagnostic.severity.HINT] = "", -- Star for hints | ||||||
|  |     [vim.diagnostic.severity.INFO] = "", -- Info circle | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|   nmap("]d", function() |   -- Register signs explicitly | ||||||
|     vim.diagnostic.jump({ count = 1, float = true }) |   for severity, icon in pairs(sign_icons) do | ||||||
|   end, { desc = "Next diagnostic" }) |     local name = "DiagnosticSign" .. vim.diagnostic.severity[severity] | ||||||
|  |     vim.fn.sign_define(name, { text = icon, texthl = name }) | ||||||
|  |   end | ||||||
| 
 | 
 | ||||||
|   -- Trouble specific navigation |   -- Set sign highlights for better visibility | ||||||
|   nmap("<a-k>", function() |   vim.cmd([[ | ||||||
|     trouble.previous({ skip_groups = true, jump = true }) |     highlight DiagnosticSignError guifg=#f7768e gui=bold | ||||||
|   end, { desc = "Previous trouble item" }) |     highlight DiagnosticSignWarn guifg=#e0af68 gui=bold | ||||||
|   nmap("<a-j>", function() |     highlight DiagnosticSignInfo guifg=#7dcfff gui=bold | ||||||
|     trouble.next({ skip_groups = true, jump = true }) |     highlight DiagnosticSignHint guifg=#9ece6a gui=bold | ||||||
|   end, { desc = "Next trouble item" }) |   ]]) | ||||||
|  | end | ||||||
| 
 | 
 | ||||||
|   -- Trouble mode toggles | -- This will now be called during setup() which happens at init | ||||||
|   nmap("<leader>tt", "<cmd>TroubleToggle<cr>", { desc = "Toggle trouble" }) | M.init = function() | ||||||
|   nmap("<leader>tw", "<cmd>TroubleToggle workspace_diagnostics<cr>", { desc = "Workspace diagnostics" }) |   register_diagnostic_signs() | ||||||
|   nmap("<leader>td", "<cmd>TroubleToggle document_diagnostics<cr>", { desc = "Document diagnostics" }) |  | ||||||
|   nmap("<leader>tq", "<cmd>TroubleToggle quickfix<cr>", { desc = "Quickfix list" }) |  | ||||||
|   nmap("<leader>tl", "<cmd>TroubleToggle loclist<cr>", { desc = "Location list" }) |  | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| local function setup_diagnostic_config() | local function setup_diagnostic_config() | ||||||
|  |   -- Define prettier diagnostic icons | ||||||
|  |   local diagnostic_icons = { | ||||||
|  |     [vim.diagnostic.severity.ERROR] = "", -- More prominent error symbol | ||||||
|  |     [vim.diagnostic.severity.WARN] = "", -- Warning triangle | ||||||
|  |     [vim.diagnostic.severity.HINT] = "", -- Lightbulb for hints | ||||||
|  |     [vim.diagnostic.severity.INFO] = "", -- Information symbol | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   -- Configure diagnostics | ||||||
|   vim.diagnostic.config({ |   vim.diagnostic.config({ | ||||||
|     virtual_text = { |     virtual_text = { | ||||||
|       prefix = "●", |       prefix = "●", | ||||||
|       suffix = "", |       suffix = "", | ||||||
|       format = function(diagnostic) |       format = function(diagnostic) | ||||||
|         local icons = { |         local icon = diagnostic_icons[diagnostic.severity] or "" | ||||||
|           [vim.diagnostic.severity.ERROR] = " ", |  | ||||||
|           [vim.diagnostic.severity.WARN] = " ", |  | ||||||
|           [vim.diagnostic.severity.HINT] = " ", |  | ||||||
|           [vim.diagnostic.severity.INFO] = " ", |  | ||||||
|         } |  | ||||||
|         local icon = icons[diagnostic.severity] or "" |  | ||||||
|         return string.format("%s %s", icon, diagnostic.message) |         return string.format("%s %s", icon, diagnostic.message) | ||||||
|       end, |       end, | ||||||
|     }, |     }, | ||||||
|     underline = false, |     underline = true, -- Enable underline for better visibility | ||||||
|     update_in_insert = false, |     update_in_insert = false, | ||||||
|     signs = { |     signs = { | ||||||
|       active = true, |       active = true, | ||||||
|       text = { |       text = { | ||||||
|         [vim.diagnostic.severity.ERROR] = "", |         [vim.diagnostic.severity.ERROR] = "", -- Alternative error symbol | ||||||
|         [vim.diagnostic.severity.WARN] = "", |         [vim.diagnostic.severity.WARN] = "", -- Alternative warning | ||||||
|         [vim.diagnostic.severity.HINT] = "", |         [vim.diagnostic.severity.HINT] = "", -- Star for hints | ||||||
|         [vim.diagnostic.severity.INFO] = "", |         [vim.diagnostic.severity.INFO] = "", -- Info circle | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|     float = { |     float = { | ||||||
|  | @ -65,62 +75,72 @@ local function setup_diagnostic_config() | ||||||
|       prefix = "", |       prefix = "", | ||||||
|       format = function(diagnostic) |       format = function(diagnostic) | ||||||
|         local severity = vim.diagnostic.severity[diagnostic.severity] |         local severity = vim.diagnostic.severity[diagnostic.severity] | ||||||
|         return string.format("%s: %s", severity:lower(), diagnostic.message) |         local icon = diagnostic_icons[diagnostic.severity] or "" | ||||||
|  |         return string.format("%s %s: %s", icon, severity:lower(), diagnostic.message) | ||||||
|       end, |       end, | ||||||
|     }, |     }, | ||||||
|     severity_sort = true, |     severity_sort = true, | ||||||
|   }) |   }) | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
|  | local function cycle_qf(cmd) | ||||||
|  |   local qf_list_empty = vim.fn.getqflist({ size = 0 }).size == 0 | ||||||
|  |   if qf_list_empty then | ||||||
|  |     return | ||||||
|  |   end | ||||||
|  |   local current_qf = vim.fn.getqflist({ idx = 0 }).idx | ||||||
|  |   local qf_size = vim.fn.getqflist({ size = 0 }).size | ||||||
|  |   if cmd == "next" then | ||||||
|  |     if current_qf == qf_size then | ||||||
|  |       vim.cmd("cfirst") | ||||||
|  |     else | ||||||
|  |       vim.cmd("cnext") | ||||||
|  |     end | ||||||
|  |   elseif cmd == "prev" then | ||||||
|  |     if current_qf == 1 then | ||||||
|  |       vim.cmd("clast") | ||||||
|  |     else | ||||||
|  |       vim.cmd("cprev") | ||||||
|  |     end | ||||||
|  |   end | ||||||
|  | end | ||||||
|  | 
 | ||||||
| function M.config() | function M.config() | ||||||
|   local trouble = require("trouble") |   local opts = { | ||||||
| 
 |     keys = { | ||||||
|   trouble.setup({ |       { | ||||||
|     position = "bottom", |         ">", | ||||||
|     height = 10, |         function() | ||||||
|     width = 50, |           require("quicker").expand({ before = 2, after = 2, add_to_existing = true }) | ||||||
|     -- icons = false, |         end, | ||||||
|     mode = "workspace_diagnostics", |         desc = "Expand quickfix context", | ||||||
|     fold_open = "", |       }, | ||||||
|     fold_closed = "", |       { | ||||||
|     group = true, |         "<", | ||||||
|     padding = true, |         function() | ||||||
|     action_keys = { |           require("quicker").collapse() | ||||||
|       close = "q", -- close the list |         end, | ||||||
|       cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor |         desc = "Collapse quickfix context", | ||||||
|       refresh = "r", -- manually refresh |       }, | ||||||
|       jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds |  | ||||||
|       open_split = { "<c-x>" }, -- open buffer in new split |  | ||||||
|       open_vsplit = { "<c-v>" }, -- open buffer in new vsplit |  | ||||||
|       open_tab = { "<c-t>" }, -- open buffer in new tab |  | ||||||
|       toggle_mode = "m", -- toggle between "workspace" and "document" mode |  | ||||||
|       toggle_preview = "P", -- toggle auto_preview |  | ||||||
|       preview = "p", -- preview the diagnostic location |  | ||||||
|       close_folds = { "zM", "zm" }, -- close all folds |  | ||||||
|       open_folds = { "zR", "zr" }, -- open all folds |  | ||||||
|       toggle_fold = { "zA", "za" }, -- toggle fold of current file |  | ||||||
|       previous = "k", -- previous item |  | ||||||
|       next = "j", -- next item |  | ||||||
|     }, |     }, | ||||||
|     auto_preview = true, |     type_icons = { | ||||||
|     auto_fold = false, |       E = " ", -- Error | ||||||
|     auto_jump = { "lsp_definitions" }, |       W = " ", -- Warning | ||||||
|     -- signs = { |       I = " ", -- Info | ||||||
|     --   -- Icons / text used for a diagnostic |       N = " ", -- Note | ||||||
|     --   error = "", |       H = " ", -- Hint | ||||||
|     --   warning = "", |     }, | ||||||
|     --   hint = "", |   } | ||||||
|     --   information = "", |   require("quicker").setup(opts) | ||||||
|     --   other = "", |  | ||||||
|     -- }, |  | ||||||
|     use_diagnostic_signs = false, |  | ||||||
|   }) |  | ||||||
| 
 |  | ||||||
|   -- Setup keymaps |  | ||||||
|   setup_keymaps(trouble) |  | ||||||
| 
 |  | ||||||
|   -- Setup diagnostic configuration |  | ||||||
|   setup_diagnostic_config() |   setup_diagnostic_config() | ||||||
|  | 
 | ||||||
|  |   -- Replace the existing mappings with the cycling versions | ||||||
|  |   nmap("<a-j>", function() | ||||||
|  |     cycle_qf("next") | ||||||
|  |   end, { desc = "Next quickfix item (cycles)" }) | ||||||
|  |   nmap("<a-k>", function() | ||||||
|  |     cycle_qf("prev") | ||||||
|  |   end, { desc = "Previous quickfix item (cycles)" }) | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| return M | return M | ||||||
|  |  | ||||||
|  | @ -1,53 +1,26 @@ | ||||||
| local M = { | return { | ||||||
|   "bbjornstad/pretty-fold.nvim", |   "kevinhwang91/nvim-ufo", | ||||||
|  |   event = "BufRead", | ||||||
|  |   dependencies = "kevinhwang91/promise-async", | ||||||
|  |   config = function() | ||||||
|  |     vim.o.foldcolumn = "0" -- '0' is not bad | ||||||
|  |     vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value | ||||||
|  |     vim.o.foldlevelstart = 99 | ||||||
|  |     vim.o.foldenable = true | ||||||
|  | 
 | ||||||
|  |     vim.keymap.set("n", "zA", require("ufo").openAllFolds, { desc = "Open all folds" }) | ||||||
|  |     vim.keymap.set("n", "zC", require("ufo").closeAllFolds, { desc = "Close all folds" }) | ||||||
|  |     vim.keymap.set("n", "zk", function() | ||||||
|  |       local winid = require("ufo").peekFoldedLinesUnderCursor() | ||||||
|  |       if not winid then | ||||||
|  |         vim.lsp.buf.hover() | ||||||
|  |       end | ||||||
|  |     end, { desc = "Peek Fold" }) | ||||||
|  | 
 | ||||||
|  |     require("ufo").setup({ | ||||||
|  |       provider_selector = function() | ||||||
|  |         return { "lsp", "indent" } | ||||||
|  |       end, | ||||||
|  |     }) | ||||||
|  |   end, | ||||||
| } | } | ||||||
| 
 |  | ||||||
| M.config = function() |  | ||||||
|   local global_setup = { |  | ||||||
|     sections = { |  | ||||||
|       left = { "content" }, |  | ||||||
|       right = { |  | ||||||
|         " ", |  | ||||||
|         function() |  | ||||||
|           return ("[%dL]"):format(vim.v.foldend - vim.v.foldstart) |  | ||||||
|         end, |  | ||||||
|         "[", |  | ||||||
|         "percentage", |  | ||||||
|         "]", |  | ||||||
|       }, |  | ||||||
|     }, |  | ||||||
|     matchup_patterns = { |  | ||||||
|       { "{", "}" }, |  | ||||||
|       { "%(", ")" }, |  | ||||||
|       { "%[", "]" }, |  | ||||||
|     }, |  | ||||||
|     process_comment_signs = ({ "delete", "spaces", false })[2], |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   local function ft_setup(lang, options) -- {{{ |  | ||||||
|     local opts = vim.tbl_deep_extend("force", global_setup, options) |  | ||||||
|     if opts and opts.matchup_patterns and global_setup.matchup_patterns then |  | ||||||
|       opts.matchup_patterns = vim.list_extend(opts.matchup_patterns, global_setup.matchup_patterns) |  | ||||||
|     end |  | ||||||
|     require("pretty-fold").ft_setup(lang, opts) |  | ||||||
|   end -- }}} |  | ||||||
| 
 |  | ||||||
|   require("pretty-fold").setup(global_setup) |  | ||||||
| 
 |  | ||||||
|   ft_setup("lua", { |  | ||||||
|     matchup_patterns = { |  | ||||||
|       { "^%s*do$", "end" }, |  | ||||||
|       { "^%s*if", "end" }, |  | ||||||
|       { "^%s*for", "end" }, |  | ||||||
|       { "function[^%(]*%(", "end" }, |  | ||||||
|     }, |  | ||||||
|   }) |  | ||||||
| 
 |  | ||||||
|   ft_setup("vim", { |  | ||||||
|     matchup_patterns = { |  | ||||||
|       { "^%s*function!?[^%(]*%(", "endfunction" }, |  | ||||||
|     }, |  | ||||||
|   }) |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| return M |  | ||||||
|  |  | ||||||
|  | @ -12,9 +12,12 @@ return { | ||||||
|         svelte = { lsp_format = "fallback" }, |         svelte = { lsp_format = "fallback" }, | ||||||
|         html = { "prettierd", "prettier" }, |         html = { "prettierd", "prettier" }, | ||||||
|         typescript = { "prettierd", "prettier" }, |         typescript = { "prettierd", "prettier" }, | ||||||
|         lua = { "stylua" }, |         typescriptreact = { "prettierd", "prettier" }, | ||||||
|         javascript = { "prettierd", "prettier", stop_after_first = true }, |         javascript = { "prettierd", "prettier", stop_after_first = true }, | ||||||
|         json = { "prettierd", "prettier" }, |         json = { "prettierd", "prettier" }, | ||||||
|  |         htmlhugo = { "prettierd", "prettier" }, | ||||||
|  |         markdown = { "prettierd", "prettier" }, | ||||||
|  |         lua = { "stylua" }, | ||||||
|         sh = { "shfmt" }, |         sh = { "shfmt" }, | ||||||
|         bash = { "shfmt" }, |         bash = { "shfmt" }, | ||||||
|         tex = { "latexindent" }, |         tex = { "latexindent" }, | ||||||
|  | @ -25,8 +28,6 @@ return { | ||||||
|         cpp = { "clang-format" }, |         cpp = { "clang-format" }, | ||||||
|         hcl = { "hcl" }, |         hcl = { "hcl" }, | ||||||
|         toml = { "taplo" }, |         toml = { "taplo" }, | ||||||
|         htmlhugo = { "prettierd", "prettier" }, |  | ||||||
|         markdown = { "prettierd", "prettier" }, |  | ||||||
|       }, |       }, | ||||||
|       formatters = { |       formatters = { | ||||||
|         csharpier = { |         csharpier = { | ||||||
|  |  | ||||||
|  | @ -3,10 +3,6 @@ local M = { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| M.config = function() | M.config = function() | ||||||
|   local config = require("fzf-lua.config") |  | ||||||
|   local actions = require("trouble.sources.fzf").actions |  | ||||||
|   config.defaults.actions.files["ctrl-q"] = actions.open |  | ||||||
| 
 |  | ||||||
|   local fzf_lua = require("fzf-lua") |   local fzf_lua = require("fzf-lua") | ||||||
| 
 | 
 | ||||||
|   -- Basic fzf-lua setup |   -- Basic fzf-lua setup | ||||||
|  |  | ||||||
|  | @ -24,13 +24,13 @@ local M = { | ||||||
|         callback = function() |         callback = function() | ||||||
|           nmap("P", function() |           nmap("P", function() | ||||||
|             local cmd = "git push --force-with-lease" |             local cmd = "git push --force-with-lease" | ||||||
|             vim.notify("Pushing...", vim.log.levels.INFO) |             Snacks.notifier.notify("Pushing...", vim.log.levels.INFO) | ||||||
|             vim.fn.jobstart(cmd, { |             vim.fn.jobstart(cmd, { | ||||||
|               on_exit = function(_, code) |               on_exit = function(_, code) | ||||||
|                 if code == 0 then |                 if code == 0 then | ||||||
|                   vim.notify("Push completed successfully", vim.log.levels.INFO) |                   Snacks.notifier.notify("Push completed successfully", vim.log.levels.INFO) | ||||||
|                 else |                 else | ||||||
|                   vim.notify("Push failed with exit code: " .. code, vim.log.levels.ERROR) |                   Snacks.notifier.notify("Push failed with exit code: " .. code, vim.log.levels.ERROR) | ||||||
|                 end |                 end | ||||||
|               end, |               end, | ||||||
|               detach = true, |               detach = true, | ||||||
|  | @ -41,6 +41,22 @@ local M = { | ||||||
|             local win_id = vim.api.nvim_get_current_win() |             local win_id = vim.api.nvim_get_current_win() | ||||||
|             vim.api.nvim_win_close(win_id, false) |             vim.api.nvim_win_close(win_id, false) | ||||||
|           end, { buffer = true, desc = "Close window" }) |           end, { buffer = true, desc = "Close window" }) | ||||||
|  | 
 | ||||||
|  |           -- Git Pull | ||||||
|  |           nmap("gp", function() | ||||||
|  |             local cmd = "git pull" | ||||||
|  |             Snacks.notifier.notify("Pulling...", vim.log.levels.INFO) | ||||||
|  |             vim.fn.jobstart(cmd, { | ||||||
|  |               on_exit = function(_, code) | ||||||
|  |                 if code == 0 then | ||||||
|  |                   Snacks.notifier.notify("Pull completed successfully", vim.log.levels.INFO) | ||||||
|  |                 else | ||||||
|  |                   Snacks.notifier.notify("Pull failed with exit code: " .. code, vim.log.levels.ERROR) | ||||||
|  |                 end | ||||||
|  |               end, | ||||||
|  |               detach = true, | ||||||
|  |             }) | ||||||
|  |           end, { buffer = true, desc = "Close window" }) | ||||||
|         end, |         end, | ||||||
|       }) |       }) | ||||||
|     end, |     end, | ||||||
|  |  | ||||||
|  | @ -23,4 +23,10 @@ return { | ||||||
|       }) |       }) | ||||||
|     end, |     end, | ||||||
|   }, |   }, | ||||||
|  |   { | ||||||
|  |     "chomosuke/typst-preview.nvim", | ||||||
|  |     lazy = false, -- or ft = 'typst' | ||||||
|  |     version = "1.*", | ||||||
|  |     opts = {}, -- lazy.nvim will implicitly calls `setup {}` | ||||||
|  |   }, | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -10,10 +10,12 @@ M.config = function() | ||||||
|   local lint = require("lint") |   local lint = require("lint") | ||||||
| 
 | 
 | ||||||
|   lint.linters_by_ft = { |   lint.linters_by_ft = { | ||||||
|     javascript = {}, |     -- fuck this shit, 1.5Gb of RAM for this crap | ||||||
|     typescript = {}, |     -- | ||||||
|     javascriptreact = {}, |     -- javascript = {"eslint_d"}, | ||||||
|     typescriptreact = {}, |     -- typescript = {"eslint_d"}, | ||||||
|  |     -- javascriptreact = {"eslint_d"}, | ||||||
|  |     -- typescriptreact = {"eslint_d"}, | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) |   local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) | ||||||
|  |  | ||||||
|  | @ -1,68 +0,0 @@ | ||||||
| return { |  | ||||||
|   "pmizio/typescript-tools.nvim", |  | ||||||
|   dependencies = { |  | ||||||
|     "nvim-lua/plenary.nvim", |  | ||||||
|     "neovim/nvim-lspconfig", |  | ||||||
|   }, |  | ||||||
|   ft = { "typescript", "javascript", "jsx", "tsx", "json" }, |  | ||||||
|   config = function() |  | ||||||
|     local lsp_common = require("plugins.lsp").get_common_config() |  | ||||||
|     local ts_api = require("typescript-tools.api") |  | ||||||
|     local original_on_attach = lsp_common.on_attach |  | ||||||
| 
 |  | ||||||
|     lsp_common.on_attach = function(client, bufnr) |  | ||||||
|       original_on_attach(client, bufnr) |  | ||||||
|       vim.keymap.set("n", "<leader>ca", function() |  | ||||||
|         local diagnostics = vim.diagnostic.get(0, { lnum = vim.fn.line(".") - 1 }) |  | ||||||
|         local context = { diagnostics = diagnostics } |  | ||||||
|         local params = vim.lsp.util.make_range_params(0) |  | ||||||
|         params.context = context |  | ||||||
| 
 |  | ||||||
|         params = vim.tbl_extend("force", {}, params) |  | ||||||
|         vim.lsp.buf_request(bufnr, "textDocument/codeAction", params, function(err, result, ctx) |  | ||||||
|           local actions = result or {} |  | ||||||
|           table.insert(actions, { title = "Organize Imports", command = "typescript.custom.organize_imports" }) |  | ||||||
|           table.insert(actions, { title = "Fix All", command = "typescript.custom.fix_all" }) |  | ||||||
|           table.insert(actions, { title = "Add Missing Imports", command = "typescript.custom.add_missing_imports" }) |  | ||||||
|           table.insert(actions, { title = "Remove Unused", command = "typescript.custom.remove_unused" }) |  | ||||||
|           vim.ui.select(actions, { |  | ||||||
|             prompt = "Code Actions", |  | ||||||
|             format_item = function(action) |  | ||||||
|               return action.title |  | ||||||
|             end, |  | ||||||
|           }, function(action) |  | ||||||
|             if not action then |  | ||||||
|               return |  | ||||||
|             end |  | ||||||
|             if action.command == "typescript.custom.organize_imports" then |  | ||||||
|               pcall(ts_api.organize_imports) |  | ||||||
|             elseif action.command == "typescript.custom.fix_all" then |  | ||||||
|               pcall(ts_api.fix_all) |  | ||||||
|             elseif action.command == "typescript.custom.add_missing_imports" then |  | ||||||
|               pcall(ts_api.add_missing_imports) |  | ||||||
|             elseif action.command == "typescript.custom.remove_unused" then |  | ||||||
|               pcall(ts_api.remove_unused) |  | ||||||
|             else |  | ||||||
|               if action.edit or type(action.command) == "table" then |  | ||||||
|                 if action.edit then |  | ||||||
|                   vim.lsp.util.apply_workspace_edit(action.edit, "utf-8") |  | ||||||
|                 end |  | ||||||
|                 if type(action.command) == "table" then |  | ||||||
|                   vim.lsp.buf.execute_command(action.command) |  | ||||||
|                 end |  | ||||||
|               end |  | ||||||
|             end |  | ||||||
|           end) |  | ||||||
|         end) |  | ||||||
|       end, { buffer = bufnr, desc = "Code Actions" }) |  | ||||||
|     end |  | ||||||
| 
 |  | ||||||
|     require("typescript-tools").setup(vim.tbl_deep_extend("force", lsp_common, { |  | ||||||
|       settings = { |  | ||||||
|         separate_diagnostic_server = true, |  | ||||||
|         publish_diagnostic_on = "insert_leave", |  | ||||||
|         expose_as_code_action = {}, |  | ||||||
|       }, |  | ||||||
|     })) |  | ||||||
|   end, |  | ||||||
| } |  | ||||||
|  | @ -2,11 +2,13 @@ local M = { | ||||||
|   "neovim/nvim-lspconfig", |   "neovim/nvim-lspconfig", | ||||||
|   dependencies = { |   dependencies = { | ||||||
|     "saghen/blink.cmp", |     "saghen/blink.cmp", | ||||||
|  | 
 | ||||||
|     "williamboman/mason.nvim", |     "williamboman/mason.nvim", | ||||||
|     "williamboman/mason-lspconfig.nvim", |     "williamboman/mason-lspconfig.nvim", | ||||||
|  |     "WhoIsSethDaniel/mason-tool-installer.nvim", | ||||||
|  |     { "j-hui/fidget.nvim", opts = {} }, | ||||||
|     require("plugins.lsp.extras.lazydev"), |     require("plugins.lsp.extras.lazydev"), | ||||||
|     require("plugins.lsp.extras.gopher"), |     require("plugins.lsp.extras.gopher"), | ||||||
|     require("plugins.lsp.extras.typescript"), |  | ||||||
|   }, |   }, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -93,6 +95,9 @@ function M.config() | ||||||
|   local ensure_installed = { |   local ensure_installed = { | ||||||
|     -- LSP servers |     -- LSP servers | ||||||
|     "gopls", |     "gopls", | ||||||
|  |     "jsonls", | ||||||
|  |     "lua_ls", | ||||||
|  |     "yamlls", | ||||||
|     "graphql-language-service-cli", |     "graphql-language-service-cli", | ||||||
|     "html-lsp", |     "html-lsp", | ||||||
|     "htmx-lsp", |     "htmx-lsp", | ||||||
|  | @ -101,6 +106,7 @@ function M.config() | ||||||
|     "omnisharp", |     "omnisharp", | ||||||
|     "yaml-language-server", |     "yaml-language-server", | ||||||
|     "svelte-language-server", |     "svelte-language-server", | ||||||
|  |     "vtsls", | ||||||
| 
 | 
 | ||||||
|     -- Formatters |     -- Formatters | ||||||
|     "prettierd", |     "prettierd", | ||||||
|  | @ -115,27 +121,12 @@ function M.config() | ||||||
|     "templ", |     "templ", | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   -- Install missing tools |   require("mason-tool-installer").setup({ ensure_installed = ensure_installed }) | ||||||
|   local registry = require("mason-registry") |  | ||||||
|   for _, tool in ipairs(ensure_installed) do |  | ||||||
|     if not registry.is_installed(tool) then |  | ||||||
|       vim.cmd("MasonInstall " .. tool) |  | ||||||
|     end |  | ||||||
|   end |  | ||||||
| 
 | 
 | ||||||
|   -- Set up Mason LSP config |   -- Set up Mason LSP config | ||||||
|   require("mason-lspconfig").setup({ |   require("mason-lspconfig").setup({ | ||||||
|     automatic_installation = true, |     ensure_installed = {}, -- explicitly set to an empty table (populated via mason-tool-installer) | ||||||
|     ensure_installed = { |     automatic_installation = false, | ||||||
|       "gopls", |  | ||||||
|       "html", |  | ||||||
|       "htmx", |  | ||||||
|       "jsonls", |  | ||||||
|       "lua_ls", |  | ||||||
|       "omnisharp", |  | ||||||
|       "yamlls", |  | ||||||
|       "graphql", |  | ||||||
|     }, |  | ||||||
|     handlers = { |     handlers = { | ||||||
|       function(server_name) |       function(server_name) | ||||||
|         local base_opts = M.get_common_config() |         local base_opts = M.get_common_config() | ||||||
|  |  | ||||||
|  | @ -28,6 +28,54 @@ local M = { | ||||||
|       require("mini.surround").setup({}) |       require("mini.surround").setup({}) | ||||||
|     end, |     end, | ||||||
|   }, |   }, | ||||||
|  |   { | ||||||
|  |     "echasnovski/mini.statusline", | ||||||
|  |     version = false, | ||||||
|  |     config = function() | ||||||
|  |       require("mini.statusline").setup({}) | ||||||
|  | 
 | ||||||
|  |       MiniStatusline.section_codeium = function(args) | ||||||
|  |         args = args or {} | ||||||
|  |         local trunc_width = args.trunc_width or 75 | ||||||
|  | 
 | ||||||
|  |         if MiniStatusline.is_truncated(trunc_width) then | ||||||
|  |           return "" | ||||||
|  |         end | ||||||
|  | 
 | ||||||
|  |         local status = vim.fn["codeium#GetStatusString"]() | ||||||
|  | 
 | ||||||
|  |         if status and status ~= "" then | ||||||
|  |           local icon = args.icon or " " | ||||||
|  |           return icon .. status | ||||||
|  |         end | ||||||
|  | 
 | ||||||
|  |         return "" | ||||||
|  |       end | ||||||
|  | 
 | ||||||
|  |       MiniStatusline.config.content.active = function() | ||||||
|  |         local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 }) | ||||||
|  |         local git = MiniStatusline.section_git({ trunc_width = 40 }) | ||||||
|  |         local diff = MiniStatusline.section_diff({ trunc_width = 75 }) | ||||||
|  |         local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 }) | ||||||
|  |         local lsp = MiniStatusline.section_lsp({ trunc_width = 75 }) | ||||||
|  |         local filename = MiniStatusline.section_filename({ trunc_width = 140 }) | ||||||
|  |         local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 }) | ||||||
|  |         local location = MiniStatusline.section_location({ trunc_width = 75 }) | ||||||
|  |         local search = MiniStatusline.section_searchcount({ trunc_width = 75 }) | ||||||
|  |         local codeium = MiniStatusline.section_codeium({ trunc_width = 75 }) | ||||||
|  | 
 | ||||||
|  |         return MiniStatusline.combine_groups({ | ||||||
|  |           { hl = mode_hl, strings = { mode } }, | ||||||
|  |           { hl = "MiniStatuslineDevinfo", strings = { git, diff, diagnostics, lsp } }, | ||||||
|  |           "%<", -- Mark general truncate point | ||||||
|  |           { hl = "MiniStatuslineFilename", strings = { filename } }, | ||||||
|  |           "%=", -- End left alignment | ||||||
|  |           { hl = "MiniStatuslineFileinfo", strings = { fileinfo } }, | ||||||
|  |           { hl = mode_hl, strings = { codeium, search, location } }, | ||||||
|  |         }) | ||||||
|  |       end | ||||||
|  |     end, | ||||||
|  |   }, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| return M | return M | ||||||
|  |  | ||||||
							
								
								
									
										28
									
								
								lua/plugins/obsidian.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								lua/plugins/obsidian.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | ||||||
|  | return { | ||||||
|  |   "epwalsh/obsidian.nvim", | ||||||
|  |   version = "*", -- recommended, use latest release instead of latest commit | ||||||
|  |   lazy = true, | ||||||
|  |   ft = "markdown", | ||||||
|  |   -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: | ||||||
|  |   -- event = { | ||||||
|  |   --   -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. | ||||||
|  |   --   -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md" | ||||||
|  |   --   -- refer to `:h file-pattern` for more examples | ||||||
|  |   --   "BufReadPre path/to/my-vault/*.md", | ||||||
|  |   --   "BufNewFile path/to/my-vault/*.md", | ||||||
|  |   -- }, | ||||||
|  |   dependencies = { | ||||||
|  |     -- Required. | ||||||
|  |     "nvim-lua/plenary.nvim", | ||||||
|  | 
 | ||||||
|  |     -- see below for full list of optional dependencies 👇 | ||||||
|  |   }, | ||||||
|  |   opts = { | ||||||
|  |     workspaces = { | ||||||
|  |       { | ||||||
|  |         name = "Vault", | ||||||
|  |         path = "~/Documents/Vault/", | ||||||
|  |       }, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | @ -61,9 +61,16 @@ M.config = function() | ||||||
|     }, |     }, | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   vim.keymap.set("n", "-", function() |   nmap("-", require("oil").open, { desc = "Open parent directory" }) | ||||||
|     require("oil").open() | 
 | ||||||
|   end) |   vim.api.nvim_create_autocmd("User", { | ||||||
|  |     pattern = "OilActionsPost", | ||||||
|  |     callback = function(event) | ||||||
|  |       if event.data.actions.type == "move" then | ||||||
|  |         Snacks.rename.on_rename_file(event.data.actions.src_url, event.data.actions.dest_url) | ||||||
|  |       end | ||||||
|  |     end, | ||||||
|  |   }) | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| return M | return M | ||||||
|  |  | ||||||
|  | @ -1,11 +1,9 @@ | ||||||
| return { | return { | ||||||
|   dir = "/home/forbi/Dev/marianozunino/presenterm.nvim", |   "marianozunino/presenterm.nvim", | ||||||
|   config = function() |   config = function() | ||||||
|     require("presenterm").setup({ |     require("presenterm").setup({ | ||||||
|       patterns = { |       patterns = { | ||||||
|         "*.presenterm", |  | ||||||
|         "*.pterm", |         "*.pterm", | ||||||
|         "*.md", |  | ||||||
|       }, |       }, | ||||||
|       auto_launch = true, |       auto_launch = true, | ||||||
|       terminal_cmd = "kitty --title 'Presenterm: {title}' --override font_size=18 {cmd}", |       terminal_cmd = "kitty --title 'Presenterm: {title}' --override font_size=18 {cmd}", | ||||||
|  |  | ||||||
							
								
								
									
										58
									
								
								lua/plugins/qol.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								lua/plugins/qol.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,58 @@ | ||||||
|  | return { | ||||||
|  |   "folke/snacks.nvim", | ||||||
|  |   priority = 1000, | ||||||
|  |   config = function() | ||||||
|  |     local snacks = require("snacks") | ||||||
|  |     snacks.setup({ | ||||||
|  |       bigfile = { enabled = true }, | ||||||
|  |       debug = { enabled = true }, | ||||||
|  |       image = { enabled = true }, | ||||||
|  |       indent = { enabled = true, animate = { enabled = false } }, | ||||||
|  |       rename = { enabled = true }, | ||||||
|  |       notifier = { enabled = true }, | ||||||
|  |       scroll = { | ||||||
|  |         enabled = true, | ||||||
|  |         animate = { | ||||||
|  |           duration = { step = 5, total = 50 }, | ||||||
|  |           easing = "linear", | ||||||
|  |         }, | ||||||
|  |       }, | ||||||
|  |       dashboard = { | ||||||
|  |         preset = { | ||||||
|  |           keys = function() | ||||||
|  |             return { | ||||||
|  |               { icon = "⏻", key = "q", desc = "Quit", action = "<cmd>qa<CR>" }, | ||||||
|  |               { icon = "", key = "e", desc = "New Buffer", action = "<cmd>ene<CR>" }, | ||||||
|  |             } | ||||||
|  |           end, | ||||||
|  |           header = table.concat({ | ||||||
|  |             [[   █  █   ]], | ||||||
|  |             [[   █ ██   ]], | ||||||
|  |             [[   ████   ]], | ||||||
|  |             [[   ██ ███   ]], | ||||||
|  |             [[   █  █   ]], | ||||||
|  |             [[             ]], | ||||||
|  |             [[ n e o v i m ]], | ||||||
|  |           }, "\n"), | ||||||
|  |         }, | ||||||
|  |         sections = { | ||||||
|  |           { | ||||||
|  |             section = "header", | ||||||
|  |           }, | ||||||
|  |           { title = "MRU ", file = vim.fn.fnamemodify(".", ":~"), padding = 1 }, | ||||||
|  |           { section = "recent_files", cwd = true, limit = 10, padding = 1 }, | ||||||
|  |           { title = "GMRU", padding = 1 }, | ||||||
|  |           { section = "recent_files", limit = 5, padding = 1 }, | ||||||
|  |           { title = "Sessions", padding = 1 }, | ||||||
|  |           { section = "projects", padding = 1 }, | ||||||
|  |           { section = "keys", gap = 0, padding = 1 }, | ||||||
|  |         }, | ||||||
|  |       }, | ||||||
|  |     }) | ||||||
|  | 
 | ||||||
|  |     nmap("<leader>.", snacks.scratch.open, { desc = "Toggle Scratch Buffer" }) | ||||||
|  |     nmap("<leader>,", snacks.scratch.select, { desc = "Select Scratch Buffer" }) | ||||||
|  |     -- Show notifier history | ||||||
|  |     nmap("<leader>ns", snacks.notifier.show_history, { desc = "Show notifier history" }) | ||||||
|  |   end, | ||||||
|  | } | ||||||
|  | @ -1,17 +0,0 @@ | ||||||
| local M = { |  | ||||||
|   "goolord/alpha-nvim", |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| M.config = function() |  | ||||||
|   local startify = require("alpha.themes.startify") |  | ||||||
| 
 |  | ||||||
|   startify.section.top_buttons.val = { |  | ||||||
|     startify.button("e", "New file", "<cmd>ene <CR>"), |  | ||||||
|     startify.button("q", "Quit", "<cmd>q <CR>"), |  | ||||||
|   } |  | ||||||
|   startify.section.bottom_buttons.val = {} |  | ||||||
| 
 |  | ||||||
|   require("alpha").setup(startify.config) |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| return M |  | ||||||
|  | @ -1,9 +0,0 @@ | ||||||
| local M = { |  | ||||||
|   "stevearc/dressing.nvim", |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| M.config = function() |  | ||||||
|   require("dressing").setup() |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| return M |  | ||||||
|  | @ -1,11 +0,0 @@ | ||||||
| local M = { |  | ||||||
|   require("plugins.ui.colors"), |  | ||||||
|   require("plugins.ui.alpha"), |  | ||||||
|   require("plugins.ui.dressing"), |  | ||||||
|   require("plugins.ui.whichkey"), |  | ||||||
|   require("plugins.ui.noice"), |  | ||||||
|   require("plugins.ui.scroll"), |  | ||||||
|   require("plugins.ui.status"), |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| return M |  | ||||||
|  | @ -1,92 +0,0 @@ | ||||||
| local M = { |  | ||||||
|   "folke/noice.nvim", |  | ||||||
|   event = "VeryLazy", |  | ||||||
|   dependencies = { |  | ||||||
|     "MunifTanjim/nui.nvim", |  | ||||||
|   }, |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| M.config = function() |  | ||||||
|   local noice = require("noice") |  | ||||||
| 
 |  | ||||||
|   noice.setup({ |  | ||||||
|     routes = { |  | ||||||
|       { |  | ||||||
|         filter = { |  | ||||||
|           event = "msg_show", |  | ||||||
|           any = { |  | ||||||
|             { find = "%d+L, %d+B" }, |  | ||||||
|             { find = "; after #%d+" }, |  | ||||||
|             { find = "; before #%d+" }, |  | ||||||
|             { find = "%d fewer lines" }, |  | ||||||
|             { find = "%d more lines" }, |  | ||||||
|           }, |  | ||||||
|         }, |  | ||||||
|         opts = { skip = true }, |  | ||||||
|       }, |  | ||||||
|     }, |  | ||||||
|     lsp = { |  | ||||||
|       progress = { enabled = true }, |  | ||||||
|       override = { |  | ||||||
|         ["vim.lsp.util.convert_input_to_markdown_lines"] = true, |  | ||||||
|         ["vim.lsp.util.stylize_markdown"] = true, |  | ||||||
|         ["cmp.entry.get_documentation"] = true, |  | ||||||
|       }, |  | ||||||
|       hover = { silent = true }, |  | ||||||
|       signature = { |  | ||||||
|         auto_open = { throttle = vim.api.nvim_get_option_value("updatetime", { scope = "global" }) }, |  | ||||||
|       }, |  | ||||||
|     }, |  | ||||||
|     cmdline = { |  | ||||||
|       format = { |  | ||||||
|         cmdline = { icon = "" }, |  | ||||||
|         search_down = { icon = " " }, |  | ||||||
|         search_up = { icon = " " }, |  | ||||||
|       }, |  | ||||||
|     }, |  | ||||||
|     messages = { |  | ||||||
|       enabled = false, |  | ||||||
|     }, |  | ||||||
|     popupmenu = { enabled = true }, |  | ||||||
|     presets = { |  | ||||||
|       bottom_search = true, |  | ||||||
|       long_message_to_split = true, |  | ||||||
|       lsp_doc_border = true, |  | ||||||
|     }, |  | ||||||
|     views = { |  | ||||||
|       split = { |  | ||||||
|         enter = true, |  | ||||||
|         size = "25%", |  | ||||||
|         win_options = { |  | ||||||
|           signcolumn = "no", |  | ||||||
|           number = false, |  | ||||||
|           relativenumber = false, |  | ||||||
|           list = false, |  | ||||||
|           wrap = false, |  | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|       popup = { border = { style = "rounded" } }, |  | ||||||
|       hover = { |  | ||||||
|         border = { style = "rounded" }, |  | ||||||
|         position = { row = 2, col = 2 }, |  | ||||||
|       }, |  | ||||||
|       mini = { |  | ||||||
|         timeout = 1000, |  | ||||||
|         position = { row = 2, col = "99%" }, -- Positions at top-right |  | ||||||
|         border = { style = "rounded" }, |  | ||||||
|         win_options = { |  | ||||||
|           winblend = vim.api.nvim_get_option_value("winblend", { scope = "global" }), |  | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|       cmdline_popup = { border = { style = "rounded" } }, |  | ||||||
|       confirm = { |  | ||||||
|         border = { |  | ||||||
|           style = "rounded", |  | ||||||
|           padding = { 0, 1 }, |  | ||||||
|         }, |  | ||||||
|       }, |  | ||||||
|     }, |  | ||||||
|   }) |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| return M |  | ||||||
|  | @ -1,41 +0,0 @@ | ||||||
| local M = { |  | ||||||
|   "karb94/neoscroll.nvim", |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| M.config = function() |  | ||||||
|   require("neoscroll").setup({ |  | ||||||
|     -- All these keys will be mapped to their corresponding default scrolling animation |  | ||||||
|     mappings = { "<C-u>", "<C-d>" }, |  | ||||||
|     hide_cursor = true, -- Hide cursor while scrolling |  | ||||||
|     stop_eof = true, -- Stop at <EOF> when scrolling downwards |  | ||||||
|     respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file |  | ||||||
|     cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further |  | ||||||
|     easing_function = nil, -- Default easing function |  | ||||||
|     pre_hook = nil, -- Function to run before the scrolling animation starts |  | ||||||
|     post_hook = nil, -- Function to run after the scrolling animation ends |  | ||||||
|     performance_mode = false, -- Disable "Performance Mode" on all buffers. |  | ||||||
|   }) |  | ||||||
|   local neoscroll = require("neoscroll") |  | ||||||
| 
 |  | ||||||
|   local t = { |  | ||||||
|     ["<C-u>"] = function() |  | ||||||
|       neoscroll.ctrl_u({ duration = 50 }) |  | ||||||
|     end, |  | ||||||
|     ["<C-k>"] = function() |  | ||||||
|       neoscroll.ctrl_u({ duration = 50 }) |  | ||||||
|     end, |  | ||||||
|     ["<C-d>"] = function() |  | ||||||
|       neoscroll.ctrl_d({ duration = 50 }) |  | ||||||
|     end, |  | ||||||
|     ["<C-j>"] = function() |  | ||||||
|       neoscroll.ctrl_d({ duration = 50 }) |  | ||||||
|     end, |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   local modes = { "n", "v", "x" } |  | ||||||
|   for key, func in pairs(t) do |  | ||||||
|     vim.keymap.set(modes, key, func) |  | ||||||
|   end |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| return M |  | ||||||
|  | @ -1,66 +0,0 @@ | ||||||
| local M = { |  | ||||||
|   "nvim-lualine/lualine.nvim", |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function M.config() |  | ||||||
|   local lualine = require("lualine") |  | ||||||
| 
 |  | ||||||
|   local mode = "mode" |  | ||||||
|   local filetype = { "filetype", icon_only = true } |  | ||||||
| 
 |  | ||||||
|   local diagnostics = { |  | ||||||
|     "diagnostics", |  | ||||||
|     sources = { "nvim_diagnostic" }, |  | ||||||
|     sections = { "error", "warn", "info", "hint" }, |  | ||||||
|     symbols = { |  | ||||||
|       error = icons.diagnostics.Error, |  | ||||||
|       hint = icons.diagnostics.Hint, |  | ||||||
|       info = icons.diagnostics.Info, |  | ||||||
|       warn = icons.diagnostics.Warning, |  | ||||||
|     }, |  | ||||||
|     colored = true, |  | ||||||
|     update_in_insert = false, |  | ||||||
|     always_visible = false, |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   local diff = { |  | ||||||
|     "diff", |  | ||||||
|     source = function() |  | ||||||
|       local gitsigns = vim.b.gitsigns_status_dict |  | ||||||
|       if gitsigns then |  | ||||||
|         return { |  | ||||||
|           added = gitsigns.added, |  | ||||||
|           modified = gitsigns.changed, |  | ||||||
|           removed = gitsigns.removed, |  | ||||||
|         } |  | ||||||
|       end |  | ||||||
|     end, |  | ||||||
|     symbols = { |  | ||||||
|       added = icons.git.LineAdded .. " ", |  | ||||||
|       modified = icons.git.LineModified .. " ", |  | ||||||
|       removed = icons.git.LineRemoved .. " ", |  | ||||||
|     }, |  | ||||||
|     colored = true, |  | ||||||
|     always_visible = false, |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   lualine.setup({ |  | ||||||
|     options = { |  | ||||||
|       theme = "auto", |  | ||||||
|       globalstatus = true, |  | ||||||
|       section_separators = "", |  | ||||||
|       component_separators = "", |  | ||||||
|       disabled_filetypes = { statusline = { "dashboard", "lazy", "alpha" } }, |  | ||||||
|     }, |  | ||||||
|     sections = { |  | ||||||
|       lualine_a = { mode }, |  | ||||||
|       lualine_b = {}, |  | ||||||
|       lualine_c = { "filename" }, |  | ||||||
|       lualine_x = { diff, diagnostics, filetype }, |  | ||||||
|       lualine_y = {}, |  | ||||||
|       lualine_z = {}, |  | ||||||
|     }, |  | ||||||
|   }) |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| return M |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue