Work in progress
IntelliJ plugin for Redscript Modding. entirely dependent on:
IntelliJ platform IDE >= 2025.1.1 (e.g. IDEA, Pycharm)
LSP4IJ intellij plugin from RedHat for LSP integration (auto installed
with this plugin)
Stage1: mimic/port vscode_extension
- skeleton project - plugin builds and installs on IDEA Community
- Target multiple IDEs - working in Pycharm community, Pycharm Pro, IDEA Community
- [x] Publish to Jetbrains Marketplacemarketplace dependency resolution currently broken! - Language server via LSP4IJ and redscript-ide
- GoToDefinition / click-thru
- Diagnostic underlining and pop-up code-lens (see limitations)
- Code-Completion
- Code-formatting
- Game Install dir configurable in UI
- Textmate Syntax Highlighting via redscript syntax highlighting (see limitations) see issue #10)
- Debugging via redscript DAP
- RedHotReload via RedHotTools
nb. i dont have a clue what i'm doing. use at your own risk.
Update IDE to 2025.1.1 or later
JetBrains Marketplace is experiencing a major bug affecting all plugins with dependencies. Use manual install until they fix it.
- ## JetBrains Marketplace broken!
- Search 'redscript' in IDE plugins marketplace
https://plugins.jetbrains.com/plugin/26709-redscript/versions/stable
-
- Get plugin zip - either:
- clone and build with intellij platform buildPlugin for very latest, OR:
- download prebuilt zip from releases
- Install redscript.x.x.x.zip in IntelliJ IDE >= 2024.3.3 via settings -> plugins -> cog icon -> install plugin from disk
- Get plugin zip - either:
- Set CyberPunk Install directory in Settings -> Tools -> Redscript (wait a moment for lsp server to restart)
- Any definitions you want to reference must exist in the editor. i.e. if you want to GoToDefinition on a function, that
function must be in the editor.
usesettings -> project -> project structure
to add workspace folders in pycharm. in IDEA use ctrl+shift+alt+s to open project settings, thenmodules -> sources
to add folders. - Save file (ctrl+S) to check for errors.
- Verify Language server exists in
View -> Tool Windows -> Language Servers -> LSP Consoles -> RedscriptLanguageServer
- Open a .reds file
- Verify RedscriptLanguageServer is in 'started' state
- Check lsp logs in tool window, should contain 'redscript server initialized!' ('redscript cache file not found at , the extension is configured incorrectly' means you didn't or incorrectly set the game install dir in settings)
if something is still wrong - please create an issue
- syntax highlighting is broken for runtime hooks eg
wrap | replace | ...
, and alsoswitch/case
statements. see issue #10 - lsp GoToDefinition will not find base-game definitions. if you find a case where it doesn't work in intelliJ but does in vsCode please open an issue
- No error checking for non-implemented abstract methods.
- Redscript v1 is in beta, no updates will be made to this plugin against the old compiler.
- Most functionality will break if there are any errors on the page - save (ctrl+s) to highlight the errors and resolve them to resume using GoToDefinition, or ReFormat, etc.