!HCjHPBLFfoFpYNgwdE:matrix.org

Neovim dev

209 Members
Discussion about Neovim development and adjacent topics14 Servers

Load older messages


SenderMessageTime
5 Nov 2024
@seanpoo:matrix.org@seanpoo:matrix.org joined the room.13:21:59
@seanpoo:matrix.org@seanpoo:matrix.org joined the room.13:22:17
@seanpoo:matrix.org@seanpoo:matrix.org joined the room.13:22:37
@seanpoo:matrix.org@seanpoo:matrix.org joined the room.13:24:09
@seanpoo:matrix.org@seanpoo:matrix.org joined the room.13:24:10
@seanpoo:matrix.org@seanpoo:matrix.org left the room.13:24:12
@echasnovski:matrix.orgechasnovski

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:

  1. Does parser:contains(range) being false mean that it will also be false for all parser:children()?
  2. Is LanguageTree:included_regions() guaranteed to be sorted in any way? Because I couldn't find that info.
18:00:32
@echasnovski:matrix.orgechasnovski 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:matrix.orgechasnovski * 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:matrix.orglewis6991
  1. I believe so
  2. It's not guaranteed (API wise) to be sorted, but from an implementation pov it's ideal if it is.
18:02:30
@lewis6991:matrix.orglewis6991I think it is sorted atm18:02:52
@echasnovski:matrix.orgechasnovski
In reply to @lewis6991:matrix.org
  1. I believe so
  2. 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:matrix.orgechasnovskiAnd in some particular way.18:03:53
@echasnovski:matrix.orgechasnovskiIn the most reasonable way, I agree. And it indeed seems to hold, but decided to ask.18:04:25
@echasnovski:matrix.orgechasnovskiThere is no negative reproduction or anything, just noticed this while working on some similar stuff.18:04:46
@lewis6991:matrix.orglewis6991
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:matrix.orgechasnovskiAh, 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:matrix.orglewis6991
  1. Is deffo yes actually now I remember the upstream c code
18:07:16
@lewis6991:matrix.orglewis6991
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:matrix.orgechasnovski
In reply to @lewis6991:matrix.org
  1. 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:matrix.orgechasnovskiAll right, everything is good then. Thanks!18:08:29
7 Nov 2024
@happy-dude:matrix.orghappy-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
@moonglade:matrix.orgFamiuWhat is the error?14:31:26
@moonglade:matrix.orgFamiu * What is the specific error?14:31:37
@happy-dude:matrix.orghappy-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
@moonglade:matrix.orgFamiuYou use Linux?14:54:32
@moonglade:matrix.orgFamiu * You use Linux, yeah?14:54:41
@happy-dude:matrix.orghappy-dude
In reply to @moonglade:matrix.org
You use Linux, yeah?
Yup yup (right now in a vm)
15:27:37
@moonglade:matrix.orgFamiu

@zeertzjq:matrix.org

15:28:09
@moonglade:matrix.orgFamiuSeems like vim-go uses shellslash even for Linux15:28:36

Show newer messages


Back to Room ListRoom Version: 10