File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8686--- @return integer
8787function M .create_buf ()
8888 local output_buf = vim .api .nvim_create_buf (false , true )
89- local filetype = config .ui .output .filetype or ' opencode_output'
90- vim .api .nvim_set_option_value (' filetype' , filetype , { buf = output_buf })
9189
9290 vim .api .nvim_buf_set_var (output_buf , ' opencode_folds' , build_fold_state ({}))
9391
Original file line number Diff line number Diff line change @@ -386,6 +386,12 @@ function M.create_windows()
386386
387387 windows .input_win = win_ids .input_win
388388 windows .output_win = win_ids .output_win
389+
390+ local filetype = config .ui .output .filetype or ' opencode_output'
391+ vim .api .nvim_win_call (windows .output_win , function ()
392+ vim .api .nvim_set_option_value (' filetype' , filetype , { buf = buffers .output_buf })
393+ end )
394+
389395 windows .saved_width_ratio = state .last_window_width_ratio
390396
391397 input_window .setup (windows )
You can’t perform that action at this time.
0 commit comments