Merge pull request #3 from snoweuph/main

not a commit. you're crazy, this is a poem and art
This commit is contained in:
raf 2026-03-25 00:25:46 +03:00 committed by GitHub
commit 3792412d5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 59 additions and 9 deletions

14
.editorconfig Normal file
View file

@ -0,0 +1,14 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
indent_size = 2

View file

@ -21,18 +21,46 @@ local default_config = {
merge_messages = false,
filetypes_to_ignore = { "netrw", "NvimTree", "neo-tree", "Telescope", "qf" },
messages = {
-- Actual Gaslighting
"You're not trusting user input, right?",
"Totally not a memory leak... 🚽",
"Are you sure this will pass the code quality checks? 🤔",
"Is this line really covered by unit tests? 🧐",
"I wouldn't commit that line without double checking... 💭",
"Your tech lead might have questions about this one 🤔",
"That's an... interesting way to solve this 🤯",
"sure you didn't forget to guard this? 👀",
"Did you really mean to write it this way? 🤔",
"Maybe add a comment explaining why this isn't as bad as it looks? 📝",
"Why?",
"You forgot a ';'.",
"This won't compile, you know this, right?",
"Why is this approach so convoluted? 🌀",
"You didn't actually mean to do this, right?",
"That seems like the wrong approach. ❌",
-- Grading
"Bold choice! Very... creative 💡",
"Please. Tell me Copilot wrote this one... 🤖",
"Totally not a memory leak... 🚽",
"Stack Overflow would delete this faster than you can blink. ❌",
"This has the flavor profile of debt and regret. 💸",
"That's an... interesting way to solve this 🤯",
"I'm pretty sure this violates the Geneva Convention...",
"A rubber duck would just walk away... 🦆",
"Congratulations 🎉, you've invented a problem to solve your solution.",
"This belongs in a modern art museum 🎨, not production...",
"This is sloppier than GObject",
"This code is a cry 😭 for help wrapped in syntax </>.",
"I'd be embarrassed to push this to git if I were you. 😳",
"The questions future you will have... so many... 🤷",
"This reads as much like good code as 'A Brief History of Time' like a poem.",
"I'll give you 'interesting'.",
"The secure coding training clearly didn't stick.",
"You're really 'built different', huh? Like with an extra chromosome... 🧬",
"When did we forget KISS? 🤷",
-- Grading as a Question
"Your tech lead might have questions about this one 🤔",
"Would God forgive you for this? ✝️",
"Please. Tell me Copilot wrote this one... 🤖",
'Please tell me this isn\'t the "simple" approach. 😰',
"Maybe add a comment explaining why this isn't as bad as it looks? 📝",
},
}
@ -70,7 +98,9 @@ function M.setup(user_config)
if config.auto_update then
api.nvim_create_autocmd({ "BufEnter", "TextChanged", "TextChangedI" }, {
callback = function() M.schedule_update() end,
callback = function()
M.schedule_update()
end,
})
end
@ -163,7 +193,9 @@ end
--- Update the gaslighting decorations in the current buffer
function M.update_decorations()
if not M.is_enabled or shouldIgnoreFileType() then return end
if not M.is_enabled or shouldIgnoreFileType() then
return
end
local bufnr = api.nvim_get_current_buf()
api.nvim_buf_clear_namespace(bufnr, ns, 0, -1) -- Clear previous decorations
@ -205,8 +237,12 @@ function M.schedule_update()
-- Do NOT move this block below `uv.new_timer()`, or the new timer
-- will be stopped and closed immediately after being created.
if timer then
if timer.stop then timer:stop() end
if timer.close then timer:close() end
if timer.stop then
timer:stop()
end
if timer.close then
timer:close()
end
end
timer = uv.new_timer()