Sender | Message | Time |
---|---|---|
8 Jan 2024 | ||
L3MON4D3 | In reply to @maxigaz:matrix.orgSo, the issue is that gsub returns 2 values, and these are unpacked into two arguments to t , which caused your first issue (t expects a table as the second argument)What you can do to fix this is write something like local gsubbed_text = ...:gsub(...) and then pass gsubbed_text to t . | 18:15:40 |
maxigaz | In reply to @l3mon4d3:matrix.org Oh, I see it now. I wasn't sure where to define that variable, but I changed my original snippet like this:
It's working now. Thank you very much! | 20:21:10 |
maxigaz | In reply to @l3mon4d3:matrix.org* Oh, I see it now. I wasn't sure where to define that variable, but with your help, I changed my original snippet like this:
It's working now. Thank you very much! | 20:22:17 |
L3MON4D3 | You're welcome :) | 20:52:45 |
10 Jan 2024 | ||
@mddj23wm:envs.net joined the room. | 10:46:27 | |
14 Jan 2024 | ||
hiweed joined the room. | 13:07:36 | |
20 Jan 2024 | ||
@ludv:matrix.org left the room. | 09:20:15 | |
12 Feb 2024 | ||
Benny Powers changed their profile picture. | 07:08:56 | |
27 Feb 2024 | ||
muniter changed their display name from muniter to Javier López. | 12:29:54 | |
16 Mar 2024 | ||
muniter changed their display name from Javier López to muniter. | 15:58:34 | |
26 Mar 2024 | ||
Neurognostic joined the room. | 17:53:53 | |
3 Apr 2024 | ||
Gambhir ⚡ | Download image.png | 08:38:42 |
Gambhir ⚡ | I want to extend the javascript snip to typescript, typescriptreact, javascriptreact and vue. How can I write this in a better way. | 08:39:48 |
L3MON4D3 | That's the best way :P | 11:22:09 |
19 Apr 2024 | ||
gokberkgunes joined the room. | 08:27:43 | |
gokberkgunes | Hello | 08:27:52 |
L3MON4D3 | Hi :) | 08:35:10 |
gokberkgunes | L3MON4D3: I am the one reported the exit node issues, can I talk to you about the approach you suggested here? I am trying to implement it but have some questions. | 08:43:33 |
L3MON4D3 | Oh yeah, feel free to | 08:43:52 |
gokberkgunes |
I've started by such a function, this is how you suggested, right? | 08:46:17 |
gokberkgunes | I'm using vim.print("text") to debug the code. I don't know any better way please ignore them | 08:47:03 |
L3MON4D3 | Ah no: I meant in `init.lua`, there's `jump(dir)`, where the next current_nide would be set. There, you could check whether it is a $0 (node.pos==0 and whether it belongs to a root-snippet (node.parent.snippet.parent_node == nil), and then just set the current_node to nil | 08:50:54 |
gokberkgunes | Oh okay, I'll take a look. | 08:58:12 |
gokberkgunes |
I think this is what you told me, right? This function should return false when we're at $0 and it is root snippet | 09:13:24 |
L3MON4D3 | Almost, the new node is returned by safe_jump_current, we'd have to handle it's return-value | 09:15:42 |
L3MON4D3 | Ah, and the `.snippet` can even be omitted, if pos is 0 the parent already is the snippet | 09:17:02 |
gokberkgunes | Do you mean current.parent.snippet.parent_node == nil can be omitted? Without this, snippets exit inside the child too. | 09:19:03 |
L3MON4D3 | Just the .snippet in that chain, current.parent.parent_node is enough | 09:19:57 |
gokberkgunes | ah alright. | 09:20:05 |
gokberkgunes | In reply to @l3mon4d3:matrix.orgcan we use return jump_destination(dir) ? | 09:25:09 |