atom-plugin
atom-plugin copied to clipboard
Autocomplete not working
I'm new to Fuse and UXML. I've installed the Fuse package, and removed the fuze-language package per instructions from Fuse. Autocomplete does not want to work even after a restart.
Am I missing something? Is fuse autocomplete like emmet autocomplete?
Hi, are you on Windows or OS X? Which version of Fuse are you running?
Also, are you able to run Fuse aside from this problem? Can you for instance start preview of your apps?
Really sorry about that. I should know better than just to fire of an issue without the details.
OSX 10.10.5 Latest version of Atom (1.5.3) Latest version of Fuse (0.9.11) I am able to run preview Latest version of the Atom Package XML support installed Uninstalled fuse-language package
Auto suggest seems to work, though it doesn't auto close tags. Steps to replicate:
- Type:
<DockPanel> - Press
Return - new line with indent returned
- manually type closing tag
</DockPanel>
Step four is driving me nuts. Is this a feature of the fuze package, or is this a setting in Atom that I have disabled?
Thanks for your help.
@JWhiteUX, this is the default behavior in Atom. I will recommend you to install https://atom.io/packages/autoclose-html
Just set "Additional Grammars" to include UX in the settings of Autoclose-html package

Thanks for getting back to me. I've installed atutoclose-html and, checked the autoclose-html settings for "Additional Grammars" and I'm not seeing it.

Oh, I see. Looks like it was removed in one of the latest versions :( (https://github.com/mattberkowitz/autoclose-html/commit/73cdb1292978c3b491ef5adc24bb108001aebce3). I gonna see what I can do about that. I will update you, when I know more
Temporary Workarund
- Run
apm uninstall autoclose-html. Skip this step if you already have uninstalled autoclose-html - Run
apm install [email protected] - Set grammar language to UX as I mentioned above
- Restart atom
Sorry, for all the trouble
Thanks for your help, Tapped. Seems to be working now. Cheers!
Good, it worked out :) I am not gonna close this ticket just yet. I have been in contact with the developer behind autoclose-html, to get some suggestions to how to integrate our package properly. I may have a fix that we can add, where autoclose-html will automatically work with UX.
Hi Tapped,
Did you ever get this worked out with the developer behind autoclose-html? Or, should I install 0.21.0?
Hi, wasn't able to get it working properly on none-US keyboards, because of a bug in Atom. The author made a legacy workaround: https://github.com/mattberkowitz/autoclose-html/issues/128 However that workaround doesn't support custom grammars.
But adding this to your keymap should work for US keyboards.
'atom-text-editor[data-grammar~="ux"]':
'>': 'autoclose-html:close-and-complete'
You may use a different shortcut if you have a none-US keyboard eg. (shift - c)
'atom-text-editor[data-grammar~="ux"]':
'shift-c': 'autoclose-html:close-and-complete'
Thanks Tapped - that was easy!
On a US Keyboard on OS X/Mac, on Atom 1.10.1 (or 1.10.2), simply choose:
-
Click the
Atommenu thenPreferences. -
Click
Keybindings. -
Click the blue-highlighted text which says:
your keycap file.(It's under the "Keybindings" title, at the end of the sentence which says "You can override these keybindings by copying and pasting them into
your keycap file"). -
Paste in Tapped's keymap:
'atom-text-editor[data-grammar~="ux"]': '>': 'autoclose-html:close-and-complete'
Thanks for keeping this issue open, was really helpful to get this working. The keybinding didn't work for me as it simply replaced the closing tag but just installing [email protected] and adding "UX" to additional grammars worked.
Not sure if this is related, but doesn't this package also support code completion in UX? Don't seem to have that working, assuming that means this type of thing, like in the examples which run on sublime text:
Hi,
I can see that this is still open, I have another autocomplete problem, it seems that autocomplete works for attributes but not to start a tag, for example, I can start typing <Stac to create <StackPanel>, and nothing shows up, but once I finished typing <StackPanel it shows up the attribute list.
I don't think this is the intended behavior as I have seen it work somewhere else, any advice? Thanks!
Hi,
First I'm sorry, I should have mentioned that I'm using atom 1.16 on MacOS Sierra.
As an update, I think it's a bug. Basically if I type anything inside <App></App> it doesn't start the autocomplete, but if I add a container tag like <StackPanel>, the autocomplete does work inside of that.
<App>
# autocomplete doesn't work #
</App>
<App>
<StackPanel>
# autocomplete works #
</StackPanel>
# autocomplete doesn't work #
</App>
I hope that this get fixed sometime. Thanks!