editorOpts returns the editor.Option slice derived from the current appModel.
()
| 550 | |
| 551 | // editorOpts returns the editor.Option slice derived from the current appModel. |
| 552 | func (m *appModel) editorOpts() []editor.Option { |
| 553 | opts := []editor.Option{ |
| 554 | editor.WithCompletions( |
| 555 | completions.NewCommandCompletion(m.commandCategories()), |
| 556 | completions.NewFileCompletion(m.ctx()), |
| 557 | ), |
| 558 | } |
| 559 | if m.application.IsReadOnly() { |
| 560 | opts = append(opts, editor.WithReadOnly()) |
| 561 | } |
| 562 | return opts |
| 563 | } |
| 564 | |
| 565 | // initSessionComponents creates a new chat page, session state, and editor for |
| 566 | // the given app and stores them in the per-session maps under tabID. The active |
no test coverage detected