microsoft / microsoft/vscode-cpptools

Is it possible to disable syntax coloring and intellisense in parts of source code with non-standard C or C++ syntax constructs?

Open
#9,354 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs help wanted Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

I'm using a C compiler for 8 bit machines, and this compiler is standard C, but has some non standard syntax constructs.

Like the asm keyword ...

    bank_push_bram(); bank_set_bram(fe.bram_bank);

    asm {
        lda $9f25
        pha
        lda $9f24
        pha
        lda $9f23
        pha
        lda $9f22
        pha
        lda $9f21
        pha
        lda $9f20
        pha
    }

    bank_set_brom(CX16_ROM_KERNAL);

Is it possible with a token in a comment line or something, to DISABLE the syntax coloring and intellisense in this asm statement region? Maybe something like this could be possible?

    bank_push_bram(); bank_set_bram(fe.bram_bank);

    // __INTELLISENSE_DISABLE
    asm {
        lda $9f25
        pha
        lda $9f24
        pha
        lda $9f23
        pha
        lda $9f22
        pha
        lda $9f21
        pha
        lda $9f20
        pha
    }
    // _INTELLISENSE_ENABLE

    bank_set_brom(CX16_ROM_KERNAL);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by reviewing the extension's handling of C/C++ syntax coloring and IntelliSense alongside the non-standard asm example; done should be a clearly scoped way to suppress both behaviors for a bounded source region.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.