AutoYADM commit: 2024-11-26 14:45:04

This commit is contained in:
Daniel Fichtinger 2024-11-26 14:45:04 -05:00
parent 261be59946
commit b9afe82aa4
3 changed files with 52 additions and 9 deletions

View file

@ -15,21 +15,25 @@ local modes = {
["V-REPLACE"] = "V-R",
}
local wordCountFiletypes = {
local word_count_filetypes = {
markdown = true,
txt = true,
tex = true,
}
local wcCache = ""
local function updateWordCount()
local wc_cache = ""
local function update_word_count()
local ft = vim.bo.filetype
local wc = vim.api.nvim_eval("wordcount()")
local w = "w:"
if wc["visual_words"] then
wcCache = w .. wc["visual_words"]
if word_count_filetypes[ft] then
if wc["visual_words"] then
wc_cache = w .. wc["visual_words"]
else
wc_cache = w .. wc["words"]
end
else
wcCache = w .. wc["words"]
wc_cache = ""
end
end
local sections = {
@ -45,7 +49,7 @@ local sections = {
lualine_c = { { "filename", path = 1 } },
lualine_x = { "diagnostics", { "filetype", colored = false }, {
function()
return wcCache
return wc_cache
end,
} },
lualine_y = { "progress" },
@ -63,7 +67,7 @@ return {
vim.api.nvim_create_autocmd(
{ "TextChanged", "TextChangedI", "CursorHold" },
{ pattern = "*", callback = updateWordCount }
{ pattern = "*", callback = update_word_count }
)
require("lualine").setup({

View file

@ -0,0 +1,39 @@
return {
"echasnovski/mini.indentscope",
version = false, -- wait till new 0.7.0 release to put it back on semver
event = "LazyFile",
opts = {
-- symbol = "▏",
symbol = "",
options = {
try_as_border = true,
draw = {
animation = require("mini.indentscope").gen_animation.none(),
},
},
},
init = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"Trouble",
"alpha",
"dashboard",
"fzf",
"help",
"lazy",
"mason",
"neo-tree",
"notify",
"snacks_notif",
"snacks_terminal",
"snacks_win",
"toggleterm",
"trouble",
"bigfile",
},
callback = function()
vim.b.miniindentscope_disable = true
end,
})
end,
}

View file

@ -1,5 +1,6 @@
return {
"johmsalas/text-case.nvim",
enabled = false,
dependencies = { "nvim-telescope/telescope.nvim" },
config = function()
require("textcase").setup({})
@ -10,7 +11,6 @@ return {
{ "ga.", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "x" }, desc = "Telescope" },
},
cmd = {
-- NOTE: The Subs command name can be customized via the option "substitude_command_name"
"Subs",
"TextCaseOpenTelescope",
"TextCaseOpenTelescopeQuickChange",