rc: Document non-hidden options with -docstring

This commit is contained in:
Frank LENORMAND 2017-05-16 14:35:43 +03:00
parent 3a0d9481ac
commit b9cdccd53a
16 changed files with 65 additions and 38 deletions

View File

@ -1,11 +1,12 @@
# Maximum amount of characters per line decl -docstring "maximum amount of characters per line, after which a newline character will be inserted" \
decl int autowrap_column 80 int autowrap_column 80
# If enabled, paragraph formatting will reformat the whole paragraph in which characters are being inserted decl -docstring %{when enabled, paragraph formatting will reformat the whole paragraph in which characters are being inserted
# This can potentially break formatting of documents containing markup (e.g. markdown) This can potentially break formatting of documents containing markup (e.g. markdown)} \
decl bool autowrap_format_paragraph no bool autowrap_format_paragraph no
# Command to which the paragraphs to wrap will be passed, all occurences of '%c' are replaced with `autowrap_column` decl -docstring %{command to which the paragraphs to wrap will be passed
decl str autowrap_fmtcmd 'fold -s -w %c' all occurences of '%c' are replaced with `autowrap_column`} \
str autowrap_fmtcmd 'fold -s -w %c'
def -hidden autowrap-cursor %{ eval -save-regs '/"|^@m' %{ def -hidden autowrap-cursor %{ eval -save-regs '/"|^@m' %{
try %{ try %{

View File

@ -3,7 +3,8 @@
# This script requires the readtags command available in ctags source but # This script requires the readtags command available in ctags source but
# not installed by default # not installed by default
decl str-list ctagsfiles 'tags' decl -docstring "colon separated list of paths to tag files to parse when looking up a symbol" \
str-list ctagsfiles 'tags'
def -params ..1 \ def -params ..1 \
-shell-candidates ' -shell-candidates '
@ -72,8 +73,9 @@ def ctags-enable-autoinfo -docstring "Automatically display ctags information ab
def ctags-disable-autoinfo -docstring "Disable automatic ctags information displaying" %{ remove-hooks window ctags-autoinfo } def ctags-disable-autoinfo -docstring "Disable automatic ctags information displaying" %{ remove-hooks window ctags-autoinfo }
decl str ctagsopts "-R" decl -docstring "options to pass to the `ctags` shell command" \
decl str ctagspaths "." str ctagsopts "-R"
decl -docstring "path to the directory in which the tags file will be generated" str ctagspaths "."
def ctags-generate -docstring 'Generate tag file asynchronously' %{ def ctags-generate -docstring 'Generate tag file asynchronously' %{
echo -color Information "launching tag generation in the background" echo -color Information "launching tag generation in the background"

View File

@ -1,6 +1,7 @@
# your linter should output in this format: decl -docstring %{shell command to which the path of a copy of the current buffer will be passed
# {filename}:{line}:{column}: {kind}: {message} The output returned by this command is expected to comply with the following format:
decl str lintcmd {filename}:{line}:{column}: {kind}: {message}} \
str lintcmd
decl -hidden line-flags lint_flags decl -hidden line-flags lint_flags
decl -hidden str lint_errors decl -hidden str lint_errors

View File

@ -1,6 +1,8 @@
# termcmd should be set such as the next argument is the whole # termcmd should be set such as the next argument is the whole
# command line to execute # command line to execute
decl str termcmd %sh{ decl -docstring %{shell command run to spawn a new terminal
A shell command is appended to the one set in this option at runtime} \
str termcmd %sh{
for termcmd in 'termite -e ' \ for termcmd in 'termite -e ' \
'urxvt -e sh -c' \ 'urxvt -e sh -c' \
'rxvt -e sh -c' \ 'rxvt -e sh -c' \

View File

@ -266,7 +266,12 @@ hook -group cpp-highlight global WinSetOption filetype=(?!cpp$).* %[ remove-high
hook -group objc-highlight global WinSetOption filetype=objc %[ add-highlighter ref objc ] hook -group objc-highlight global WinSetOption filetype=objc %[ add-highlighter ref objc ]
hook -group objc-highlight global WinSetOption filetype=(?!objc$).* %[ remove-highlighter objc ] hook -group objc-highlight global WinSetOption filetype=(?!objc$).* %[ remove-highlighter objc ]
decl str c_include_guard_style "ifdef" decl -docstring %{control the type of include guard to be inserted in empty headers
Can be one of the following:
ifdef: old style ifndef/define guard
pragma: newer type of guard using "pragma once"} \
str c_include_guard_style "ifdef"
def -hidden c-family-insert-include-guards %{ def -hidden c-family-insert-include-guards %{
%sh{ %sh{
case "${kak_opt_c_include_guard_style}" in case "${kak_opt_c_include_guard_style}" in
@ -283,7 +288,8 @@ def -hidden c-family-insert-include-guards %{
hook global BufNewFile .*\.(h|hh|hpp|hxx|H) c-family-insert-include-guards hook global BufNewFile .*\.(h|hh|hpp|hxx|H) c-family-insert-include-guards
decl str-list alt_dirs ".;.." decl -docstring "semi-colon separated list of path in which header files will be looked for" \
str-list alt_dirs ".;.."
def c-family-alternative-file -docstring "Jump to the alternate file (header/implementation)" %{ %sh{ def c-family-alternative-file -docstring "Jump to the alternate file (header/implementation)" %{ %sh{
alt_dirs=$(printf %s\\n "${kak_opt_alt_dirs}" | sed -e 's/;/ /g') alt_dirs=$(printf %s\\n "${kak_opt_alt_dirs}" | sed -e 's/;/ /g')

View File

@ -1,8 +1,10 @@
## Line comments ## Line comments
decl str comment_line '#' decl -docstring "characters inserted at the beginning of a commented line" \
str comment_line '#'
## Block comments ## Block comments
decl str-list comment_block decl -docstring "colon separated tuple containing the characters inserted before/after a commented line" \
str-list comment_block
## Default comments for all languages ## Default comments for all languages
hook global BufSetOption filetype=asciidoc %{ hook global BufSetOption filetype=asciidoc %{

View File

@ -1,4 +1,5 @@
decl str docsclient decl -docstring "name of the client in which documentation is to be displayed" \
str docsclient
def -hidden -params 1..2 doc-open %{ def -hidden -params 1..2 doc-open %{
%sh{ %sh{

View File

@ -1,4 +1,6 @@
decl str formatcmd "" decl -docstring "shell command to which the contents of the current buffer is piped" \
str formatcmd
def format -docstring "Format the contents of the current buffer" %{ def format -docstring "Format the contents of the current buffer" %{
%sh{ %sh{
if [ ! -z "${kak_opt_formatcmd}" ]; then if [ ! -z "${kak_opt_formatcmd}" ]; then

View File

@ -1,5 +1,7 @@
decl str grepcmd 'grep -RHn' decl -docstring "shell command run to search for subtext in a file/directory" \
decl str toolsclient str grepcmd 'grep -RHn'
decl -docstring "name of the client in which utilities display information" \
str toolsclient
decl -hidden int _grep_current_line 0 decl -hidden int _grep_current_line 0
def -params .. -file-completion \ def -params .. -file-completion \
@ -41,7 +43,8 @@ hook global WinSetOption filetype=(?!grep).* %{
remove-hooks buffer grep-hooks remove-hooks buffer grep-hooks
} }
decl str jumpclient decl -docstring "name of the client in which all source code jumps will be executed" \
str jumpclient
def -hidden grep-jump %{ def -hidden grep-jump %{
eval -collapse-jumps %{ eval -collapse-jumps %{

View File

@ -1,7 +1,10 @@
decl str makecmd make decl -docstring "shell command run to build the project" \
decl str make_error_pattern " (?:fatal )?error:" str makecmd make
decl -docstring "pattern that describes lines containing information about errors in the output of the `makecmd` command" \
str make_error_pattern " (?:fatal )?error:"
decl str toolsclient decl -docstring "name of the client in which utilities display information" \
str toolsclient
decl -hidden int make_current_error_line decl -hidden int make_current_error_line
def -params .. \ def -params .. \
@ -40,7 +43,8 @@ hook global WinSetOption filetype=(?!make).* %{
remove-hooks buffer make-hooks remove-hooks buffer make-hooks
} }
decl str jumpclient decl -docstring "name of the client in which all source code jumps will be executed" \
str jumpclient
def -hidden make-jump %{ def -hidden make-jump %{
eval -collapse-jumps %{ eval -collapse-jumps %{

View File

@ -1,4 +1,5 @@
decl str docsclient decl -docstring "name of the client in which documentation is to be displayed" \
str docsclient
decl -hidden str _manpage decl -hidden str _manpage

View File

@ -1,5 +1,5 @@
## If set to true, backups will be removed as soon as they have been restored decl -docstring "remove backups once they've been restored" \
decl bool autorestore_purge_restored true bool autorestore_purge_restored true
## Insert the content of the backup file into the current buffer, if a suitable one is found ## Insert the content of the backup file into the current buffer, if a suitable one is found
def autorestore-restore-buffer -docstring "Restore the backup for the current file if it exists" %{ def autorestore-restore-buffer -docstring "Restore the backup for the current file if it exists" %{

View File

@ -1,4 +1,5 @@
decl str clang_options decl -docstring "options to pass to the `clang` shell command" \
str clang_options
decl -hidden str clang_tmp_dir decl -hidden str clang_tmp_dir
decl -hidden completions clang_completions decl -hidden completions clang_completions

View File

@ -1,4 +1,5 @@
decl str docsclient decl -docstring "name of the client in which documentation is to be displayed" \
str docsclient
hook -group git-log-highlight global WinSetOption filetype=git-log %{ hook -group git-log-highlight global WinSetOption filetype=git-log %{
add-highlighter group git-log-highlight add-highlighter group git-log-highlight
@ -16,8 +17,8 @@ hook -group git-status-highlight global WinSetOption filetype=git-status %{
hook -group git-status-highlight global WinSetOption filetype=(?!git-status).* %{ remove-highlighter git-status-highlight } hook -group git-status-highlight global WinSetOption filetype=(?!git-status).* %{ remove-highlighter git-status-highlight }
decl line-flags git_blame_flags decl -hidden line-flags git_blame_flags
decl line-flags git_diff_flags decl -hidden line-flags git_diff_flags
face GitBlame default,magenta face GitBlame default,magenta
face GitDiffFlags default,black face GitDiffFlags default,black

View File

@ -1,6 +1,7 @@
decl -hidden str jedi_tmp_dir decl -hidden str jedi_tmp_dir
decl -hidden completions jedi_completions decl -hidden completions jedi_completions
decl str-list jedi_python_path '' decl -docstring "colon separated list of path added to `python`'s $PYTHONPATH environment variable" \
str-list jedi_python_path
def jedi-complete -docstring "Complete the current selection" %{ def jedi-complete -docstring "Complete the current selection" %{
%sh{ %sh{

View File

@ -7,9 +7,8 @@
## Only a few options are supported, in order to prevent the ## Only a few options are supported, in order to prevent the
## buffers from poking around the configuration too much ## buffers from poking around the configuration too much
# Amount of additional lines that will be checked at the beginning decl -docstring "amount of lines that will be checked at the beginning and the end of the buffer" \
# and the end of the buffer int modelines 5
decl int modelines 5
def -hidden modeline-parse-impl %{ def -hidden modeline-parse-impl %{
%sh{ %sh{