-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Bug?] Incorrect activation events #737
Comments
If you want to add support for "literate coq", I think you can refer to Agda's approach. {
// ...
"contributes": {
// ...
"languages": [
{
"id": "agda",
"extensions": [".agda"],
"aliases": ["Agda"],
"configuration": "./language-configuration.json",
"icon": {
"dark": "./asset/dark.png",
"light": "./asset/light.png"
}
},
{
"id": "lagda-md",
"extensions": [".lagda.md"],
"aliases": ["Literate Agda (markdown)"],
"configuration": "./language-configuration.json",
"icon": {
"dark": "./asset/dark.png",
"light": "./asset/light.png"
}
},
{
"id": "lagda-tex",
"extensions": [".lagda.tex", ".lagda"],
"aliases": ["Literate Agda (TeX)"],
"configuration": "./language-configuration.json",
"icon": {
"dark": "./asset/dark.png",
"light": "./asset/light.png"
}
},
{
"id": "lagda-rst",
"extensions": [".lagda.rst"],
"aliases": ["Literate Agda (reStructuredText)"],
"configuration": "./language-configuration.json",
"icon": {
"dark": "./asset/dark.png",
"light": "./asset/light.png"
}
}
]
// ...
}
// ...
} For example: {
// ...
"contributes": {
// ...
"languages": [
{
"id": "coq",
"extensions": [".v"],
"aliases": ["Coq"],
"configuration": "./language-configuration.json"
},
{
"id": "coq-md",
"extensions": [".mv", ".lcoq.md"],
"aliases": ["Literate Coq (markdown)"],
"configuration": "./language-configuration.json"
},
{
"id": "coq-tex",
"extensions": [".lv", ".lcoq.tex"],
"aliases": ["Literate Coq (TeX)"],
"configuration": "./language-configuration.json"
}
]
// ...
}
// ...
} However, I don't know the details of the implementation, so it's just a suggestion. |
Hi @kands-code , thanks for the report, the code you quote is for 0.1.9, so indeed the behavior will differ greatly from 0.1.8. Activaton is a bit complex, as indeed, A few comments:
Thanks for the Agda example, we used this approach in the past, however we had the problem But indeed, in the Agda code, as the extension does contribute the language, the See microsoft/vscode#198295 for discussion about this topic. Any help with this is much appreciated. |
Things seems to work fine in 0.1.9, except for a little detail:
We will release a 0.1.9.1 bugfix ASAP (also to tweak a few other things). |
@kands-code , the 0.1.10 version of the extension should behave much better, thanks for the report and testing. Don't hesitate to reopen if the |
Describe the bug
For most plugins in vscode, specific language plugins, such as Java, or Python, the activation events is generally
onLanguage:xxx
, wherexxx
represents this language, such as Java:Screenshot of plugin interface
including VsCoq:
Screenshot of plugin interface
But the activation events of CoqLSP are
markdown
andlatex
:Screenshot of plugin interface
As a result, in some projects not related to Coq, there may be a
README.md
in the project, and then CoqLSP is activated.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The activation event of the plugin should be
onLanguage:coq
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: