Skip to content

Improve general auto-complete / intellisense (Not perfect but better) - #556

Open
Ho11ow1 wants to merge 12 commits into
renpy:masterfrom
Ho11ow1:improved-intellisense
Open

Improve general auto-complete / intellisense (Not perfect but better)#556
Ho11ow1 wants to merge 12 commits into
renpy:masterfrom
Ho11ow1:improved-intellisense

Conversation

@Ho11ow1

@Ho11ow1 Ho11ow1 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Still not perfect but it really can't be however it is better than it was.

Improvements

  • All immediate namespaces are shown in full persistent, preferences, gui, config, bubble, etc...
  • Persistent now shows all variables and the 2 specific persistent methods
  • Auto-complete now shows a full list of accessible variables and methods under a customStore
  • Variables created via default x = customStore.Class() now also have intellisense for their methods and fields
  • All immediately available variables, methods, classes and stores now show up in intellisense

Limitations

  • It unfortunately doesn't do everything i would like it too however it is better than what it was e.g. custom.var. does not show it's appropriate methods
  • From my testing this is due to const range = document.getWordRangeAtPosition(prefixPosition); forcing us to only receive the last non empty component of the entire line (rentale.all_items. => kwPrefix = all_items) because of the default regex that vscode uses for getWordRangeAtPosition. However if we use the regex: /[\w.]+$/ to capture the entire expression, we then break call, call screen and jump auto-complete

Thoughts

  • Maybe an entire re-write would be better. On vscode-init firstly we go through navigation.json, then parse each .rpy and _ren.py file so we have the context of all custom stores, custom store variables, methods etc... From there we could implement full call and jump auto-complete so it would be aware of all the available labels and screens, However that is outside the scope of this PR and is really just an additional thought
  • With that said i'll look at the parser branch

@Ho11ow1 Ho11ow1 changed the title Improve general auto-complete / intellisense (Not perfect but better (Still doesn't grab custom.var.field/method though)) Improve general auto-complete / intellisense (Not perfect but better) Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant