about summary refs log tree commit diff stats
path: root/src/ui/statusbar.h
blob: 6c5513f906a27e3effe18825d84d37c0c5bca3d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * statusbar.h
 * vim: expandtab:ts=4:sts=4:sw=4
 *
 * Copyright (C) 2012 - 2019 James Booth <boothj5@gmail.com>
 *
 * This file is part of Profanity.
 *
 * Profanity is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Profanity is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Profanity.  If not, see <https://www.gnu.org/licenses/>.
 *
 * In addition, as a special exception, the copyright holders give permission to
 * link the code of portions of this program with the OpenSSL library under
 * certain conditions as described in each individual source file, and
 * distribute linked combinations including the two.
 *
 * You must obey the GNU General Public License in all respects for all of the
 * code used other than OpenSSL. If you modify file(s) with this exception, you
 * may extend this exception to your version of the file(s), but you are not
 * obligated to do so. If you do not wish to do so, delete this exception
 * statement from your version. If you delete this exception statement from all
 * source files in the program, then also delete it here.
 *
 */

#ifndef UI_STATUSBAR_H
#define UI_STATUSBAR_H

void status_bar_init(void);
void status_bar_draw(void);
void status_bar_close(void);
void status_bar_resize(void);
void status_bar_set_prompt(const char *const prompt);
void status_bar_clear_prompt(void);
void status_bar_set_fulljid(const char *const fulljid);
void status_bar_clear_fulljid(void);
void status_bar_current(int i);

#endif
;vc@akkartik.com> 2018-12-02 12:49:15 -0800 committer Kartik Agaram <vc@akkartik.com> 2018-12-02 13:09:23 -0800 4816' href='/akkartik/mu/commit/subx/subx.vim?h=main&id=39d718afcff131abf9c12f89357e7e387d7892d5'>39d718af ^
cbe5bec6 ^
39d718af ^
cbe5bec6 ^
39d718af ^
521ff2f1 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54


                                              
                                             












                                                                             

                     

                                                                                              

                                                                                       

                                                                           
 
                


                                                                                        
 
               
                                                                               
 
                                                                      

              
                                            


                                                                                               

                                                                         
 
                                                        
                                                                                                 
                             
                                                                           
                                      
                                                                                         
                                         
                                                                             
 
                     
" SubX syntax file
" Language:    SubX
" Maintainer:  Kartik Agaram <mu@akkartik.com>
" URL:         https://github.com/akkartik/mu
" License:     public domain
"
" Copy this into your ftplugin directory, and add the following to your vimrc
" or to .vim/ftdetect/subx.vim:
"   autocmd BufReadPost,BufNewFile *.subx set filetype=subx

let s:save_cpo = &cpo
set cpo&vim

" setlocal iskeyword=@,48-57,?,!,_,$,-
setlocal formatoptions-=t  " allow long lines
setlocal formatoptions+=c  " but comments should still wrap

setlocal iskeyword+=-

"? syntax match subxComment /#.*$/  | highlight link subxComment Comment
"? syntax match subxSalientComment /##.*$/  | highlight link subxSalientComment SalientComment
syntax match subxH1Comment /# -.*/ | highlight subxH1Comment ctermfg=14
syntax match subxComment /#[^ ].*\|# [^.-].*\|# \?$/ | highlight subxComment ctermfg=39
syntax match subxS1Comment /# \..*/ | highlight subxS1Comment ctermfg=27
syntax match subxS2Comment /# \. \..*/ | highlight subxS2Comment ctermfg=19

set comments-=:#
set comments+=n:#
syntax match subxCommentedCode "#? .*"  | highlight link subxCommentedCode CommentedCode
let b:cmt_head = "#? "

" comment token
syntax match subxDelimiter / \. /  | highlight link subxDelimiter CommentedCode

syntax match subxString %"[^"]*"% | highlight link subxString Constant

"" definitions
" match globals but not registers like 'EAX'
" don't match capitalized words in metadata
" don't match inside strings
syntax match subxGlobal %\(/\)\@<!\<[A-Z][a-z0-9_-]*\>% | highlight link subxGlobal SpecialChar
" tweak the red color from the colorscheme just a tad to improve contrast
highlight SpecialChar ctermfg=196

" functions but not tests, globals or internal functions
syntax match subxFunction "^\(test_\)\@<![a-z][^ ]*\(:\)\@=" | highlight subxFunction ctermfg=208
" tests starting with 'test-'
syntax match subxTest "^test-[^ ]*\(:\)\@=" | highlight subxTest ctermfg=34
" internal functions starting with '_'
syntax match subxMinorFunction "^_[^ ]*\(:\)\@=" | highlight subxMinorFunction ctermfg=95
" other internal labels starting with '$'
syntax match subxLabel "^\$[^ ]*\(:\)\@=" | highlight link subxLabel Constant

let &cpo = s:save_cpo