Skip to content

Repository files navigation

VS Code textlint extension

integration-tests

📢 IMPORTANT NOTICE 📢

This extension is the community-based maintenance version under the textlint organization. It has been transferred for continued maintenance and development. For more details, please refer to https://github.com/orgs/textlint/discussions/2.

Integrates textlint into VS Code. If you are new to textlint, check the documentation.

hover

codeaction

Installation

  1. Visit textlint - Visual Studio Marketplace
  2. Click the "Install" button

The extension uses the textlint library installed in the opened workspace folder. If the folder doesn't provide one, the extension looks for a global install version. If you haven't installed textlint either locally or globally, you can do so by running npm install textlint in the workspace folder for a local install or npm install -g textlint for a global install.

When working with new projects, you might need to create a .textlintrc configuration file. You can do this by either running textlint --init in a terminal or by using the VS Code command Create '.textlintrc' file.

Settings options

  • editor.codeActionsOnSave

    • To fix textlint errors automatically when explicitly saving a file, add the following to your VS Code settings:

      {
        "editor.codeActionsOnSave": {
          "source.fixAll.textlint": "explicit"
        }
      }
  • textlint.run

    • Controls when the linter runs. Options: onSave or onType. Default: onSave.
  • textlint.nodePath

    • Use this setting if an installed textlint package can't be detected, for example /myGlobalNodePackages/node_modules.
  • textlint.trace

    • Traces the communication between VS Code and the textlint linter service.
  • textlint.configPath

    • Absolute path to textlint config file.
    • Workspace settings take priority over this setting.
  • textlint.ignorePath

    • Absolute path to textlint ignore file.
    • See here for more information about ignore files.
  • textlint.targetPath

    • A glob pattern relative to the workspace folder that selects files to lint. Leave empty to lint all supported files.
  • textlint.languages

    • Languages to lint with textlint.

Commands

This extension contributes the following commands to the Command palette:

  • Create '.textlintrc' File
    • Creates a new .textlintrc configuration file in your workspace.
  • Fix all auto-fixable Problems
    • Applies textlint auto-fix resolutions to all fixable problems in the current document.

Release notes

0.13.0

  • Dropped support for textlint v12, requiring textlint v13 or later (#39)
  • Required VS Code 1.91 or later
  • Added language associations for .textlintrc.json and .textlintignore files (#28)
  • Fixed a server crash when no workspace folder is open (#33)
    • Thanks to @314systems
  • Removed redundant rule IDs from diagnostic messages (#32)
    • Thanks to @314systems

0.12.0

  • Changed notification level from ERROR to WARN when executable file is not found (#6)
    • Thanks to @azu
  • Improved .textlintignore support using linter.scanFilePath() API (#7)
    • Thanks to @frozenbonito
  • Enabled to emit activation events on all language files (#8)
    • Thanks to @iku12phycho

0.11.0

  • Fixed highlight range issue
    • Thanks to @Yuiki

0.10.0

  • Added VS Code workspace support
  • Prepared for web-extension

0.9.0

  • Added .textlintignore support
    • Thanks to @frozenbonito

0.8.0

  • Added option to choose languages and improved positioning of highlighted text
    • Thanks to @linhtto

0.7.0

  • Added target path support
    • Thanks to @bells17

0.6.8

  • Changed default value of textlint.run to onSave
  • Added Azure Pipelines for CI testing

0.6.5

0.5.0

  • Added configPath to configuration. Recommend to use your user settings

0.4.0

  • Added ability to read configuration file from HOME directory
    • If you want to use global configuration, you should install textlint and plugins globally

0.3.0

  • Updated runtime dependencies

0.2.3

  • Added a tracing option

0.2.2

  • Fixed various bugs

0.2.1

  • Added progress notification to StatusBar

0.2.0

  • Added support for fixing errors

0.1.0

  • Initial Release

Acknowledgements

This project was originally created as taichi/vscode-textlint.

Since v0.12.0, it has been transferred to the textlint organization for continued maintenance and development.

We'd like to express our gratitude to @taichi and all contributors. For more details, please see github.com/orgs/textlint/discussions/2.

The MIT License from the upstream repository continues to be honored and upheld.

Contributing

See the contributing guide for development setup and release process.

About

Extension to integrate textlint into VS Code.

Topics

Resources

Contributing

Security policy

Stars

44 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages