VSCode Integration

EkLine flags any style guide violations in your company's documentation with Visual Studio Code diagnostics. It offers immediate feedback, facilitating consistency in your documentation.

Prerequisites

You need an EkLine integration token to use this extension. Visit the EkLine dashboard and click View Integration Token to obtain one.

Getting started

Installation

To install the VSCode extension from the web, follow these steps:

  1. Visit the EkLine Extension Page on VSCode Marketplace.
  2. Click Install.
  3. Open Visual Studio Code when prompted.

Alternately, to install the VSCode extension from within VSCode:

  1. Open Visual Studio Code.
  2. Click on the Extensions icon in the Activity Bar on the side of the window to access the Extensions view.
  3. Type "EkLine" in the Extensions view search box.
  4. Click the "Install" button next to the extension with the same name.

Configure EkLine linter

When you first install the VSCode extension, it invites you to activate with EkLine by entering your integration token.

If you cancel or input an invalid token, the extension displays a popup offering another chance to set up EkLine or turn off for avoiding future popups. Once turned off, execute 'Configure EkLine Linter' from the Command Palette or clear the 'off' box in Extension Settings.

Configuration Settings

EkLine provides several configuration options that can be accessed through the Settings panel:

1. Style Guide

  • Choose from available style guides:
    • Google (default)
    • Marketing
    • Microsoft
    • Custom
  • The selected style guide determines the writing standards applied during document review

2. Documentation Paths

  • Specify which directories to include in documentation review
  • Enter paths relative to your workspace root
  • Multiple paths can be added as a comma-separated list (e.g., "src,docs,content")
  • Default path is "src"

3. Token Configuration

  • Set your EkLine API token
  • Can be configured at user or workspace level

To access these settings:

  • Click the EkLine icon in the Activity Bar
  • Click the Settings icon in the EkLine panel
  • Or use the Command Palette and select EkLine: Configure Extension

Commands and Shortcuts

EkLine provides several commands that can be accessed through the Command Palette (Cmd/Ctrl + Shift + P):

Document Review Commands

  • EkLine: Review all documents - Analyzes all supported files in your workspace
  • EkLine: Review current document - Analyzes only the currently active file
  • EkLine: Configure Extension - Opens the EkLine extension configuration
  • EkLine: Improve writing in current file - Uses EkLine AI to enhance the writing in the active file

AI Assistant Commands

  • Ask EkLine About Selection (Cmd/Ctrl + Shift + E) - Get AI assistance for selected text
  • Ask EkLine - Opens the AI assistant interface for more complex queries

Keyboard Shortcuts

  • Cmd/Ctrl + Shift + E - Quick access to Ask EkLine when text is selected
  • Cmd/Ctrl + Shift + E - Add content at empty line when no text is selected

Ask EkLine Feature

The Ask EkLine feature provides AI-powered assistance for your documentation:

Using Ask EkLine

  • With Text Selection:

    1. Select the text you want to improve
    2. An "Ask EkLine" button will appear above your selection.
    3. Click the button or press Cmd/Ctrl + Shift + E to open an input box.
    4. Type your request, and press Enter.
    5. The suggested changes will be shown in a diff view. You can then accept or reject them.
  • Without Selection:

    1. Place your cursor where you want to add content
    2. Press Cmd/Ctrl + Shift + E
    3. Type your request
    4. Press Enter or click the Send button

Using @ Commands for Context

You can reference other files for context in two ways:

  1. In Input Prompts:

    • Type @ followed by a file path (e.g., "@utils.ts")
    • Click the "Add File Reference" button to browse files
    • Multiple files can be referenced in one prompt
  2. In Files:

    • Type @ekline followed by your prompt
    • The extension will show a CodeLens action to run the prompt

Advanced Features

  • Preview Changes: Changes are shown in a diff view before applying
  • Accept/Reject: Click the ✓ or ✗ icons to accept or reject changes
  • Inline Diff: View and accept/reject specific parts of suggestions

Usage

The extension runs EkLine on supported files when opened or saved.

To analyze all supported files in the workspace, execute 'Run EkLine Linter' from the Command Palette.