Skip to content

Commit

Permalink
Add manpage (#159)
Browse files Browse the repository at this point in the history
* Add manpage

This generates a manpage via scdoc, which has a markdown-like
syntax, has no additional dependencies and is available in
many distros already.

fixes #63
  • Loading branch information
Cogitri authored Oct 3, 2020
1 parent 20c2acf commit 6cb0cc9
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
30 changes: 30 additions & 0 deletions data/man/vala-language-server.1.scd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
vala-language-server(1)

# NAME

vala-language-server - Code Intelligence for Vala and Genie.

# SYNOPSIS

*vala-language-server*

# DESCRIPTION

vala-language-server is a language server protocol implementation for Vala
and Genie. It enables features like auto-complete, go-to-definition,
hover, symbol documentation, and more for editors/plugins supporting Vala
and the Language Server Protocol.

# ENVIRONMENT

Users may set the *G_MESSAGES_DEBUG=all* environment variable when launching
vala-language-server to enable debugging output.

# BUGS

Please file bugs at https://github.com/benwaffle/vala-language-server

# AUTHOR

Ben Iofel <[email protected]>++
Princeton Ferro <[email protected]>
28 changes: 28 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man_pages'))
if scdoc.found()
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
sh = find_program('sh', native: true)
mandir = get_option('mandir')
man_files = [
'man/vala-language-server.1.scd',
]
foreach filename : man_files
topic = filename.split('.')[-3].split('/')[-1]
if topic.contains('_')
topic = topic.split('_')[0] + '.' + topic.split('_')[1]
endif
section = filename.split('.')[-2]
output = '@0@.@1@'.format(topic, section)

custom_target(
output,
input: filename,
output: output,
command: [
sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), meson.current_build_dir() / output)
],
install: true,
install_dir: '@0@/man@1@'.format(mandir, section)
)
endforeach
endif
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ else
deps += dependency('gio-unix-2.0')
endif

subdir('data')
subdir('plugins/gnome-builder')
subdir('src')
subdir('test')
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ option('parse_system_girs', type: 'boolean', value: true, description: 'Parse sy
option('active_parameter', type: 'boolean', value: false, description: 'Support activeParameter in signatureHelp')
option('debug_mem', type: 'boolean', value: false, description: 'Debug memory usage')
option('builder_abi', type: 'string', value: '3.36', description: 'Builder ABI version')
option('man_pages', type: 'feature', value: 'auto', description: 'Generate and install man pages.')

0 comments on commit 6cb0cc9

Please sign in to comment.