Types autocomplete and go-to-defenition are not working with k8s-openapi
See original GitHub issueEnvironment
- IntelliJ Rust plugin version: 0.4.164.4409-212
- Rust toolchain version: 1.57.0 (f1edd0429 2021-11-29) x86_64-apple-darwin
- IDE name and version: IntelliJ IDEA 2021.2.4 Ultimate Edition (IU-212.5712.43)
- Operating system: macOS 12.2.1
- Macro expansion engine: new
- Name resolution engine: new
Problem description
I installed k8s-openapi
dependency and can’t use it’s types and go-to-definition feature, for example - k8s_openapi::api::core::v1::Pod
When I try to go-to-defenition to Pod
, I get message Cannot find declaration to go to
, but I can go-to ::api::
, so it means that it finds api/mod.rs
, but not core
, for some reason.
When I try to use variable, that don’t print type hints and there is no autocomplete.
p.s. build process works without errors
Steps to reproduce
Install k8s-openapi = { version = "0.15.0", features = ["v1_24"] }
Import k8s_openapi::api::core::v1::Pod
and try to use autocomplete/go-to-defenition
use k8s_openapi::api::core::v1::Pod;
use kube::{
api::{Api, ListParams, PostParams, ResourceExt},
Client,
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::try_default().await?;
let pods: Api<Pod> = Api::default_namespaced(client);
}
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
1856354 – New APIServices missing from OpenAPI definitions
Console will register the new models using API discovery, but does not refresh the OpenAPI definitions in localStorage (used for YAML editor autocomplete, ......
Read more >How to create your own auto-completion for JSON and YAML ...
In this article, I demonstrate how to create a JSON Schema, to provide auto-completion to Hadolint configuration files on VS Code editor.
Read more >kubernetes - Is there any easy way to convert (CRD ...
Want to provide autocompletion and Intellisense in IDE. It needs a JSON schema to do so. I have a huge number of CRDs...
Read more >Kubernetes supports OpenAPI
OpenAPI allows API providers to define their operations and models, and enables developers to automate their tools and generate their favorite ...
Read more >Kubernetes | IntelliJ IDEA Documentation - JetBrains
Validation of custom resources with custom resource definition (CRD) ... The Kubernetes plugin is not bundled with IntelliJ IDEA, and should ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just came here to say that https://github.com/intellij-rust/intellij-rust/issues/9093#issuecomment-1190010829 just changed my life.
Thank you!
@testitm Great! Don’t hesitate to let us know if anything will work unexpectedly
I don’t close this issue since build scripts support is not enabled by default yet