Skip to content

Commit 9f93ce0

Browse files
committed
feat(input_window): add context legend to input
1 parent 7b3aab1 commit 9f93ce0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/opencode/ui/input_window.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ function M.refresh_placeholder(windows, input_lines)
144144
local slash_key = config.get_key_for_function('input_window', 'slash_commands')
145145
local mention_key = config.get_key_for_function('input_window', 'mention')
146146
local mention_file_key = config.get_key_for_function('input_window', 'mention_file')
147+
local context_key = config.get_key_for_function('input_window', 'context_items')
147148

148149
vim.api.nvim_buf_set_extmark(windows.input_buf, ns_id, 0, 0, {
149150
virt_text = {
@@ -153,7 +154,9 @@ function M.refresh_placeholder(windows, input_lines)
153154
{ mention_key or '@', 'OpencodeInputLegend' },
154155
{ ' mentions ', 'OpenCodeHint' },
155156
{ mention_file_key or '~', 'OpencodeInputLegend' },
156-
{ ' to pick files' .. padding, 'OpenCodeHint' },
157+
{ ' files ', 'OpenCodeHint' },
158+
{ context_key or '#', 'OpencodeInputLegend' },
159+
{ ' context' .. padding, 'OpenCodeHint' },
157160
},
158161

159162
virt_text_pos = 'overlay',

0 commit comments

Comments
 (0)