@evches/raml-suggestions
v0.0.31
Published
[](https://travis-ci.org/raml-org/raml-suggestions)
Readme
RAML Suggestions (beta)
This module provides auto-completion suggestions for RAML. See http://raml.org for more information about RAML.
Usage
Implement IEditorStateProvider interface to create editor state provider
getTextmethod should return text of the document opened in the editorgetPathmethod should return full path to the document opened in the editorgetBaseNamemethod should return file name of the document opened in the editorgetOffsetmethod should return editor cursor offset
Implement IFSProvider interface to create File System data provider.
contentDirNamemethod should return directory name of the file, opened in the specific editordirNamemethod should directory name by full pathexistsmethod should check whether an item exists by full pathresolvemethod should resolves one path against anotherisDirectorymethod should check whether the path points to a directoryreadDirmethod should return return directory content list
Set default IEditorStateProvider and IFSProvider using setDefaultEditorStateProvider and setDefaultFSProvider methods.
Call suggestDefault method to get default suggestions list using default providers or call suggest method taking IEditorStateProvider and IFSProvider as arguments.
Suggestions are categorized (optional field "category" in suggestion) as described in "resources/categories.json" file.
