Finally modularize neovim configuration
This commit is contained in:
parent
d4ca4668c4
commit
e2697f61fd
16 changed files with 872 additions and 1004 deletions
15
lua/utils/statusline.lua
Normal file
15
lua/utils/statusline.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
-- Statusline utilities
|
||||
|
||||
local M = {}
|
||||
|
||||
-- Function to get word count in status line
|
||||
function M.getWords()
|
||||
-- the third string here is the string for visual-block mode (^V)
|
||||
if vim.fn.mode() == "v" or vim.fn.mode() == "V" or vim.fn.mode() == "" then
|
||||
return vim.fn.wordcount().visual_words .. ""
|
||||
else
|
||||
return vim.fn.wordcount().words .. ""
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
Loading…
Add table
Add a link
Reference in a new issue