Skip to content

LSP: load statement not at the top of WORKSPACE file #145

Description

@Jaetan

I am using starlark-rust 0.13.0 for its LSP capabilities, from neovim. I have the following WORKSPACE file:

http_archive(
  name = "bazel_compdb",
  url = "https://github.com/bazelbuild/bazel-compilation-database/archive/refs/heads/main.zip",
  strip_prefix = "bazel-compilation-database-main"
)

load("@bazel_compdb//:deps.bzl", "bazel_compdb_deps")

The LSP reports the warning "A load statement not at the top of the file". I believe this warning is warranted for BUILD files, but not WORKSPACE files as these may need to download things first. I did not find a way to mute this warning on this line either. Could someone look into this issue, please?

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions