Skip to content

Commit

Permalink
Merged PR posit-dev/positron-python#217: Add initial placeholder for …
Browse files Browse the repository at this point in the history
…python snippets

Merge pull request #217 from posit-dev/feature/1437

Add initial placeholder for python snippets
--------------------
Commit message for posit-dev/positron-python@a2971a6:

Add initial placeholder for python snippets

Establishes a mechanism to address #1437


Authored-by: Pete Farland <pete.farland@posit.co>
Signed-off-by: Pete Farland <pete.farland@posit.co>
  • Loading branch information
petetronic authored and wesm committed Mar 28, 2024
1 parent 33e5efc commit 6d7b31b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extensions/positron-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2059,6 +2059,12 @@
}
]
},
"snippets": [
{
"language": "python",
"path": "./snippets/python.code-snippets"
}
],
"submenus": [
{
"id": "python.run",
Expand Down
12 changes: 12 additions & 0 deletions extensions/positron-python/snippets/python.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"import <module>": {
"prefix": "im",
"body": "import ${1:module}$0",
"description": "Import a package or module"
},
"from <module> import <names>": {
"prefix": "from",
"body": "from ${1:module} import ${2:names}$0",
"description": "Import names from a package or module"
}
}

0 comments on commit 6d7b31b

Please sign in to comment.