-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
Introduce a new regex for a special comment: howto? #863
Comments
I can't understand what you want, please tell more details |
In some lua-file, e.g.
I want to use CPP-preprocessor directives like demonstrated above.
I tried to achieve that with the above extension. |
For 1. , please check https://github.com/sumneko/lua-language-server/wiki/Plugin |
Ok, thanks. The plugin gets found, but no diffed.lua is created. |
|
Ok, works. |
What about 2) ? |
You may try this: https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#injection-grammars EDIT: VSCode dose not supports 2) in one extension, you may create a new extension to do this |
Wouldn't be sufficient to edit |
It is not good to modify internal files directly, because you need to modify it again after the new version is released. You could replace |
Yes, I would go an patch approach.
Why replace by |
Color of |
Can I choose a speacial color for // then? |
"editor.semanticTokenColorCustomizations": {
"rules": {
"comment": "#ff0000"
}
} |
Mmh, does not work (should be red): diffed.lua:
settings.json:
|
Try to reopen/scoll this file, the client may not refresh at the first time |
No luck |
Try set |
As well no luck |
I have no idea, but I can confirm that it works at my side |
Can you share your example? |
I'm using exaclty your example / plugin / setting ... no luck with color |
Your example only works if main.lua has 5 lines. With 6 lines (blank) it does not work anymore |
I can reproduce it with EOL |
This is Linux, so |
Maybe you can only waiting for fixing this bug or editing |
Well, I have no real idea how to do that. I hope you can fix that soon |
I tried to introduce a special comment for CPP-directives like
#include "bla.lua"
in lua.tmLanguage.json
.vscode-oss/extensions/sumneko.lua-2.5.3/syntaxes
But now luck with
The text was updated successfully, but these errors were encountered: