diff options
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/lua/plugin_settings.lua | 21 |
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 |
39 | end | 39 | end |
40 | 40 | ||
41 | local function lualine_spell_cond() | 41 | -- Grinds vim to a halt |
42 | if vim.wo.spell then | 42 | local function lualine_tex_wordcount() |
43 | return true | 43 | return vim.fn['vimtex#misc#wordcount']() .. " ‽" |
44 | else | ||
45 | return false | ||
46 | end | ||
47 | end | 44 | end |
48 | 45 | ||
46 | local 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 | |||
49 | require'lualine'.setup { | 56 | require'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'}, |