Support for Autocompletion

Oct 15, 2012 at 12:08 PM


I am using the irony package for visual studio integration of my language. I am storing all the declarations in one container and then when i do "ctrl+ spacebar" for auto completion options i have list of variables declared already. Now the problem is whenever i delete some lines of declaration i need to remove those entries from the declaration data container. For that i am thinking in two ways 

1. handling a delete event or

2. reparsing the contents whenever the auto completion is initiated.

In the 1st method i don't know is there any provision to provide event handlers for keyboard inputs. If there's a way and it is a right way then please guide me.

In the second method i don't know how to reparse the contents for the current language service instance.

Any help will be greatly helpful.


Oct 16, 2012 at 5:08 PM

it's hard to say, your questions are mostly about handling the interaction between editor (VS) and Irony's parser, not about parser itself. As a guess, I would say the code should be re-parsed on any edit change - maybe not every character, but with some delay to accommodate the word/serious of changes, and then reparsing. Maybe not the entire file, but some fragment (proc body), but that's not directly supported in Irony now.