diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index 3c098aec..bf9aa4ae 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -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({ diff --git a/.config/nvim/lua/plugins/mini-indentscope.lua b/.config/nvim/lua/plugins/mini-indentscope.lua new file mode 100644 index 00000000..7da47525 --- /dev/null +++ b/.config/nvim/lua/plugins/mini-indentscope.lua @@ -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, +} diff --git a/.config/nvim/lua/plugins/text-case.lua b/.config/nvim/lua/plugins/text-case.lua index fa554254..5c527b79 100644 --- a/.config/nvim/lua/plugins/text-case.lua +++ b/.config/nvim/lua/plugins/text-case.lua @@ -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.", "TextCaseOpenTelescope", mode = { "n", "x" }, desc = "Telescope" }, }, cmd = { - -- NOTE: The Subs command name can be customized via the option "substitude_command_name" "Subs", "TextCaseOpenTelescope", "TextCaseOpenTelescopeQuickChange",