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

Publish diagnostics even if the file is not saved to disk #104

Open
resolritter opened this issue May 21, 2024 · 0 comments
Open

Publish diagnostics even if the file is not saved to disk #104

resolritter opened this issue May 21, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@resolritter
Copy link

Describe the feature

Feature

I would like to receive diagnostics on the fly as I am editing a file, without having to save it to disk.

Explanation

It understand that v-analyzer collects diagnostics by parsing the compiler's output for a given input_path.

mut p := os.new_process(compiler_path)
p.set_args(['-enable-globals', '-shared', '-check', input_path])

output_lines := p.stderr_slurp().split_into_lines().map(term.strip_ansi(it))

mut report := parse_compiler_diagnostic(error) or { continue }

I guess that is why the file has to be saved to disk prior to providing the diagnostics.

Use Case

It is annoying to have to constantly save the file only for the sake of getting diagnostics. Many other language servers can provide diagnostics even if the file is not saved to disk.

Other Information

No response

@spytheman spytheman added enhancement New feature or request help wanted Extra attention is needed labels Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants