vs.language.cmake icon indicating copy to clipboard operation
vs.language.cmake copied to clipboard

Autocomplete is case sensitive

Open kymikoloco opened this issue 8 years ago • 3 comments

Commands like add_executable, etc, only autocomplete when you type in lowercase. As this is not a syntax requirement to use CMake, can autocomplete be case insensitive? I thought the extension was less than useful for a second because I would type 'ADD_EXECUTABLE' and it would never be found in the autocomplete list. Turns out my habit of writing CMake scripts in all caps isn't quite supported.

kymikoloco avatar Sep 01 '17 00:09 kymikoloco

This is an issue for me as well. If someone wants to point me in the right direction I'd be happy to make the changes and submit at PR.

rlizzo avatar Apr 12 '18 22:04 rlizzo

Hi, This was by design because lower case is preferred in modern cmake guidelines.

If you want to change this behavior, look at cmXxxSuggestions calls in provideCompletionItems. It lookups the currentWord, if you lowercase currentWord, the promise will be resolved. Then you should have to modify the result to uppercase the completion item.

I think it should do the job.

twxs avatar Apr 13 '18 05:04 twxs

Beautiful. I'll take a look and maybe add it as a workspace option. Though I totally agree that it's a best practice now, it would be great to have jt work for for those of us who have to use legacy CMake projects on occasion.

rlizzo avatar Apr 13 '18 19:04 rlizzo