Skip to content

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

@resolritter

Description

@resolritter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions