Skip to content

Create rs.lua #174

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Lua/Plugins/rs.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
highlight("const", "reserved")
highlight("fn", "reserved")
highlight("let", "reserved")
highlight("mut", "reserved")
highlight("+", "operator")
highlight("-", "operator")
highlight("*", "operator")
highlight("/", "operator")
highlight("%", "operator")


add_comment("add some raw pointers trust")
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Use proper comment delimiter(s) for Rust syntax highlighting.
The current call add_comment("add some raw pointers trust") appears to be placeholder text rather than actual Rust comment syntax. To ensure comments are highlighted, register the real comment tokens. For example:

-add_comment("add some raw pointers trust")
+add_comment("//")         -- single-line comments
+add_comment("/*")         -- block comment start (if supported)
+add_comment("*/")         -- block comment end (if supported)

Without valid delimiters, comment highlighting won’t function.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
add_comment("add some raw pointers trust")
add_comment("//") -- single-line comments
add_comment("/*") -- block comment start (if supported)
add_comment("*/") -- block comment end (if supported)