Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all typescript problems are found/visible in the problem panel #8268

Open
1 task done
nym21 opened this issue Feb 23, 2024 · 3 comments
Open
1 task done

Not all typescript problems are found/visible in the problem panel #8268

nym21 opened this issue Feb 23, 2024 · 3 comments
Labels
bug [core label] diagnostics Feedback for diagnostics, error messages, logs, etc language An umbrella label for all programming languages syntax behaviors setting Feedback for preferences, configuration, etc typescript TypeScript programming language support

Comments

@nym21
Copy link

nym21 commented Feb 23, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

The problem panel only show a certain amount of problems while the command tsc --noEmit --skipLibCheck will show all the problems found.

Environment

Maybe a way to specify a command for problems but I would expect the editor to automatically run tsc when in a Typescript project.

VSCode has for example a typescript.tsserver.experimental.enableProjectDiagnostics option. (microsoft/vscode#13953)

While one solution would be to just run tsc in a terminal, it's not possible for now to split a terminal panel (in v.0.123.3) vertically and thus isn't practical to have to choose between having the server or the problems visible at any time.

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

@nym21 nym21 added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Feb 23, 2024
@JosephTLyons JosephTLyons added typescript TypeScript programming language support language An umbrella label for all programming languages syntax behaviors setting Feedback for preferences, configuration, etc diagnostics Feedback for diagnostics, error messages, logs, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Feb 23, 2024
@anandthakker
Copy link

It looks like 2727f55 fixed a bug wherein the initialization_options setting was not being respected for vtsls (the default TS language server).

Once that makes it into a release, it will be possible to turn this on in settings like:

"lsp": {
    "vtsls": {
      "initialization_options": {
        "typescript": {
          "tsserver": {
            "experimental": {
              "enableProjectDiagnostics": true
            }
          }
        }
      }
    }
  }

@nym21
Copy link
Author

nym21 commented Jul 16, 2024

Thanks a lot, can't wait !

@brookback
Copy link

This is still not working for me. I'm not sure if this is intended behaviour, but the Zed marketing pages says so ("Project wide diagnostics").

It's easily reproducible by creating a new Typescript project:

mkdir repro && cd repro
npm init -y
npm i --save-dev typescript
npx tsc --init
# Won't type check:
echo "let a: string = 1;" > file.ts
zed .

If I open file.ts, the problems pane shows error. When closed, the problem pane shows "No errors".

Here's the relevant Zed settings.json:

Details
{
    "lsp": {
        "vtsls": {
            "initialization_options": {
                "preferences": {
                    "includeInlayParameterNameHints": "all",
                    "includeInlayParameterNameHintsWhenArgumentMatchesName": true,
                    "includeInlayFunctionParameterTypeHints": true,
                    "includeInlayVariableTypeHints": true,
                    "includeInlayVariableTypeHintsWhenTypeMatchesName": false,
                    "includeInlayPropertyDeclarationTypeHints": true,
                    "includeInlayFunctionLikeReturnTypeHints": true,
                    "includeInlayEnumMemberValueHints": true
                },
                "typescript": {
                    "tsserver": {
                        "experimental": {
                            "enableProjectDiagnostics": true
                        }
                    }
                }
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] diagnostics Feedback for diagnostics, error messages, logs, etc language An umbrella label for all programming languages syntax behaviors setting Feedback for preferences, configuration, etc typescript TypeScript programming language support
Projects
None yet
Development

No branches or pull requests

4 participants