File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ from talon import app , registry
2+
3+ required_captures = [
4+ "number_small" ,
5+ "user.any_alphanumeric_key" ,
6+ "user.formatters" ,
7+ "user.ordinals_small" ,
8+ ]
9+
10+ required_actions = [
11+ "user.homophones_get" ,
12+ "user.reformat_text" ,
13+ ]
14+
15+
16+ def onready ():
17+ missing_captures = [
18+ capture for capture in required_captures if capture not in registry .captures
19+ ]
20+ missing_actions = [
21+ action for action in required_actions if action not in registry .actions
22+ ]
23+ errors = []
24+ if missing_captures :
25+ errors .append (f"Missing captures: { ', ' .join (missing_captures )} " )
26+ if missing_actions :
27+ errors .append (f"Missing actions: { ', ' .join (missing_actions )} " )
28+ if errors :
29+ errors .insert (0 , "https://github.com/talonhub/community" )
30+ message = "\n " .join (errors )
31+ app .notify ("Cursorless missing community repository" , body = message )
32+
33+
34+ app .register ("ready" , onready )
You can’t perform that action at this time.
0 commit comments