vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Autocompletion does not work if there is text under the cursor

Open palvarezcordoba opened this issue 6 years ago • 1 comments

If I write a new file, It works nice but if I edit a file does not.

I am using this custom schema: https://gist.github.com/palvarezcordoba/55ea8c948c45475446cb6fff6f91a359

If I try to get suggestions here: imagen

It fails because there is more text below.

What happens if I delete that text? It works: imagen

EDIT: This bug is only reproducible inside an object, If you edit a top-level var it does not fail

For example:

default_password:  **************
default_snmp_community:  **************
default_model:  **************
default_ssh_port:  **************
default_position:
  default_zoom:  **************
  default_Lat: **************
  default_Lng:  **************

locations:
  - name:  **************
    comment:  **************
    latitude:  **************
    longitude:  **************

In that yaml, if you delete default_ssh_port, put your cursor below default_model and press ctrl + space you will get suggestions, but if you try to edit locations it does not work because there is more text below (it does not appear in the snippet)

palvarezcordoba avatar Dec 04 '18 11:12 palvarezcordoba

Are you still able to reproduce this issue?

gorkem avatar Apr 22 '22 20:04 gorkem

Closing due to inactivity

gorkem avatar Apr 01 '23 01:04 gorkem