Context Menu based on Grammar Scope


#1

Hi,

As far as I can tell, it’s not possible to have the context menu based on the grammar scope of the item you right-clicked.

I think it would be great to be able to do something like .editor .variable: { 'Show type of this variable' : 'my-language:show-type'}.
The main problem seems to be that the right-click is actually registered in the overlayer, and not on the lines themselves - which is why it currently doesn’t work. If this could be fixed, it would be wicked.

Then in combination with the other discussions for also adding the name of the grammar, you could create a module that gives IDE-like features for a certain language without polluting / interfering with other languages. Because the keymaps + context-menus could target the language + individual scopes of the language to provide very context-aware suggestions.
And that would IMHO be rather wicked. What do other people think of something like this?

Kind regards
Morten


#2

We think this is a great idea, but it is something we haven’t had time to add. It is also related to this Topic: