1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 15:19:12 +08:00

feat(git): display root path of repo

This commit is contained in:
Eric Wong 2024-02-24 20:56:31 +08:00
parent b5866a81e7
commit 83be314258
3 changed files with 5 additions and 2 deletions

View File

@ -85,7 +85,7 @@ local function update_buf_context()
table.insert(context, v)
end
end
table.insert(context, 'Git Remotes:')
table.insert(context, '[in] ' .. vim.fn.getcwd())
for _, v in ipairs(remotes) do
local extra_text = ''
if v.updating then

View File

@ -41,6 +41,7 @@ The roadmap defines the project direction and priorities.
- [x] use desc for project manager callback function
- [ ] cache remote and branch info
- [ ] cache info based on project root
- [x] display root path
- [x] implement `ctags#update` in lua
- [x] register project function with description
- [x] update todo list when switch project

View File

@ -1,12 +1,14 @@
scriptencoding utf-8
sy match SPCGitRemoteName '^\s*[▷▼]\s.*'
sy match SPCGitRemoteTitle '^Git Remotes:'
sy match SPCGitRemoteTitlePrefix '^\[in\]'
sy match SPCGitRemoteTitle '^\[in\].*' contains=SPCGitRemoteTitlePrefix
sy match SPCGitRemoteHelpKey '" \zs[^:]*\ze[:]'
sy match SPCGitRemoteHelpTitle 'Git remote manager quickhelp'
sy match SPCGitRemoteHelp '^".*' contains=SPCGitRemoteHelpTitle,SPCGitRemoteHelpKey
hi def link SPCGitRemoteName Directory
hi def link SPCGitRemoteHelpKey Identifier
hi def link SPCGitRemoteTitlePrefix Identifier
hi def link SPCGitRemoteTitle Title
hi def link SPCGitRemoteHelpTitle Title
hi def link SPCGitRemoteHelp String