Added more editor features to support Golang, sql and git

This commit is contained in:
2026-01-19 19:31:11 -07:00
parent a9b956e141
commit 3b41bd1552
16 changed files with 184 additions and 46 deletions

View File

@@ -114,3 +114,29 @@ autocmd("DirChanged", {
end
end,
})
-- Golang AutoOpen PProf
autocmd("BufRead", {
pattern = { "cpu.out", "mem.out", "trace.out" },
callback = function(args)
local name = vim.fn.fnamemodify(args.file, ":t")
vim.notify(
"Generated " .. name .. ". Use: `go tool pprof -http=:0 " .. name .. "` or `go tool trace " .. name .. "`",
vim.log.levels.INFO)
end,
})
-- SQL files
autocmd("FileType", {
pattern = { "sql", "mysql", "plsql" },
callback = function()
local cmp = require("cmp")
cmp.setup.buffer({
sources = {
{ name = "vim-dadbod" },
{ name = "nvim_lsp" },
{ name = "buffer" },
},
})
end,
})