Open justingrant opened 6 years ago
Honestly this is probably the most irritating part of Data Studio I've come across so far. On a few occasions, I've closed down ADS & gone back to working in SSMS because of how frustrating it is. I hope this gets looked at.
I "arrived" here with the same issue and I would also like to see a fix. Maybe I found a workaround for the time being: The idea is to change the keybinding for this command (which is normally Enter). Then Enter after a table alias will behave as expected. Side effect is that you cant use Enter anymore to accept any suggestions, but if you are trained to Tab, then this should not be a problem.
edit: Changing the keybinding to Space is unintuitive in other cases, so I would just remove this keybinding.
I had the same issue and I've found an acceptable work-around for my use case: I changed the "Editor: Accept Suggestion On Enter" setting to "off". This way, I only accept autocomplete suggestion with Tab, not with Enter, which is what I am used to anyway coming from SSMS.
See also https://github.com/microsoft/azuredatastudio/issues/24149 ADS needs a better way of handling aliases!
Issue Type: Bug
When I try to enter a table alias, autocomplete changes my alias name to random matching keywords unless I manually cancel autocomplete. This is frustrating.
Repro:
select *
(press enter to go to next line)from Machine
mac
(without quotes) and hit Enter to go to the next lineExpected: No autocomplete, because this is a table alias. Or if I do see autocomplete, I don't expect it to complete a keyword that doesn't even match what I typed.
Actual: It autocompletes to the closest matching keyword which is NAMESPACE (!!) which doesn't even contain what I typed. If I use "as" to preface the alias, then I get a different autocomplete problem where it matches the table "Machine" instead of allowing me to add my alias.
Autocomplete should realize that the context I'm typing in is an alias so should turn off autocomplete in this context. Or at the very least, autocomplete should be smarter about matching only contiguous "contains" matches. Even better, autocomplete should be smarter about "contains" matching for keywords. For identifiers, e.g. "SalesAndProfitTable" I guess it makes sense to match when I type "Profit". But for keywords that are one word long, IMHO we should not be doing intra-word "contains" matching inside them. If I type "nam" I'd expect it to match NAMESPACE and UserNames, but not the SYSNAME keyword and definitely not NATIVE_COMPILATION!!!
SQL Operations Studio version: sqlops 0.32.7 (b3766d7421bac5d8596eb2ce4980da5546325282, 2018-08-30T02:48:41.576Z) OS version: Darwin x64 17.7.0
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz (8 x 2800)| |GPU Status|2d_canvas: enabledflash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|16.00GB (0.12GB free)| |Process Argv|/Applications/SQL Operations Studio.app/Contents/MacOS/Electron -psn_0_30362867| |Screen Reader|no| |VM|13%|