[Feat]: SQL editor: reusable snippets with tab-stop placeholders

Open
#1,417 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@markankamaransheogarat-sys is already working on this.

Since Nov 7, 2026.

  • #1432 by @markankamaransheogarat-sys — open

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
sql, tauri, typescript

Research direction

Start with packages/web-ui/src/utils/autocomplete.ts, then read packages/web-ui/src/hooks/useSqlAutocompleteRegistration.ts and packages/web-ui/src/components/ui/SqlEditorWrapper.tsx to understand completion and editor integration. Check the saved query persistence references in packages/web-ui/src/contexts/SavedQueriesProvider.tsx and src-tauri/src/application/productivity.rs for adjacent patterns. Done means personal snippets support editing, persistence, dialect scoping and tab stops while meeting the listed completion, undo, security and test criteria.

Written by the indexing model from the issue text.

Description

feature request help wanted
Prerequisites
  • I have written a descriptive issue title.
  • I have searched existing issues and open pull requests to avoid duplicating an existing feature request.
🚀 Feature Proposal

Add a personal SQL snippet library with name, trigger prefix, optional dialect scope and snippet body. Insert snippets through Monaco completion with editable tab stops; do not treat snippets as executable saved queries.

Motivation

Small reusable templates avoid repeatedly typing standard joins, reporting fragments and investigation scaffolding.

Example
Define prefix active_orders with a body containing SELECT ${1:columns} FROM ${2:orders} WHERE ${3:condition}; then navigate between placeholders after insertion.
Acceptance criteria
  • Create/edit/delete snippets and validate trigger/body; store a versioned format without credentials or automatic query execution.
  • Use Monaco snippet insertion for tab stops/defaults; make snippet completion distinguishable from schema suggestions.
  • Honor dialect scoping and avoid triggering inside comments/strings unless deliberately invoked; define behavior for duplicate prefixes.
  • Keep snippet insertion one editor undo operation and preserve existing autocomplete acceptance and keybindings.
  • Test persistence/migration, placeholder navigation, escaped literal dollar signs, duplicate prefixes and interaction with normal completions.
Where to start
  • packages/web-ui/src/utils/autocomplete.ts registers completion providers.
  • packages/web-ui/src/hooks/useSqlAutocompleteRegistration.ts and packages/web-ui/src/components/ui/SqlEditorWrapper.tsx manage editor integration.
  • packages/web-ui/src/contexts/SavedQueriesProvider.tsx and src-tauri/src/application/productivity.rs are adjacent persistence references, not an assumed snippet-compatible model.

Boundary: personal snippets, no team synchronization or query execution. Existing saved queries remain a separate workflow.

Contributor notes
  • Follow AGENTS.md and the repository rules. Run GitNexus upstream impact analysis before editing existing symbols and report the blast radius.
  • Add new UI strings to every locale under packages/web-ui/src/i18n/locales/; use design tokens, keyboard access and visible focus.
  • Keep pure frontend helpers under packages/web-ui/src/utils/ and tests in the matching packages/web-ui/tests/ paths. Run focused tests, typecheck and relevant repository checks.
  • Shared backend behavior belongs in src-tauri/src/application/ or plain modules. Keep Tauri code under transport/desktop/, expose shared web behavior when applicable and preserve cargo check --no-default-features from src-tauri/ for backend changes.
  • Questions? Ask here or on Discord.
Dominant language
TypeScript
Stars
5.1k
Forks
335
Avg merge
1d 11h
Merged PRs (30d)
280

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TabularisDB/tabularis

All issues in TabularisDB/tabularis

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.