Skip to content

Commit 79939cc

Browse files
authored
chore(luadoc): Let mapping items accept string[] (#944)
* chore(luadoc): Let mapping items accept string[] * chore(luadoc): Add alias for org mappings * `string | string[]`
1 parent d2b0fe5 commit 79939cc

File tree

1 file changed

+104
-103
lines changed

1 file changed

+104
-103
lines changed

lua/orgmode/config/_meta.lua

+104-103
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---@meta
22
---@alias OrgAgendaSpan 'day' | 'week' | 'month' | 'year' | number
3+
---@alias OrgMappingValue string | string[]
34

45
---@class OrgAgendaCustomCommandTypeInterface
56
---@field type? 'agenda' | 'tags' | 'tags_todo'
@@ -45,124 +46,124 @@
4546
---@field scheduled_reminder? boolean Enable notifiactions for DEADLINE dates. Default: true
4647

4748
---@class OrgMappingsGlobal
48-
---@field org_agenda? string Mappings used to open agenda prompt. Default: '<prefix>a'
49-
---@field org_capture? string Mappings used to open capture prompt. Default: '<prefix>c'
49+
---@field org_agenda? OrgMappingValue Mappings used to open agenda prompt. Default: '<prefix>a'
50+
---@field org_capture? OrgMappingValue Mappings used to open capture prompt. Default: '<prefix>c'
5051

5152
---@class OrgHyperlinksConfig
5253
---@field sources OrgLinkType[]
5354

5455
---@class OrgMappingsAgenda
55-
---@field org_agenda_later? string Default: 'f'
56-
---@field org_agenda_earlier? string Default: 'b'
57-
---@field org_agenda_goto_today? string Default: '.'
58-
---@field org_agenda_day_view? string Default: 'vd'
59-
---@field org_agenda_week_view? string Default: 'vw'
60-
---@field org_agenda_month_view? string Default: 'vm'
61-
---@field org_agenda_year_view? string Default: 'vy'
62-
---@field org_agenda_quit? string Default: 'q'
63-
---@field org_agenda_switch_to? string Default: '<CR>'
64-
---@field org_agenda_goto? string Default: '<TAB>'
65-
---@field org_agenda_goto_date? string Default: 'J'
66-
---@field org_agenda_redo? string Default: 'r'
67-
---@field org_agenda_todo? string Default: 't'
68-
---@field org_agenda_clock_goto? string Default: '<prefix>xj'
69-
---@field org_agenda_set_effort? string Default: '<prefix>xe'
70-
---@field org_agenda_clock_in? string Default: 'I'
71-
---@field org_agenda_clock_out? string Default: 'O'
72-
---@field org_agenda_clock_cancel? string Default: 'X'
73-
---@field org_agenda_clockreport_mode? string Default: 'R'
74-
---@field org_agenda_priority? string Default: '<prefix>,'
75-
---@field org_agenda_priority_up? string Default: '+'
76-
---@field org_agenda_priority_down? string Default: '-'
77-
---@field org_agenda_archive? string Default: '<prefix>$'
78-
---@field org_agenda_toggle_archive_tag? string Default: '<prefix>A'
79-
---@field org_agenda_set_tags? string Default: '<prefix>t'
80-
---@field org_agenda_deadline? string Default: '<prefix>id'
81-
---@field org_agenda_schedule? string Default: '<prefix>is'
82-
---@field org_agenda_filter? string Default: '/'
83-
---@field org_agenda_refile? string Default: '<prefix>r'
84-
---@field org_agenda_add_note? string Default: '<prefix>na'
85-
---@field org_agenda_show_help? string Default: 'g?'
56+
---@field org_agenda_later? OrgMappingValue Default: 'f'
57+
---@field org_agenda_earlier? OrgMappingValue Default: 'b'
58+
---@field org_agenda_goto_today? OrgMappingValue Default: '.'
59+
---@field org_agenda_day_view? OrgMappingValue Default: 'vd'
60+
---@field org_agenda_week_view? OrgMappingValue Default: 'vw'
61+
---@field org_agenda_month_view? OrgMappingValue Default: 'vm'
62+
---@field org_agenda_year_view? OrgMappingValue Default: 'vy'
63+
---@field org_agenda_quit? OrgMappingValue Default: 'q'
64+
---@field org_agenda_switch_to? OrgMappingValue Default: '<CR>'
65+
---@field org_agenda_goto? OrgMappingValue Default: '<TAB>'
66+
---@field org_agenda_goto_date? OrgMappingValue Default: 'J'
67+
---@field org_agenda_redo? OrgMappingValue Default: 'r'
68+
---@field org_agenda_todo? OrgMappingValue Default: 't'
69+
---@field org_agenda_clock_goto? OrgMappingValue Default: '<prefix>xj'
70+
---@field org_agenda_set_effort? OrgMappingValue Default: '<prefix>xe'
71+
---@field org_agenda_clock_in? OrgMappingValue Default: 'I'
72+
---@field org_agenda_clock_out? OrgMappingValue Default: 'O'
73+
---@field org_agenda_clock_cancel? OrgMappingValue Default: 'X'
74+
---@field org_agenda_clockreport_mode? OrgMappingValue Default: 'R'
75+
---@field org_agenda_priority? OrgMappingValue Default: '<prefix>,'
76+
---@field org_agenda_priority_up? OrgMappingValue Default: '+'
77+
---@field org_agenda_priority_down? OrgMappingValue Default: '-'
78+
---@field org_agenda_archive? OrgMappingValue Default: '<prefix>$'
79+
---@field org_agenda_toggle_archive_tag? OrgMappingValue Default: '<prefix>A'
80+
---@field org_agenda_set_tags? OrgMappingValue Default: '<prefix>t'
81+
---@field org_agenda_deadline? OrgMappingValue Default: '<prefix>id'
82+
---@field org_agenda_schedule? OrgMappingValue Default: '<prefix>is'
83+
---@field org_agenda_filter? OrgMappingValue Default: '/'
84+
---@field org_agenda_refile? OrgMappingValue Default: '<prefix>r'
85+
---@field org_agenda_add_note? OrgMappingValue Default: '<prefix>na'
86+
---@field org_agenda_show_help? OrgMappingValue Default: 'g?'
8687
---
8788
---@class OrgMappingsCapture
88-
---@field org_capture_finalize? string Default: '<C-c>'
89-
---@field org_capture_refile? string Default: '<prefix>r'
90-
---@field org_capture_kill? string Default: '<prefix>k'
91-
---@field org_capture_show_help? string Default: 'g?'
89+
---@field org_capture_finalize? OrgMappingValue Default: '<C-c>'
90+
---@field org_capture_refile? OrgMappingValue Default: '<prefix>r'
91+
---@field org_capture_kill? OrgMappingValue Default: '<prefix>k'
92+
---@field org_capture_show_help? OrgMappingValue Default: 'g?'
9293
---
9394
---@class OrgMappingsNote
94-
---@field org_note_finalize? string Default: '<C-c>'
95-
---@field org_note_kill? string Default: '<prefix>k'
95+
---@field org_note_finalize? OrgMappingValue Default: '<C-c>'
96+
---@field org_note_kill? OrgMappingValue Default: '<prefix>k'
9697
---
9798
---@class OrgMappingsOrg
98-
---@field org_refile? string Default: '<prefix>r'
99-
---@field org_timestamp_up_day? string Default: '<S-UP>'
100-
---@field org_timestamp_down_day? string Default: '<S-DOWN>'
101-
---@field org_timestamp_up? string Default: '<C-a>'
102-
---@field org_timestamp_down? string Default: '<C-x>'
103-
---@field org_change_date? string Default: 'cid'
104-
---@field org_priority? string Default: '<prefix>,'
105-
---@field org_priority_up? string Default: 'ciR'
106-
---@field org_priority_down? string Default: 'cir'
107-
---@field org_todo? string Default: 'cit'
108-
---@field org_todo_prev? string Default: 'ciT'
109-
---@field org_toggle_checkbox? string Default: '<C-Space>'
110-
---@field org_toggle_heading? string Default: '<prefix>*'
111-
---@field org_open_at_point? string Default: '<prefix>o'
112-
---@field org_edit_special? string Default: "<prefix>'"
113-
---@field org_add_note? string Default: '<prefix>na'
114-
---@field org_cycle? string Default: '<TAB>'
115-
---@field org_global_cycle? string Default: '<S-TAB>'
116-
---@field org_archive_subtree? string Default: '<prefix>$'
117-
---@field org_set_tags_command? string Default: '<prefix>t'
118-
---@field org_toggle_archive_tag? string Default: '<prefix>A'
119-
---@field org_do_promote? string Default: '<<'
120-
---@field org_do_demote? string Default: '>>'
121-
---@field org_promote_subtree? string Default: '<s'
122-
---@field org_demote_subtree? string Default: '>s'
123-
---@field org_meta_return? string Add heading, item or row (context-dependent) Default: '<Leader><CR>'
124-
---@field org_return? string Default: '<CR>'
125-
---@field org_insert_heading_respect_content? string Add new heading after current heading block (same level) Default: '<prefix>ih'
126-
---@field org_insert_todo_heading? string Add new todo heading right after current heading (same level) Default: '<prefix>iT'
127-
---@field org_insert_todo_heading_respect_content? string Add new todo heading after current heading block (same level). Default: '<prefix>it'
128-
---@field org_move_subtree_up? string Default: '<prefix>K'
129-
---@field org_move_subtree_down? string Default: '<prefix>J'
130-
---@field org_export? string Default: '<prefix>e'
131-
---@field org_next_visible_heading? string Default: '}'
132-
---@field org_previous_visible_heading? string Default: '{'
133-
---@field org_forward_heading_same_level? string Default: ']]'
134-
---@field org_backward_heading_same_level? string Default: '[['
135-
---@field outline_up_heading? string Default: 'g{'
136-
---@field org_deadline? string Default: '<prefix>id'
137-
---@field org_schedule? string Default: '<prefix>is'
138-
---@field org_time_stamp? string Default: '<prefix>i.'
139-
---@field org_time_stamp_inactive? string Default: '<prefix>i!'
140-
---@field org_toggle_timestamp_type? string Default: '<prefix>d!'
141-
---@field org_insert_link? string Default: '<prefix>li'
142-
---@field org_store_link? string Default: '<prefix>ls'
143-
---@field org_clock_in? string Default: '<prefix>xi'
144-
---@field org_clock_out? string Default: '<prefix>xo'
145-
---@field org_clock_cancel? string Default: '<prefix>xq'
146-
---@field org_clock_goto? string Default: '<prefix>xj'
147-
---@field org_set_effort? string Default: '<prefix>xe'
148-
---@field org_show_help? string Default: 'g?'
149-
---@field org_babel_tangle? string Default: '<prefix>bt'
99+
---@field org_refile? OrgMappingValue Default: '<prefix>r'
100+
---@field org_timestamp_up_day? OrgMappingValue Default: '<S-UP>'
101+
---@field org_timestamp_down_day? OrgMappingValue Default: '<S-DOWN>'
102+
---@field org_timestamp_up? OrgMappingValue Default: '<C-a>'
103+
---@field org_timestamp_down? OrgMappingValue Default: '<C-x>'
104+
---@field org_change_date? OrgMappingValue Default: 'cid'
105+
---@field org_priority? OrgMappingValue Default: '<prefix>,'
106+
---@field org_priority_up? OrgMappingValue Default: 'ciR'
107+
---@field org_priority_down? OrgMappingValue Default: 'cir'
108+
---@field org_todo? OrgMappingValue Default: 'cit'
109+
---@field org_todo_prev? OrgMappingValue Default: 'ciT'
110+
---@field org_toggle_checkbox? OrgMappingValue Default: '<C-Space>'
111+
---@field org_toggle_heading? OrgMappingValue Default: '<prefix>*'
112+
---@field org_open_at_point? OrgMappingValue Default: '<prefix>o'
113+
---@field org_edit_special? OrgMappingValue Default: "<prefix>'"
114+
---@field org_add_note? OrgMappingValue Default: '<prefix>na'
115+
---@field org_cycle? OrgMappingValue Default: '<TAB>'
116+
---@field org_global_cycle? OrgMappingValue Default: '<S-TAB>'
117+
---@field org_archive_subtree? OrgMappingValue Default: '<prefix>$'
118+
---@field org_set_tags_command? OrgMappingValue Default: '<prefix>t'
119+
---@field org_toggle_archive_tag? OrgMappingValue Default: '<prefix>A'
120+
---@field org_do_promote? OrgMappingValue Default: '<<'
121+
---@field org_do_demote? OrgMappingValue Default: '>>'
122+
---@field org_promote_subtree? OrgMappingValue Default: '<s'
123+
---@field org_demote_subtree? OrgMappingValue Default: '>s'
124+
---@field org_meta_return? OrgMappingValue Add heading, item or row (context-dependent) Default: '<Leader><CR>'
125+
---@field org_return? OrgMappingValue Default: '<CR>'
126+
---@field org_insert_heading_respect_content? OrgMappingValue Add new heading after current heading block (same level) Default: '<prefix>ih'
127+
---@field org_insert_todo_heading? OrgMappingValue Add new todo heading right after current heading (same level) Default: '<prefix>iT'
128+
---@field org_insert_todo_heading_respect_content? OrgMappingValue Add new todo heading after current heading block (same level). Default: '<prefix>it'
129+
---@field org_move_subtree_up? OrgMappingValue Default: '<prefix>K'
130+
---@field org_move_subtree_down? OrgMappingValue Default: '<prefix>J'
131+
---@field org_export? OrgMappingValue Default: '<prefix>e'
132+
---@field org_next_visible_heading? OrgMappingValue Default: '}'
133+
---@field org_previous_visible_heading? OrgMappingValue Default: '{'
134+
---@field org_forward_heading_same_level? OrgMappingValue Default: ']]'
135+
---@field org_backward_heading_same_level? OrgMappingValue Default: '[['
136+
---@field outline_up_heading? OrgMappingValue Default: 'g{'
137+
---@field org_deadline? OrgMappingValue Default: '<prefix>id'
138+
---@field org_schedule? OrgMappingValue Default: '<prefix>is'
139+
---@field org_time_stamp? OrgMappingValue Default: '<prefix>i.'
140+
---@field org_time_stamp_inactive? OrgMappingValue Default: '<prefix>i!'
141+
---@field org_toggle_timestamp_type? OrgMappingValue Default: '<prefix>d!'
142+
---@field org_insert_link? OrgMappingValue Default: '<prefix>li'
143+
---@field org_store_link? OrgMappingValue Default: '<prefix>ls'
144+
---@field org_clock_in? OrgMappingValue Default: '<prefix>xi'
145+
---@field org_clock_out? OrgMappingValue Default: '<prefix>xo'
146+
---@field org_clock_cancel? OrgMappingValue Default: '<prefix>xq'
147+
---@field org_clock_goto? OrgMappingValue Default: '<prefix>xj'
148+
---@field org_set_effort? OrgMappingValue Default: '<prefix>xe'
149+
---@field org_show_help? OrgMappingValue Default: 'g?'
150+
---@field org_babel_tangle? OrgMappingValue Default: '<prefix>bt'
150151

151152
---@class OrgMappingsTextObjects
152-
---@field inner_heading? string Default: 'ih'
153-
---@field around_heading? string Default: 'ah'
154-
---@field inner_subtree? string Default: 'ir'
155-
---@field around_subtree? string Default: 'ar'
156-
---@field inner_heading_from_root? string Default: 'Oh'
157-
---@field around_heading_from_root? string Default: 'OH'
158-
---@field inner_subtree_from_root? string Default: 'Or'
159-
---@field around_subtree_from_root? string Default: 'OR'
153+
---@field inner_heading? OrgMappingValue Default: 'ih'
154+
---@field around_heading? OrgMappingValue Default: 'ah'
155+
---@field inner_subtree? OrgMappingValue Default: 'ir'
156+
---@field around_subtree? OrgMappingValue Default: 'ar'
157+
---@field inner_heading_from_root? OrgMappingValue Default: 'Oh'
158+
---@field around_heading_from_root? OrgMappingValue Default: 'OH'
159+
---@field inner_subtree_from_root? OrgMappingValue Default: 'Or'
160+
---@field around_subtree_from_root? OrgMappingValue Default: 'OR'
160161
---
161162
---@class OrgMappingsEditSrc
162-
---@field org_edit_src_abort? string Default: '<prefix>k'
163-
---@field org_edit_src_save? string Default: '<prefix>w'
164-
---@field org_edit_src_save_exit? string Default: "<prefix>'"
165-
---@field org_edit_src_show_help? string Default: 'g?'
163+
---@field org_edit_src_abort? OrgMappingValue Default: '<prefix>k'
164+
---@field org_edit_src_save? OrgMappingValue Default: '<prefix>w'
165+
---@field org_edit_src_save_exit? OrgMappingValue Default: "<prefix>'"
166+
---@field org_edit_src_show_help? OrgMappingValue Default: 'g?'
166167
---
167168
---@class OrgEmacsConfig
168169
---@field executable_path? string path to emacs executable. Default: 'emacs'

0 commit comments

Comments
 (0)