AutoYADM commit: 2024-11-26 14:45:04
This commit is contained in:
parent
261be59946
commit
b9afe82aa4
3 changed files with 52 additions and 9 deletions
|
@ -15,21 +15,25 @@ local modes = {
|
||||||
["V-REPLACE"] = "V-R",
|
["V-REPLACE"] = "V-R",
|
||||||
}
|
}
|
||||||
|
|
||||||
local wordCountFiletypes = {
|
local word_count_filetypes = {
|
||||||
markdown = true,
|
markdown = true,
|
||||||
txt = true,
|
txt = true,
|
||||||
tex = true,
|
tex = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
local wcCache = ""
|
local wc_cache = ""
|
||||||
local function updateWordCount()
|
local function update_word_count()
|
||||||
local ft = vim.bo.filetype
|
local ft = vim.bo.filetype
|
||||||
local wc = vim.api.nvim_eval("wordcount()")
|
local wc = vim.api.nvim_eval("wordcount()")
|
||||||
local w = "w:"
|
local w = "w:"
|
||||||
if wc["visual_words"] then
|
if word_count_filetypes[ft] then
|
||||||
wcCache = w .. wc["visual_words"]
|
if wc["visual_words"] then
|
||||||
|
wc_cache = w .. wc["visual_words"]
|
||||||
|
else
|
||||||
|
wc_cache = w .. wc["words"]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
wcCache = w .. wc["words"]
|
wc_cache = ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local sections = {
|
local sections = {
|
||||||
|
@ -45,7 +49,7 @@ local sections = {
|
||||||
lualine_c = { { "filename", path = 1 } },
|
lualine_c = { { "filename", path = 1 } },
|
||||||
lualine_x = { "diagnostics", { "filetype", colored = false }, {
|
lualine_x = { "diagnostics", { "filetype", colored = false }, {
|
||||||
function()
|
function()
|
||||||
return wcCache
|
return wc_cache
|
||||||
end,
|
end,
|
||||||
} },
|
} },
|
||||||
lualine_y = { "progress" },
|
lualine_y = { "progress" },
|
||||||
|
@ -63,7 +67,7 @@ return {
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd(
|
vim.api.nvim_create_autocmd(
|
||||||
{ "TextChanged", "TextChangedI", "CursorHold" },
|
{ "TextChanged", "TextChangedI", "CursorHold" },
|
||||||
{ pattern = "*", callback = updateWordCount }
|
{ pattern = "*", callback = update_word_count }
|
||||||
)
|
)
|
||||||
|
|
||||||
require("lualine").setup({
|
require("lualine").setup({
|
||||||
|
|
39
.config/nvim/lua/plugins/mini-indentscope.lua
Normal file
39
.config/nvim/lua/plugins/mini-indentscope.lua
Normal 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,
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"johmsalas/text-case.nvim",
|
"johmsalas/text-case.nvim",
|
||||||
|
enabled = false,
|
||||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
config = function()
|
config = function()
|
||||||
require("textcase").setup({})
|
require("textcase").setup({})
|
||||||
|
@ -10,7 +11,6 @@ return {
|
||||||
{ "ga.", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "x" }, desc = "Telescope" },
|
{ "ga.", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "x" }, desc = "Telescope" },
|
||||||
},
|
},
|
||||||
cmd = {
|
cmd = {
|
||||||
-- NOTE: The Subs command name can be customized via the option "substitude_command_name"
|
|
||||||
"Subs",
|
"Subs",
|
||||||
"TextCaseOpenTelescope",
|
"TextCaseOpenTelescope",
|
||||||
"TextCaseOpenTelescopeQuickChange",
|
"TextCaseOpenTelescopeQuickChange",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue