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

exclude gems based on pattern/prefix name/wildcard #2847

Open
1 task done
will opened this issue Nov 12, 2024 · 0 comments
Open
1 task done

exclude gems based on pattern/prefix name/wildcard #2847

will opened this issue Nov 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@will
Copy link

will commented Nov 12, 2024

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

There are large families of gems that are just generated api code that both take a long time to index, and aren't worth indexing. Manually enumerating them once wasn't so bad, but I just had a reason to add Yet Another Aws Gem and it's not fun to have to remember to exclude it.

Description

Right now my config is

  vim.lsp.start {
    name = "ruby-lsp",
    cmd = { "ruby-lsp" },
    root_dir = root_dir,
    init_options = {
      formatter = "standard",
      linters = { "standard" },
      indexing = {
        -- stylua: ignore start
        excludedGems = {
          "aws-eventstream", "aws-partitions", "aws-sdk-cloudwatch", "aws-sdk-cloudwatchlogs", "aws-sdk-core",
          "aws-sdk-ec2", "aws-sdk-elasticloadbalancingv2", "aws-sdk-kms", "aws-sdk-route53", "aws-sdk-s3", "aws-sdk-iam",
          "aws-sigv4", "google-apis-compute_v1", "google-apis-core", "google-apis-dns_v1",
          "google-apis-iam_v1", "google-apis-iamcredentials_v1", "google-apis-storage_v1", "google-cloud-core",
          "google-cloud-env", "google-cloud-errors", "google-cloud-storage", "opentelemetry-api",
          "opentelemetry-common", "opentelemetry-helpers-sql-obfuscation", "opentelemetry-instrumentation-aws_sdk",
          "opentelemetry-instrumentation-base", "opentelemetry-instrumentation-excon", "opentelemetry-instrumentation-faraday",
          "opentelemetry-instrumentation-pg", "opentelemetry-instrumentation-rack", "opentelemetry-registry", "opentelemetry-sdk",
          "opentelemetry-semantic_conventions",
        },
        -- stylua: ignore end
      },
    },
  }

But I would like it to be like

  vim.lsp.start {
    name = "ruby-lsp",
    cmd = { "ruby-lsp" },
    root_dir = root_dir,
    init_options = {
      formatter = "standard",
      linters = { "standard" },
      indexing = { excludedGems = { "aws-*", "google-*",  "opentelemetry-*" } },
    },
  }

or something along those lines

Implementation

No response

@will will added the enhancement New feature or request label Nov 12, 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
Projects
None yet
Development

No branches or pull requests

1 participant