snowkit / atom-haxe

atom.io haxe plugin, includes completion, error checking and more.
MIT License
43 stars 10 forks source link

Flicker in project tree when completion is invoked #55

Closed ntrf closed 8 years ago

ntrf commented 8 years ago

By default files for completion server are saved with . prefix. When completion query is invoked file is shown in project tree view for a split second. If you change prefix to ._ file will be ignored and will not show up in the tree. By default Atom ignores vcs folders, .ds_store, thumbs.db and files matching ._* mask.

I've changed it at [https://github.com/snowkit/atom-haxe/blob/master/lib/completion/provider.js#L320] in my local copy, but there might be other changes required.

ruby0x1 commented 8 years ago

can you point to documentation the ._ specifically? Because there is a user setting for ignoring all dot files - which we don't want to confuse the two where one is explicit and the other is implicit. It currently relies on the explicit, and if there is an implicit rule for hidden files with the underscore it would be fine to switch for now.

Another option is to try the experimental flag in the atom-haxe settings regarding the completion file used - it uses a temp folder elsewhere.

ntrf commented 8 years ago

I did not find it in the documnetation. It's a default setting specified in atom sources: [https://github.com/atom/atom/blob/beta/src/config-schema.coffee#L12]. I'm not sure where you found settings that ignores all dot files scince this would also exclude .gitignore, which is usefull to have in list.

ruby0x1 commented 8 years ago

in the tree view settings there's an ignored names option which is where you'd edit the config for treeview, it's likely this changed prior to atom 1.0 when I was using it most, but my settings are still respected and I don't have the tree view showing me these files.

This is actually referenced in the readme as well,

Completion happens as you type. For now, you might add "dot files" to Settings -> ignored Names, For example adding .* would ignore the .tmp file generated for completion. We are working on a more flexible solution.

ntrf commented 8 years ago

Yes. You can exclude .* files, but that includes .htaccess, .gitignore and other usefull files, that can be modified by user. Completion temporaries on the other hand should not be modified and should not be visible. By using the same prefix you are mixing these file types. Prefix ._* is ignored by default settings as shown in the commit i linked.

Anyway i'm closing the issue scince "Avoid saving file for completion" covers it. Hopefully in the future it will be prefered option.

jeremyfa commented 8 years ago

I have been using the Avoid saving file for completion for months without any apparent issue, so that should do the trick yes!