1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-09 09:50:06 +08:00

Add option for setting todo labels (#3362)

This commit is contained in:
Wang Shidong 2020-02-19 18:47:38 +08:00 committed by GitHub
parent b42ddf7129
commit 805ded92ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View File

@ -965,6 +965,10 @@ let g:spacevim_project_rooter_automatically = 1
" Config the command line prompt for flygrep and denite etc. " Config the command line prompt for flygrep and denite etc.
let g:spacevim_commandline_prompt = '➭' let g:spacevim_commandline_prompt = '➭'
""
" Option for setting todo labels in current project.
let g:spacevim_todo_labels = map(['fixme', 'question', 'todo', 'idea'], '"@" . v:val')
"" ""
" @section lint_on_the_fly, options-lint_on_the_fly " @section lint_on_the_fly, options-lint_on_the_fly
" @parentsection options " @parentsection options

View File

@ -10,8 +10,6 @@ let s:JOB = SpaceVim#api#import('job')
let s:BUFFER = SpaceVim#api#import('vim#buffer') let s:BUFFER = SpaceVim#api#import('vim#buffer')
let s:SYS = SpaceVim#api#import('system') let s:SYS = SpaceVim#api#import('system')
" @question any other recommanded tag?
let s:labels = map(['fixme', 'question', 'todo', 'idea'], '"@" . v:val')
let [ let [
\ s:grep_default_exe, \ s:grep_default_exe,
@ -56,6 +54,13 @@ endfunction
" @todo Improve todo manager " @todo Improve todo manager
function! s:update_todo_content() abort function! s:update_todo_content() abort
if exists('g:spacevim_todo_labels')
\ && type(g:spacevim_todo_labels) == type([])
\ && !empty(g:spacevim_todo_labels)
let s:labels = g:spacevim_todo_labels
else
let s:labels = map(['fixme', 'question', 'todo', 'idea'], '"@" . v:val')
endif
let s:todos = [] let s:todos = []
let s:todo = {} let s:todo = {}
let argv = [s:grep_default_exe] + let argv = [s:grep_default_exe] +

View File

@ -1068,6 +1068,9 @@ Enable/Disable changing directory automatically. Enabled by default.
*g:spacevim_commandline_prompt* *g:spacevim_commandline_prompt*
Config the command line prompt for flygrep and denite etc. Config the command line prompt for flygrep and denite etc.
*g:spacevim_todo_labels*
Option for setting todo labels in current project.
*g:spacevim_lint_on_the_fly* *g:spacevim_lint_on_the_fly*
Enable/Disable lint on the fly feature of SpaceVim's maker. Default is 0. Enable/Disable lint on the fly feature of SpaceVim's maker. Default is 0.
> >