!HCjHPBLFfoFpYNgwdE:matrix.org

Neovim dev

202 Members
Discussion about Neovim development and adjacent topics14 Servers

Load older messages


SenderMessageTime
13 Sep 2024
@clason:matrix.orgclasonBecause how are you supposed to actually handle the deprecation warning?16:15:18
@clason:matrix.orgclason
In reply to @mfussenegger:matrix.org
Could do it like iter_matches and add a parameter?
yes, I think that's the best (error = true)
16:15:52
@clason:matrix.orgclasonhttps://github.com/neovim/neovim/pull/30313#issuecomment-234932745816:22:12
@clason:matrix.orgclasonsorry for stealing your suggestion16:22:17
@mfussenegger:matrix.orgMathias

Is #x equal to vim.fn.strlen(x) or am I missing some edge cases?

local x = "๐Ÿด ๐Ÿ› $ ยข โ‚ฌ ใ‚"
print(x)
print(#x)
print(vim.fn.strlen(x))
17:04:09
@clason:matrix.orgclasonOh, you sweet summer child...17:05:41
@mfussenegger:matrix.orgMathias Go on?
I thought Lua strings are utf-8 encoded, so # does give the utf-8 encoded byte length, no?
I'm more unsure about what kind of bytes strlen returns, but given that there are special utf16/32 methods I assumed it is also utf-8
17:17:37
@clason:matrix.orgclasonin Neovim it is, but it wouldn't be Vim if it wasn't controlled by weird legacy options...17:20:00
@clason:matrix.orgclasonbut things should be much better now with bfredl's utf8proc changes17:22:06
@mfussenegger:matrix.orgMathiasTo give more context: I'm wondering if https://github.com/neovim/neovim/blob/755512ed60fe6c9b7fbd3bf57c827d938ff6d743/runtime/lua/vim/lsp/util.lua#L157 could be replaced. (Method also mentions it returns utf-8 index) To avoid vimL and also to deal with https://github.com/neovim/neovim/pull/30359#issuecomment-2349295272 (where there will likely be a completion specific fix, but I wouldn't rule out that this could happen in other places)17:24:55
@bfredl:matrix.orgbfredl
In reply to @mfussenegger:matrix.org
Go on?
I thought Lua strings are utf-8 encoded, so # does give the utf-8 encoded byte length, no?
I'm more unsure about what kind of bytes strlen returns, but given that there are special utf16/32 methods I assumed it is also utf-8
Ye strlen is just bytes
17:26:31
@bfredl:matrix.orgbfredlWith the caveat that vimL strings cannot contain nul bytes 17:27:01
@tris203:matrix.orgtris203Yes. I think it probably can just be a #len. My bad, I think I was thinking about pos rather than byte index which is why I reached for vimL18:11:46
@tris203:matrix.orgtris203 Note for me later. All the stuff in build.md for nixos is really outdated 21:04:53
14 Sep 2024
@rileybruins:matrix.orgRiley Bruins
In reply to @gpanders:matrix.org
I completely missed https://github.com/neovim/neovim/pull/30313 while it was happening but THANK YOU Riley Bruins for pushing that through
No problem :D it also annoyed me a lot. Sadly seems not as uncontroversial as initially thought ๐Ÿ˜… but I have a fix that should make it less annoying
20:11:29
@clason:matrix.orgclasonIt was a good change; the fault lies in my depreciation suggestion. 20:13:28
@rileybruins:matrix.orgRiley BruinsNo worries at all :) 20:17:12
15 Sep 2024
@seniormars:matrix.orgSeniorMars joined the room.17:57:46
@seniormars:matrix.orgSeniorMarsHello, my I get some help with homebrew / head.17:59:44
@seniormars:matrix.orgSeniorMars

Here is the error I get:

