summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugin_settings.lua
diff options
context:
space:
mode:
diffstat (limited to '.config/nvim/lua/plugin_settings.lua')
-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'},