Daemon b61afc44e6
docs: cleanup formatting and comment typos (#696)
* docs: fix typo in component notice

* refactor: rename typo param 'pattern'

* docs: fix comments typos across project files

Cleanup misspellings and wording in comment lines.

* docs: improve readability of `CONTRIBUTING.md`

* docs: improve readability of `README.md`

- Minor typos
- Clarify information
- Separate sections from paragraphs

* docs: add newline below headers in `THEMES.md`

Aim's to be consistent with other documents.

* docs: fix unname tabpage command reference

* docs: reword 'directly bused' for `setup_theme()`

* docs: fix extra indent in contribution list

* docs: more separation in readme/tabs, remove extra backtick

* docs: further improve wording for `setup_theme`

* docs: improve wording for `setup` function

* docs: missing underscore in lualine/config
2022-05-30 20:25:05 +06:00

26 lines
721 B
Lua

-- Copyright (c) 2020-2021 shadmansaleh
-- MIT license, see LICENSE for more details.
local M = require('lualine.component'):extend()
local modules = require('lualine_require').lazy_require {
git_branch = 'lualine.components.branch.git_branch',
highlight = 'lualine.highlight',
utils = 'lualine.utils.utils',
}
-- Initializer
M.init = function(self, options)
M.super.init(self, options)
if not self.options.icon then
self.options.icon = '' -- e0a0
end
modules.git_branch.init()
end
M.update_status = function(_, is_focused)
local buf = (not is_focused and vim.api.nvim_get_current_buf())
local branch = modules.git_branch.get_branch(buf)
return modules.utils.stl_escape(branch)
end
return M