Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

my workspace setting.json for unity on VSCode says 'end of file' expected after files.exclude

After setting VSCode as my editor and downloading the unity debugger extension, I deleted the original settings.json and replaced it with this one:

 // Configure glob patterns for excluding files and folders.
 "files.exclude": {
    "**/.git": true,
    "**/.DS_Store": true,
    "**/*.meta": true,
    "**/*.*.meta": false,
    "**/*.unity": true,
    "**/*.unityproj": true,
    "**/*.mat": true,
    "**/*.fbx": true,
    "**/*.FBX": true,
    "**/*.tga": true,
    "**/*.cubemap": true,
    "**/*.prefab": true,
    "**/Library": true,
    "**/ProjectSettings": true,
    "**/Temp": true
} 

What i want is for only the CS scripts to show and hide the remaining (.unity,.prefab etc...). I found this above code online that's meant to do that but there's an 'end of file expected' message on the colon after the files.exclude. i guess a set of curly brackets is missing somewhere but where in the code is it meant to be?

like image 887
Bolu Morawo Avatar asked Dec 08 '17 10:12

Bolu Morawo


1 Answers

I actually found what was missing and it happened to be that curly brackets also needed to encapsulate the whole code itself. That solved the problem. Here is the corrected code with some extra files to exclude added:

{
    "files.exclude": {
        "**/.git": true,
        "**/.DS_Store": true,
        "**/*.meta":true,
        "**/Library":true,
        "**/obj":true,
        "**/Temp":true,
        "**/ProjectSettings": true,
        "**/*.unityproj": true,
        "**/*.wav": true,
        "**/*.sln": true,
        "**/*.userprefs": true,
        "**/*.prefab": true,
        "**/*mat": true,
        "**/*fbx": true,
        "**/*.unity": true
    }
}
like image 177
Bolu Morawo Avatar answered Nov 18 '22 13:11

Bolu Morawo