talonhub / community

Voice command set for Talon, community-supported.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vscode: undeclared dependency on cursorless?

fusentasticus opened this issue · comments

Hi, so extension pack [pokey](https://github.com/pokey/vscode-talon) is required by [knausj_talon] for operation with vscode. But [knausj_talon] references an insertSnippet action:

https://github.com/knausj85/knausj_talon/blob/644d330be80bddfe7bfc314a15903185b3111cf7/apps/vscode/vscode.py#L247

which is not defined in [pokey](https://github.com/pokey/vscode-talon). Instead, it appears to my untrained eyes that this action is defined in cursorless-dev/cursorless/tree/main/src/actions

So, is the vscode part of this package https://marketplace.visualstudio.com/items?itemName=pokey.cursorless obligatory? If so, please update documentation perhaps?

That is a built-in VSCode command, which should work without Cursorless installed. Is it not working for you?

Thanks for quick replay. So "snip show" works (for a Python file) and shows the language appropriate snippets. But "snip if else" does not work. I debug by print (in vscode.py):

  def snippet_insert(text: str):
        """Inserts a snippet"""
        actions.user.vscode("editor.action.insertSnippet")
        actions.insert(text)
        actions.key("enter")
        print(f"snippet_insert {text}")

And indeed I see "if/else" printed as expected in the log consul. The vscode window also flickers at the top, that's all. Now, if I do "snip hunt", then a pop-up textbox occurs with the text "select snippet" but there are no snippets to choose amongst. So it appears as if there are two snippet systems: one of vscode and one of Talon - but they don't know about each other.

There's a configure snippets command in vscode - it asks to define stuff in some python.json file. Should knausj auto-populate that?

Original issue resolved; opened #1070 to track Python VSCode snippet issues