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

Suggestion: Don't add duplicate path to Factorio data folder to Lua.workspace.library setting #73

Open
Bilka2 opened this issue Nov 19, 2022 · 0 comments

Comments

@Bilka2
Copy link
Contributor

Bilka2 commented Nov 19, 2022

This suggestion may not be feasible because paths are hard, but I want to at least note the issue.

Given the following settings.json file:

{
    "Lua.workspace.library": [
        "~/Games/factorio/data",
        ".vscode/factorio"
    ]
}

I select a new Factorio version via the version selector, I choose the binary ~/Games/factorio/bin/x64/factorio. The extension populates the Lua.workspace.library setting:

    "Lua.workspace.library": [
        "~/Games/factorio/data",
        "/home/erik/Games/factorio/data",
        "/home/erik/Games/factorio/data/core/lualib",
        ".vscode/factorio"
    ],

The second line (/home/erik/Games/factorio/data) is redundant because it points to the same folder as the first line.

I first encountered this issue on Windows, there my existing setting line was using a different path separator than the setting line added by the extension.

It would be great if the duplicate lines could be avoided even in cases where the paths use different "notations".

Extension version 1.1.23
Sumneko version 3.6.3
VSCode 1.73.0
Not using JanSharp's plugin.

@Bilka2 Bilka2 changed the title Suggestion: Don't add path to Factorio data folder to Lua.workspace.library setting when it already exists Suggestion: Don't add duplicate path to Factorio data folder to Lua.workspace.library setting Nov 19, 2022
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

1 participant