xulion / scope4code

cscope support for visual studio code
MIT License
21 stars 8 forks source link

Selecting an already build database #54

Closed JayroALH closed 4 years ago

JayroALH commented 4 years ago

Hi, i work with some big linux apps and a cscope database is created with each build,

There is a way to manually select a database file instead of having to build one from scratch?

xulion commented 4 years ago

Thanks for using the extension. I've been quite a slacker recently. To do so you can edit the configure file (if it does not exist then create one): File path

.vscode/cscope_conf.json

Configure template

{
    "version": "0.0.13",
    "open_new_column" : "no",
    "engine_configurations": [
        {
            "cscope" : {
                "paths" : [
                    "${workspaceRoot}"
                ],
]                "database_path" : "${workspaceRoot}/.vscode/cscope"
            }
        }
    ]
}

what you need to do is to update database_path attribute.

I'm trying to find time refactor the configuration (move to vs code preference) and I try to avoid user to edit the json file directly. For now you shall use the JSON file. My next update might require you to update the path again in vscode preference.

JayroALH commented 4 years ago

Thanks for the info