feat(nvim): idk, lots of changes
This commit is contained in:
		| @@ -17,6 +17,8 @@ return { | ||||
| 			vim.keymap.del("n", "<leader>as") | ||||
| 			vim.keymap.del("n", "<leader>at") | ||||
| 			vim.keymap.del("n", "<leader>a?") | ||||
| 			vim.keymap.del("n", "<leader>aB") | ||||
| 			vim.keymap.del("n", "<leader>aS") | ||||
| 		end) | ||||
| 	end, | ||||
| 	opts = { | ||||
|   | ||||
							
								
								
									
										25
									
								
								nvim/lua/olinpin/plugins/conform.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								nvim/lua/olinpin/plugins/conform.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| return { | ||||
| 	"stevearc/conform.nvim", | ||||
| 	event = 'BufWritePre', -- uncomment for format on save | ||||
| 	opts = { | ||||
| 		lsp_fallback = true, | ||||
|  | ||||
| 		formatters_by_ft = { | ||||
| 			lua = { "stylua" }, | ||||
|  | ||||
| 			javascript = { "prettier" }, | ||||
| 			css = { "prettier" }, | ||||
| 			html = { "prettier" }, | ||||
|  | ||||
| 			sh = { "shfmt" }, | ||||
|  | ||||
| 			go = {"goimports", "gofumpt" }, | ||||
| 		}, | ||||
|  | ||||
| 		format_on_save = { | ||||
| 		  -- These options will be passed to conform.format() | ||||
| 		  timeout_ms = 500, | ||||
| 		  lsp_fallback = true, | ||||
| 		}, | ||||
| 	}, | ||||
| } | ||||
| @@ -1,22 +1,22 @@ | ||||
| return { | ||||
|     "zbirenbaum/copilot.lua", | ||||
|     cmd = "Copilot", | ||||
|     event = "InsertEnter", | ||||
|     config = function () | ||||
|         require("copilot").setup({ | ||||
|             suggestion = { | ||||
|                 enabled = true, | ||||
|                 auto_trigger = true, | ||||
|                 keymap = { | ||||
|                     accept = "…" | ||||
|                 } | ||||
|             }, | ||||
|             panel = { | ||||
|                 enabled = false, | ||||
|             }, | ||||
|             filetypes = { | ||||
|                 ["."] = false, | ||||
|             } | ||||
|         }) | ||||
|     end | ||||
| 	"zbirenbaum/copilot.lua", | ||||
| 	cmd = "Copilot", | ||||
| 	event = "InsertEnter", | ||||
| 	config = function() | ||||
| 		require("copilot").setup({ | ||||
| 			suggestion = { | ||||
| 				enabled = true, | ||||
| 				auto_trigger = true, | ||||
| 				keymap = { | ||||
| 					accept = "…", | ||||
| 				}, | ||||
| 			}, | ||||
| 			panel = { | ||||
| 				enabled = false, | ||||
| 			}, | ||||
| 			filetypes = { | ||||
| 				["."] = false, | ||||
| 			}, | ||||
| 		}) | ||||
| 	end, | ||||
| } | ||||
|   | ||||
							
								
								
									
										3
									
								
								nvim/lua/olinpin/plugins/go-ide.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								nvim/lua/olinpin/plugins/go-ide.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| return { | ||||
|     "https://github.com/plentiform/go-ide", | ||||
| } | ||||
| @@ -1,9 +1,9 @@ | ||||
| return { | ||||
| 	"m4xshen/hardtime.nvim", | ||||
| 	lazy = false, | ||||
| 	dependencies = { "MunifTanjim/nui.nvim" }, | ||||
| 	opts = {}, | ||||
| 	config = function(_, opts) | ||||
| 		require("hardtime").setup(opts) | ||||
| 	end, | ||||
| } | ||||
| return {} | ||||
| -- 	"m4xshen/hardtime.nvim", | ||||
| -- 	lazy = false, | ||||
| -- 	dependencies = { "MunifTanjim/nui.nvim" }, | ||||
| -- 	opts = {}, | ||||
| -- 	config = function(_, opts) | ||||
| -- 		require("hardtime").setup(opts) | ||||
| -- 	end, | ||||
| -- } | ||||
|   | ||||
| @@ -33,47 +33,66 @@ return { | ||||
| 				buffer_previewer_maker = new_maker, | ||||
| 			}, | ||||
| 			pickers = { | ||||
|                 find_files = { | ||||
|                     -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. | ||||
|                     find_command = { "rg", "--files", "--hidden", "--no-ignore", | ||||
|                         "--glob", "!**/.git/*", "--glob", "!**/venv/*", "--glob", "!**/.venv/*", "--glob", | ||||
|                         "!**/node_modules/*", | ||||
|                         "--glob", "!**/vendor/*", "--glob", "!**/var/cache/*", | ||||
|                         "--glob", "!**/.next/*", "--glob", "!**/out/*", "--glob", "!**/dist/*", "--glob", "!**.min.js" | ||||
|                     }, | ||||
|                 }, | ||||
| 				find_files = { | ||||
| 					-- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. | ||||
| 					find_command = { | ||||
| 						"rg", | ||||
| 						"--files", | ||||
| 						"--hidden", | ||||
| 						"--no-ignore", | ||||
| 						"--glob", | ||||
| 						"!**/.git/*", | ||||
| 						"--glob", | ||||
| 						"!**/venv/*", | ||||
| 						"--glob", | ||||
| 						"!**/.venv/*", | ||||
| 						"--glob", | ||||
| 						"!**/node_modules/*", | ||||
| 						"--glob", | ||||
| 						"!**/vendor/*", | ||||
| 						"--glob", | ||||
| 						"!**/var/cache/*", | ||||
| 						"--glob", | ||||
| 						"!**/.next/*", | ||||
| 						"--glob", | ||||
| 						"!**/out/*", | ||||
| 						"--glob", | ||||
| 						"!**/dist/*", | ||||
| 						"--glob", | ||||
| 						"!**.min.js", | ||||
| 					}, | ||||
| 				}, | ||||
| 			}, | ||||
| 			preview = { | ||||
| 				filesize_limit = 0.5, -- MB | ||||
| 			}, | ||||
| 		}) | ||||
|  | ||||
|         local function grepInFiles() | ||||
|             local actions = require("telescope.actions") | ||||
|             local action_state = require("telescope.actions.state") | ||||
|             builtin.filetypes({ | ||||
|                 attach_mappings = function(prompt_bufnr, _) | ||||
|                     actions.select_default:replace(function() | ||||
|                         actions.close(prompt_bufnr) | ||||
|                         local selection = action_state.get_selected_entry() | ||||
|                         local filetype = selection.value | ||||
|  | ||||
|                         builtin.live_grep({ | ||||
|                             additional_args = function() | ||||
|                                 return { "--glob", "*." .. filetype } | ||||
|                             end, | ||||
|                         }) | ||||
|                     end) | ||||
|                     return true | ||||
|                 end, | ||||
|             }) | ||||
|         end | ||||
|         vim.keymap.set("n", "<leader>ft", grepInFiles, { desc = "Live grep by filetype" }) | ||||
|         vim.keymap.set('n', '<leader>*', builtin.grep_string, {desc = "Grep current string"}) | ||||
|         vim.keymap.set('n', '<leader>ff', builtin.find_files, {desc = "Find files"}) | ||||
|         vim.keymap.set('n', '<leader>fg', builtin.git_branches, {desc = "Find Git branches" }) | ||||
|         vim.keymap.set('n', '<leader>fc', builtin.git_commits, {desc = "Find Commits" }) | ||||
|         vim.keymap.set('n', '<leader>fw', builtin.live_grep, {desc = "Find Words" }) | ||||
| 		local function grepInFiles() | ||||
| 			local actions = require("telescope.actions") | ||||
| 			local action_state = require("telescope.actions.state") | ||||
| 			builtin.filetypes({ | ||||
| 				attach_mappings = function(prompt_bufnr, _) | ||||
| 					actions.select_default:replace(function() | ||||
| 						actions.close(prompt_bufnr) | ||||
| 						local selection = action_state.get_selected_entry() | ||||
| 						local filetype = selection.value | ||||
|  | ||||
| 						builtin.live_grep({ | ||||
| 							additional_args = function() | ||||
| 								return { "--glob", "*." .. filetype } | ||||
| 							end, | ||||
| 						}) | ||||
| 					end) | ||||
| 					return true | ||||
| 				end, | ||||
| 			}) | ||||
| 		end | ||||
| 		vim.keymap.set("n", "<leader>ft", grepInFiles, { desc = "Live grep by filetype" }) | ||||
| 		vim.keymap.set("n", "<leader>*", builtin.grep_string, { desc = "Grep current string" }) | ||||
| 		vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Find files" }) | ||||
| 		vim.keymap.set("n", "<leader>fg", builtin.git_branches, { desc = "Find Git branches" }) | ||||
| 		vim.keymap.set("n", "<leader>fc", builtin.git_commits, { desc = "Find Commits" }) | ||||
| 		vim.keymap.set("n", "<leader>fw", builtin.live_grep, { desc = "Find Words" }) | ||||
| 	end, | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user