summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/99/init.lua9
-rw-r--r--lua/99/window/init.lua11
2 files changed, 15 insertions, 5 deletions
diff --git a/lua/99/init.lua b/lua/99/init.lua
index 7a15dfc..14ece26 100644
--- a/lua/99/init.lua
+++ b/lua/99/init.lua
@@ -191,6 +191,8 @@ local _99_state
--- Performs a search across your project with the prompt you provide and return out a list of
--- locations with notes that will be put into your quick fix list.
--- @field vibe fun(opts?: _99.ops.Opts): _99.TraceID | nil
+--- will ask opencode or whatever provider currently being used to perform a vibe
+--- session.
--- @field open fun(): nil
--- Opens a selection window for you to select the last interaction to open
--- and display its contents in a way that makes sense for its type. For
@@ -281,7 +283,12 @@ end
--- @param context _99.Prompt
function _99.open_tutorial(context)
local tutorial = context:tutorial_data()
- Window.create_split(tutorial.tutorial, tutorial.buffer)
+ Window.create_split(tutorial.tutorial, tutorial.buffer, {
+ split_direction = "vertical",
+ window_opts = {
+ wrap = true,
+ },
+ })
end
function _99.open()
diff --git a/lua/99/window/init.lua b/lua/99/window/init.lua
index 902f94f..01de82b 100644
--- a/lua/99/window/init.lua
+++ b/lua/99/window/init.lua
@@ -665,8 +665,9 @@ function M.close(win)
end
--- @class _99.window.SplitWindowOpts
---- @field split_direction "vertical" | "horizontal" | nil
---- @field filetype string
+--- @field split_direction "vertical" | "horizontal"
+--- @field window_opts table<string, any>
+--- @field filetype string | nil
--- @param content string[]
---@param buffer number | nil
@@ -674,7 +675,7 @@ end
--- @return _99.window.SplitWindow
function M.create_split(content, buffer, opts)
opts = opts or { split_direction = "vertical" }
-
+ opts.window_opts = opts.window_opts or {}
opts.split_direction = opts.split_direction or "vertical"
opts.filetype = opts.filetype or "markdown"
@@ -707,7 +708,9 @@ function M.create_split(content, buffer, opts)
vim.api.nvim_win_set_buf(win_id, buf_id)
vim.bo[buf_id].filetype = opts.filetype
-
+ for option, value in pairs(opts.window_opts) do
+ vim.wo[win_id][option] = value
+ end
return {
win = win_id,
buffer = buf_id,