Versions from 1.0.0 and onwards: The MIT License (MIT)
Copyright (c) 2016 Kapiainen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Versions prior to 1.0.0: Used according to the license included in the original package by Bethesda Game Studios and Mark Hanna. Said license is included in this package.
File credits
Version from 1.0.0 and onwards: MrJack (aka Kapiainen aka mrpwn)
Versions prior to 1.0.0: Quad2Core MrJack Based on the work done by Bethesda Game Studios and Mark Hanna. Used according to the license included in the original package and said license is included in this package.
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
Changelogs
Version 2.7.1
Skyrim
- Fixed a bug in the linter's assignment validation.
Version 2.7.0
Skyrim
- Added completions for End* keywords (e.g. EndWhile).
- Fixed a bug that caused the linter to crash.
Version 2.6.10
Skyrim
- Fixed a bug that caused linter to crash.
Version 2.6.9
Skyrim
- Fixed a bug that caused an exception to not be handled properly.
- Updated an error message regarding undefined import paths in the user settings.
Version 2.6.8
Skyrim
- Fixed bugs that caused the linter to crash when attempting to cache scripts under certain circumstances.
Version 2.6.7
Skyrim
- Added support for completions, which had previously been omitted, directly after the Return keyword in functions with a defined return type.
Version 2.6.6
Skyrim
- Fixed a typo that caused the plugin to crash under certain circumstances.
Version 2.6.5
Skyrim
- Updated some error messages.
- Fixed validation of function return types and return statements.
- Fixed missing quotation marks in the default values of string arguments in function completions.
- Added validation of the size of the int literal used to initialize an array.
- Added validation of the assignment operator used to assign to an array element.
- Updated the validation of assigment statements.
- Updated the definition of float literals in lexical analysis.
Version 2.6.4
Skyrim
- Fixed a bug that caused the plugin to crash in Sublime Text 2 when the linter processed multiple scripts with lexical, syntactic or semantic issues and the linter_panel_error_messages setting was enabled.
Version 2.6.3
Core
- Updated readme to clarify certain aspects of installing and setting up the package.
Version 2.6.2
Skyrim
- Added exception handling to the plugin and linter to catch UnicodeDecodeError errors raised when attempting to read scripts while using the default encoding of the operating system's locale.
- Added a confirmation dialog to the 'Generate completions' command when attempting to process more than 100 scripts.
Version 2.6.1
Skyrim
- Fixed issue that caused errors when attempting to call *Find* and *RFind* functions on arrays of base types.
- The name of the first argument in the completions for the *Find* and *RFind* functions of arrays now changes based on the array's element type (abElement, afElement, aiElement, asElement, or akElement).
Version 2.6.0
Core
- Added a boolean setting for displaying docstrings in function/event call tooltips.
- Added a warning to the build system framework for when an import path defined in a module's settings does not actually exist on the filesystem.
Skyrim
- Added docstring support to classes representing scriptheaders, functions, events, and properties in the linter.
- Added support for displaying docstrings in tooltips for function/event calls.
Version 2.5.0
Skyrim
- Added indentation and comment rules with a .tmPreferences file.
- Fixed a bug in the linter. The bug caused accessing the 'Length' property of bool, float, int, and string arrays to throw a semantic error.
Version 2.4.0
Core
- Added setting for splitting the full paths to scripts into filenames and folder paths in the *Open script* command.
Skyrim
- Shortened descriptions in definition completions (e.g. state, function).
- Updated syntax highlighting to support whitespace between function/event identifiers and left parentheses in function/event definitions.
- Fixed incorrect syntax highlighting when passing '\<identifier\> == \<expression\>' as an argument. It was previously highlighted as if one were passing an argument while specifying the corresponding parameter identifier.
Fallout 4
- This module has been removed until further notice. The changes made in the latest version of Papyrus, which is used in Fallout 4, are extensive and incompatible with e.g. the build system framework. The package provided by Bethesda on the official Fallout 4 Creation Kit wiki should be used while this module is being developed.
Version 2.3.0
Core
- Added support for "arguments" setting in build systems.
Fallout 4
- Added "Release" and "Final" build systems to Fallout 4.
Version 2.2.0
Core
- Added the ability to use the Open script command in views that do not have a compatible syntax. An additional panel, which allows you to select which module's import paths should be used, opens up after you enter the (partial) name of the script to look for.
- Added support for listing all scripts with the Open script command by typing in an asterisk (*) as the only character.
- Added an optional title setting to module settings. The string value is used when listing modules by name. If this setting does not exist, then the module's key is used instead in listings.
Skyrim
- Code completion
- Added completions for imported global functions when defining arguments in function/event calls.
- Tooltips
- Refactored tooltips for function/event parameters in order to reduce the amount of work that is done.
- Added parameter tooltips for imported global functions.
Version 2.1.0
Core
- Added new settings for toggling tooltips and customizing the looks of tooltips.
- Added a setting to toggle function/event parameters in function/event call completions.
Skyrim
- Added an optional tooltip that shows the name of the function/event and its parameters when typing inside of a function/event call (Sublime Text 3 build 3070 or newer only).
- Linter
- Fixed validation of explicit casting.
- Fixed argument validation in function calls.
- Added restrictions imposed on functions by the 'Global' keyword to the semantic analysis.
- Added a warning when no import paths are passed to the semantic analysis (e.g. if no paths have been defined in the settings).
- Code completion
- Updated completions for functions/events in states.
- Added completions for parameters of the function/event that is being called.
- Added back completions for inherited functions/events that had been missing since the previous version.
Version 2.0.0
Core
- The build system now places the compiled script one folder above the script's source file ("\Scripts\Source\Example.psc" is compiled to "\Scripts\Example.pex") if no output folder has been specified in the user settings.
- Updated function, event, and property completions to always include the source (i.e. the script) that the completions are from.
- The 'Open script' command automatically uses the first selection, if a piece of text has been selected, as the initial value.
- Added a new setting ('linter_error_line_threshold') that defines how many lines a linter error can move up or down by between passes before it is considered a new error that should be centered.
Skyrim
- Added a command to manually clear the various caches relevant to the linter and code completion without needing to restart Sublime Text. It is useful when modifying the contents of the 'import' setting in the user settings or one of the folders specified in that setting.
- Linter
- Switched from using filenames to using a view's buffer ID for identification purposes. Scripts no longer have to have been saved to a file for the linter, and subsequently the code completion, to work.
- Switched to using the unmodified lexical and syntactic analysis classes in semantic analysis when processing other scripts in order to get their properties, functions, and events.
- Changed the way that lexical and syntactic analysis are performed in an effort to catch syntactic errors earlier.
- Semantic analysis has been modified to no longer discard statements after use and instead store them in an object, which represents the script and can be used by the code completion system.
- NodeVisitor now returns an object with 'type', 'array', and 'object' fields instead of just a string.
- Error messages in the status bar are now persistent until they have been resolved.
- Removed gutter icon from highlighted lines.
- Errors are no longer centered multiple times unless either the line with the error has moved up or down more than specified in the user settings (default: 2 lines) or there has been a linter pass without errors.
- Modified error messages.
- Fixed 'GetPath' so that it works in a Unix environment where many file systems are case-sensitive.
- Fixed a bug that caused issues when using identifiers starting with 'true' and 'false'.
- Fixed NodeVisitor so that it returns the correct values from binary operator nodes involving comparison or logical operators.
- Fixed a bug that caused non-global functions from imported scripts to be taken into account when checking for ambiguous function calls.
- Fixed a bug that stopped casting 'self' to a type that extends the current script.
- Fixed a bug that prevented the use of 'self' as an argument in function calls when the parameter type is the same as the current script.
- Added specific warnings when declaring a variable/property with an identifier that is already in use in a property declaration in a parent script.
- Added support for distinguishing between attempts to call global and non-global functions.
- Added errors when attempting to use the 'Self' or 'Parent' variables in functions with the 'Global' keyword.
- Added validation of function return types.
- Added more specific exceptions (e.g. when expecting a type, a literal, a keyword, or an identifier).
- Added an error about casting to non-existing types.
- Added an error when attempting to cast an expression that does not return a value.
- Added errors when attempting to explicitly cast outside of the chain of inheritance of the type that the left-hand side expression evaluates to.
- Added an error when attempting to access properties, functions, or events of expressions that evaluate to a base type or nothing.
- Added an error when a variable's, property's, or parameter's name is the same as a known type.
- Added an error when attempting to assign a non-array value to an array.
- Added an error when attempting to use a type as if it were a variable (e.g. accessing a property directly via a type).
- Added errors when attempting to incorrectly use arithmetic or logical operators.
- Code completion
- Performance has been improved by caching the result of the linter's semantic analysis.
- More scenarios are now supported (e.g. keywords in script headers, variable declarations, property declarations, function/event declarations).
- The source (the current script, the parent script, or another script) of the completion is specified.
Version 1.0.7
- Fixed a bug in the 'Generate completions' command.
- Linter optimizations.
Version 1.0.6
- Fixed an issue that produced incorrect completions for array parameters in function and event completions.
Version 1.0.5
- Fixed string literal regex in the linter.
Version 1.0.4
- Fixed a bug in the linter related to casting from arrays to other types.
- Fixed a bug that caused certain completions to be suggested outside of function/event definitions when they should not.
Version 1.0.3
- Added completions for Find and RFind functions for arrays.
- Added missing return type in the description of the GetState function's completion.
Version 1.0.2
- Fixed a bug in the linter involving validation of array arguments and array parameters in function calls.
Version 1.0.1
- Implemented support in the linter for Find and RFind functions for arrays.
- Implemented support in the linter for documentation strings for functions and events with the Native keyword.
Version 1.0.0
- Major rewrite
- Introduction of version numbers
Sublime Text 2 and 3 package for the Papyrus scripting language.
SublimePapyrus is a package that aims to provide a development environment for the Papyrus scripting language within Sublime Text. The package is split into a core package and additional packages for specific games and/or resources. The core package is always required, but the other packages usually depend upon the core package or one of the other packages.
How to install - Download a release. - Start Sublime Text. - Click on the Browse Packages... option in the Preferences section of Sublime Text's toolbar. - The \Data\Packages folder should now be open. Browse to \Data\Installed Packages. - Open the release archive that was downloaded and extract the .sublime-package files to \Data\Installed Packages. - Restart Sublime Text.
Features - Syntax highlighting - Build systems - Linter - Intelligent code completion - Tooltips - Various commands
Credits: From version 1.0.0 onwards: Kapiainen (MrJack, mrpwn)
Prior to version 1.0.0: Quad2Core MrJack Based on the work done by Bethesda Game Studios and Mark Hanna. Used according to the license included in the original package and said license is included in this package.