mirror of
https://github.com/powerline/powerline.git
synced 2025-07-30 01:05:42 +02:00
parent
c868f9c255
commit
9d90552091
@ -3,12 +3,12 @@
|
|||||||
"left": [
|
"left": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"highlight_groups": ["gundo.name", "file_name"],
|
"highlight_groups": ["gundo:name", "file_name"],
|
||||||
"contents": "Undo diff"
|
"contents": "Undo diff"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"highlight_groups": ["gundo.background", "background"],
|
"highlight_groups": ["gundo:background", "background"],
|
||||||
"draw_soft_divider": false,
|
"draw_soft_divider": false,
|
||||||
"draw_hard_divider": false,
|
"draw_hard_divider": false,
|
||||||
"width": "auto"
|
"width": "auto"
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
"left": [
|
"left": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"highlight_groups": ["gundo.name", "file_name"],
|
"highlight_groups": ["gundo:name", "file_name"],
|
||||||
"contents": "Undo tree"
|
"contents": "Undo tree"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"highlight_groups": ["gundo.background", "background"],
|
"highlight_groups": ["gundo:background", "background"],
|
||||||
"draw_soft_divider": false,
|
"draw_soft_divider": false,
|
||||||
"draw_hard_divider": false,
|
"draw_hard_divider": false,
|
||||||
"width": "auto"
|
"width": "auto"
|
||||||
|
@ -14,12 +14,12 @@ from powerline.segments.vim import window_cached
|
|||||||
def nerdtree(pl):
|
def nerdtree(pl):
|
||||||
'''Return directory that is shown by the current buffer.
|
'''Return directory that is shown by the current buffer.
|
||||||
|
|
||||||
Highlight groups used: ``nerdtree.path`` or ``file_name``.
|
Highlight groups used: ``nerdtree:path`` or ``file_name``.
|
||||||
'''
|
'''
|
||||||
if not bufvar_exists(None, 'NERDTreeRoot'):
|
if not bufvar_exists(None, 'NERDTreeRoot'):
|
||||||
return None
|
return None
|
||||||
path_str = vim.eval('getbufvar("%", "NERDTreeRoot").path.str()')
|
path_str = vim.eval('getbufvar("%", "NERDTreeRoot").path.str()')
|
||||||
return [{
|
return [{
|
||||||
'contents': path_str,
|
'contents': path_str,
|
||||||
'highlight_groups': ['nerdtree.path', 'file_name'],
|
'highlight_groups': ['nerdtree:path', 'file_name'],
|
||||||
}]
|
}]
|
||||||
|
@ -20,7 +20,7 @@ def syntastic(pl, err_format='ERR: {first_line} ({num}) ', warn_format='WARN
|
|||||||
:param str warn_format:
|
:param str warn_format:
|
||||||
Format string for warnings.
|
Format string for warnings.
|
||||||
|
|
||||||
Highlight groups used: ``syntastic.warning`` or ``warning``, ``syntastic.error`` or ``error``.
|
Highlight groups used: ``syntastic:warning`` or ``warning``, ``syntastic:error`` or ``error``.
|
||||||
'''
|
'''
|
||||||
if not vim_global_exists('SyntasticLoclist'):
|
if not vim_global_exists('SyntasticLoclist'):
|
||||||
return None
|
return None
|
||||||
@ -33,11 +33,11 @@ def syntastic(pl, err_format='ERR: {first_line} ({num}) ', warn_format='WARN
|
|||||||
if errors:
|
if errors:
|
||||||
segments.append({
|
segments.append({
|
||||||
'contents': err_format.format(first_line=errors[0]['lnum'], num=len(errors)),
|
'contents': err_format.format(first_line=errors[0]['lnum'], num=len(errors)),
|
||||||
'highlight_groups': ['syntastic.error', 'error'],
|
'highlight_groups': ['syntastic:error', 'error'],
|
||||||
})
|
})
|
||||||
if warnings:
|
if warnings:
|
||||||
segments.append({
|
segments.append({
|
||||||
'contents': warn_format.format(first_line=warnings[0]['lnum'], num=len(warnings)),
|
'contents': warn_format.format(first_line=warnings[0]['lnum'], num=len(warnings)),
|
||||||
'highlight_groups': ['syntastic.warning', 'warning'],
|
'highlight_groups': ['syntastic:warning', 'warning'],
|
||||||
})
|
})
|
||||||
return segments
|
return segments
|
||||||
|
Loading…
x
Reference in New Issue
Block a user