Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ffi for char classing #49

Merged
merged 2 commits into from
Jun 1, 2024
Merged

feat: ffi for char classing #49

merged 2 commits into from
Jun 1, 2024

Conversation

tris203
Copy link
Owner

@tris203 tris203 commented May 31, 2024

This borrows inspiration from Noice's implementation
Shout out Folke

And uses this LuaJITs FFI to support all the char classing that Vim/Neovim does

@tris203 tris203 requested a review from willothy May 31, 2024 23:12
@willothy
Copy link
Collaborator

Does this conflict with noice? Lua's FFI C namespace is global, so if utf_class is used in ffi.cdef multiple times (even in separate plugins) it could cause issues.

@tris203
Copy link
Owner Author

tris203 commented May 31, 2024

Does this conflict with noice? Lua's FFI C namespace is global, so if utf_class is used in ffi.cdef multiple times (even in separate plugins) it could cause issues.

No. Noice doesn't use utf_class

lua/precognition/ffi.lua Show resolved Hide resolved
lua/precognition/ffi.lua Show resolved Hide resolved
@willothy
Copy link
Collaborator

Does this conflict with noice? Lua's FFI C namespace is global, so if utf_class is used in ffi.cdef multiple times (even in separate plugins) it could cause issues.

No. Noice doesn't use utf_class

Cool, should be good then.

What was the error with ffi.cdef?

Copy link
Collaborator

@willothy willothy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questions answered, looks good to me!

@willothy willothy merged commit 488dc26 into main Jun 1, 2024
9 checks passed
tris203 added a commit to josh-nz/precognition.nvim that referenced this pull request Jun 1, 2024
@tris203 tris203 deleted the ffi branch June 3, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants