microsoft / microsoft/vscode-cpptools

Formatting GLSL not supported, even though it should be able to format GLSL

Aperta
#9,902 12 commenti 12 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement Feature: Code Formatting Language Service
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

Environment
  • OS and version: Windows_NT x64 10.0.19044
  • VS Code: 1.71.2 (user setup)
  • C/C++ extension: v1.12.4
  • OS and version of remote machine (if applicable):
Bug Summary and Steps to Reproduce

Posting issue here, as suggested by: https://github.com/microsoft/vscode/issues/161209#issuecomment-1251914962

Issuing the format document command on a GLSL file with .frag as the extension in case of the this fragment shader file, results in the There is no formatter for 'glsl' files installed. error message. Which is correct, I do not have one installed specifically for GLSL shaders.

image

I would like to use the default formatter for C files, as GLSL is formatted identically to C. So I set the following in my settings .json

    "[glsl]": {
        "editor.defaultFormatter": "ms-vscode.cpptools"
    },

This does not change the error message, which persists.

I presume this is because ms-vscode.cpptools is not specifically registered to work with glsl files, although the formatter should be more than capable of formatting GLSL files. It would be excellent, if I could chose the C formatter for GLSL files.

Does this issue occur when all extensions are disabled?: Yes

Detailed version Info
Version: 1.71.2 (user setup)
Commit: 74b1f979648cc44d385a2286793c226e611f59e7
Date: 2022-09-14T21:03:37.738Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No

Steps to Reproduce:

  1. Set "editor.defaultFormatter": "ms-vscode.cpptools"
  2. Format a glsl file
Other Extensions

No response

Additional Information

No response

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riprodurre con un file .frag GLSL e l’impostazione [glsl] editor.defaultFormatter mostrata nell’issue. Esaminare come l’estensione C/C++ registra il proprio formatter e il supporto per il linguaggio; il lavoro è completato quando il formatter configurato viene accettato per i file GLSL e Format Document non segnala più che non è installato alcun formatter.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.