summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2021-11-01 01:41:55 +0300
committerYigit Sever2021-11-01 01:41:55 +0300
commit5c8368d57cacd1c26df38b88ea7da9a2d3ad24b1 (patch)
treeebdf63b8908d8685862d613501af9ad1869896f4
parent668d0be41fc65932faf9a3be92aad4ed07724881 (diff)
downloaddotfiles-5c8368d57cacd1c26df38b88ea7da9a2d3ad24b1.tar.gz
dotfiles-5c8368d57cacd1c26df38b88ea7da9a2d3ad24b1.tar.bz2
dotfiles-5c8368d57cacd1c26df38b88ea7da9a2d3ad24b1.zip
nvim: add tex wordcount (but dont use)
-rw-r--r--.config/nvim/lua/plugin_settings.lua21
1 files changed, 14 insertions, 7 deletions
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua
index ec23325..4bc7081 100644
--- a/.config/nvim/lua/plugin_settings.lua
+++ b/.config/nvim/lua/plugin_settings.lua
@@ -38,14 +38,21 @@ local function lualine_spell()
38 end 38 end
39end 39end
40 40
41local function lualine_spell_cond() 41-- Grinds vim to a halt
42 if vim.wo.spell then 42local function lualine_tex_wordcount()
43 return true 43 return vim.fn['vimtex#misc#wordcount']() .. " ‽"
44 else
45 return false
46 end
47end 44end
48 45
46local conditions = {
47 spell_on = function ()
48 return vim.wo.spell
49 end,
50 filetype_is_tex = function()
51 return vim.bo.filetype == "tex"
52 end
53}
54
55
49require'lualine'.setup { 56require'lualine'.setup {
50 options = { 57 options = {
51 icons_enabled = true, 58 icons_enabled = true,
@@ -57,7 +64,7 @@ require'lualine'.setup {
57 lualine_a = {{'mode', fmt = string.lower}}, 64 lualine_a = {{'mode', fmt = string.lower}},
58 lualine_b = {'branch', 'diff', { 65 lualine_b = {'branch', 'diff', {
59 lualine_spell, 66 lualine_spell,
60 cond = lualine_spell_cond 67 cond = conditions.spell_on,
61 }}, 68 }},
62 lualine_c = {'filename'}, 69 lualine_c = {'filename'},
63 lualine_x = {'encoding', 'fileformat', 'filetype'}, 70 lualine_x = {'encoding', 'fileformat', 'filetype'},