Skip to content

Latest commit

 

History

History
96 lines (65 loc) · 2.76 KB

README_en-US.md

File metadata and controls

96 lines (65 loc) · 2.76 KB

Vscode Comment Queries

|zh-Hans |en-US

Show the (variable) types in your code through annotation syntax and inline prompts, install it by marketplace.

Demo

Relative Query

pre-line-point

next-line-point

left-right-point

cross-line-point

Absoulute Query

absolute-point

cross-file-point

Features

  • Support for multiple programming languages

    • TypeScript
    • Python
    • Golang
    • Rust
  • Relative file line column query

    • Up and down
    //   _x2?
    //   _?
    type T = 1 | 2
    //   ^?
    //   ^x2?
    • Left and right
    type /*>?*/ T /*<?*/ = 1 | 2 //<4?
  • Absoulute file line column query

    • Current file

      // @114,514?
      // @[114, 514]?
    • Cross file

      • Absoulute path

        // @./foo.ts:114:514?
      • Relative path

        // @/users/xxx/codes/foo.ts:114:514?

Configure

  • Remove the prefix of the prompt message
  • Message display length limit

Q&A

  • Q: Why can't the prompt message be displayed?
  • A: Please check if your vscode version supports the editor.inlayHints.enabled configuration item and set it to on.
  • Q: An error may occur when querying in the top row or bottom row.
  • A: I haven't done the verification, so I won't fix it for now.
  • Q: There may be calculation errors when querying for elements with no corresponding row and column.
  • A: I don't want to fix it yet, you can fix it yourself.
  • Q: Why doesn't it support jumping to definition in python and go (<ctrl|cmd> + mouse right click)?
  • A: It has not been implemented, and I personally do not have the need for it (you can provide a PR to support it).

About

Using in IDEA.