Skip to content

[BUG] cclsp not finding any errors for any typescript file #20

@patrykk21

Description

@patrykk21

Describe the bug

No matter how I setup the tool or what kind of project I test it in, I still don't get any diagnostics.

To Reproduce

Steps to reproduce the behavior:

  1. Set up configuration
// I'm using mason binary here but the same happens with any binary
{
  "servers": [
    {
      "extensions": [
        "js",
        "ts",
        "jsx",
        "tsx"
      ],
      "command": [
        "/Users/vigenerr/.local/share/nvim/mason/bin/typescript-language-server",
        "--stdio"
      ],
      "rootDir": "."
    }
  ]
}
  1. Create a file in a typescript project
interface User {
    name: string;
    age: number;
  }

  function greetUser(user: User): string {
    // Type mismatch - returning number instead of string
    return user.age;
  }

  // Missing type annotation
  function calculateAge(birthYear) {
    return 2024 - birthYear;
  }

  // Using undefined variable
  function processData() {
    console.log(undefinedVariable);
  }

  // Wrong property access
  const user: User = {
    name: "John",
    age: 30
  };

  // Accessing non-existent property
  console.log(user.email);

  // Type mismatch in assignment
  let count: number = "hello";

  // Function with wrong return type
  function getNumbers(): number[] {
    return "not an array";
  }

  // Missing semicolon and syntax error
  const broken = {
    prop1: "value1"
    prop2: "value2"
  }

  // Using unknown type
  let mystery: SomeUnknownType = "test";
  1. Run command
⏺ cclsp - get_diagnostics (MCP)(file_path: "./test-errors.ts")
  ⎿  No diagnostics found for test-errors.ts. The file has no errors, warnings, or hints.

Expected behavior

I would expect the LSP to return the errors

Actual behavior

I don't receive any diagnostics

Error messages

No errors

Environment

  • OS: macOS 14.5
  • Node.js version: v22.13.1
  • cclsp version: 0.6.1
  • Language server: typescript-language-server 5.0.1
  • MCP client: 1.0.68 (Claude Code)

Configuration

{
  "servers": [
    {
      "extensions": [
        "js",
        "ts",
        "jsx",
        "tsx"
      ],
      "command": [
        "/Users/vigenerr/.local/share/nvim/mason/bin/typescript-language-server",
        "--stdio"
      ],
      "rootDir": "."
    }
  ]
}

Additional context

Already shared the problem here: #2 (comment)

Screenshots

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions