arnoudkooi / sn-scriptsync

Use sn-scriptsync in combination with SN Utils to be able to code in VS Code, including all benefits of a full fledged code editor
https://marketplace.visualstudio.com/items?itemName=arnoudkooicom.sn-scriptsync
Other
43 stars 28 forks source link

Add custom Intellisense #64

Closed Zmud1 closed 2 years ago

Zmud1 commented 2 years ago

Hi, Is there a way to add custom code snippets to appear in the VSCode-like background editor? Iam talking about the functionality of Syntax Macros. Like, for example, I would like to be able to input:

"vargr" +Tab/Enter in the background script window

And have it automatically changed into :

var gr = new GlideRecord(""); gr.addQuery("name", "value"); gr.query(); while(gr.next()) { }

Is there an extension file I can modify for that functionality to work? I mean, the original Intelllisense must be somewhere defined, right?

arnoudkooi commented 2 years ago

This is a default VS Code capability, check this documentation

I also recommend this dedicated ServiceNow snippet library

Zmud1 commented 2 years ago

Sure, but what I mean is for this functionality to work in a Background Script that is enchanced by SNUtils. Please, see below. While VSCode uses 'gliderecord' snippet and inserts code, the Background Script in browser doesn't see "gliderecord" snippet. Is there a way to change that?

image

I know I can sync the BG Script with vscode editor, my question is - is it possible for the snippets to work directly in BGScript in browser.

arnoudkooi commented 2 years ago

Ah ok, this is about SN Utils, not vs-scriptsync. For now you could try the Mirro in sn-scriptsync or an external snippet manager...

arnoudkooi commented 2 years ago

This is about SN Utils