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

Cannot locate the config file under remote env #7

Open
luliangce opened this issue May 13, 2020 · 0 comments
Open

Cannot locate the config file under remote env #7

luliangce opened this issue May 13, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@luliangce
Copy link
Owner

current version find the config file(etc. python.json) from System's User Dir

get userSnippetFilePath(): string {
        let platform: string = os.platform();
        let AppDataPath: string;
        switch (platform) {
            case 'win32':
                AppDataPath = process.env['VSCODE_APPDATA'] || process.env['APPDATA'] || path.join(process.env['USERPROFILE'] || "", 'AppData', 'Roaming');
                break;
            case 'darwin':
                AppDataPath = process.env['VSCODE_APPDATA'] || path.join(os.homedir(), 'Library', 'Application Support');
                break;
            case 'linux':
                AppDataPath = process.env['VSCODE_APPDATA'] || process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config');
                break;
            default: throw new Error('Platform not supported');
        }
        return path.join(AppDataPath, "Code", "User", "snippets", `${this.language}.json`)
    }

unfortunately, this didn't work well with vscode-remote environment.

i will try fix this in next few days.

@luliangce luliangce added the bug Something isn't working label May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant