-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Yaml custom tags, unresolved tags #18013
Comments
Can you provide an minimal example YAML file so I can see if I can reproduce? |
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: >
api-example: API Example
Parameters:
Stage:
Type: String
Default: development
AllowedValues:
- development
- staging
- production
Conditions:
IsProductionStage: !Equals [!Ref Stage, production]
Resources:
HttpApi:
Type: AWS::Serverless::HttpApi
Properties:
DefaultRouteSettings:
DetailedMetricsEnabled: true
Domain:
CertificateArn: arn:aws:acm:us-east-1:000000000000:certificate/be8e5595-4771-4408-9ec2-547a2230bdfds
DomainName: !Ref DomainName
EndpointConfiguration: REGIONAL
Route53:
HostedZoneId: Z1OLBJHSKHIU98
|
Change |
I had changed the configs to this: "lsp": {
"yaml-language-server": {
"settings": {
"yaml": {
"customTags": [
"!And scalar",
"!And mapping",
"!And sequence",
"!If scalar",
"!If mapping",
"!If sequence",
"!Not scalar",
"!Not mapping",
"!Not sequence",
"!Equals scalar",
"!Equals mapping",
"!Equals sequence",
"!Or scalar",
"!Or mapping",
"!Or sequence",
"!FindInMap scalar",
"!FindInMap mappping",
"!FindInMap sequence",
"!Base64 scalar",
"!Base64 mapping",
"!Base64 sequence",
"!Cidr scalar",
"!Cidr mapping",
"!Cidr sequence",
"!Ref scalar",
"!Ref mapping",
"!Ref sequence",
"!Sub scalar",
"!Sub mapping",
"!Sub sequence",
"!GetAtt scalar",
"!GetAtt mapping",
"!GetAtt sequence",
"!GetAZs scalar",
"!GetAZs mapping",
"!GetAZs sequence",
"!ImportValue scalar",
"!ImportValue mapping",
"!ImportValue sequence",
"!Select scalar",
"!Select mapping",
"!Select sequence",
"!Split scalar",
"!Split mapping",
"!Split sequence",
"!Join scalar",
"!Join mapping",
"!Join sequence",
"!Condition scalar",
"!Condition mapping",
"!Condition sequence"
],
"schemas": {
"https://raw.githubusercontent.com/aws/serverless-application-model/main/samtranslator/schema/schema.json": "template.yml"
}
}
}
}
}
|
Here is an example project that works for me Zed Preview v0.154.0 Unrelated, there's a typo in your settings: |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I don't know what is happening here: |
I did commented the section lsp from user settings, and here are the logs:
|
I also continue to get "Unresolved tag" errors. I experience it in my own SAM projects, and in the above-provided test from @elvishp2006 . I'm running Zed Version: my (local) settings: // Folder-specific settings
//
// For a full list of overridable settings, and general information on folder-specific settings,
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
{
"lsp": {
"yaml-language-server": {
"settings": {
"yaml": {
"customTags": [
"!And scalar",
"!And mapping",
"!And sequence",
"!If scalar",
"!If mapping",
"!If sequence",
"!Not scalar",
"!Not mapping",
"!Not sequence",
"!Equals scalar",
"!Equals mapping",
"!Equals sequence",
"!Or scalar",
"!Or mapping",
"!Or sequence",
"!FindInMap scalar",
"!FindInMap mappping",
"!FindInMap sequence",
"!Base64 scalar",
"!Base64 mapping",
"!Base64 sequence",
"!Cidr scalar",
"!Cidr mapping",
"!Cidr sequence",
"!Ref scalar",
"!Ref mapping",
"!Ref sequence",
"!Sub scalar",
"!Sub mapping",
"!Sub sequence",
"!GetAtt scalar",
"!GetAtt mapping",
"!GetAtt sequence",
"!GetAZs scalar",
"!GetAZs mapping",
"!GetAZs sequence",
"!ImportValue scalar",
"!ImportValue mapping",
"!ImportValue sequence",
"!Select scalar",
"!Select mapping",
"!Select sequence",
"!Split scalar",
"!Split mapping",
"!Split sequence",
"!Join scalar",
"!Join mapping",
"!Join sequence",
"!Condition scalar",
"!Condition mapping",
"!Condition sequence"
],
"schemas": {
"https://raw.githubusercontent.com/aws/serverless-application-model/main/samtranslator/schema/schema.json": "template.yml"
}
}
}
}
}
} |
@mcsakoff, I am seeing the same behavior on my end. It does seem like the language server picks up the custom tags. However, when I disable the language server entirely via the |
@notpeter I found that the Docker Compose extension was the cause of the Unresolved Tag warnings. When I uninstalled the extension, they disappeared (using your test repo). The extension registers its own language server for YAML files. I re-installed the extension, but I disabled its language server it in my project settings: "languages": {
"YAML": {
"language_servers": ["yaml-language-server", "!docker-compose"]
}
}, Ultimately, the issue seems to be with other extensions registering language servers for YAML files and not providing a way to register custom tags. @elvishp2006 not sure if you have installed the Docker Compose extension. If not, auditing extensions that register additional language servers on YAML files may be worthwhile. |
@notpeter Thanks, I had the same extension, that conflict was the problem |
@adamhake @elvishp2006 Thank you for your tracking this down, providing a clear workaround and confirming the fix. I've opened an issue upstream with that extension: And we can move any discussion there. Thanks all! |
Check for existing issues
Describe the bug / provide steps to reproduce it
I had configured my editor to work with a custom lsp config to yaml files, but it keep saying that my custom tags are Unresolved
Environment
Zed: v0.153.5 (Zed Preview)
OS: macOS 14.6.1
Memory: 16 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
If applicable, attach your Zed.log file to this issue.
Zed.log
The text was updated successfully, but these errors were encountered: