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

Can't require a file in the same directory? #713

Open
Nakilon opened this issue May 20, 2024 · 1 comment
Open

Can't require a file in the same directory? #713

Nakilon opened this issue May 20, 2024 · 1 comment

Comments

@Nakilon
Copy link

Nakilon commented May 20, 2024

I'm trying to start using LSP in Sublime Text 4.
My configuration:

    "ruby": {
      "enabled": true,
      "command": ["solargraph", "stdio"],
      "selector": "source.ruby | text.html.ruby",
      "initializationOptions": {
        // "diagnostics": true
      },
      "env": {"RBENV_VERSION": "2.6.6"}
    }

I have a file with module Common but it does not seem to see it:
image
Added this file:

$ cat .solargraph.yml 
include:
- "common.rb"

but it had no effect.
Am I doing it wrong?

@castwide
Copy link
Owner

Are you opening a single file without a workspace folder? If so, only the current file gets mapped.

If you're opening a workspace folder, you might need to make a .solargraph.yml configuration file with an include directive. More info: https://solargraph.org/guides/configuration

I'm looking into the possibility of being able to map files automatically when they're included in code with require_relative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants