VirtualWhirlwind / vscode-povray2

A Visual Studio Code extension to allow you to edit Persistence of Vision Ray Tracer (POV-Ray) Scene files and render them using the integrated terminal
MIT License
6 stars 3 forks source link

wrong / lack of .ini file syntax highlighting #12

Closed jkozniewski closed 2 years ago

jkozniewski commented 2 years ago

There seem to be no proper syntax highlighting for the *.ini files so it's either a bug or a feature request to add it :)

Screenshot 2022-03-19 at 12 24 08

bentorkington commented 2 years ago

Looks like the plugin tries to interpret .INI files as if they were Povray source. Probably best in the short term if the .INI suffix is removed so it falls back on the more general syntax highlighting for that format

jkozniewski commented 2 years ago

Thanks - is there any way I can help to create proper syntax highlight for this type of files (never done VS Code extension stuff but with some tips I might contribute a patch as it's probably mostly generating some json with proper keywords) ?

bentorkington commented 2 years ago

Because .ini is a popular format outside of Povray, there are already extensions to handle its grammar.

You could add Povray's specific keywords as snippets or code suggestions, but at this point I also don't know whether this would augment or override existing .ini parser extensions.

The most convenient feature I can think of would be a code snippet that generates a sample Povray .ini file similar to what you've posted above (probably with all the modifiers except Width and Height commented out) as a helpful starting point.

jkozniewski commented 2 years ago

oh.. ok.. you're right that .ini is generic file format so just installed this extension - https://marketplace.visualstudio.com/items?itemName=DavidWang.ini-for-vscode and changed file association manually :) Thanks !

kennebel commented 2 years ago

Pulled out ini from the file types this extension will try to handle.

bentorkington commented 2 years ago

@kennebel , I had a PR for this and #15 already open if you think that they'll save you time?

kennebel commented 2 years ago

Sorry for missing that. Reviewing the PR's now.