Skip to content

Commit bd7c945

Browse files
committed
Backup update
1 parent e8635fa commit bd7c945

File tree

176 files changed

+47368
-1507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+47368
-1507
lines changed

last_update

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-11-05T01:27:55Z
1+
2024-11-12T02:20:36Z

repositories/neovim/issues/12537.json

Lines changed: 207 additions & 39 deletions
Large diffs are not rendered by default.

repositories/neovim/issues/19624.json

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3381,9 +3381,54 @@
33813381
"url": "https://api.github.com/users/vurentjie",
33823382
"user_view_type": "public"
33833383
}
3384+
},
3385+
{
3386+
"author_association": "CONTRIBUTOR",
3387+
"body": "Hi,\n\nI would like to present my design for structured concurrency in Neovim: [Coop.nvim](https://github.com/gregorias/coop.nvim). I believe it addresses all requirements you have listed out for such a framework + it’s as straightforward as such a framework could be ([How it works doc](https://github.com/gregorias/coop.nvim/blob/main/How%20it%20works.md)). I believe it provides an elegant approach to the subject.\n\nHere’s how Coop relates to the listed requirements:\n\n> Representing a task.\n> Orchestrating \"pipelines\" (quasi monads?) of work (\"tasks\") and handling errors.\n\n[See examples](https://github.com/gregorias/coop.nvim/blob/0e2082500707f2a143ff924ad36577c348148517/lua/coop/examples.lua#L72) for examples of handling errors, running tasks in parallel, and complex awaiting conditions.\n\n> Maximally leveraging Lua coroutines + libuv. Only add concepts (\"task\", \"promise\") if absolutely needed.\n\nYes,\n\n- the Task interface is an extension to Lua coroutines and implements parallel `create, resume, yield, status` functions with equivalent semantics.\n- Libuv functions are easily ported through generic wrappers: https://github.com/gregorias/coop.nvim/blob/main/lua/coop/uv.lua.\n- Only two concepts are added: a task and a future.\n\n> Coroutines (or tasks that wrap coroutines) can be nested. ([ref](https://gregorias.github.io/posts/using-coroutines-in-neovim-lua/#addendum-whats-wrong-with-plenary-async))\n\nTrue. In Coop you can freely nest task functions (a task function is a function that may call `task.yield`).\n\n> Util to create an awaitable task from \"normal\" functions (cf. \"promisify\"?).\n> Example: vim.system() returns its own ad-hoc \"task\" that can be \"awaited\" via :wait().\n> Can e.g. vim.system() be \"promisified\" without its knowledge?\n\nCoop indeed “promisifies” `uv.spawn`. Coop’s implementation returns an awaitable future. [In tests you have an example of how it turns the callback interface from Neovim’s documentation into a synchronous one](https://github.com/gregorias/coop.nvim/blob/ff49c6d5a741e9e7b22366f5bedf43f7fcfd01c5/tests/coop/uv_spec.lua#L48-L84):\n\n```lua\nlocal stdin = vim.uv.new_pipe()\nlocal stdout = vim.uv.new_pipe()\nlocal stderr = vim.uv.new_pipe()\n\nlocal handle, pid, cat_future = uv.spawn(\"cat\", {\n\tstdio = { stdin, stdout, stderr },\n})\n\nlocal read_future = coop.Future.new()\nvim.uv.read_start(stdout, function(err, data)\n\tassert(not err, err)\n\tif data ~= nil and not read_future.done then\n\t\tread_future:complete(data)\n\tend\nend)\nvim.uv.write(stdin, \"Hello World\")\n\n-- Here we wrap the APIs into a task to use the synchronous looking interface.\nlocal task = coop.spawn(function()\n\t-- Wait for stdout to produce the data.\n\tlocal read_data = read_future:await()\n\tassert.are.same(\"Hello World\", read_data)\n\tlocal err_stdin_shutdown = uv.shutdown(stdin)\n\tassert.is.Nil(err_stdin_shutdown)\n\t-- Wait for the cat process to finish.\n\treturn cat_future:await()\nend)\n\n-- Wait for 200ms for the task finish.\nlocal exit_code, exit_sign = task:await(200, 2)\n```\n\n> Document (or generalize) [\"coroutine to callback\"](https://gregorias.github.io/posts/using-coroutines-in-neovim-lua/#coroutine-to-callback-conversion).\n\nCoop provides a generic converter callback to coroutine converter: `cb_to_tf` ([docs](https://github.com/gregorias/coop.nvim/blob/main/How%20it%20works.md#using-callbacks-to-build-coroutines).)\n\nThe generic conversion from a coroutine (a task) into a callback is done through [an await overload that accepts a callback](https://github.com/gregorias/coop.nvim/tree/main#:~:text=task.await(function(success%2C%20result)%20end)).\n\n> await_all, await_any (pseudo-names). See JS [Promise.all()](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Promise/all).\n> Results (and failures) can be aggregated. (Can't do this with jobwait()!)\n\nAll possible. For example, Coop provides an implementation of `as_completed`, an iterator that returns task results as they finish: [example](https://github.com/gregorias/coop.nvim/tree/main#:~:text=sort_with_time%20shows%20that%20Coop%20achieves%20true%20parallelism.%20It%20launches%20parallel%20timers%20with%20coop.spawn%20and%20uses%20a%20coop.control.as_completed%20to%20conveniently%20capture%20results%20as%20each%20timer%20completes.).\n\nTentative implementations of `await_all` and `await_any` are in [control.lua](https://github.com/gregorias/coop.nvim/blob/ff49c6d5a741e9e7b22366f5bedf43f7fcfd01c5/lua/coop/control.lua#L1-L68).\n\n> Tasks can be canceled.\n\n[True.](https://github.com/gregorias/coop.nvim/blob/main/How%20it%20works.md#cancellation)\n\n> Failures/errors can be handled\n\n[True.](https://github.com/gregorias/coop.nvim/blob/main/How%20it%20works.md#error-handling)\n\n> (possibly canceling the rest of the task tree).\n\nCoop doesn’t natively provide the task tree abstraction to keep with the Lua’s spirit of coroutines being standalone threads. Task trees can be implemented on top of Coop, because the programmer can intercept the `\"cancelled\"` error and `:cancel` subtasks.",
3388+
"created_at": "2024-11-10T11:40:03Z",
3389+
"html_url": "https://github.com/neovim/neovim/issues/19624#issuecomment-2466700118",
3390+
"id": 2466700118,
3391+
"issue_url": "https://api.github.com/repos/neovim/neovim/issues/19624",
3392+
"node_id": "IC_kwDOAPphoM6TBttW",
3393+
"performed_via_github_app": null,
3394+
"reactions": {
3395+
"+1": 0,
3396+
"-1": 0,
3397+
"confused": 0,
3398+
"eyes": 4,
3399+
"heart": 0,
3400+
"hooray": 0,
3401+
"laugh": 0,
3402+
"rocket": 0,
3403+
"total_count": 4,
3404+
"url": "https://api.github.com/repos/neovim/neovim/issues/comments/2466700118/reactions"
3405+
},
3406+
"updated_at": "2024-11-10T11:40:03Z",
3407+
"url": "https://api.github.com/repos/neovim/neovim/issues/comments/2466700118",
3408+
"user": {
3409+
"avatar_url": "https://avatars.githubusercontent.com/u/722385?v=4",
3410+
"events_url": "https://api.github.com/users/gregorias/events{/privacy}",
3411+
"followers_url": "https://api.github.com/users/gregorias/followers",
3412+
"following_url": "https://api.github.com/users/gregorias/following{/other_user}",
3413+
"gists_url": "https://api.github.com/users/gregorias/gists{/gist_id}",
3414+
"gravatar_id": "",
3415+
"html_url": "https://github.com/gregorias",
3416+
"id": 722385,
3417+
"login": "gregorias",
3418+
"node_id": "MDQ6VXNlcjcyMjM4NQ==",
3419+
"organizations_url": "https://api.github.com/users/gregorias/orgs",
3420+
"received_events_url": "https://api.github.com/users/gregorias/received_events",
3421+
"repos_url": "https://api.github.com/users/gregorias/repos",
3422+
"site_admin": false,
3423+
"starred_url": "https://api.github.com/users/gregorias/starred{/owner}{/repo}",
3424+
"subscriptions_url": "https://api.github.com/users/gregorias/subscriptions",
3425+
"type": "User",
3426+
"url": "https://api.github.com/users/gregorias",
3427+
"user_view_type": "public"
3428+
}
33843429
}
33853430
],
3386-
"comments": 75,
3431+
"comments": 76,
33873432
"comments_url": "https://api.github.com/repos/neovim/neovim/issues/19624/comments",
33883433
"created_at": "2022-08-02T11:39:42Z",
33893434
"events_url": "https://api.github.com/repos/neovim/neovim/issues/19624/events",
@@ -3431,7 +3476,7 @@
34313476
"locked": false,
34323477
"milestone": {
34333478
"closed_at": null,
3434-
"closed_issues": 655,
3479+
"closed_issues": 660,
34353480
"created_at": "2014-05-10T20:43:04Z",
34363481
"creator": {
34373482
"avatar_url": "https://avatars.githubusercontent.com/u/1359421?v=4",
@@ -3461,10 +3506,10 @@
34613506
"labels_url": "https://api.github.com/repos/neovim/neovim/milestones/6/labels",
34623507
"node_id": "MDk6TWlsZXN0b25lNjU1MDM3",
34633508
"number": 6,
3464-
"open_issues": 607,
3509+
"open_issues": 614,
34653510
"state": "open",
34663511
"title": "backlog",
3467-
"updated_at": "2024-10-21T15:22:37Z",
3512+
"updated_at": "2024-11-07T08:21:30Z",
34683513
"url": "https://api.github.com/repos/neovim/neovim/milestones/6"
34693514
},
34703515
"node_id": "I_kwDOAPphoM5PBO-Z",
@@ -3476,18 +3521,23 @@
34763521
"confused": 0,
34773522
"eyes": 0,
34783523
"heart": 8,
3479-
"hooray": 20,
3524+
"hooray": 21,
34803525
"laugh": 0,
34813526
"rocket": 0,
3482-
"total_count": 29,
3527+
"total_count": 30,
34833528
"url": "https://api.github.com/repos/neovim/neovim/issues/19624/reactions"
34843529
},
34853530
"repository_url": "https://api.github.com/repos/neovim/neovim",
34863531
"state": "open",
34873532
"state_reason": null,
3533+
"sub_issues_summary": {
3534+
"completed": 0,
3535+
"percent_completed": 0,
3536+
"total": 0
3537+
},
34883538
"timeline_url": "https://api.github.com/repos/neovim/neovim/issues/19624/timeline",
34893539
"title": "Lua: structured concurrency, Promises, task pipelines",
3490-
"updated_at": "2024-10-21T16:45:33Z",
3540+
"updated_at": "2024-11-10T11:40:04Z",
34913541
"url": "https://api.github.com/repos/neovim/neovim/issues/19624",
34923542
"user": {
34933543
"avatar_url": "https://avatars.githubusercontent.com/u/1359421?v=4",

repositories/neovim/issues/20310.json

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,28 @@
44
"assignees": [],
55
"author_association": "MEMBER",
66
"body": "### Feature already in Vim?\n\n_No response_\n\n### Feature description\n\nWhen using `ext_messages`, I found no easy way to retrieve highlight attributes. `ext_hlstate` looks promising, but doesn't seem to be available within lua.\r\n\r\nWould be great if there would be an API call to retrieve the HL attributes.\r\n\r\nCurrent workaround I found by @notomo:\r\n\r\n```lua\r\nlocal M = {}\r\n\r\nfunction M.setup()\r\n local ffi = require(\"ffi\")\r\n local ok, err = pcall(\r\n ffi.cdef,\r\n [[typedef int32_t RgbValue;\r\n typedef struct attr_entry {\r\n int16_t rgb_ae_attr, cterm_ae_attr;\r\n RgbValue rgb_fg_color, rgb_bg_color, rgb_sp_color;\r\n int cterm_fg_color, cterm_bg_color;\r\n int hl_blend;\r\n } HlAttrs;\r\n HlAttrs syn_attr2entry(int attr);]]\r\n )\r\n if not ok and not err:find(\"redefine\") then\r\n error(err)\r\n end\r\n M.attr2entry = ffi.C.syn_attr2entry\r\nend\r\n\r\nfunction M.attr2entry(attr_id)\r\n M.setup()\r\n return M.attr2entry(attr_id)\r\nend\r\n\r\nM.cache = {}\r\n\r\nfunction M.get_hl_group(attr_id)\r\n return \"NoiceAttr\" .. tostring(attr_id)\r\nend\r\n\r\nfunction M.get_hl(attr_id)\r\n if not M.cache[attr_id] then\r\n local attrs = M.attr2entry(attr_id)\r\n local hl_group = M.get_hl_group(attr_id)\r\n vim.api.nvim_set_hl(0, hl_group, {\r\n fg = attrs.rgb_fg_color,\r\n bg = attrs.rgb_bg_color,\r\n sp = attrs.rgb_sp_color,\r\n bold = bit.band(attrs.rgb_ae_attr, 0x02),\r\n standout = bit.band(attrs.rgb_ae_attr, 0x0100),\r\n italic = bit.band(attrs.rgb_ae_attr, 0x04),\r\n underline = bit.band(attrs.rgb_ae_attr, 0x08),\r\n undercurl = bit.band(attrs.rgb_ae_attr, 0x10),\r\n nocombine = bit.band(attrs.rgb_ae_attr, 0x0200),\r\n reverse = bit.band(attrs.rgb_ae_attr, 0x01),\r\n blend = attrs.hl_blend ~= -1 and attrs.hl_blend or nil,\r\n })\r\n M.cache[attr_id] = hl_group\r\n end\r\n return M.cache[attr_id]\r\nend\r\n\r\nreturn M\r\n```",
7-
"closed_at": null,
7+
"closed_at": "2024-11-11T11:26:36Z",
8+
"closed_by": {
9+
"avatar_url": "https://avatars.githubusercontent.com/u/1363104?v=4",
10+
"events_url": "https://api.github.com/users/bfredl/events{/privacy}",
11+
"followers_url": "https://api.github.com/users/bfredl/followers",
12+
"following_url": "https://api.github.com/users/bfredl/following{/other_user}",
13+
"gists_url": "https://api.github.com/users/bfredl/gists{/gist_id}",
14+
"gravatar_id": "",
15+
"html_url": "https://github.com/bfredl",
16+
"id": 1363104,
17+
"login": "bfredl",
18+
"node_id": "MDQ6VXNlcjEzNjMxMDQ=",
19+
"organizations_url": "https://api.github.com/users/bfredl/orgs",
20+
"received_events_url": "https://api.github.com/users/bfredl/received_events",
21+
"repos_url": "https://api.github.com/users/bfredl/repos",
22+
"site_admin": false,
23+
"starred_url": "https://api.github.com/users/bfredl/starred{/owner}{/repo}",
24+
"subscriptions_url": "https://api.github.com/users/bfredl/subscriptions",
25+
"type": "User",
26+
"url": "https://api.github.com/users/bfredl",
27+
"user_view_type": "public"
28+
},
829
"comment_data": [
930
{
1031
"author_association": "NONE",
@@ -47,7 +68,8 @@
4768
"starred_url": "https://api.github.com/users/sassanh/starred{/owner}{/repo}",
4869
"subscriptions_url": "https://api.github.com/users/sassanh/subscriptions",
4970
"type": "User",
50-
"url": "https://api.github.com/users/sassanh"
71+
"url": "https://api.github.com/users/sassanh",
72+
"user_view_type": "public"
5173
}
5274
},
5375
{
@@ -91,7 +113,8 @@
91113
"starred_url": "https://api.github.com/users/dsully/starred{/owner}{/repo}",
92114
"subscriptions_url": "https://api.github.com/users/dsully/subscriptions",
93115
"type": "User",
94-
"url": "https://api.github.com/users/dsully"
116+
"url": "https://api.github.com/users/dsully",
117+
"user_view_type": "public"
95118
}
96119
},
97120
{
@@ -135,7 +158,8 @@
135158
"starred_url": "https://api.github.com/users/clason/starred{/owner}{/repo}",
136159
"subscriptions_url": "https://api.github.com/users/clason/subscriptions",
137160
"type": "User",
138-
"url": "https://api.github.com/users/clason"
161+
"url": "https://api.github.com/users/clason",
162+
"user_view_type": "public"
139163
}
140164
},
141165
{
@@ -179,7 +203,8 @@
179203
"starred_url": "https://api.github.com/users/vhakulinen/starred{/owner}{/repo}",
180204
"subscriptions_url": "https://api.github.com/users/vhakulinen/subscriptions",
181205
"type": "User",
182-
"url": "https://api.github.com/users/vhakulinen"
206+
"url": "https://api.github.com/users/vhakulinen",
207+
"user_view_type": "public"
183208
}
184209
}
185210
],
@@ -220,7 +245,7 @@
220245
{
221246
"color": "c5def5",
222247
"default": false,
223-
"description": "UI extensibility, events, protocol",
248+
"description": "UI extensibility, events, protocol, externalized UI",
224249
"id": 640132777,
225250
"name": "ui-extensibility",
226251
"node_id": "MDU6TGFiZWw2NDAxMzI3Nzc=",
@@ -231,7 +256,7 @@
231256
"locked": false,
232257
"milestone": {
233258
"closed_at": null,
234-
"closed_issues": 35,
259+
"closed_issues": 94,
235260
"created_at": "2023-12-07T23:09:35Z",
236261
"creator": {
237262
"avatar_url": "https://avatars.githubusercontent.com/u/1359421?v=4",
@@ -251,19 +276,20 @@
251276
"starred_url": "https://api.github.com/users/justinmk/starred{/owner}{/repo}",
252277
"subscriptions_url": "https://api.github.com/users/justinmk/subscriptions",
253278
"type": "User",
254-
"url": "https://api.github.com/users/justinmk"
279+
"url": "https://api.github.com/users/justinmk",
280+
"user_view_type": "public"
255281
},
256282
"description": "",
257-
"due_on": "2024-10-31T07:00:00Z",
283+
"due_on": "2024-12-25T08:00:00Z",
258284
"html_url": "https://github.com/neovim/neovim/milestone/41",
259285
"id": 10283236,
260286
"labels_url": "https://api.github.com/repos/neovim/neovim/milestones/41/labels",
261287
"node_id": "MI_kwDOAPphoM4AnOjk",
262288
"number": 41,
263-
"open_issues": 50,
289+
"open_issues": 53,
264290
"state": "open",
265291
"title": "0.11",
266-
"updated_at": "2024-06-24T03:19:54Z",
292+
"updated_at": "2024-11-11T14:23:28Z",
267293
"url": "https://api.github.com/repos/neovim/neovim/milestones/41"
268294
},
269295
"node_id": "I_kwDOAPphoM5ShAXG",
@@ -282,11 +308,16 @@
282308
"url": "https://api.github.com/repos/neovim/neovim/issues/20310/reactions"
283309
},
284310
"repository_url": "https://api.github.com/repos/neovim/neovim",
285-
"state": "open",
286-
"state_reason": null,
311+
"state": "closed",
312+
"state_reason": "completed",
313+
"sub_issues_summary": {
314+
"completed": 0,
315+
"percent_completed": 0,
316+
"total": 0
317+
},
287318
"timeline_url": "https://api.github.com/repos/neovim/neovim/issues/20310/timeline",
288319
"title": "vim.ui_attach: make it easier to retrieve highlight attributes (with `ext_messages`)",
289-
"updated_at": "2024-06-18T22:55:23Z",
320+
"updated_at": "2024-11-11T11:26:36Z",
290321
"url": "https://api.github.com/repos/neovim/neovim/issues/20310",
291322
"user": {
292323
"avatar_url": "https://avatars.githubusercontent.com/u/292349?v=4",
@@ -306,6 +337,7 @@
306337
"starred_url": "https://api.github.com/users/folke/starred{/owner}{/repo}",
307338
"subscriptions_url": "https://api.github.com/users/folke/subscriptions",
308339
"type": "User",
309-
"url": "https://api.github.com/users/folke"
340+
"url": "https://api.github.com/users/folke",
341+
"user_view_type": "public"
310342
}
311343
}

0 commit comments

Comments
 (0)