Skip to content

Extension does not go to definition when it is in a different file #74

@Skylark13

Description

@Skylark13

Hello,

Thanks for this extension! Given issue #70 I don't know what kind of support I can expect but let's try anyways :)

When I have function calls in the shader I'm currently viewing, and I press F12 to go to definition, it works if the function is in the same file, but not if it was included in a header.

Context:
Our project uses HLSL, and main files (shader entry points) have the *.hlsl extension but included files (containing shared code) have the *.hsh extension. I already had the following in my vscode settings so that HLSL syntax highlighting worked in *.hsh files:

    "files.associations": {
        "*.hsh": "hlsl"
    },

and syntax highlighting does work, but go to definition still doesn't work when the definition is in one of those files.

The files are always included using relative paths (something like #include "../Algorithms/ColorConversion.hsh" if the current file is in a folder parallel to the Algorithms folder) and that all works as far as compilation is concerned.

So I'm not sure what the issue could be. I might be able to debug this myself (if getting set up to run the extension with local code is not too involved). But if anyone else has an idea I'd be interested.

Thanks in advance.

VSCode version: 1.91.0
Extension version: v1.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions