Skip to content

Feature Request: Language Server Protocol (LSP) Implementation #12

@qiuethan

Description

@qiuethan

Summary

Currently, IDE support is limited to a specific VS Code extension. To support the broader developer ecosystem (Neovim, IntelliJ, Sublime Text, Zed, etc.), we should extract the linting logic into a standard Language Server Protocol (LSP) server.

Problem

  • Maintaining a specific VS Code extension couples the tool to one editor.
  • Users of other editors have to rely on the CLI, missing out on real-time "squiggles" and feedback.

Proposed Solution

Create a new package @archctl/language-server.

Key Capabilities

  1. Standard LSP Features:
    • textDocument/publishDiagnostics: Show errors/warnings on imports.
    • textDocument/hover: Show layer/context info when hovering a file header.
    • textDocument/codeAction: Provide "Quick Fixes" (see Auto-Fix feature).
  2. Editor Agnostic: The core logic handles the analysis, and any LSP-compliant client can consume it.

Implementation Plan

  1. Refactor vscode-extension code to separate VS Code specifics from the analysis logic.
  2. Use vscode-languageserver-node to implement the server.
  3. Update the VS Code extension to simply be a client for this new server.
  4. Publish instructions for configuring Neovim (nvim-lspconfig) and other editors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions