npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vscode-markdown-languageserver

v0.5.0-alpha.9

Published

The language server that powers VS Code's Markdown support

Downloads

20,829

Readme

Markdown Language Server

❗ Import This is still in development. While the language server is being used by VS Code, it has not yet been tested with other clients.

The Markdown language server powers VS Code's built-in markdown support, providing tools for writing and browsing Markdown files. It runs as a separate executable and implements the language server protocol.

This server uses the Markdown Language Service to implement almost all of the language features. You can use that library if you need a library for working with Markdown instead of a full language server.

Server capabilities

  • Completions for Markdown links.

  • Folding of Markdown regions, block elements, and header sections.

  • Smart selection for inline elements, block elements, and header sections.

  • Document Symbols for quick navigation to headers in a document.

  • Workspace Symbols for quick navigation to headers in the workspace

  • Document links for making Markdown links in a document clickable.

  • Find all references to headers and links across all Markdown files in the workspace.

  • Go to definition from links to headers or link definitions.

  • Rename of headers and links across all Markdown files in the workspace.

  • Find all references to a file. Uses a custom markdown/getReferencesToFileInWorkspace message.

  • Code Actions

    • Organize link definitions source action.
    • Extract link to definition refactoring.
  • Updating links when a file is moved / renamed. Uses a custom markdown/getEditForFileRenames message.

  • Pull diagnostics (validation) for links.

Client requirements

Initialization options

The client can send the following initialization options to the server:

  • markdownFileExtensions Array file extensions that should be considered as Markdown. These should not include the leading .. For example: ['md', 'mdown', 'markdown'].

Settings

Clients may send a workspace/didChangeConfiguration notification to notify the server of settings changes. The server supports the following settings:

  • markdown
    • suggest

      • paths
        • enabled — Enable/disable path suggestions.
    • occurrencesHighlight

      • enabled — Enable/disable highlighting of link occurrences.
    • validate

      • enabled — Enable/disable all validation.
      • referenceLinks
        • enabled — Enable/disable validation of reference links: [text][ref]
      • fragmentLinks
        • enabled — Enable/disable validation of links to fragments in the current files: [text](#head)
      • fileLinks
        • enabled — Enable/disable validation of links to file in the workspace.
        • markdownFragmentLinks — Enable/disable validation of links to headers in other Markdown files. Use inherit to inherit the fragmentLinks setting.
      • ignoredLinks — Array of glob patterns for files that should not be validated.
      • unusedLinkDefinitions
        • enabled — Enable/disable validation of unused link definitions.
      • duplicateLinkDefinitions
        • enabled — Enable/disable validation of duplicated link definitions.

Custom requests

To support all of the features of the language server, the client needs to implement a few custom request types. The definitions of these request types can be found in protocol.ts

markdown/parse

Get the tokens for a Markdown file. Clients are expected to use Markdown-it for this.

We require that clients bring their own version of Markdown-it so that they can customize/extend Markdown-it.

markdown/fs/readFile

Read the contents of a file in the workspace.

markdown/fs/readDirectory

Read the contents of a directory in the workspace.

markdown/fs/stat

Check if a given file/directory exists in the workspace.

markdown/fs/watcher/create

Create a file watcher. This is needed for diagnostics support.

markdown/fs/watcher/delete

Delete a previously created file watcher.

markdown/findMarkdownFilesInWorkspace

Get a list of all markdown files in the workspace.

Contribute

The source code of the Markdown language server can be found in the VSCode repository at extensions/markdown-language-features/server.

File issues and pull requests in the VSCode GitHub Issues. See the document How to Contribute on how to build and run from source.

Most of the functionality of the server is located in libraries:

Help on any of these projects is very welcome.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.