File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ local icons = require (' lua.opencode.ui.icons' )
12local M = {}
23
34local function get_available_commands ()
@@ -24,9 +25,6 @@ local command_source = {
2425 name = ' commands' ,
2526 priority = 1 ,
2627 complete = function (context )
27- local config = require (' opencode.config' )
28- local input_text = vim .api .nvim_buf_get_lines (0 , 0 , - 1 , false )
29-
3028 if not context .line :match (' ^' .. vim .pesc (context .trigger_char ) .. ' [^%s/]*$' ) then
3129 return {}
3230 end
@@ -49,6 +47,7 @@ local command_source = {
4947 local item = {
5048 label = command .name .. (command .args and ' *' or ' ' ),
5149 kind = ' command' ,
50+ kind_icon = icons .get (' command' ),
5251 detail = command .description ,
5352 documentation = command .documentation .. (command .args and ' \n\n * This command takes arguments.' or ' ' ),
5453 insert_text = command .name ,
Original file line number Diff line number Diff line change 11local config = require (' opencode.config' )
2+ local icons = require (' opencode.ui.icons' )
23local M = {}
34
45local last_successful_tool = nil
@@ -95,6 +96,7 @@ local function create_file_item(file, suffix)
9596 return {
9697 label = display_label .. (suffix or ' ' ),
9798 kind = kind ,
99+ kind_icon = icons .get (kind ),
98100 detail = detail ,
99101 documentation = ' Path: ' .. detail ,
100102 insert_text = file_path ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ local presets = {
2222 snapshot = ' ' ,
2323 restore_point = ' ' ,
2424 file = ' ' ,
25+ folder = ' ' ,
2526 attached_file = ' ' ,
2627 agent = ' ' ,
2728 -- statuses
@@ -37,6 +38,7 @@ local presets = {
3738 warning = ' ' ,
3839 info = ' ' ,
3940 selection = ' ' ,
41+ command = ' ' ,
4042 },
4143 text = {
4244 -- headers
@@ -56,6 +58,7 @@ local presets = {
5658 snapshot = ' ::' ,
5759 restore_point = ' ::' ,
5860 file = ' @' ,
61+ folder = ' [@]' ,
5962 attached_file = ' @' ,
6063 agent = ' @' ,
6164 -- statuses
@@ -71,6 +74,7 @@ local presets = {
7174 warning = ' [W]' ,
7275 info = ' [I] ' ,
7376 selection = " '<'> " ,
77+ command = ' ::' ,
7478 },
7579}
7680
You can’t perform that action at this time.
0 commit comments