@@ -115,6 +115,9 @@ require('opencode').setup({
115115 diff_revert_this_last_prompt = ' <leader>ort' , -- Revert current file changes since the last opencode prompt
116116 diff_revert_all = ' <leader>orA' , -- Revert all file changes since the last opencode session
117117 diff_revert_this = ' <leader>orT' , -- Revert current file changes since the last opencode session
118+ diff_restore_snapshot_file = ' <leader>orr' , -- Restore file to snapshot
119+ diff_restore_snapshot_all = ' <leader>orR' , -- Restore all files to snapshot
120+ open_configuration_file = ' <leader>oC' , -- Open opencode configuration file
118121 swap_position = ' <leader>ox' , -- Swap Opencode pane left/right
119122 },
120123 window = {
@@ -135,6 +138,7 @@ require('opencode').setup({
135138 select_child_session = ' <leader>oS' , -- Select and load a child session
136139 debug_message = ' <leader>oD' , -- Open raw message in new buffer for debugging
137140 debug_output = ' <leader>oO' , -- Open raw output in new buffer for debugging
141+ debug_session = ' <leader>ods' , -- Debug session info
138142 },
139143 },
140144 ui = {
@@ -147,7 +151,7 @@ require('opencode').setup({
147151 display_cost = true , -- Display cost in the footer
148152 window_highlight = ' Normal:OpencodeBackground,FloatBorder:OpencodeBorder' , -- Highlight group for the opencode window
149153 icons = {
150- preset = ' emoji ' , -- 'emoji' | 'text'. Choose UI icon style (default: 'emoji ')
154+ preset = ' nerdfonts ' , -- 'emoji' | 'nerdfonts' | ' text'. Choose UI icon style (default: 'nerdfonts ')
151155 overrides = {}, -- Optional per-key overrides, see section below
152156 },
153157 output = {
@@ -157,11 +161,12 @@ require('opencode').setup({
157161 },
158162 input = {
159163 text = {
160- wrap = false , -- Wraps text inside input window
164+ wrap = true , -- Wraps text inside input window
161165 },
162166 },
163167 completion = {
164168 file_sources = {
169+ cache_timeout = 300 , -- seconds
165170 enabled = true ,
166171 preferred_cli_tool = ' fd' , -- 'fd','fdfind','rg','git' if nil, it will use the best available tool
167172 ignore_patterns = {
@@ -197,89 +202,99 @@ require('opencode').setup({
197202 },
198203 context = {
199204 enabled = true , -- Enable automatic context capturing
205+ plugin_versions = {
206+ enabled = false , -- Include plugin versions in context
207+ limit = 20 , -- Max number of plugins to include
208+ },
200209 cursor_data = {
201210 enabled = false , -- Include cursor position and line content in the context
202211 },
203212 diagnostics = {
204- info = false , -- Include diagnostics info in the context (default to false
205- warn = true , -- Include diagnostics warnings in the context
213+ info = false , -- Include diagnostics info in the context (default to false)
214+ warning = true , -- Include diagnostics warnings in the context
206215 error = true , -- Include diagnostics errors in the context
207216 },
208217 current_file = {
209218 enabled = true , -- Include current file path and content in the context
219+ show_full_path = true , -- Show full file path instead of relative
220+ },
221+ files = {
222+ enabled = true , -- Include mentioned files in context
223+ show_full_path = true , -- Show full file path instead of relative
210224 },
211225 selection = {
212226 enabled = true , -- Include selected text in the context
213227 },
214- -- Enhanced context options (all disabled by default)
228+ -- Enhanced context options (enabled by default where applicable )
215229 marks = {
216- enabled = false , -- Include the 10 most recently accessed marks
217- limit = 10 ,
230+ enabled = true , -- Include the most recently accessed marks
231+ limit = 5 ,
218232 },
219233 jumplist = {
220- enabled = false , -- Include the last 10 jumps
221- limit = 10 ,
234+ enabled = true , -- Include the last jumps
235+ limit = 5 ,
222236 },
223237 recent_buffers = {
224- enabled = false , -- Include the 10 most recently accessed buffers
225- limit = 10 ,
238+ enabled = true , -- Include the most recently accessed buffers
239+ symbols_only = true , -- Include only buffers with symbols (functions, classes, etc.)
240+ limit = 3 ,
226241 },
227242 undo_history = {
228- enabled = false , -- Include the last 10 undo branches/changesets
229- limit = 10 ,
243+ enabled = true , -- Include the last undo branches/changesets
244+ limit = 3 ,
230245 },
231246 windows_tabs = {
232- enabled = false , -- Include active windows and tabs information
247+ enabled = true , -- Include active windows and tabs information
233248 },
234249 highlights = {
235- enabled = false , -- Include buffer line highlights in current viewport
250+ enabled = true , -- Include buffer line highlights in current viewport
236251 },
237252 session_info = {
238253 enabled = false , -- Include current session name if active
239254 },
240255 registers = {
241- enabled = false , -- Include contents of specified registers
242- include = { ' "' , ' /' , ' q' }, -- Registers to include
256+ enabled = true , -- Include contents of specified registers
257+ include = { ' "' , ' /' , ' q' , ' 0 ' , ' 1 ' , ' 2 ' , ' 3 ' , ' 4 ' , ' 5 ' , ' 6 ' , ' 7 ' , ' 8 ' , ' 9 ' , ' % ' , ' # ' , ' . ' }, -- Registers to include
243258 },
244259 command_history = {
245- enabled = false , -- Include the last 5 executed commands
246- limit = 5 ,
260+ enabled = true , -- Include the last executed commands
261+ limit = 3 ,
247262 },
248263 search_history = {
249- enabled = false , -- Include the last 5 search patterns
250- limit = 5 ,
264+ enabled = true , -- Include the last search patterns
265+ limit = 3 ,
251266 },
252267 debug_data = {
253- enabled = false , -- Include active nvim-dap debugging sessions and breakpoints
268+ enabled = true , -- Include active nvim-dap debugging sessions and breakpoints
254269 },
255270 lsp_context = {
256271 enabled = false , -- Include LSP diagnostics and code actions
257272 diagnostics_limit = 10 , -- Max diagnostics to include
258273 code_actions = false , -- Include available code actions at cursor
259274 },
260275 git_info = {
261- enabled = false , -- Include git branch, file diff, and recent changes
276+ enabled = true , -- Include git branch, file diff, and recent changes
262277 diff_limit = 10 , -- Max lines of file diff to include
263278 changes_limit = 5 , -- Number of recent commits to include
264279 },
265280 fold_info = {
266- enabled = false , -- Include visible fold information in viewport
281+ enabled = true , -- Include visible fold information in viewport
267282 },
268283 cursor_surrounding = {
269- enabled = false , -- Include lines around cursor position
270- lines_above = 3 , -- Lines to include above cursor
271- lines_below = 3 , -- Lines to include below cursor
284+ enabled = true , -- Include lines around cursor position
285+ lines_above = 4 , -- Lines to include above cursor
286+ lines_below = 4 , -- Lines to include below cursor
272287 },
273288 quickfix_loclist = {
274- enabled = false , -- Include quickfix and location list entries
289+ enabled = true , -- Include quickfix and location list entries
275290 limit = 5 ,
276291 },
277292 macros = {
278293 enabled = false , -- Include recorded macro content
279294 register = ' q' , -- Macro register to include
280295 },
281296 terminal_buffers = {
282- enabled = false , -- Include most recently used terminal buffer details
297+ enabled = true , -- Include most recently used terminal buffer details
283298 },
284299 session_duration = {
285300 enabled = false , -- Include time spent in current Neovim session
@@ -289,6 +304,7 @@ require('opencode').setup({
289304 enabled = false , -- Enable debug messages in the output window
290305 },
291306})
307+
292308```
293309
294310### UI icons (disable emojis or customize)
0 commit comments