renpy / vscode-language-renpy

Ren'Py extension for Visual Studio Code
Other
107 stars 22 forks source link

Empty outline when opening folder #151

Open PatrickMassot opened 2 years ago

PatrickMassot commented 2 years ago

When opening a game folder and editing a script file from there, nothing shows up in the outline. If I open a single script.rpy then I see the outline. This is a bit confusing for me since I'm rather used to VScode extensions that won't do anything until you open a project folder.

Compare: image where the outline works but the file explorer doesn't show other files and image where the outline is empty but I can see all files in the file explorer.

This is on a fresh install of RenPy 8.0.0 with VSCode extension version 2.0.11. I may be missing something obvious, I installed RenPy for the first time yesterday. In particular I don't know whether this should be considered an actual bug or a documentation issue or a stupid newbie user issue.

Savage1969 commented 2 years ago

FWIW: It works on my end. Note that I've noticed that certain symbols such as labels require them to be formatted with proper indentation rules. In other words if you indent labels they will not show up in the outline, they must be outdented flush to show in the outline, etc.

LuqueDaniel commented 2 years ago

I've tested it and can't reproduce it.

Savage1969 commented 2 years ago

It works in most projects I've tested so far (over 2 dozen). The classes branch is extremely useful btw. It can be temperamental and I'm trying to isolate where the issue is when it fails to work, but the majority of the time it does on my end.

For example, all the below are expandable in this file example: image

duckdoom4 commented 2 years ago

Possibly an issue with missing navigation data?

Do you have this with all projects or just with "The Question"

I'll look into this when I have more time.

duckdoom4 commented 2 years ago

FWIW: It works on my end. Note that I've noticed that certain symbols such as labels require them to be formatted with proper indentation rules. In other words if you indent labels they will not show up in the outline, they must be outdented flush to show in the outline, etc.

This should be fixed as soon as the new syntax branch gets merged. We still need to do more testing on that branch before making it fully public though.

duckdoom4 commented 2 years ago

Please check if this has been fixed as of v2.1.0-pre-release

Savage1969 commented 2 years ago

Please check if this has been fixed as of v2.1.0-pre-release

Nope, it was mostly fine before, now many project get this never-ending initialization in the bottom-left corner with no outline population: image

duckdoom4 commented 2 years ago

Please check if this has been fixed as of v2.1.0-pre-release

Nope, it was mostly fine before, now many project get this never-ending initialization in the bottom-left corner with no outline population: image

Good to know, thanks for the update. I'll look into it when I find the time :)

Savage1969 commented 2 years ago

FYI: To make it easier to replicate the "never-ending initialization" simply navigate to any RenPy project's "renpy/common" folder, open that "common" folder in VSC, choose any RPY file. This will negate the use of personal files in the replication process.

multimokia commented 2 years ago

I think this is an issue in the extension seemingly requiring renpy navigation data. I think it may be a good idea to remove this dependency on an external sdk/application as not all git projects are the same, nor will they contain the renpy binaries or compilation info (nor should they, in my opinion)

duckdoom4 commented 2 years ago

This navigation data should be in any project that has executed at least once. It's a file generated by the renpy launcher.

Tho to be honest, I think I will remove it at some point since we won't need it as soon as we have the variable/data storage that will be generated using the tokenizer

multimokia commented 2 years ago

I don't use the renpy launcher for my projects as the projects I work on are mods or extension libraries of sorts, rather than fully-fledged games. So all the code is compiled when you actually drop it into an existing game. Glad to hear this won't be an issue with the tokenizer though

FaceCrap commented 1 year ago

Well now, and here I was wondering why my outline stays empty. Like the last poster, I don't run VSC from the SDK but rather open the game folders directly. I read above a mention it worked if opening a single RenPy file directly, however, my outline has never populated. Neither with opening a game's folder nor opening a single file.

LuqueDaniel commented 1 year ago

@FaceCrap Currently, the extension uses the saves/navigation.json file for several features. You have to run the project using the Ren'Py launcher to generate it.