feat: init version

This commit is contained in:
2026-04-30 22:32:47 +02:00
commit bbc81afdb9
5 changed files with 559 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
if vim.g.loaded_loc_nvim == 1 then
return
end
vim.g.loaded_loc_nvim = 1
vim.api.nvim_create_user_command("LocEnable", function()
require("loc").enable()
end, { desc = "Enable loc.nvim insert-mode character tracking" })
vim.api.nvim_create_user_command("LocDisable", function()
require("loc").disable()
end, { desc = "Disable loc.nvim insert-mode character tracking" })
vim.api.nvim_create_user_command("LocReset", function()
require("loc").reset()
end, { desc = "Reset loc.nvim character counters" })
vim.api.nvim_create_user_command("LocStats", function()
local stats = require("loc").stats()
local message = string.format(
"LOC added=%d deleted=%d net=%+d abs=%d",
stats.added,
stats.deleted,
stats.net,
stats.abs
)
vim.notify(message, vim.log.levels.INFO)
end, { desc = "Show loc.nvim character counters" })