From 580a30e305dd67b61d2f606cdf77391be1f8966d Mon Sep 17 00:00:00 2001 From: Devin Lumley <2636402+devinwl@users.noreply.github.com> Date: Tue, 9 Jan 2024 17:09:27 -0800 Subject: [PATCH] fix: format config files --- init.lua | 17 ++++++++--------- lua/keybinds.lua | 7 ++++--- lua/plugins/completion.lua | 8 ++++---- lua/plugins/fugitive.lua | 3 +-- lua/plugins/hardtime.lua | 14 +++++++------- lua/plugins/lint.lua | 4 ++-- lua/plugins/telescope.lua | 10 +++++----- lua/plugins/trouble.lua | 2 +- 8 files changed, 32 insertions(+), 33 deletions(-) diff --git a/init.lua b/init.lua index 818e495..93f817c 100644 --- a/init.lua +++ b/init.lua @@ -32,14 +32,14 @@ vim.opt.incsearch = true local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) @@ -61,4 +61,3 @@ end require("lazy").setup("plugins") require("keybinds") - diff --git a/lua/keybinds.lua b/lua/keybinds.lua index 9258c85..ca9d9ea 100644 --- a/lua/keybinds.lua +++ b/lua/keybinds.lua @@ -1,6 +1,6 @@ vim.keymap.set("n", "", "", { desc = "Go to split on left" }) -vim.keymap.set("n", "", "", { desc = "Go to split above"}) -vim.keymap.set("n", "", "", { desc = "Go to split below"}) +vim.keymap.set("n", "", "", { desc = "Go to split above" }) +vim.keymap.set("n", "", "", { desc = "Go to split below" }) vim.keymap.set("n", "", "", { desc = "Go to split on right" }) vim.keymap.set("v", "J", ":m '>+1gv=gv", { desc = "Move lines under cursor up" }) @@ -14,4 +14,5 @@ vim.keymap.set("x", "p", "\"_dP", { desc = "Paste without replacing clip vim.keymap.set("n", "y", "\"*y", { desc = "Yank into system clipboard" }) vim.keymap.set("v", "y", "\"*y", { desc = "Yank into system clipboard" }) -vim.keymap.set("n", "s", [[:%s/\<\>//gI]], { desc = "Like `ciw` for any highlighted text (doesn't have to be word)"}) +vim.keymap.set("n", "s", [[:%s/\<\>//gI]], + { desc = "Like `ciw` for any highlighted text (doesn't have to be word)" }) diff --git a/lua/plugins/completion.lua b/lua/plugins/completion.lua index 18d888f..6696501 100644 --- a/lua/plugins/completion.lua +++ b/lua/plugins/completion.lua @@ -15,14 +15,14 @@ return { [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.abort(), - [""] = cmp.mapping(function (fallback) + [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() else fallback() end end, { "i" }), - [""] = cmp.mapping(function (fallback) + [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() else @@ -45,8 +45,8 @@ return { { name = "nvim_lsp" }, { name = "luasnip" } }, { - { name = "buffer" } - }) + { name = "buffer" } + }) }) end }, diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index 9636763..b9a587d 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -1,10 +1,9 @@ return { "tpope/vim-fugitive", - config = function () + config = function() vim.keymap.set("n", "gs", vim.cmd.Git, { desc = "View `git status`" }) vim.keymap.set("n", "gh", "diffget //2", { desc = "Pick gitdiff on left" }) vim.keymap.set("n", "gl", "diffget //3", { desc = "Pick gitdiff on right" }) vim.keymap.set("n", "gp", ":Git push", { desc = "Run `git push`" }) end } - diff --git a/lua/plugins/hardtime.lua b/lua/plugins/hardtime.lua index 8b090fd..2848a46 100644 --- a/lua/plugins/hardtime.lua +++ b/lua/plugins/hardtime.lua @@ -1,14 +1,14 @@ return { - "m4xshen/hardtime.nvim", - dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" }, - opts = { + "m4xshen/hardtime.nvim", + dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" }, + opts = { disable_mouse = true, disabled_keys = { -- Drill Sergeant Demchuk! - [""] = {"", "i"}, - [""] = {"", "i"}, - [""] = {"", "i"}, - [""] = {"", "i"} + [""] = { "", "i" }, + [""] = { "", "i" }, + [""] = { "", "i" }, + [""] = { "", "i" } }, disabled_filetypes = { "checkhealth", diff --git a/lua/plugins/lint.lua b/lua/plugins/lint.lua index 2d279dd..03b7cbb 100644 --- a/lua/plugins/lint.lua +++ b/lua/plugins/lint.lua @@ -4,7 +4,7 @@ return { "BufReadPre", "BufNewFile", }, - config = function () + config = function() local lint = require("lint") lint.linters_by_ft = { @@ -18,7 +18,7 @@ return { vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, { group = lint_augroup, - callback = function () + callback = function() lint.try_lint() end }) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index ff69daa..d0c21e6 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -7,7 +7,7 @@ return { local builtin = require('telescope.builtin') vim.keymap.set('n', 'pp', builtin.git_files, { desc = "Search git_files" }) - vim.keymap.set('n', 'pf', builtin.find_files, { desc = "Search all files "}) + vim.keymap.set('n', 'pf', builtin.find_files, { desc = "Search all files " }) vim.keymap.set('n', 'fh', builtin.help_tags, { desc = "View help tags" }) vim.keymap.set('n', 'ps', function() builtin.grep_string({ search = vim.fn.input("Grep > ") }) @@ -18,11 +18,11 @@ return { "nvim-telescope/telescope-ui-select.nvim", config = function() require("telescope").setup { - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown {} + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown {} + } } - } } require("telescope").load_extension("ui-select") diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua index e7a9de2..4745503 100644 --- a/lua/plugins/trouble.lua +++ b/lua/plugins/trouble.lua @@ -4,4 +4,4 @@ return { config = function() vim.keymap.set("n", "tt", ":TroubleToggle", { desc = "Toggle Trouble" }) end - } +}