-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
INTRODUCTION | ||
============ | ||
|
||
Dutyl operate various Dlang tools to help you program D in Vim. Instead of | ||
having a separate plugin for each tool, Dutyl can use multiple plugins and | ||
use them together - for example, use DUB to get a list of import paths the | ||
project is using and pass that list to DCD to get autocompleting for symbols | ||
that come from libraries. Dutyl has a module(/plugin) system that allows tools | ||
to back up each other - so for example if a project doesn't use DUB, Dutyl can | ||
back up reading the import paths from a static configuration file. | ||
|
||
Currently supported features: | ||
|
||
* Getting the imports list from DUB or from a configuration file | ||
* Autocompletion using DCD | ||
* Finding DDoc using DCD | ||
|
||
|
||
REQUIREMENTS | ||
============ | ||
|
||
Dutyl requires the tools that it uses. If you want it to use DUB to get info | ||
about the project, you need [DUB](http://code.dlang.org/download). If you want | ||
it to use DCD for autocompletion, you need | ||
[DCD](https://github.com/Hackerpilot/DCD). | ||
|
||
|
||
CONFIGURATION | ||
============= | ||
|
||
Use `g:dutyl_stdImportPaths` to specify the standard library import paths. | ||
```vim | ||
let g:dutyl_stdImportPaths=['/usr/include/dlang/dmd'] | ||
``` | ||
You must either set `g:dutyl_stdImportPaths` or configure these paths in DCD | ||
itself, or else DCD won't be able to recognize standard library symbols. | ||
|
||
If you want to never add the closing paren in calltips completions, set | ||
`g:dutyl_neverAddClosingParen` to 1: | ||
```vim | ||
let g:dutyl_neverAddClosingParen=1 | ||
``` | ||
|
||
Dutyl will assume that tools are in the system's PATH. If they are not, you'll | ||
have to supply the path for them using `dutyl#register#tool` like so: | ||
```vim | ||
call dutyl#register#tool('dcd-client','/path/to/DCD/dcd-client') | ||
call dutyl#register#tool('dcd-server','/path/to/DCD/dcd-server') | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
*dutyl.txt* | ||
|
||
|
||
Author: Idan Arye <https://github.com/idanarye/> | ||
License: Same terms as Vim itself (see |license|) | ||
|
||
Version: 1.0.0 | ||
|
||
INTRODUCTION *dutyl* | ||
|
||
Dutyl operate various Dlang tools to help you program D in Vim. Instead of | ||
having a separate plugin for each tool, Dutyl can use multiple plugins and | ||
use them together - for example, use DUB to get a list of import paths the | ||
project is using and pass that list to DCD to get autocompleting for symbols | ||
that come from libraries. Dutyl has a module(/plugin) system that allows tools | ||
to back up each other - so for example if a project doesn't use DUB, Dutyl can | ||
back up reading the import paths from a static configuration file. | ||
|
||
Currently supported features: | ||
|
||
* Getting the imports list from DUB or from a configuration file | ||
* Autocompletion using DCD | ||
* Finding DDoc using DCD | ||
|
||
|
||
REQUIREMENTS *dutyl-requirements* | ||
|
||
Dutyl requires the tools that it uses. If you want it to use DUB to get info | ||
about the project, you need DUB(http://code.dlang.org/download). If you want | ||
it to use DCD for autocompletion, you need | ||
DCD(https://github.com/Hackerpilot/DCD). | ||
|
||
|
||
CONFIGURATION *dutyl-configuration* | ||
|
||
Use *g:dutyl_stdImportPaths* to specify the standard library import paths. | ||
Example: > | ||
let g:dutyl_stdImportPaths=['/usr/include/dlang/dmd'] | ||
< | ||
You must either set g:dutyl_stdImportPaths or configure these paths in DCD | ||
itself, or else DCD won't be able to recognize standard library symbols. | ||
|
||
If you want to never add the closing paren in calltips completions, set | ||
g:dutyl_neverAddClosingParen to 1: > | ||
let g:dutyl_neverAddClosingParen=1 | ||
< | ||
Dutyl will assume that tools are in the system's PATH. If they are not, you'll | ||
have to supply the path for them using *dutyl#register#tool* like so: > | ||
call dutyl#register#tool('dcd-client','/path/to/DCD/dcd-client') | ||
call dutyl#register#tool('dcd-server','/path/to/DCD/dcd-server') | ||
< | ||
|
||
|
||
DCD SERVER *dutyl-dcd-server* | ||
|
||
Dutyl can not use DCD if the DCD server is not running. To start the DCD | ||
server, use |:DUDCDstartServer|. To stop it, use |:DUDCDstopServer| | ||
|
||
|
||
CONFIG FILE *dutyl-config-file* | ||
|
||
The config file contains information about the project, and is useful when | ||
that information can not be gathered automatically from DUB(usually because | ||
it's not a DUB project). | ||
|
||
The config file is named ".dutyl.configFile" and it is a serialization of a | ||
Vim |Dictionary|. | ||
|
||
The config file can contain a list of import paths for the project. The source | ||
code of the project must be one of them - Dutyl won't guess for you whether or | ||
not you are using a dedicated folder for the source files and what's it's | ||
name. To edit that list, run |:DUConfigFileEditImportPaths|. It'll open buffer | ||
where you write each import path in a separate line and when you save that | ||
buffer it'll be written to the config file. | ||
|
||
|
||
AUTOCOMPLETE *dutyl-autocomplete* | ||
|
||
Autocomplete requires DCD(see |dutyl-dcd-server|) and either DUB or a config | ||
file. | ||
|
||
The autocomplete omnifunc is set automatically when you edit a D source file. | ||
|
||
|
||
DDOC-PRINTING *dutyl-ddoc-printing* | ||
|
||
DDoc printing requires DCD(see |dutyl-dcd-server|) and either DUB or a config | ||
file. | ||
|
||
Place the cursor on that symbol and run *:DUddoc* to print all DDocs | ||
associated with that symbol. |