How to configure SublimeLinter 4.0.1 - sublimetext3

I'm using Sublime Text 3, and SublimeLinter just upgraded itself to version 4.0.1.
I've read the docs but can't work out how to get it working properly. I have tried copying the default settings into user settings and changing them but it has made no difference (this is via Preferences > Package Settings > Sublime Linter > Settings).
The gutter icons are all just white; I've tried setting it to:
"gutter_theme": "Default",
I've also tried changing the icon in styles:
"styles": [
{
"mark_style": "outline",
"priority": 1,
"scope": "region.yellowish markup.changed.sublime_linter markup.warning.sublime_linter",
"icon": "warning",
"types": [
"warning"
]
},
{
"mark_style": "outline",
"priority": 1,
"scope": "region.redish markup.deleted.sublime_linter markup.error.sublime_linter",
"icon": "error",
"types": [
"error"
]
}
],
The outline around error text is now incredibly faint and I can barely see it; previously it was clear and bright.
Anybody know how to configure the new version to highlight errors clearly and show different icons for warnings, errors? Thanks for any help!
(How I wish this hadn't updated itself. The docs say you can manually install an older version but that looks like another project in itself, I just want to get on with some work!)
Edit: more fiddling around and setting "mark_style": "fill", in "styles" has at least made the errors visible on the page. But I can't figure out how to get the gutter icons to be different.

It's not you, there's an open issue on GitHub. See here.

Related

HtmlResponse is not supported on this device

I have developed interactive canvas application and it was working fine with devices having display.
Suddenly when I checked it today it says "Application is not responding, try again later.". When I checked in test simulator and gone through debug I have received following error printed in debug.
"sharedDebugInfoList": [
{
"name": "ResponseValidation",
"debugInfo": "",
"subDebugEntryList": [
{
"name": "MalformedResponse",
"debugInfo": "expected_inputs[0].input_prompt.rich_initial_prompt.items[1].html_response: HtmlResponse is not supported on this device..",
"subDebugEntryList": []
}
]
}
],
It was working and users were using it in their mobile device, but this sudden error made me blind to understand it. I have not made even 1 line of change in my code. I have even checked cloud logs and there is nothing. Here is what I am doing when user enters in my action.
app.intent('welcome', (conv) => {
console.log('capabilities = ',conv.surface.capabilities)
if (!conv.surface.capabilities.has('actions.capability.SCREEN_OUTPUT')) {
conv.close('Sorry, this device does not support Interactive Canvas!');
return;
}
conv.ask(`Welcome! Let's start the game`);
conv.ask(new HtmlResponse({
url: '<url of my website having interactive canvas support>',
}));
});
Here is the action that I am facing error.
The action seems to be working ok for me.
The most common reason I've seen for it not working is that the category wasn't set to "Games & Fun" (or was cleared for some reason) or the Interactive Canvas checkbox wasn't set.
To make sure you are still in the "Games & Fun" category, go to the Actions Console, the "Deploy" tab, and the "Directory" information.
Then, towards the bottom of that same page, make sure you have the Interactive Canvas checkbox set.

JSDoc: How to include multiple .md file

This is my first time been asked to write a documentation and my choice of way to do it is by using jsdoc.
This following is the sample jsdoc.json config file for my jsdoc. It read just a single README.md file.
{
"source": {
"include": "./client/src",
"includePattern": ".js$",
"excludePattern": "(node_modules/|docs)"
},
"plugins": ["plugins/markdown"],
"templates": {
"cleverLinks": true,
"monospaceLinks": true,
},
"opts": {
"recurse": true,
"destination": "./docs/",
"readme": "./README.md"
}
}
How can I make it to read multiple .md file like if I have index.md and content.md?
I just wanted to do the same functionality, and the approach that I found is not perfect, but it works good enough.
In JSDOC there is an functionality called "tutorials".
What I have done, is created on the root of my project folder "Tutorials" and added to the "opts" section in my config file the following:
"opts": {
"tutorials": "./Tutorials",
}
In the tutorials folder you create as many .md files you need, keeping in mind that every tutorial needs to have unique name.
Every time you want to connect something with specific tutorial (for example tutorial called "content.md") you need to put
{#tutorial content}
This works in both Readme.md and any js file you have documentation. Also you can connect one tutorial with another.
you can learn more about the feature here:
https://jsdoc.app/about-tutorials.html
https://jsdoc.app/tags-inline-tutorial.html
my answer is a bit late, but I hope this can at least help you for future projects :)

VSCode stops on invisible breakpoint on "async_hooks.js" while debugging a node.js script

so I built a script in node.js which supposed to take csv files, parse them and enter them to DB.
Sometimes, when I debug my code, it stops on like an invisible breakpoint found in async_hooks.js file, on the first line of the "emitHookFactory" function (line 163).
The call stack states only one call- "emitBeforeNative" on the same file.
I noticed a few things on my trials:
I have 3 types of files I need to parse and put in the DB. It happens only on one of the file types, which is extremely large (3.1m~ lines on csv, while the others have 50~200K lines). I tried to load it partially- only the starting 20K lines (copied them to a new file, no changes in code) and it didn't break. which means the size has to do with the debugger stopping?
I tried to reproduce it with other means but no success. Also, it doesn't happen always (even when ran on the same file)- but like 80-85% of the times.
My script goes like this: query DB and AWS to find a new file > download file to local > stream the file from local > on line event- parse line and perform data manipulations > on end event - loop through all manipulated data, build queries and query the DB to insert it. I've put a few breakpoints on key places and found out the breakpoint SEEMS to happen somewhere in the middle of emitting the line events. The callback function is a normal function, not async, and there are no async operations inside. In fact, there are only array and string manipulations operations inside- not even 3rd party operation or anything unusual.
I tried to look at the internet for solution. Didn't find any clear way to comletely get rid of it, only workaround which I didn't really understand (kinda new to JS environments so I could not get the concepts of how can I disable or ignore it...)
Thanks for the help in advanced.
Based on https://github.com/nodejs/node/issues/15464
There's a way to ignore stepping into Node guts. In your launch.json add the following skipFiles directive:
"skipFiles": [
"<node_internals>/**"
]
or you can ignore particularly /internal/async_hooks with this:
"skipFiles": [
"<node_internals>/internal/async_hooks.js",
"<node_internals>/internal/inspector_async_hook.js"
]
After all, your config may look like this:
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Debug",
"runtimeExecutable": "<your executable path>",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"timeout": 30000,
"skipFiles": [
"<node_internals>/**"
]
}
]
}
This also might be related to a known NodeJS bug: https://github.com/nodejs/node/issues/36022
Could you please try whether our new JavaScript debugger still has this problem. For details see the release notes of VS Code 1.42: https://code.visualstudio.com/updates/v1_42#_new-javascript-debugger.

