-
Notifications
You must be signed in to change notification settings - Fork 50
FAQ
Select File > Preferences > Color Theme
and select a SAS provided theme.
To manage shortcuts in VS Code, Click the "Manage" button from the left bottom and select Keyboard Shortcuts
. Type "run sas" or so to filter and you'll see SAS: Run SAS code
command and you can define shortcuts to it.
Can I make F3 to automatically run only selected code (when there's a selection) or all code (when there's no selection)?
User can assign a same shortcut to multiple commands with proper when clauses.
Here's an example in keybindings.json
{
"key": "f3",
"command": "SAS.run",
"when": "editorTextFocus && editorLangId == 'sas'"
},
{
"key": "f3",
"command": "SAS.runSelected",
"when": "editorHasSelection && editorTextFocus && !editorHasMultipleSelections && editorLangId == 'sas'"
}
To prevent the autocomplete from popping up on pressing spacebar, uncheck the "Suggest On Trigger Characters" option in settings. Then the autocomplete will only show when you type matched text or press Ctrl+spacebar.
Set the "Accept Suggestion On Enter" option to false in settings. Then only Tab key will commit suggestions.
Also note that all settings can be set specific to sas to not impact other languages. Refers to https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settings
VS Code provides a default autocomplete that suggests existing words gathered in opened documents when there's no other autocomplete provider. But when an extension provided some autocomplete items, the default autocomplete will not show up. It's not specific to SAS. Refers to https://github.com/microsoft/vscode/issues/21611
A new session must be created the first time you run SAS code. Connection time will vary depending on the server connection. Subsequent runs within the session should be quicker.
SAS administrator can refers to this documentation for how to generate client IDs.
The client ID needs authorization_code
grant type. If you want it to automatically refresh access token, it also need refresh_token
grant type.
You will likely need to import your Viya server certificate into your local certificate store, as below steps:
- Obtain the root CA
- Import it into your local store. The steps vary across Operating Systems. Here's an instruction for Windows. For Mac OS, use the Keychain Access application, and change the "When using this certificate" setting from "Use System Default" to "Always Trust".
If it doesn't work, here's a workaround:
- Set environment variable NODE_TLS_REJECT_UNAUTHORIZED to 0 (This will bypass the certificate check). Or set NODE_EXTRA_CA_CERTS to include your certificate file.
- Shut down all VS Code instances and restart to pick up the environment variable. If you're connecting to a remote workspace, please set the environment variable on the remote system and kill all vscode server processes (for example, run
ps -aux | grep vscode-server
on the remote Linux to see the processes).
Please specify the correct protocol. For example, if your Viya server is on https, make sure you included https://
in your endpoint
setting.
Please try restart your VS Code.