Click here to Skip to main content
15,885,810 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have files in Visual Studio 2019 that have an SQL extension. The SQL contained within them is SQLite dialect. An example statement might be this:
INSERT INTO EstimateRevisions ( PK_id, revision, total_value, breakdown )
VALUES ( NULL, '', 0.0, '' ),

My problem is that the non-quoted value 0.0 appears as a fairly unreadable dark-red colour, but I can't find the appropriate setting in Tools | Options | Fonts and Colours to change this.

Can anyone suggest what the setting might be?

What I have tried:

I tried the ones prefixed 'SQL'.

I have tried clicking on every item in the list. There must be over a hundred now so I may have missed it. (By the way, am I the only one who thinks this part of VS is long overdue a big improvement? Listing all the colour settings in one long list is getting plain silly now there are so many.)
Posted
Updated 18-Jul-19 2:31am

1 solution

Check the extension type: VS "knows about" .SQL files, and will syntax highlight them correctly - for me, 0.0 comes up as black-on-white, which it inherits from the standard "Number" setting under "Tools...options...Environment...Fonts and Colours", "Display items: Number"

If your extension type is different, it may be considering it as a specific type, and overwriting it (for example, there is also "Display items: U-SQL - Number" which is separately configurable).
 
Share this answer
 
v2
Comments
Patrick Skelton 19-Jul-19 3:47am    
I'm not sure what you mean by the first part of your answer, the bit about 'knows about', but the 'Display Items: Numbers' did the trick. I must have missed it. I do think this list is getting stupidly long and needs a completely new interface. I also need to learn to read, maybe. :-|

Anyway, thank you! Problem solved and my eyes already feel better!
OriginalGriff 19-Jul-19 4:03am    
:laugh:
It's getting kinda unwieldy, isn't it? I'm guessing that job was given to the intern, and devs at MS don't fiddle so they never noticed just how bad it is ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900