microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.57k stars 901 forks source link

Typing "desc" often results in sqlDropStoredProc code snippet #6197

Open winzig opened 5 years ago

winzig commented 5 years ago

Issue Type: Bug

Often at the end of queries, when I do an order by desc, as I type "desc" and hit enter to go to the next line, I end up triggering the sqlDropStoredProc function code snippet:

Screen Shot 2019-06-27 at 3 37 25 PM

Based on the highlighting above, it seems that it's treating each letter (D-E-S-C) as a separate "keyword" in the code snippet lookup, as not only do they not appear together as "desc" in the phrase "sqlDropStoredProc", but they don't even appear in the same order!

How can I stop this from happening?

Azure Data Studio version: Azure Data Studio 1.8.0 (96e214593190071f0b520439929b218f9fa673de, 2019-06-06T01:37:31.184Z) OS version: Darwin x64 18.6.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz (8 x 3100)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|16.00GB (0.21GB free)| |Process Argv|| |Screen Reader|no| |VM|22%|
Extensions (9) Extension|Author (truncated)|Version ---|---|--- admin-pack|Mic|0.0.2 agent|Mic|0.40.0 dacpac|Mic|0.3.0 import|Mic|0.8.0 profiler|Mic|0.8.0 schema-compare|Mic|0.3.0 server-report|Mic|0.1.5 whoisactive|Mic|0.1.1 sql-search|Red|0.3.3
kburtram commented 5 years ago

@winzig if you don't use snippets at all you can disable with the below setting. There is also an option to sort snippets at the bottom of the list, which may help.

Screen Shot 2019-06-28 at 10 08 23 AM
winzig commented 5 years ago

I may need to do that, but it seems weird that:

(a) It’s triggering at the end of a sql statement (none of these snippets make sense to trigger at that point) (b) It’s matching each individual letter of the word I typed, and in the wrong order