-
Notifications
You must be signed in to change notification settings - Fork 58
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
Use of DCD for "Go To Definition" and Code Completion functionality plus other changes. #29
Conversation
Uses DCD to get location. See issue buggins#5
See issue buggins#20 Suggestions is not displayed yet.
@@ -245,7 +271,7 @@ class SimpleDSyntaxHighlighter : SyntaxHighlighter { | |||
for (;;) { | |||
ch = nextBracket(dir, p); | |||
if (!ch) // no more brackets | |||
return startPos; | |||
break; |
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.
This caused a compiler issue for me at the last return in the function: "Statement is not reachable".
…pletion item Also set focus back to editor after completion popup
automatic merge is impossible |
Could you please merge to latest mainstream? |
Merged. It compiles and runs, but I didn't check new functionality |
Did some refactoring. |
Okay so this is all the changes I've made to fix #20 and fix #5.
There is still a fair bit to do, but I believe this is ready to be merged in.
So firstly I've created a new directory for tools, such as Go to Def and Code Completion. In the hope that the IDE in the future can also be used for other languages, I've created the EditorTool class which will contain abstract methods. We then implement those abstract methods for each language inside a folder with the name of the language. DEditorTool implements those methods and uses DCDInterface to start dcd-client to send the requests to dcd-server. I want to re-implement dcd-client so that we can talk directly to dcd-server through sockets, which should be a big boon to performance for very large documents. However I'm completely unsure of the legality of doing so.
I've also moved SimpleDSyntaxHighlighter out of dsourceedit.d into its own file under tools.
Right now I've assigned Go to Def as SHIFT+G and for Code Completion CTRL+SHIFT+G.
Make sure that dcd-client is in your path and that dcd-server is running.
There still is a fairly lengthy todo list, which I'll get to work on as soon as I get feedback for the changes.
Still to do:
Fix caret disappearing after insertion.Refactor extprocess so that we have access to stdin.
Handle the user continueing to type, display only matches containing entered text.
Inform user when dcd-client command is not found.
Check that dcd-server is running and attempt to start it if it is not, if we started it we should also kill it.
Let the user know when we don't know of any completions or we don't know where the symbol declaration is.
I've only tested this on Linux at the moment.
Please review and let me know what I should change.