tasks for stack in VS code

I am new to VS code (1.21.1) with HIE 0.1.0.0 - installed using stack. I have been able to define a task for testing:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "test",
"type": "shell",
"command": "stack build --test",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
I checked the documentation mentioned but did not understand much.
This task works only on the project I specified it for; how to make it usable for any project I happen to have open in the editor? How to further automate the selection of tasks?
I assume that there is somewhere a collection of tasks to run stack with HIE - could somebody point me to it?
I'm not sure if this is the problem you run into, but Visual Studio Code gives you the ability to edit settings per work-space/project in addition to overall settings:
Make sure that you're editing the USER SETTINGS tab instead of the WORKSPACE SETTINGS tab, if you want the settings to all projects.
Apologies if this is a trivial answer, and the problem is something completely different.

Wintersmith: Two paginated sections

In my wintersmith-built site, I want to have:
index.html containing a news feed
blog.html containing a blog index
I copied paginator.coffee into newspaginator.coffee, tweaked it to return 'news' instead of 'articles', and with a couple of other adjustments, it works fine.
Then I tried to add the original paginator back in, with some parameters in config.json:
"plugins": [
"./plugins/newspaginator.coffee",
"./plugins/paginator.coffee"
],
"newspaginator": {
"articles": "news",
"perPage": 10
},
"paginator": {
"articles": "articles",
"template": "blog.jade",
"first": "blog.html",
"filename": "blogpage/%d/index.html",
"perPage": 3
}
Now: I only get the HTML page for whichever plugin comes second. As above, I get blog.html but no index.html. If I reverse the order of the two plugins, I get index.html but no blog.html.
How do I get it to do both?
There's a few wintersmith properties that paginator.coffee sets that need to be accounted for in your "tweaks" or one plugin will override the settings of the other. Here are the ones I've noticed:
options = env.config.paginator or {}
...
env.helpers.getArticles = getArticles
...
env.registerGenerator 'paginator', (contents, callback) ->
Take env.helpers.getArticles for example. Somewhere in your templates you'll call something like env.helpers.getArticles(contents). That will be the method for whichever plugin is called second, since the second plugin overrides the value that the first set.
You should be able to get it to work by changing those three lines. This is still a bit of a hacky solution, since you're duplicating code (DRY Principles) but it could be a good quick fix since it doesn't seem the paginator plugin was set up to work on more than one directory.

Resources