From bba4305aa0d22be04c4a1ea4a61b13dd1bc4b0c0 Mon Sep 17 00:00:00 2001 From: Thiago Lino Date: Wed, 11 Jun 2025 15:30:24 -0300 Subject: [PATCH] feat: add #snippet and @render completions --- packages/site-kit/src/lib/codemirror/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/site-kit/src/lib/codemirror/index.js b/packages/site-kit/src/lib/codemirror/index.js index 24152606a3..be75f54d3c 100644 --- a/packages/site-kit/src/lib/codemirror/index.js +++ b/packages/site-kit/src/lib/codemirror/index.js @@ -25,13 +25,18 @@ const logic_block_snippets = [ label: '#await :then', type: 'keyword' }), - snippetCompletion('#key ${}}\n\n{/key', { label: '#key', type: 'keyword' }) + snippetCompletion('#key ${}}\n\n{/key', { label: '#key', type: 'keyword' }), + snippetCompletion('#snippet ${}()}\n\n{/snippet', { + label: '#snippet', + type: 'keyword' + }) ]; const special_tag_snippets = [ snippetCompletion('@html ${}', { label: '@html', type: 'keyword' }), snippetCompletion('@debug ${}', { label: '@debug', type: 'keyword' }), - snippetCompletion('@const ${}', { label: '@const', type: 'keyword' }) + snippetCompletion('@const ${}', { label: '@const', type: 'keyword' }), + snippetCompletion('@render ${}()', { label: '@render', type: 'keyword' }) ]; /**