Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>TF2 VScript SupportNew to Visual Studio Code? Get it now.
TF2 VScript Support

TF2 VScript Support

ocet247

|
447 installs
| (0) | Free
Language Server for TF2 VScript
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Team Fortress 2 VScript Support

Features

  • Completions
    • Keywords
    • Symbols
    • String literals (like script names, netprops, attributes, etc)
    • Members of builtin types
  • Completions for documentation comments
    • Autogenerated comment for variables and functions
    • Tags
    • Types
    • Parameter names (for @param)
  • Hover
  • Go to definition
  • Go to type definition
  • Find references
  • Rename
  • Semantic tokens
  • Inlay hints
  • Signature help
  • Document symbols
  • Document link for imports
  • Workspace symbol
  • Selection range

Diagnostics

  • Syntax checking
  • Type checking for operations and function call arguments
  • Unused local variables
  • Unreachable code
  • Workspace diagnostics (disabled by default)

Additional

  • String literal name resolution
  • Type inference for both variables and functions
  • Documentation comments with simple types
  • Import resolution from IncludeScript
  • Standard library symbols included from both Squirrel and VScript

Possible future development (in order)

  • Handle events (like OnScriptHook_OnTakeDamage by using a preset signature for certain keys)
  • Complex type system (mostly for tables)
  • Formatting
  • Completions and validation for assets like models / sounds
  • Improving reuse with salsa for individual files (meaning more speed)

Sidenode

Functionality is mostly checked using a comprehensive set of scripts, there might be unknown bugs. Please report at https://github.com/ocet247/tf2-vscript-support/issues.

Even though the language server implements type inference, the type might not always be predictable. This may lead to incorrect hover, completions and overall state of the variable. By specifying the type with a doc comment you make the server's job a lot easier, in addition to knowing the exact type you would also get diagnostics for doing incorrect operations on the variable

Credits

  • Valve Development Community for VScript function signatures and documentation https://developer.valvesoftware.com/wiki/VScript
  • Parts of LSP handling from rust-analyzer and auto-lsp
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft