clemos / haxe-sublime-bundle

Sublime Text bundle for Haxe programming language
Apache License 2.0
235 stars 86 forks source link

Cannot disable temporary files #231

Closed kewp closed 9 years ago

kewp commented 9 years ago

I can't figure out how to disable the .tmp files that keep getting generated ... Is there a setting for that ?

ghost commented 9 years ago

There is no setting for that. To get completion list, the file should be saved. Currently the file is saved and restored from a temp file (to restore its unsaved state on disc). I can add an option to disable temp file generation. But the file will be save on every code completion. To restore it you'll have to use undo history.

kewp commented 9 years ago

That's interesting - Can you not disable saves on completion completely ?

Also - Is there a way to disable completion ?

ghost commented 9 years ago

I think its impossible. The file should be saved. You can disable autocompletion in user settings (to display the code completion list manually press ctrl+space or alt+/):

"auto_complete": false

But you will lose sublime's completions as well. Tomorrow I'll add an option to disable haxe's autocompletion only.

kewp commented 9 years ago

Thanks, that's brilliant.

Sorry to ask again, but - Why do you need to save a file during an autocomplete ?

ghost commented 9 years ago

This bundle uses compiler based code completions.

kewp commented 9 years ago

Ok, that makes sense then ... On Sat, 09 May 2015 at 16:40 r3a1ay notifications@github.com wrote:

This bundle uses compiler based http://haxe.org/manual/cr-completion-overview.html code completions.

— Reply to this email directly or view it on GitHub https://github.com/clemos/haxe-sublime-bundle/issues/231#issuecomment-100498073 .

kewp commented 9 years ago

I should mention why this was an issue - I was getting temporary files left after closing sublime. Surely they should be removed once the completion is finished ?

ghost commented 9 years ago

Yes, they should. Check sublime's console (View-Show console) for errors.

kewp commented 9 years ago

Ok, got it - going to have to wait for the problem to reappear ...

I got this error saying "Game.hx has changed - do you want to reload it?". I'm never sure why it says that or what to do. Does this have to do with auto completion?

On Saturday, May 9, 2015, r3a1ay notifications@github.com wrote:

Yes, they should. Check sublime's console (View-Show console) for errors.

— Reply to this email directly or view it on GitHub https://github.com/clemos/haxe-sublime-bundle/issues/231#issuecomment-100530576 .

ghost commented 9 years ago

It seems that you have some issue. Maybe this one #225. I'll check that tomorrow.

kewp commented 9 years ago

Yes - Seems like it happens when I use auto complete - Any changes I made before the save are lost if I click OK ...

It sort of makes sense, though, right - Based on what you were saying about saving before completes ? Though I suppose that's the point of temporary files ...

I should mention I have the following settings (which are the opposite of standard):

"hot_exit": false,
"remember_open_files": false,
"close_windows_when_empty": true
ghost commented 9 years ago

Can you upload somewhere a test hx file with this issue and build file?

kewp commented 9 years ago

Yes - Turning hot exit back on removes the message "File changed on disc. Reload?"

kewp commented 9 years ago

You still want a ... test hx file ? Not sure what you mean ...

ghost commented 9 years ago

Can't reproduce the issue with hot_exit = false. No. I'll add some debug code tomorrow.

kewp commented 9 years ago

Ok cool. Thanks for the help.

On Sat, May 9, 2015 at 9:46 PM, r3a1ay notifications@github.com wrote:

Can't reproduce the issue with hot_exit = false. No. I'll add some debug code tomorrow.

— Reply to this email directly or view it on GitHub https://github.com/clemos/haxe-sublime-bundle/issues/231#issuecomment-100537516 .

ghost commented 9 years ago

Added haxe_auto_complete setting. Set it to false if you want to display haxe completion manually (ctrl+space or haxe_display_completion command).

Please try to reproduce "reload" issue. And check sublime's console for errors.

kewp commented 9 years ago

Thanks, r3a1ay.

Can reproduce error fine: as soon as I disable hot_exit, make some changes, do a haxe-based auto complete, switch to another window (not sublime), and come back I get a "... Has changed on disk. Do you want to reload?" message. Which when I click OK wipes my changes ... And when I put hot_exit back to true and restart sublime the problem goes away ... Have checked several times.

ghost commented 9 years ago

"haxe_auto_complete": false disables method hints. Press ctrl+shift+h, ctrl+shift+p to display the hints manually.

Do you have any error messages in sublime's console?

kewp commented 9 years ago

I'm sorry - I forgot to check.

I did have some errors, strangely (had nothing yesterday) - But they were before I tried turning hot exit on/off to retest reload error.

Traceback (most recent call last): File ".\sublime_plugin.py", line 236, in on_query_completions File ".\HaxeComplete.py", line 1815, in on_query_completions File ".\HaxeComplete.py", line 1973, in get_haxe_completions File ".\HaxeComplete.py", line 1779, in run_haxe File ".\features\haxe_errors.py", line 66, in highlight_errors AttributeError: 'module' object has no attribute 'samefile'

ghost commented 9 years ago

Thanks. That should help.

ghost commented 9 years ago

Should be fixed. Please check.

kewp commented 9 years ago

Woohoo - works great. And it also seems a LOT faster !