-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SublimeHaskell with hsdev #132
Conversation
@@ -1,5 +1,6 @@ | |||
[ | |||
{ "keys": ["ctrl+shift+r"], "context": [ {"key" : "is_haskell_source" } ], "command": "sublime_haskell_go_to_declaration" }, | |||
{ "keys": ["ctrl+m", "ctrl+i"], "context": [ {"key": "is_haskell_source" } ], "command": "sublime_haskell_insert_import" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People won't like us for this one, since Ctrl+M
is Sublime's default for "jump to matching bracket" (very useful).
How about Ctrl+Alt+i
(and of course Shift-Ctrl-P "imp..."
)?
I hope I can try this out soon. In general, how do you feel about implementing even more on the hsdev side? I've only taken a superquick look, but as far as I understand we still do a lot of buffer changes within Sublime. On most actions like adding imports, we could save the file, let hsdev modify it, and Sublime will automatically reload it. Pros:
Cons:
We might actually get nicely around the reload issue by letting hsdev perform the changes in-memory and send over a diff, which Sublime could run on the buffer. What do you think? |
Good idea. I think, I can implement both ways for test
We can update inspected info with buffer contents and then invoke command, which can return new buffer contents. The real problem is that buffer contents are usually in invalid state and inspecting can fail. |
The shorter inspection is really great news. Is |
@yghor, no, |
I thought the quicker scan was great, but the new commands are exactly what was needed to avoid switching between the browser and Sublime. I'll run and track from this branch for now on. Suggestions
Bug?
Warning:
The import of 'Package.Module' is redundant
except perhaps to import instances from (...) Is this expected or should I file an issue? |
|
@yghor, I think it's good idea to find declarations online
|
Can we merge this branch? |
Do you think it's possible to do the following:
Cleaning up the history is probably going to be a bit of work, but I think it can save us a lot of trouble in the long run, especially when bisecting. |
@nh2 , i've rebased 6 commits |
Doesn't seem to run any tests though - https://github.com/mvoidex/hsdev/blob/master/tests/Test.hs looks quite empty
Nice, it cut down more than 1000 lines of diff. There still seems to be some amount of hsdev-unrelated changes in it, for example the switch from I also seem to have another problem: In the {
"auto_run_tests": false,
"enable_auto_build": true,
"enable_auto_lint": false,
"enable_ghc_mod": true,
"enable_hdevtools": false,
"inspect_modules": false,
"enable_hsdev": false
} and on |
I've been using this branch instead of master for some time now - I came here just to say I'm excited for it to be finished off! Thanks for all the great work :-) |
@rehno-lindeque, thanks! I have not enough time now, but I'll try to finish it as soon as possible |
Get into account 'inspect_modules' option: don't inspect sources if enabled Start/stop inspector/hsdev on settings changed
@nh2 , could you test this branch a bit? I think, it is ready to merge with master |
I shall |
Shows in format 'decl :: type module' Also completes with qualified (as) import names
Async completion
…stack Also rremoved cabal-dev and explicit sandboxes
…teps so that socket dies on second one
@nh2, I've implemented most things I wanted to and ready to merge |
@mvoidex: I'm having a look. Some points:
I could not test much more since because of the above problem, most of my commands seem to kill In general, I'd be happy to merge this even if there are still some problems, especially since te default is off and I know you do lots of iterative improvements on this, which should be easier to do when it's merged to master. |
@nh2 , thanks for response and testing
There are some commands for SublimeREPL plugin (
I've enabled travis according to #244, there's no travis config for master and hsdev branches. I think, i should disable it
We're already checking hsdev version and disabling
I'm using
No, but I'll install it to test with.
Seems, that module is not in
Thanks for your help! You can also try to test it on .sublime-project with only one dummy cabal project |
@nh2, I've just noticed I forgot to upload hsdev-0.1.6.2, which have very important fix |
… _, a-z, A-Z, 0-9
Excellent! |
I've just updated hsdev and SublimeHaskell-hsdev. Now it works in Ubuntu & Windows.
There are also new way to scan cabal, which now takes only 3-4 (not 40-100) seconds to completely rescan all modules.
And some new commands:
I'll be grateful for any suggestions and testing