forked from renpy/vscode-language-renpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request renpy#21 from rdurfee/master
* Extension Settings - allows you to enable/disable certain new functionality * Hover - Hovering over a keyword will display the selected item's source file/location as well as documentation if available * Definition - Adds support for right-click Go To Definition (F12), which will jump to the selected keyword's source * Document Symbols - Document Symbols are displayed in the Outline window in the sidebar * Signature Help - Shows the documentation pop-up as you enter a function's arguments * Completion - Displays a pop-up auto-complete menu with appropriate choices as you type your script * Document Color - Displays a color block next to detected colors in your script and allows you to pick new colors with a click * Reference - Adds support for Go To Reference, which searches your documents for the selected keyword * Folding - Adds folding support to collapse logical sections of your script in the editor * Semantic Tokens - Detects parameters and variables in screens and functions and colorizes them correctly * Diagnostics - Adds support for the detection of issues with an indentation or invalid filenames/variable names and marks them as errors or warnings in the editor * Updated README.md to provide more information about the new features.
- Loading branch information
Showing
33 changed files
with
6,292 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"out": false // set this to true to hide the "out" folder with the compiled JS files | ||
"**/*.rpyc": true | ||
}, | ||
"search.exclude": { | ||
"out": true // set this to false to include "out" folder in search results | ||
} | ||
}, | ||
"cmake.configureOnOpen": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
node_modules | ||
out/test/** | ||
out/**/*.map | ||
src/** | ||
**/*.ts | ||
.gitignore | ||
tsconfig.json | ||
vsc-extension-quickstart.md | ||
tslint.json | ||
!renpy.json | ||
!renpyauto.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import os | ||
import subprocess | ||
import sys | ||
|
||
import renpy.editor | ||
|
||
class Editor(renpy.editor.Editor): | ||
|
||
has_projects = True | ||
|
||
def get_code(self): | ||
""" | ||
Returns the path to the code executable, if None. | ||
""" | ||
|
||
DIR = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
if renpy.windows: | ||
code = "Code.exe" | ||
elif renpy.macintosh: | ||
DIR = os.path.abspath("/Applications") | ||
code = os.path.join(DIR, "Visual Studio Code.app", "Contents", "Resources", "app", "bin", "code") | ||
else: | ||
code = "code" | ||
|
||
return code | ||
|
||
def open(self, filename, line=None, **kwargs): | ||
if line: | ||
filename = "{}:{}".format(filename, line) | ||
self.args.append(filename) | ||
|
||
def open_project(self, project): | ||
if renpy.windows: | ||
project = '"{}"'.format(project) | ||
elif renpy.macintosh: | ||
project = project.replace(' ', '\ ') | ||
self.args.append(project) | ||
|
||
def begin(self, new_window=False, **kwargs): | ||
self.args = [ ] | ||
|
||
def end(self, **kwargs): | ||
self.args.reverse() | ||
|
||
if renpy.macintosh: | ||
code = self.get_code() | ||
args = [ code ] + self.args | ||
args = [ renpy.exports.fsencode(i) for i in args ] | ||
subprocess.Popen(args) | ||
else: | ||
args = self.args | ||
args = [ renpy.exports.fsencode(i) for i in args ] | ||
subprocess.call(["code", "-g", args], shell=True) | ||
|
||
def main(): | ||
e = Editor() | ||
e.begin() | ||
|
||
for i in sys.argv[1:]: | ||
e.open(i) | ||
|
||
e.end() | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"files.exclude": { | ||
"**/*.rpyc": true | ||
} | ||
} |
Oops, something went wrong.