Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved code snippets and autocompletion #5209

Open
pawelsalawa opened this issue Jan 13, 2025 · 0 comments
Open

Improved code snippets and autocompletion #5209

pawelsalawa opened this issue Jan 13, 2025 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@pawelsalawa
Copy link
Owner

Default code snippets should be initialized with common queries, such as:

SELECT * FROM :table_name;
SELECT * FROM :table_name WHERE :conditions;
DELETE FROM :table_name WHERE :conditions;
INSERT INTO :table_name (:columns) VALUES (:values);
UPDATE :table_name SET :assignments WHERE :conditions;

Then the code assistant should consider completion for empty SQL to be completion for templates (should switch to templates view initially - this should be configurable). This will allow users to quickly start typing queries from empty input.

Finally, any placeholders (:token) should be preselected one by one to be replaced by user. Tab-key should move to next :token, until last one is tabbed-out. This (token replacing) should work generally for all code snippets.

Tokens should be detected by tokenizer, as user may use :value inside of string, or quoted object name.

@pawelsalawa pawelsalawa added the enhancement New feature or request label Jan 13, 2025
@pawelsalawa pawelsalawa added this to the 3.5.0 milestone Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant