Giter Club home page Giter Club logo

docfx-assistant's Introduction

DocFX assistant

An extension for VS Code that provides tools for authoring content using Microsoft DocFX.

DocFX Assistant in action

I'm planning to eventually contribute this functionality to Microsoft's official DocFX extension, but you're welcome to use this in the meanwhile.

Usage

When you're editing Markdown or YAML and the workspace contains a DocFX project, type @ or press ctrl+space to invoke the completion provider and bring up a pick-list of available topic UIDs.

It will also underline inline-style and (@xxx) and XRef-style (<xref:xxx>) links for UIDs into hyperlinks pointing to the documents where they are defined. If a link is not underlined, then it points to a non-existent topic.

To refresh the list of available topics, use the "DocFX: Refresh topic UIDs" command.

Installation

You can install this extension from the Visual Studio Marketplace.

Notes

This extension uses docfx-project to work with DocFX projects and their content files.

Unless configured otherwise, it will automatically start scanning and updating in the background as soon as it starts (or you open a workspace with docfx.json in the root directory). Note that if your docfx.json file is in a sub-folder, the extension will not activate until you first invoke one of its commands.

You may want to exclude /.vscode/docfx-assistant from source control (sorry, we can't do this automatically).

Questions / bug reports

If you have questions, feature requests, or would like to report a bug, please feel free to reach out by creating an issue. When reporting a bug, please try to include as much information as possible about what you were doing at the time, what you expected to happen, and what actually happened.

If you're interested in collaborating that'd be great, too :-)

docfx-assistant's People

Contributors

tintoy avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

docfx-assistant's Issues

Implement a language server

VSCode's a bit unreliable when it comes to file-change notifications (and our use of Chokidar to overcome this tends to make the environment unstable when there are lots of changes close together - e.g. during a build). Additionally, the requirements for interpreting Markdown are getting more complex as time goes on so it may be worth building a language server using .NET Core and moving most of the logic in there.

I've already done something similar in another extension, so hopefully we can just reuse that.

Extension should cache topic metadata in workspace-specific files

VS Code's workspace state API discards large values; we'll therefore store the cache ourselves in .vscode/docfx-assistant/topic-cache.json.

Later, we could store and compare content file timestamps to invalidate entries in the cache but for now that's probably more expensive, in terms of complexity, than it's worth.

Preparation for merge with official DocFX extension

  • Decouple DocFX-specific functionality from anything that depends on VS Code (e.g. use of Rx observables to avoid coupling to vscode.FileSystemWatcher, calls to vscode.window.showXXXMessage, etc)
  • Move DocFX-specific functionality into a separate package
  • Add tests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.