summaryrefslogtreecommitdiff
path: root/scratch
diff options
context:
space:
mode:
authorThePrimeAgain <theprimeagain@theprimeagain.com>2025-12-22 07:39:50 -0700
committerThePrimeAgain <theprimeagain@theprimeagain.com>2025-12-22 07:39:50 -0700
commit02bfe7a24359fae6045e00b2e48ad75068193dc0 (patch)
treee95a43ffcbfe28586884181559388ad5198086a5 /scratch
parent31f4e492e3af27a19125e0644cacce6a53b07411 (diff)
downloada4-02bfe7a24359fae6045e00b2e48ad75068193dc0.tar.xz
a4-02bfe7a24359fae6045e00b2e48ad75068193dc0.zip
about to start a feature, but i have some serious bugs to take care of
Diffstat (limited to 'scratch')
-rw-r--r--scratch/refresh.lua67
-rw-r--r--scratch/test.ts10
2 files changed, 20 insertions, 57 deletions
diff --git a/scratch/refresh.lua b/scratch/refresh.lua
index e586df4..ec59b06 100644
--- a/scratch/refresh.lua
+++ b/scratch/refresh.lua
@@ -1,67 +1,20 @@
R("99")
---- @param m _99.Mark
----@param count number
-function done(m, count)
- local Logger = require("99.logger.logger")
- Logger:debug("done", "count", count)
- m:set_virtual_text({
- "deleting in " .. tostring(count)
- })
- if count <= 0 then
- m:delete()
- return
- end
-
- vim.defer_fn(function()
- done(m, count - 1)
- end, 500)
+function test_function()
+ return 42
end
----@param m _99.Mark
---- @param lines string[]
----@param index number?
-function write(m, lines, index)
- index = index or 1
- local Logger = require("99.logger.logger")
- Logger:debug("write", "index", index)
-
- if index > #lines then
- done(m, 5)
- return
- end
-
- vim.defer_fn(function()
- m:set_virtual_text({lines[index]})
- write(m, lines, index + 1)
- end, 500)
-end
+function test_empty() end
-function create_mark()
- local Logger = require("99.logger.logger")
- local Level = require("99.logger.level")
- Logger:configure({
- level = Level.WARN,
- path = nil,
- })
- local buffer = vim.api.nvim_get_current_buf()
+function test_body()
local ts = require("99.editor.treesitter")
- local Mark = require("99.ops.marks")
local Point = require("99.geo").Point
+ local Lang = require("99.language")
+ local cursor = Point:from_cursor()
+ local func = ts.containing_function(0, cursor)
+ local body = Lang.find_body(func.function_node, "block")
- Logger:info("getting containing function")
- local fn = ts.containing_function(buffer, Point:from_cursor())
- assert(fn, "could not find containing function")
-
- local _99 = require("99")
- local m = Mark.mark_func_body(_99.__get_state(), buffer, fn)
-
- write(m, {
- "hello, world",
- "",
- "this is the greatest text",
- })
+ print("body", vim.inspect(body))
end
-
---create_mark()
+test_body()
diff --git a/scratch/test.ts b/scratch/test.ts
index ab1c7cf..a6399f9 100644
--- a/scratch/test.ts
+++ b/scratch/test.ts
@@ -19,3 +19,13 @@ const foo = function() {
}
+function display_text(
+ canvas: HTMLCanvasElement,
+ text: string,
+ x: number,
+ y: number,
+): void {
+ // test
+}
+
+function test_again() {}