5 Nov 2024 |
| @seanpoo:matrix.org joined the room. | 13:21:59 |
| @seanpoo:matrix.org joined the room. | 13:22:17 |
| @seanpoo:matrix.org joined the room. | 13:22:37 |
| @seanpoo:matrix.org joined the room. | 13:24:09 |
| @seanpoo:matrix.org joined the room. | 13:24:10 |
| @seanpoo:matrix.org left the room. | 13:24:12 |
echasnovski | I have a couple of related questions for a more tree-sitter savvy people (lewis6991, probably you, but who knows). Assuming local parser = vim.treesitter.get_parser() and some properly structured range :
- Does
parser:contains(range) being false mean that it will also be false for all parser:children() ?
- Is
LanguageTree:included_regions() guaranteed to be sorted in any way? Because I couldn't find that info.
| 18:00:32 |
echasnovski | Why I asking is due to this part of commenting code. It is traversing all trees only if the 1. there is true. | 18:01:59 |
echasnovski | * Why I am asking is due to this part of commenting code. It is traversing all trees only if the 1. there is true. | 18:02:24 |
lewis6991 |
- I believe so
- It's not guaranteed (API wise) to be sorted, but from an implementation pov it's ideal if it is.
| 18:02:30 |
lewis6991 | I think it is sorted atm | 18:02:52 |
echasnovski | In reply to @lewis6991:matrix.org
- I believe so
- It's not guaranteed (API wise) to be sorted, but from an implementation pov it's ideal if it is.
The :contains() method depends on it being sorted. | 18:03:33 |
echasnovski | And in some particular way. | 18:03:53 |
echasnovski | In the most reasonable way, I agree. And it indeed seems to hold, but decided to ask. | 18:04:25 |
echasnovski | There is no negative reproduction or anything, just noticed this while working on some similar stuff. | 18:04:46 |
lewis6991 | In reply to @echasnovski:matrix.org The :contains() method depends on it being sorted. Yes, so if we unsort the regions, that implementation would naturally be updated | 18:06:24 |
echasnovski | Ah, so regions are sorted on Neovim side? I assumed that it is done in tree-sitter's C library or something. | 18:07:14 |
lewis6991 |
- Is deffo yes actually now I remember the upstream c code
| 18:07:16 |
lewis6991 | In reply to @echasnovski:matrix.org Ah, so regions are sorted on Neovim side? I assumed that it is done in tree-sitter's C library or something. No the regions we manage I think | 18:07:32 |
echasnovski | In reply to @lewis6991:matrix.org
- Is deffo yes actually now I remember the upstream c code
Yeah, it is reasonable to assume, but you never know. | 18:07:38 |
echasnovski | All right, everything is good then. Thanks! | 18:08:29 |
7 Nov 2024 |
happy-dude | Not sure if this is just me, but vim-go plugin (https://github.com/fatih/vim-go) is having errors in neovim nightly, probably related to recent (no)shellslash changes? https://github.com/neovim/neovim/pull/28400 cc Famiu | 14:25:20 |
Famiu | What is the error? | 14:31:26 |
Famiu | * What is the specific error? | 14:31:37 |
happy-dude | In reply to @moonglade:matrix.org What is the specific error? Error detected while processing CursorHold Autocommands for "<buffer=1>"..function go#lsp#DidChange[13]..go#lsp#DidOpen[10]..16[2]..<SNR>181_newlsp
[474]..go#path#CheckBinPath[8]..go#path#BinPath[8]..go#util#env[7]..go#util#gobin[1]..<SNR>136_exec[2]..go#util#Shelljoin[27]..CursorHold Autocomma
nds for "<buffer=1>"..function go#lsp#DidChange[13]..go#lsp#DidOpen[10]..16[2]..<SNR>181_newlsp[474]..go#path#CheckBinPath[8]..go#path#BinPath[8]..
go#util#env[7]..go#util#gobin[1]..<SNR>136_exec[2]..go#util#Shelljoin:
line 17:
E519: Option not supported: noshellslash
| 14:52:48 |
Famiu | You use Linux? | 14:54:32 |
Famiu | * You use Linux, yeah? | 14:54:41 |
happy-dude | In reply to @moonglade:matrix.org You use Linux, yeah? Yup yup (right now in a vm) | 15:27:37 |
Famiu | @zeertzjq:matrix.org
| 15:28:09 |
Famiu | Seems like vim-go uses shellslash even for Linux | 15:28:36 |