Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello, I have a question. Why is it that after I set the language, when I click on the displayed document, it doesn't show in the corresponding language?

(1 edit)

I’m assuming you’ve already enabled early access (thank you for the support! 😊) by entering the password, unlocking that setting.

GDScript support is provided only by the “godot-tools” extension, not by “Godot Files”. So, unfortunately, when you click it from GDScript, it will use their own viewer (which only supports English). If you click from a language provided by Godot Files, like .tscn, .tres, .godot, etc., or if you open it from the command (e.g. with CTRL+F1 on Windows/Linux) then it will use the setting for the specified viewer (and language if you enabled early access). If you’re on VSCode, CTRL+F will work on the webview viewer (to search e.g. a class name).

Sorry if this wasn’t super clear in the README, I’ll update it for the next version.

I’ll see if there’s some workaround to this limitation somehow, but as far as I know, I’m not able to make it work from GDScript unless I were to support GDScript myself (not going to happen anytime soon) or overwrite their viewer (which would remove your option to use it).

The “godot-tools” extension would be able to use a viewer from “Godot Files” if they were to implement it themselves, (e.g. by checking this setting on their extension too). You might want to open an issue in their repo to ask for compatibility, maybe they’re willing to implement it? They would just need to call the URI for my viewer in a similar way that I call theirs.

Don’t hesitate to ask if you have any other questions! 🙂

Do you know? You are like an angel.

(1 edit)

I’ve just released v0.1.5, which fixes the search and should improve this (this issue was bothering me too).

I found a solution that works well enough without clashing with their extension. You just need to use the Open Godot API Documentation command (default: CTRL F1; ⌥ ⌘ D on macOS) instead of going to the definition with F12. This shortcut works even in GDScript.

If you use this when the text cursor is on a word that looks like a class, it takes you to the docs page of that class. If it’s in another word or some other text that is selected, it takes you to the search page, searching that text; then you can try to find it.

This simply matches the word, it doesn’t analyze the code at all. You can still use F12 on GDScript to use godot-tools like before (which does analyze the code and can find definitions in non-obvious cases like when the class is implied).

Thank you very much. This is of great help to me. This is really wonderful.