I have installed Anaconda package using package controle.
I have the following user settings for the package:
{
/*
No Autoformatting
*/
"auto_formatting": false,
"autoformat_ignore":
[
"E309",
"E501"
],
"pep8_ignore":
[
"E309",
"E501"
],
/*
No Linting (this is done by sublinter-flake8)
*/
"anaconda_linting": false,
"anaconda_linter_underlines": false,
"anaconda_linter_mark_style": "none",
"display_signatures": true,
/*
Use anaconda for code completion
Suppress sublime completions
*/
"disable_anaconda_completion": false,
"suppress_word_completions": true,
"suppress_explicit_completions": true,
"enable_signatures_tooltip" : true,
"merge_signatures_and_doc" : true,
/*
Others
*/
"complete_parameters": false
}
Right after installation The anaconda autocompletion works:
but after restart of sublime text 3 it stop working:
sublime text 3 version - 3.2.2 build 3211
could you please help to understand what I'm doing wrong or what settings need to add to make it working after restart?
Related
I am using Visual Studio Code and pylama linter.
Currently I am added # noqa to every long line to avoid the following linter message:
line too long (100 > 79 characters) [pycodestyle]pylama(E501)
I've added "--disable=E501" to VSCODE's workspace settings.json file as shown below:
{
"editor.tabSize": 2,
"editor.detectIndentation": false,
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": false,
"python.linting.pycodestyleEnabled": false,
"python.linting.pylamaEnabled": true,
"[python]": {
"editor.tabSize": 4
},
"python.linting.pylama": [
"--disable=E501"
]
}
but still I get E501.
How can I disable E501 in my VSCODE workspace for good?
For other linters, the .settings file seems to be looking for
python.linting.<linter>Args
so I recommend trying:
"python.linting.pylamaArgs": [
"--ignore=E501"
]
or potentially
python.linting.pylamaArgs": ["--disable=E501"]
See also: https://code.visualstudio.com/docs/python/settings-reference#_pylama
that seems to suggest the same:
pylamaArgs [] Additional arguments for pylama, where each top-level element that's separated by a space is a separate item in the list.
I am using Dart and Node.js. I tried to auto format Node.js with Prettier. However, VSCode auto formats Dart file but it does not format JavaScript with Prettier.
Under the screen, it says Prettier on JavaScript. When I touch the setting and set it to Prettier for auto format, Prettier works and it auto format JS files but Dart auto format does not work.
How can I set VSCode to auto format Dart and JS files without switching settings everytime?
VSCode Setup
{
"workbench.colorTheme": "Visual Studio Dark",
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.rulers": [
80
],
"editor.selectionHighlight": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": false
},
"workbench.preferredHighContrastColorTheme": "Default Dark+",
"files.autoSave": "afterDelay",
"editor.minimap.enabled": false,
"dart.openDevTools": "flutter",
"explorer.confirmDragAndDrop": false,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
!!!! Solution
"editor.defaultFormatter": "Dart-Code.dart-code",
You need to add this line to setting.json Dart part. And then set your default formatter to Prettier!
Don't set Prettier as VS Code's global default formatter. Set to only be the default formatter where Javascript is concerned. Open your settings JSON and add the following:
{
...
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
I took a combination of the answer and comments above and used it to solve the problem I had, which was Firebase Cloud Function JavaScript/Typescript and Flutter/Dart code in the same VSCode project.
Create a .vscode folder in the root of your project.
Create a settings.json file inside of it.
Add the following and tweak to your liking. In the main VSCode settings, you can find a cog in the left gutter next to each setting that has a "Copy setting to JSON" menu item, which you can then paste into the below and adjust to override the application-level settings.
Decide whether to .gitignore your new folder or share it with your team.
Restart VSCode
{
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[dart]": { "editor.defaultFormatter": "Dart-Code.dart-code" },
"editor.formatOnSave": true
}
Recently I started using sublime 3 text editor and the issue I encountered is the REPl terminal, I mean why is there syntax highlighting and autocompletion in a terminal during execution, it makes the terminal annoying, is there any fix?
Go to .sublime-settings file, add "auto_complete": false in SublimeRepl user settings.
"repl_view_settings": {
"translate_tabs_to_spaces": false,
"auto_indent": true,
"smart_indent": true,
"spell_check": false,
"indent_subsequent_lines": false,
"detect_indentation": false,
"auto_complete": false,
"line_numbers": true,
"gutter": true
},
If this doesn't work, go to SublimeREPL/config/Python/Main.sublime-menu, search for autocomplete_server and set it to false.
I'm using nightwatchjs to run my test suite, and I would like to remove the warning messages being outputted to my terminal display.
At the moment, I'm getting loads of these (admittedly genuine) warning messages whilst my scripts are running and it's making the reading of the results harder and harder.
As an example;
Yes they are valid messages, but it's not often possible for me to uniquely pick out each individual element and I'm not interested in them for my output.
So, I'd like to know how I can stop them from being reported in my terminal.
Below is what I've tried so far in my nightwatch.conf.js config file;
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled : true,
acceptSslCerts: true,
acceptInscureCerts: true,
chromeOptions : {
args: [
'--ignore-certificate-errors',
'--allow-running-insecure-content',
'--disable-web-security',
'--disable-infobars',
'--disable-popup-blocking',
'--disable-notifications',
'--log-level=3'],
prefs: {
'profile.managed_default_content_settings.popups' : 1,
'profile.managed_default_content_settings.notifications' : 1
},
},
},
},
but it's still displaying the warnings.
Any help on this would be really appreciated.
Many thanks.
You can try setting detailed_output property to false in the configuration file. This should stop these details from printing in the console.
You can find a sample config file here.
You can find relevant details available under Output Settings section of official docs here.
Update 1: This looks like a combo of properties which controls this and the below combo works for me.
live_output: false,
silent: true,
output: true,
detailed_output: false,
disable_error_log: false,
I am trying to execute my tests in nodejs using protractor.
Example protractor protractor.conf
When I run protractor protractor.conf, I get error Error code 135, Error message Could not fingd update-config.json. Run webdriver-manager update to download the binaries
I ran the following command but still get the above error message
webdriver-manager update -- proxy http://
protractor.conf.js
/*global jasmine */
var SpecReporter = require('jasmine-spec-reporter');
var TfsReporter = require('jasmine-tfs-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/tests/*spec.js'
],
capabilities: {
'browserName': 'chrome',
/*'browserName': 'phantomjs',
'phantomjs.binary.path': require('phantomjs-prebuilt').path,
'phantomjs.ghostdriver.cli.args': ['--loglevel=DEBUG']*/
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
useAllAngular2AppRoots: false,
beforeLaunch: function() {
require('ts-node').register({
project: '../PartyAndIndustryDataMigration'
});
},
onPrepare: function() {
jasmine.getEnv().addReporter(new SpecReporter());
jasmine.getEnv().addReporter(new TfsReporter());
}
};
I'm not 100% sure (and cannot it check now), but shouldn't command look like that:
webdriver-manager update --proxy http:// (without space between -- and proxy)?
I guess chrome driver & update-config.json couldn't downloaded at the time of webdriver-manager update.
Just for verification go to
node_modules\protractor\node_modules\webdriver-manager\selenium\
location and look if everything downloaded properly?
If there is problem on downloading chrome driver you can check chrome-response.xml in same location for reason. One reason could be chrome driver website is in blacklisted or behind the proxy.
1.Open Command prompt or terminal.
2.Go to your project root directory.
3.Enter the below command and hit Enter key.
node node_modules/protractor/bin/webdriver-manager update
This command will update the WebDriver Manager.