eyza-cod2 / vscode-cod-gsc

Extension for VS Code for GSC scripts used in Call of Duty games
GNU General Public License v3.0
11 stars 0 forks source link

Multi-File GoTo Definition #11

Open NightwalkerLots opened 1 week ago

NightwalkerLots commented 1 week ago

Tried to config the settings every which way. Read docs multiple times. This just doesn't work. The "Go To Definition" will only work if the function is defined in the same GSC file that you're currently browsing.

If there is supposed to be a way to make this work, for the love of god just have it on by default. Will re-enable whenever that works properly, was the soul purpose I got the extension. Either way looks good so far.

eyza-cod2 commented 1 week ago

The "Go To Definition" should work for current file, other files in current workspace, and included workspace folders via settings.

First make sure you have resolved errors with missing files. image (file path is in red)

If your files are spread in multiple independen foldes (for exmaple you have multiple mod files), you can include the folder for file references image

Than the "Go To Definition" should work like this: image

NightwalkerLots commented 1 week ago

I've tried the example for doing the include at the top for the function_included example. This doesn't work. Most of the functions in my project are not called via " :: "

1 2

My project is a multiple-folder workspace, but all of them are in the same parent directory. No way that I try to get these examples to work is doing it. It will only ever work if the function is defined in the same file. It also has started to say "workspace diagnostic off" when it is on for both user and workspace. Did a restart a few times. This

did work but suddenly stopped. I tried to give the extension a reference to the location in a few different ways for each method in those examples. None would work.

eyza-cod2 commented 1 week ago

Lets try again with settings reset. In both workspace folders there is a /.vscode/settings.json file, delete the file in both workspace directories.

After that there should be errors again saing that some of the files are not found or that some functions are not found.

I tried to recreate your project structure and it looks like this: image (no error and "Go To Definition" is working)

Do you have avaible public repo with your mode? I could open the whole mod to see if there is any problem for me.

Also make sure you have the latest version v0.1.10

eyza-cod2 commented 2 days ago

Does it work?

NightwalkerLots commented 2 days ago

I've uninstalled the extension and just went back to searching the whole project for the function until I found the definition. I started to step further and further back to humor even the simple things being wrong, as well as the json, retrying backups of it, trying different configurations of it, doing a fresh install of the extension, ect...

It started to be more trouble than it was worth for the single feature it had that I wanted.

On Tue, Oct 1, 2024 at 1:44 PM eyza @.***> wrote:

Does it work?

— Reply to this email directly, view it on GitHub https://github.com/eyza-cod2/vscode-cod-gsc/issues/11#issuecomment-2386716268, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVLL6BSOBACDUDRQLNYIEDZZLURJAVCNFSM6AAAAABOZUVASGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBWG4YTMMRWHA . You are receiving this because you authored the thread.Message ID: @.***>

eyza-cod2 commented 1 day ago

Im sorry to heard that.

There must be something specific about your vscode / system configuration that makes my extension not working.

Without your help im not able to fix it, its working fine for others.