ฮป in ~ took 28s โฏโฏ โŒ1 brew reinstall neovim
==> Fetching neovim
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/9de737780e3d0003aa2270a84a243b70e236ad20/Formula/n/neovim.rb
Already downloaded: /Users/charlie/Library/Caches/Homebrew/downloads/1f41d56460b06172b1456cabd526db843fff97726c7e0f8407382b3ba537dbb9--neovim.rb
==> Cloning https://github.com/neovim/neovim.git
Updating /Users/charlie/Library/Caches/Homebrew/neovim--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 579254677 refactor(tests): rename terminal/testutil.lua => testterm.lua #30372
==> Reinstalling neovim 
==> cmake -S . -B build -DLUV_LIBRARY=/opt/homebrew/opt/luv/lib/libluv.dylib -DLIBUV_LIBRARY=/opt/homebrew/opt/libuv/lib/libuv.dylib -DLPEG_LIBRARY=/opt/homebrew/opt/lpeg/lib/liblpeg.dylib
==> cmake --build build
Last 15 lines from /Users/charlie/Library/Logs/Homebrew/neovim/02.cmake:
  488 |   if (p_emoji && c >= 0x1f000 && !prop->ambiguous_width && prop_is_emojilike(prop)) {
      |                                   ~~~~  ^
/tmp/neovim-20240915-60891-dg44f5/src/nvim/mbyte.c:1352:15: error: no member named 'ambiguous_width' in 'struct utf8proc_property_struct'
 1352 |     if (prop->ambiguous_width || prop_is_emojilike(prop)) {
      |         ~~~~  ^
3 errors generated.
[ 80%] Building C object src/nvim/CMakeFiles/nvim_bin.dir/message.c.o
cd /tmp/neovim-20240915-60891-dg44f5/build/src/nvim && /opt/homebrew/Library/Homebrew/shims/mac/super/clang -DINCLUDE_GENERATED_DECLARATIONS -DUNIT_TESTING -DUTF8PROC_STATIC -D_GNU_SOURCE -Dnvim_bin_EXPORTS -I/tmp/neovim-20240915-60891-dg44f5/build/src/nvim/auto -I/tmp/neovim-20240915-60891-dg44f5/build/include -I/tmp/neovim-20240915-60891-dg44f5/build/cmake.config -I/tmp/neovim-20240915-60891-dg44f5/src -isystem /opt/homebrew/include/luajit-2.1 -isystem /opt/homebrew/opt/gettext/include -O3 -DNDEBUG -flto=thin -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -mmacosx-version-min=15.1 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wimplicit-fallthrough -fdiagnostics-color=auto -MD -MT src/nvim/CMakeFiles/nvim_bin.dir/message.c.o -MF CMakeFiles/nvim_bin.dir/message.c.o.d -o CMakeFiles/nvim_bin.dir/message.c.o -c /tmp/neovim-20240915-60891-dg44f5/src/nvim/message.c
make[2]: *** [src/nvim/CMakeFiles/nvim_bin.dir/mbyte.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 80%] Building C object src/nvim/CMakeFiles/nvim_bin.dir/mouse.c.o
cd /tmp/neovim-20240915-60891-dg44f5/build/src/nvim && /opt/homebrew/Library/Homebrew/shims/mac/super/clang -DINCLUDE_GENERATED_DECLARATIONS -DUNIT_TESTING -DUTF8PROC_STATIC -D_GNU_SOURCE -Dnvim_bin_EXPORTS -I/tmp/neovim-20240915-60891-dg44f5/build/src/nvim/auto -I/tmp/neovim-20240915-60891-dg44f5/build/include -I/tmp/neovim-20240915-60891-dg44f5/build/cmake.config -I/tmp/neovim-20240915-60891-dg44f5/src -isystem /opt/homebrew/include/luajit-2.1 -isystem /opt/homebrew/opt/gettext/include -O3 -DNDEBUG -flto=thin -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -mmacosx-version-min=15.1 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wimplicit-fallthrough -fdiagnostics-color=auto -MD -MT src/nvim/CMakeFiles/nvim_bin.dir/mouse.c.o -MF CMakeFiles/nvim_bin.dir/mouse.c.o.d -o CMakeFiles/nvim_bin.dir/mouse.c.o -c /tmp/neovim-20240915-60891-dg44f5/src/nvim/mouse.c
make[1]: *** [src/nvim/CMakeFiles/nvim_bin.dir/all] Error 2
make: *** [all] Error 2


READ THIS: https://docs.brew.sh/Troubleshooting

neovim's formula was built from an unstable upstream --HEAD.
This build failure is expected behaviour.
Do not create issues about this on Homebrew's GitHub repositories.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.````
18:00:11
@clason:matrix.orgclason brew remove utf8proc; brew install utf8proc --HEAD 18:00:12
@clason:matrix.orgclason but HEAD installs are not supported 18:00:27
@clason:matrix.orgclason neither by us nor by homebrew; caveat emptor 18:00:40
16 Sep 2024
@glacambre:matrix.orgglacambre Why does VIMRUNTIME="$HOME/prog/neovim/runtime" "$HOME/prog/neovim/build/bin/nvim" --clean /path/to/file +TOhtml work while VIMRUNTIME="$HOME/prog/neovim/runtime" "$HOME/prog/neovim/build/bin/nvim" --clean --cmd 'so /tmp/init.vim' /path/to/file +TOhtml doesn't? Somehow TOhtml gets properly loaded for the first command, but the second one complains that TOhtml is not an editor command ๐Ÿค” 11:12:29
@clason:matrix.orgclason

{command} will be executed before processing any vimrc file.

11:18:49
@clason:matrix.orgclason what's in init.vim? 11:19:19
@glacambre:matrix.orgglacambre An amalgation of polyglot.vim's sources, I'm trying to build a minimal reproducer for a segfault I can reliably reproduce... It looks like this is indeed what's preventing TOhtml from being loaded... But I need both polyglot and TOhtml to make the crash happen ๐Ÿ˜ญ 11:24:22
@clason:matrix.orgclasonFrickin' polyglot again ๐Ÿ˜ 11:25:01
@glacambre:matrix.orgglacambre

func! s:process_rtp(rtp)
  " Remove vim-polyglot from paths and make everything absolute

Gee, I wonder if that could be the source of the problem ๐Ÿ™ƒ

11:30:36
@glacambre:matrix.orgglacambre *
func! s:process_rtp(rtp)
  " Remove vim-polyglot from paths and make everything absolute

Gee, I wonder if that could be the source of the problem ๐Ÿ™ƒ

11:30:41

There are no newer messages yet.


Back to Room ListRoom Version: 10