API Blueprint Language ServerThis is a VS Code extension that brings a Language Server support for API Blueprint. It adheres to the Language Server Protocol and allows to enhance developer experience when creating and editing API Blueprint documentation in code editors and IDEs. RationaleThough API Blueprint is based on Markdown, the semantics totally differs from Markdown. Where in Markdown are sections and titles, in API Blueprint they mean data structures and custom types. It's easy to misspell the name of a custom data type or get lost among a large number of documentation files. To help developers with the completion of structure names, navigation between document sections, and other handy stuff, we created this implementation of Language Server. Supported capabilities
Package structure
Installation in VS CodeBuild extension from source
Download from marketplaceVS Code extension is currently unavailable in marketplace. Installation in JetBrains IDEs (WebStorm, PhpStorm, etc)Add support for Language Server ProtocolTo activate LS support install plugin LSP Support. The last published version (1.6.1) is quite unstable, and development is suspended for a time. It is recommended to install version 1.6.0. Installation:
After successful installation, LSP.zip can be deleted. Setup LSP Support pluginTo perform required preparations navigate to Preferences → Languages & Frameworks → Language Server Protocol → Server Definitions. Apply next settings:
You can also setup LS globally as an executable file. To do that run After that, change value in the Path field to Important notice. After any change, it is recommended to restart IDE. Editing of a multi-file documentationIt is common for API documentation to be split into multiple files. Therefore, a developer can define data structures in one file and use them in another file. In that case, the extension requires the root file to know where to start. Otherwise, the extension could not realize which data structures are valid and which are not. By default, the extension assumes that the root file is called When the name of the root file differs from If, for some reason, error highlighting is not working, check if the current file is imported directly in the project root or indirectly. Development guideLaunch in dev mode in VS Code
You can launch client and server at once and select DebuggingTo debug server part of the extension breakpoints and logging techniques are applicable. For logging use Public version bundlingBefore publishing the extension, source files need to be bundled (there is one bundle for To compile minified bundle (as the one that will be shipped with the published extension), run Besides that, you can check a list of actual files to be published. To print the list, run CreditsAwesome logo for the project was made by Igor Garybaldi. |