From c8a407b681e04d0f6f2134a34f31e6511cabcdd3 Mon Sep 17 00:00:00 2001
From: Luca Bilke <luca@asmara.fritz.box>
Date: Fri, 26 Jan 2024 14:42:46 +0100
Subject: [PATCH] cleanup

---
 .config/nvim/lua/funcs.lua      | 6 +-----
 .config/nvim/lua/snippets/c.lua | 1 +
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/.config/nvim/lua/funcs.lua b/.config/nvim/lua/funcs.lua
index 97f6ab90..01b6b559 100644
--- a/.config/nvim/lua/funcs.lua
+++ b/.config/nvim/lua/funcs.lua
@@ -109,17 +109,14 @@ function M.toggle_term_cmd(opts)
         vim.g.user_terminals = {}
     end
     local terms = vim.g.user_terminals
-    -- if a command string is provided, create a basic table for Terminal:new() options
     if type(opts) == "string" then opts = { cmd = opts, hidden = true } end
     local num = vim.v.count > 0 and vim.v.count or 1
-    -- if terminal doesn't exist yet, create it
     if not terms[opts.cmd] then terms[opts.cmd] = {} end
     if not terms[opts.cmd][num] then
         if not opts.count then opts.count = vim.tbl_count(terms) * 100 + num end
         if not opts.on_exit then opts.on_exit = function() terms[opts.cmd][num] = nil end end
         terms[opts.cmd][num] = require("toggleterm.terminal").Terminal:new(opts)
     end
-    -- toggle the terminal
     terms[opts.cmd][num]:toggle()
 end
 
@@ -138,6 +135,7 @@ function M.file_worktree(file, worktrees)
             "ls-files",
             "--error-unmatch",
             file
+---@diagnostic disable-next-line: undefined-field
         }):wait()
         if r.code == 0 then
             return worktree
@@ -211,8 +209,6 @@ local function has_capability(capability, filter)
 end
 
 -- NOTE: LSP Keymaps here
--- TODO: Optimize these lookups with a fucking table jesus
--- https://stackoverflow.com/a/37493047
 function M.lsp_on_attach(client, bufnr)
     local lsp_mappings = M.empty_map_table()
 
diff --git a/.config/nvim/lua/snippets/c.lua b/.config/nvim/lua/snippets/c.lua
index 75aeeb15..04afe14b 100644
--- a/.config/nvim/lua/snippets/c.lua
+++ b/.config/nvim/lua/snippets/c.lua
@@ -1,3 +1,4 @@
+---@diagnostic disable: undefined-global
 return {
     s({ trig = "sst", name = "Standard Template" }, fmt([[
         #include <stdlib.h>