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

fix(native_lsp): boolean logic #526

Merged
merged 3 commits into from
Jun 25, 2023
Merged

Conversation

Yuhf7
Copy link
Contributor

@Yuhf7 Yuhf7 commented Jun 24, 2023

Fixes #523
The error seems to be due to boolean logic in native_lsp.lua:

-			bg = O.transparent_background and C.none
+			bg = O.transparent_background
+				or not inlay_hints.background and C.none

Since and has priority over or, Lua computes not inlay_hints.background and C.none first, and then O.transparent_background or'd with the result of and.
Then, if O.transparent_background is true (which is the case for me), the bg field is set to true, which causes the "invalid 'bg'" error.

Surrounding the or statement with parens seemed to solve the issue for me.

Copy link
Contributor

@mrtnvgr mrtnvgr left a comment

Choose a reason for hiding this comment

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

Thanks!

@mrtnvgr mrtnvgr merged commit 8d02781 into catppuccin:main Jun 25, 2023
@Yuhf7 Yuhf7 deleted the fix/boolean-logic branch June 25, 2023 14:08
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.

bg error(from prev commit)
2 participants