What I did:
npm install -g yo generator-code
yo code and selected New Color Theme
Following instructions for name, author etc.
The ready made folder I moved to $HOME/.vscode/extensions (I am on Mac)
Content of my folder:
Inside the themes folder:
I restarted the vscode and from Code->Preferences->Color Theme I chose my theme and have the following error:
The theme was generated with editor. I also tried with theme from colorsublime but I had the same error.
This is package.json file:
{
"name": "random",
"displayName": "randomtheme",
"description": "theme",
"version": "0.0.1",
"publisher": "Milenito",
"engines": {
"vscode": "^1.5.0"
},
"categories": [
"Themes"
],
"contributes": {
"themes": [
{
"label": "Random",
"uiTheme": "vs-dark",
"path": "./themes/milenekai.tmTheme"
}
]
}
}
I really can't see where is the problem. I would appreciate any help.
Related
I followed several tutorials on the Internet and tried to build a latex environment in vscode. However, after I've installed everything and started running a .tex file, it came up with the following error:
Qt: Untested Windows version 6.2 detected!
xelatex: Bad parameter value.
xelatex: Data: font_mem_size
source code test.tex: (I put it in a folder on desktop)
\documentclass{article}
\begin{document}
Hello World!
\end{document}
I tried Google, but didn't find any effective approach. I also restarted my computer and reinstalled MiKTeX, but nothing changed.
By the way: I installed LaTeX workshop, MiKTeX and Strawberry Perl (just following the tutorial) and added this into the settings.json of vscode.
"latex-workshop.latex.tools": [
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
"latex-workshop.latex.recipes": [
{
"name": "xelatex",
"tools": [
"xelatex"
],
},
{
"name": "pdflatex",
"tools": [
"pdflatex"
]
},
{
"name": "xe->bib->xe->xe",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"name": "pdf->bib->pdf->pdf",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
}
],
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.latex.autoBuild.run": "onFileChange",
"latex-workshop.message.error.show": false,
"latex-workshop.message.warning.show": false,
Update: the issue was solved by reinstalling MiKTeX and resetting its environment variables in PATH.
The issue was eventually solved by reinstalling MiKTeX and resetting its environment variables in PATH. (Another way is to directly install MiKTeX in its recommended directory, which is how I solved the problem.) In addition, the code I added in the settings.json should be discarded (or vscode will report errors).
I use visual studio code and setup it following theses instructions :
https://github.com/apache/royale-asjs/wiki/Visual-Studio-Code
Everythings worked fine.
For now I deleted bin folder in main project, and when launch debug, then bin and js-debug and others stuffs are right generated, but my assets dir with used jpg are not copied.
For exemple in the code I use <j:Image src="assets/logo.png" percentHeight="100"/> but the is no assets/logo.png in js-debug. So I must copy it manualy...
Here is my asconfig.json :
{
"compilerOptions": {
"targets": [
"JSRoyale"
],
"theme": "${royalelib}/themes/JewelTheme/src/main/resources/defaults.css",
//"html-template": "src/main/resources/jewel-example-index-template.html",
"source-map": true,
"source-path": [
"src"
],
},
"files":
[
"src/main/royale/App.mxml"
]
}
and tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"type": "actionscript",
"clean": true,
"problemMatcher": []
},
{
"label": "build",
"type": "actionscript",
"debug": true,
"problemMatcher": []
}
]
}
Could someone tell me how to copy assets folder automatically ?
thanks
Regards
Add to your asconfig.json file:
"copySourcePathAssets": true
I am creating a VS Code WebView extension that I wish to invoke/trigger when I open a file of a specific file extension name. e.g. MyFile.abc.
Within myExt I added the onFileSystem to the activationEvents within package.json:
{
"name": "myext",
"description": "A Webview API Sample",
"version": "0.0.2",
"publisher": "vscode-myext",
"engines": {
"vscode": "^1.25.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onWebviewPanel:myExt",
"onFileSystem:abc",
"*"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "myExt.start",
"title": "Start myExt ",
"category": "My Ext"
}
]
},
"scripts": {
"vscode:prepublish": "tsc -p ./",
"compile": "tsc -p ./",
"watch": "tsc -w -p ./",
"postinstall": "node ./node_modules/vscode/bin/install"
},
"dependencies": {
"supports-color": "^6.0.0",
"vscode": "^1.1.18"
},
"devDependencies": {
"#types/node": "^10.5.2",
"tslint": "^5.11.0",
"typescript": "^2.9.2"
}
}
When I add "onFileSystem:abc" to activationEvents in myExt I was expecting my webview extension to open anytime I opened a file with the extension .abc however nothing happened.
I then tried the activationEvents setting "*", expecting that my webview extension would open at the start of VSCode but that too did not open my extension.
I am able to open and run my extension through Ctrl+Shift+P as per normal.
I don't think there's any activation event that fires when a file with a specific name or extension is opened. The onFileSystem event you were trying has a different purpose and checks for the scheme of a file.
Normally you would use onLanguage for this, and use the language identifier that your .abc extension is associated with. If it's not a popular file extension, you might need to register it in the contributes.languages section.
I then tried the activationEvents setting "*", expecting that my webview extension would open at the start of VSCode but that too did not open my extension.
The activate() method of your extension should always be called if the activation event is *. I assume by "running it with the command palette" you mean debugging the extension through the extension development host? Unless your extension is in your <User>/.vscode/extensions directory, it wouldn't be included in regular VSCode executions. It should then also be listed in the Extensions panel.
I think that you need to use
"workspaceContains:*.abc" as activationEvents
I think you have to do something for below in package.json
{
"activationEvents": [
"onCommand:"**HERE WILL BE YOUR EXTENSION NAME WHICH YOU REGISTERED**"
],
"contributes": {
"menus": {
"explorer/context": [
{
"when": "resourceLangId == **abc**", // this is the extension of the file where you want to execute your command
"command": "**YOUR COMMAND NAME**",
"title": "Anything relevent title",
"group": "navigation"
}
]
}
}
}
According to custom-editor-sample example by Microsoft, you need to do the following configuration in package.json:
"contributes": {
"customEditors": [
{
"viewType": "catCustoms.catScratch",
"displayName": "Cat Scratch",
"selector": [
{
"filenamePattern": "*.cscratch"
}
]
},
I've started building a new plugin for Adobe XD, but for some reason, I can't see it in the plugin menu, even after several reloads.
I'm pretty sure I structured the folder correctly and I'm building in the correct develop folder...
Plugin location
Make sure your plugin is in XD's develop folder. You can find that folder here:
macOS:
~/Library/Application\ Support/Adobe/Adobe\ XD\ CC/
Windows:
C:\Users\%USERNAME%\AppData\Local\Packages\Adobe.CC.XD_adky2gkssdxte\LocalState\
The XD plugin API docs have more information on plugin location.
Manifest errors
Errors in the plugin manifest are the most likely culprit.
Here's an example of a manifest.json file:
{
"id": "YOUR_ID_HERE",
"name": "Name of Your Plugin",
"version": "0.0.1",
"description": "Description of your plugin.",
"icons": [
{ "width": 96, "height": 96, "path": "images/icon#2x.png" }
],
"host": {
"app": "XD",
"minVersion": "13.0.0"
},
"uiEntryPoints": [
{
"type": "menu",
"label": "Hello World",
"commandId": "helloCommand",
"shortcut": { "mac": "Cmd+Shift+P", "win": "Ctrl+Shift+P" }
}
]
}
Note that the icons and uiEntryPoints values are arrays of objects, not an objects.
I was able to successfully add basic language support for ColdFusion in visual studio code and for the most part it seems to work properly.
The only issue is that the syntax highlighting does not work at all, specifically the colorization. Otherwise the file extension association works and bracket highlight works and even the commenting rules work.
I used the yo code generator to create the new language.
I got the .tmLanguage file from here:
https://github.com/textmate/coldfusion.tmbundle
I feel like there must be a step I'm missing in order to get the new language to work with the theme being used.
Thanks in advance!
EDIT: added package.json
{
"name": "cf",
"displayName": "ColdFusion",
"description": "ColdFusion VSCode Support",
"version": "0.0.1",
"publisher": "epetti",
"engines": {
"vscode": "^0.10.1"
},
"categories": [
"Languages"
],
"contributes": {
"languages": [{
"id": "coldfusion",
"aliases": ["ColdFusion", "coldfusion"],
"extensions": [".cfm",".cfml",".cfc"],
"configuration": "./coldfusion.configuration.json"
}],
"grammars": [{
"language": "coldfusion",
"scopeName": "text.html.cfm",
"path": "./syntaxes/coldfusion.tmLanguage"
}]
}
}