Visual Studio Code: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed source for autocomplete functionality to a VSCode extension.)
Line 15: Line 15:
For {{tf2|2}}, auto-completion of the game's built-in [[Team Fortress 2/Scripting/Script Functions|script functions and constants]] is also available.
For {{tf2|2}}, auto-completion of the game's built-in [[Team Fortress 2/Scripting/Script Functions|script functions and constants]] is also available.


To install, press Ctrl + Shift + P in VSCode.
Click on the Extensions button in VSCode. This is represented as a icon of building blocks, usually on the left side of the window.


Search for "Configure User Snippets" and click on the command, then search for "squirrel" and click on it.
Search for "VScript" in the search bar. Install the following extension:
You should have a "squirrel.json" window open at this point.
* TF2 VScript Snippets (by Sour Dani)


Replace the contents of this window with [https://github.com/ZacharyTalis/tf2-vscript-snippets/blob/main/squirrel.json the text here].
Restart VSCode. Functions and constants should now autocomplete!
{{tip|Press the Raw button on the Github page and then press Ctrl + A to select all of the text and Ctrl + C to copy everything. You can now paste this directly into the VSCode document.}}
 
Save the file, and now VSCode will provide autocomplete for your scripts!


== See Also ==
== See Also ==

Revision as of 01:58, 11 November 2023

This page describes how to set-up Visual Studio Code (VSCode) for VScript purposes.

Usage

Squirrel Squirrel

Click on the Extensions button in VSCode. This is represented as a icon of building blocks, usually on the left side of the window.

Search for "Squirrel" in the search bar. Install the following extensions:

  • Squirrel Language Supports (by marcinbar)
  • Squirrel Language Linter (by marcinbar)

Restart VSCode. Now the language is ready for use in the editor!

Autocomplete

For Team Fortress 2 Team Fortress 2, auto-completion of the game's built-in script functions and constants is also available.

Click on the Extensions button in VSCode. This is represented as a icon of building blocks, usually on the left side of the window.

Search for "VScript" in the search bar. Install the following extension:

  • TF2 VScript Snippets (by Sour Dani)

Restart VSCode. Functions and constants should now autocomplete!

See Also

External links