added signify component (#18)
This commit is contained in:
parent
b8ad8a13b2
commit
0194740d28
|
@ -116,6 +116,7 @@ lualine.inactiveSections = {
|
|||
<details>
|
||||
<summary><b>Available components</b></summary>
|
||||
|
||||
* general
|
||||
* branch
|
||||
* encoding
|
||||
* fileformat
|
||||
|
@ -124,6 +125,8 @@ lualine.inactiveSections = {
|
|||
* location
|
||||
* mode
|
||||
* progress
|
||||
* plugin
|
||||
* signify
|
||||
|
||||
</details>
|
||||
|
||||
|
@ -249,7 +252,7 @@ Please create an issue/ pr if you want to see more functionality implemented
|
|||
- [ ] [liuchengxu/vista.vim](https://github.com/liuchengxu/vista.vim)
|
||||
- [ ] [preservim/tagbar](https://github.com/preservim/tagbar)
|
||||
- Plugin Components
|
||||
- [ ] [vim-signify](https://github.com/mhinz/vim-signify)
|
||||
- [x] [vim-signify](https://github.com/mhinz/vim-signify)
|
||||
- Diagnostics
|
||||
- [ ] nvim-lsp status support
|
||||
- [ ] [coc.nvim](https://github.com/neoclide/coc.nvim)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
local function signify()
|
||||
if vim.fn.exists('*sy#repo#get_stats') == 0 then return '' end
|
||||
local added, modified, removed = unpack(vim.fn['sy#repo#get_stats']())
|
||||
if added == -1 then added = 0 end
|
||||
if modified == -1 then modified = 0 end
|
||||
if removed == -1 then removed = 0 end
|
||||
return '+' .. added .. ' ~'.. modified .. ' -' .. removed
|
||||
end
|
||||
|
||||
return signify
|
Loading…
Reference in New Issue