Closed clemos closed 8 years ago
I think I'm going to switch to VS Code, and certainly make substantial contributions to this extension. Do you have any plan, so we don't work on the same features ? Here is what I wanted to do:
Could you start with changing this to a proper XML parsing while you're at it? :)
@clemos - I'm woefully unfamiliar with the details of vscode extensions (and node) - I basically pick things up and hack. So what's your goal with a "implementing a language server" ? This extension already provides auto-completion, goto definition, etc. It spins up a Haxe completion server (if necessary), and to that end, has options for you to specify a build.hxml file (@pleclech can probably give you more info.)
As for implementing a build command, it seems like not too far of a stretch, as like I said, we already have to know about the build.hxml for the completion server. This could be something interesting to investigate. Though "building" implies you'll want to launch or debug, which are target-specific considerations, which I feel (but I could be wrong) may be better maintained as separate extensions -- e.g. I have an hxcpp debugger extension in a separate repo. Because a debugger extension (which also builds and launches) provides different functionality than a language extension, and I'm not sure the extension framework is flexible enough to handle all the Haxe targets (JS, hxcpp, etc) in a single extension.
Thoughts?
@nadako - ha, yes, there are definitely TODO's in the code! :D
@jcward You're right, it's probably not mandatory, but reading VSC docs, Language Server really seems like the proper way to implement such features as completion, signature help, goto definition, find usages, and get "free" "rename symbol in all files" / refactoring features. I don't know if I'm really going to start by doing that; actually, I was curious to know if there was a design choice for not implementing one for Haxe in the first place. If it was not, then I guess we should switch to a Language Server while we can ;)
As for building, for now I was only thinking haxe myfile.hxml
=> error highlighting / navigation.
I agree with you, VSC makes it easy to work with modules, so any more advanced stuff (I'm particularily interested in js debugging) would certainly be better in a separate extension.
Yeah, historically I poked around with the language server examples, and didn't get anywhere. Then found I could just hack around in @nadako's extension and get the features I wanted.
I was only thinking haxe myfile.hxml => error highlighting / navigation.
I agree, I think that makes sense for this extension.
I'm definitely interested in JS debugging also, I'd like to follow your progress closely!
Let me merge up @pleclech's 0.0.5 branch really quick, then we'll all be starting from the latest development work...
Ok, well, I hope I didn't screw that up. I had outstanding commits (for market publishing), merged in Patricks, and force pushed. :P Ha! But the history all looks ok, I think. ;)
I'm going to close this PR, but feel free to continue the conversation.
Mh, I wish my changes were merged :\
Oh, sorry, that was the beginnings of your compile / build. I'll take it, just a sec...
Can you resolve the conflicts wrt the latest update?
Man, I don't know what you did, but I'm having a hard time rebasing my changes... I'd better make a new PR, I guess :|
yeah, it was ugly, sorry. :/
@clemos - hey, I thought I'd note that, due to the completion server, the plugin already and *continuously populates errors and warnings even without a proper "build task". Open them by clicking on the icon in the lower-left, or View->Errors and Warnings (shows shortcut key.)
ok i will check that. At what time do you prefer to validate the file ?, for now it is validated after an idle time.
:)