Skip to content

Commit

Permalink
0.1.10 release
Browse files Browse the repository at this point in the history
- default to pylance
- disable pylint
- add activation conditions
- update q&a link and readme
  • Loading branch information
joedevivo committed Apr 1, 2021
1 parent a5959fe commit d5efdfb
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ circup*
/boards
new.diff
.DS_Store
/tmp
.history
build
*.tar.gz
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ native
Makefile
package.sh
new.diff
/scripts
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to the "vscode-circuitpython" extension will be documented
in this file.

## [0.1.10]
- Disable pylint by default
- Opt in to pylance by default
- Added link to [GitHub Discussions](https://github.com/joedevivo/vscode-circuitpython/discussions) for Q&A.


## [0.1.9]
- Library management fix [#37](https://github.com/joedevivo/vscode-circuitpython/pull/37)
- thanks @makermelissa!
Expand Down
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ Inspired by [Scott Hanselman's blog
post](https://www.hanselman.com/blog/UsingVisualStudioCodeToProgramCircuitPythonWithAnAdaFruitNeoTrellisM4.aspx)
and the [VSCode Arduino extension](https://github.com/Microsoft/vscode-arduino).

## Getting Started

The extension will currently activate when any of the following occur:

* workspace contains
* `/code.py`
* `/code.txt`
* `/main.py`
* `/main.txt`
* `/boot_out.txt`
* command run
* `circuitpython.openSerialMonitor`
* `circuitpython.selectSerialPort`
* `circuitpython.closeSerialMonitor`

Upon activation, the extension will check for the latest
[Adafruit_CircuitPython_Bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle)
and download it if needed. It'll then load that library metadata into the
workspace's state. You can also trigger this manually with `CircuitPython: Check
for latest bundle`.

After that you should be ready to use the following features.

## Features

### Library Management
Expand Down Expand Up @@ -67,16 +90,6 @@ library and all py source files in the adafruit bundle to your completion path.

![Demo](images/circuitpy-demo.gif)

## TODO / Future Work

* Refactor as I learn more about VSCode Extensions & Typescript
[#11](joedevivo/vscode-circuitpython#11)
* Automate the platform specific binding stuff [#8](joedevivo/vscode-circuitpython#8)
* Share library state in globalState, only managing it once per all
vscode workspaces [#6](joedevivo/vscode-circuitpython#6)
* Quick open Adafruit Bundle examples [#10](joedevivo/vscode-circuitpython#10)
* Quick open readthedocs.io for a library [#9](joedevivo/vscode-circuitpython#9)

## Requirements

## Extension Settings
Expand Down
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "vscode-circuitpython",
"displayName": "CircuitPython",
"description": "CircuitPython for Visual Studio Code",
"version": "0.1.9",
"version": "0.1.10",
"publisher": "joedevivo",
"license": "MIT",
"qna": "https://github.com/joedevivo/vscode-circuitpython/discussions",
"repository": {
"type": "git",
"url": "https://github.com/joedevivo/vscode-circuitpython.git"
Expand All @@ -13,7 +14,7 @@
"url": "https://github.com/joedevivo/vscode-circuitpython/issues"
},
"engines": {
"vscode": "^1.53.0"
"vscode": "^1.55.0"
},
"icon": "images/BlinkaOnDark.png",
"categories": [
Expand All @@ -23,10 +24,14 @@
"iot",
"adafruit",
"circuitpython",
"blinka"
"blinka",
"python"
],
"activationEvents": [
"workspaceContains:/code.py",
"workspaceContains:/code.txt",
"workspaceContains:/main.py",
"workspaceContains:/main.txt",
"workspaceContains:/boot_out.txt",
"onCommand:circuitpython.openSerialMonitor",
"onCommand:circuitpython.selectSerialPort",
Expand Down Expand Up @@ -126,7 +131,8 @@
"test": "node ./out/test/runTest.js"
},
"extensionDependencies": [
"ms-python.python"
"ms-python.python",
"ms-python.vscode-pylance"
],
"devDependencies": {
"@types/glob": "^7.1.3",
Expand Down
9 changes: 7 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ import * as vscode from 'vscode';
import { Container } from './container';

export async function activate(context: vscode.ExtensionContext) {
// Disable jedi
vscode.workspace.getConfiguration().update("python.jediEnabled", false);
vscode.workspace.getConfiguration().update("python.languageServer", "Pylance");
vscode.workspace.getConfiguration().update("python.linting.pylintEnabled", false);

vscode.workspace.getConfiguration().update("python.analysis.diagnosticSeverityOverrides",
{
"reportMissingModuleSource": "none"
}
);
let container: Container = await Container.newInstance(context);
}

Expand Down
4 changes: 2 additions & 2 deletions src/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Project implements vscode.Disposable {
public constructor(context: vscode.ExtensionContext) {
this._context = context;

let autoConf: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("python.autoComplete");
let autoConf: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("python.analysis");
let paths: string[] = autoConf.get("extraPaths");

// Load paths from last session
Expand Down Expand Up @@ -91,7 +91,7 @@ export class Project implements vscode.Disposable {
this._autoCompleteBundle
].concat(this._autoCompleteExtra);
vscode.workspace.getConfiguration().update(
"python.autoComplete.extraPaths",
"python.analysis.extraPaths",
paths
);
}
Expand Down

0 comments on commit d5efdfb

Please sign in to comment.