Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/templates/playgroundFromCollectionTreeItemTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { createTemplate } from './templateHelpers';

export const playgroundFromCollectionTreeItemTemplate = createTemplate(
(databaseName, collectionName) => `// MongoDB Playground
(databaseName, collectionName) => `/* global use, db */
// MongoDB Playground
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the same string in every playground, would it make sense for us to put it into a helper function? So all of them then call that templateHeader. Not a blocker, fine as is.

// Use Ctrl+Space inside a snippet or a string literal to trigger completions.

// The current database to use.
Expand Down
3 changes: 2 additions & 1 deletion src/templates/playgroundFromDatabaseTreeItemTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { createTemplate } from './templateHelpers';

export const playgroundFromDatabaseTreeItemTemplate = createTemplate(
(currentDatabase) => `// MongoDB Playground
(currentDatabase) => `/* global use */
// MongoDB Playground
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.

// The current database to use.
Expand Down
3 changes: 2 additions & 1 deletion src/templates/playgroundInsertDocumentTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const template = `// MongoDB Playground
const template = `/* global use, db */
// MongoDB Playground
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.

// The current database to use.
Expand Down
Loading