Skip to content

CUDA support could use setTextDocumentLanguage instead of files.associations #7359

Closed

Description

Currently, when a cpp file is determined to be a CUDA file (due to nvcc compiler path), a files.associations entry is added to map the file to the cuda-cpp language ID, to ensure it gets the proper TextMate grammar.

It looks like it would be possible to use setTextDocumentLanguage instead to switch the file from cpp to cuda-cpp on the fly. It's OK that the association is not persisted, as we should continue to handle cpp files and continue to remap them. This solution seems preferable, as it doesn't incur a bunch of entries in settings.json.

Activity

  1. added this to the 1.5.0 milestone on Apr 20, 2021
  2. Colengms commented on May 14, 2021

    @Colengms
    ContributorAuthor

    As part of this fix, headers should get updated to be associated with CUDA C++ when associated with a CUDA source file. Otherwise, the header may not have the proper CUDA syntax highlighting.

  3. added
    fixed
    on Jun 28, 2021
  4. soulman710 commented on Jul 10, 2021

    @soulman710

    This is awesome

  5. locked and limited conversation to collaborators on Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Feature: CUDALanguage Servicefixed

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions