Samuel Brucksch
Samuel Brucksch
The problem here is, that completion items are proposed no matter the context. So 'T', 'H', 'E' and 'N' are included in the items seen in the screenshots, so they...
Related to https://github.com/Microsoft/vscode/issues/52500 Fuzzy code completion.
One proposal to get a quick solution to this is adding the actual words from the language to code completion, like 'then', 'when', 'rule' and so on, in that case...
This is because the code completion is not context aware as we do not have the grammar available in the extension. I already mentioned this here: https://github.com/openhab/openhab-vscode/issues/123#issuecomment-446912723
Not sure if i miss something, but from the documentation it looks like you can only provide the language the snippet is for, but not the file type. As all...
Snippet support seems to be available for LSP: https://github.com/Microsoft/vscode/issues/24924 It was added in node lib 3.x, we use 5.x i guess each snippet needs to be returned as completion item...
Regarding sitemaps: Outline seems to be provided by remote lsp server. Also frames do not have a property name, only a label and the outline only shows the property names:...
Not sure if these are the right files but it looks like these are used to implement the ```format``` functionality: [ItemsFormatter](https://github.com/eclipse/smarthome/blob/7176f8961a4caba501fe38bab52a44c8705011c3/bundles/model/org.eclipse.smarthome.model.item/src/org/eclipse/smarthome/model/formatting/ItemsFormatter.xtend) [RulesFormatter](https://github.com/eclipse/smarthome/blob/7176f8961a4caba501fe38bab52a44c8705011c3/bundles/model/org.eclipse.smarthome.model.rule/src/org/eclipse/smarthome/model/rule/formatting/RulesFormatter.xtend) [SiteMapFormatter](https://github.com/eclipse/smarthome/blob/7176f8961a4caba501fe38bab52a44c8705011c3/bundles/model/org.eclipse.smarthome.model.sitemap/src/org/eclipse/smarthome/model/formatting/SitemapFormatter.xtend) [ThingFormatter](https://github.com/eclipse/smarthome/blob/7176f8961a4caba501fe38bab52a44c8705011c3/bundles/model/org.eclipse.smarthome.model.thing/src/org/eclipse/smarthome/model/thing/formatting/ThingFormatter.xtend) However all of them except ItemsFormatter...
Ok i think i get it now. xtext is a language grammar tool that uses antlr. I already worked with antlr and know, that it works very well together with...
I made a sample project and played around a bit with the Items grammar: https://github.com/SamuelBrucksch/openhab-antlr4 I also wrote some tests to verify, if grammar is correct. Had to adapt the...