repos / dotfiles

my dotfiles

commit
4f6cf8a
parent
c9ef776
author
Eric Bower
date
2026-01-20 09:40:30 -0500 EST
chore: fmt
1 files changed,  +43, -43
M dot_config/nvim/init.lua
+43, -43
  1@@ -51,24 +51,24 @@ map("n", "<leader>t", "<cmd>term fish<cr>", opts)
  2 map({ "n", "v" }, "<leader>u", "<cmd>GitLink<cr>", opts)
  3 map("n", "<leader>e", vim.diagnostic.open_float, opts)
  4 map("n", "<leader>y", function() -- copy relative filepath to clipboard
  5-	vim.fn.setreg("+", vim.fn.expand("%"))
  6+  vim.fn.setreg("+", vim.fn.expand("%"))
  7 end)
  8 map("n", "<leader>r", function() -- toggle lsp loclist
  9-	local loclist_win = vim.fn.getloclist(0, { winid = 0 }).winid
 10-	if loclist_win > 0 then
 11-		vim.cmd("lclose")
 12-	else
 13-		vim.diagnostic.setloclist({ open = true })
 14-	end
 15+  local loclist_win = vim.fn.getloclist(0, { winid = 0 }).winid
 16+  if loclist_win > 0 then
 17+    vim.cmd("lclose")
 18+  else
 19+    vim.diagnostic.setloclist({ open = true })
 20+  end
 21 end, opts)
 22 map("n", "<leader>f", function() -- toggle quickfix
 23-	for _, win in ipairs(vim.fn.getwininfo()) do
 24-		if win.quickfix == 1 then
 25-			vim.cmd("cclose")
 26-			return
 27-		end
 28-	end
 29-	vim.cmd("copen")
 30+  for _, win in ipairs(vim.fn.getwininfo()) do
 31+    if win.quickfix == 1 then
 32+      vim.cmd("cclose")
 33+      return
 34+    end
 35+  end
 36+  vim.cmd("copen")
 37 end)
 38 map("n", "<leader>d", ":DiffviewOpen ")
 39 map("n", "<leader>a", "<cmd>lua MiniFiles.open()<cr>")
 40@@ -80,42 +80,42 @@ local augroup = vim.api.nvim_create_augroup("erock.cfg", { clear = true })
 41 local autocmd = vim.api.nvim_create_autocmd
 42 autocmd("Filetype", { group = augroup, pattern = "make", command = "setlocal noexpandtab tabstop=4 shiftwidth=4" })
 43 autocmd("BufEnter", { -- disable automatic newline comment continuation
 44-	callback = function()
 45-		o.formatoptions = vim.opt.formatoptions:remove({ "c", "r", "o" })
 46-	end,
 47+  callback = function()
 48+    o.formatoptions = vim.opt.formatoptions:remove({ "c", "r", "o" })
 49+  end,
 50 })
 51 
 52 local function setup_lsp()
 53-	vim.lsp.enable({
 54-		"gopls", -- os package mgr: gopls
 55-		"pyright", -- npm i -g pyright
 56-		"tsgo", -- npm i -g @typescript/native-preview
 57-		"zls", -- os package mgr: zls
 58-	})
 59+  vim.lsp.enable({
 60+    "gopls", -- os package mgr: gopls
 61+    "pyright", -- npm i -g pyright
 62+    "tsgo", -- npm i -g @typescript/native-preview
 63+    "zls", -- os package mgr: zls
 64+  })
 65 
 66-	autocmd("LspAttach", {
 67-		group = augroup,
 68-		callback = function(ev)
 69-			local bufopts = { noremap = true, silent = true, buffer = ev.buf }
 70-			map("n", "grd", vim.lsp.buf.definition, bufopts)
 71-			map("i", "<C-k>", vim.lsp.completion.get, bufopts) -- open completion menu manually
 72-			local client = assert(vim.lsp.get_client_by_id(ev.data.client_id))
 73-			local methods = vim.lsp.protocol.Methods
 74-			if client:supports_method(methods.textDocument_completion) then
 75-				vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
 76-			end
 77-		end,
 78-	})
 79+  autocmd("LspAttach", {
 80+    group = augroup,
 81+    callback = function(ev)
 82+      local bufopts = { noremap = true, silent = true, buffer = ev.buf }
 83+      map("n", "grd", vim.lsp.buf.definition, bufopts)
 84+      map("i", "<C-k>", vim.lsp.completion.get, bufopts) -- open completion menu manually
 85+      local client = assert(vim.lsp.get_client_by_id(ev.data.client_id))
 86+      local methods = vim.lsp.protocol.Methods
 87+      if client:supports_method(methods.textDocument_completion) then
 88+        vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
 89+      end
 90+    end,
 91+  })
 92 end
 93 
 94 vim.pack.add({
 95-	"https://github.com/neovim/nvim-lspconfig",
 96-	"https://github.com/nvim-mini/mini.pick",
 97-	"https://github.com/karb94/neoscroll.nvim",
 98-	"https://github.com/linrongbin16/gitlinker.nvim",
 99-	"https://github.com/sindrets/diffview.nvim",
100-	"https://github.com/tpope/vim-fugitive",
101-	"https://github.com/nvim-mini/mini.files",
102+  "https://github.com/neovim/nvim-lspconfig",
103+  "https://github.com/nvim-mini/mini.pick",
104+  "https://github.com/karb94/neoscroll.nvim",
105+  "https://github.com/linrongbin16/gitlinker.nvim",
106+  "https://github.com/sindrets/diffview.nvim",
107+  "https://github.com/tpope/vim-fugitive",
108+  "https://github.com/nvim-mini/mini.files",
109 })
110 
111 vim.cmd("colorscheme default")