added branch to statusline
This commit is contained in:
1 parent
3879bf8751
commit
787505258d
3 files changed
+56
-5
No files matched your search
@@ -121,6 +121,19 @@ NV_Darcula_Git_Root = function(cwd)
|
||||
return cwd
|
||||
end
|
||||
|
||||
NV_Darcula_Git_Branch = function(cwd)
|
||||
cwd = cwd or vim.loop.cwd()
|
||||
local output =
|
||||
vim.fn.systemlist(
|
||||
{"git", "-C", cwd, "symbolic-ref", "--quiet", "--short", "HEAD"}
|
||||
)
|
||||
if vim.v.shell_error == 0 and output[1] and #output[1] > 0 then
|
||||
return output[1]
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
NV_Darcula_Grab_Selection = function(cb)
|
||||
local selection = utils.get_visual_text()
|
||||
vim.schedule(
|
||||
|
||||
@@ -42,14 +42,15 @@ return {
|
||||
git = {
|
||||
added = "",
|
||||
blame = "",
|
||||
branch = "",
|
||||
conflict = "",
|
||||
unstaged = "",
|
||||
deleted = "",
|
||||
ignored = "◌",
|
||||
renamed = "",
|
||||
staged = "",
|
||||
unmerged = "",
|
||||
renamed = "",
|
||||
untracked = "",
|
||||
deleted = "",
|
||||
ignored = "◌"
|
||||
unstaged = "",
|
||||
untracked = ""
|
||||
},
|
||||
indent = "│",
|
||||
listchars = {
|
||||
|
||||
Reference in new issue
Block a user