Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: AZ on August 30, 2012, 05:24:42 am

Title: addition of a nother language
Post by: AZ on August 30, 2012, 05:24:42 am
Hello,
 is it possible to add the support (editor + compile, debug) of another C-like language? I primarily interested in GO ( golang.org)
Thank you
AZ
Title: Re: addition of a nother language
Post by: Alpha on September 01, 2012, 01:54:56 pm
Yes, see: Adding support for non C/C++ files to the build system (http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system).
Title: Re: addition of a nother language
Post by: AZ on September 14, 2012, 07:59:57 pm
Yes, see: Adding support for non C/C++ files to the build system (http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system).

Thank you Alpha,
 how about syntax highlighting and code competition ?
Title: Re: addition of a nother language
Post by: Alpha on September 15, 2012, 04:14:30 pm
Syntax highlighting, yes: Creating a custom lexer for Code::Blocks editor (http://wiki.codeblocks.org/index.php?title=Creating_a_custom_lexer_for_Code::Blocks_editor).  If GO is similar in syntax to C, it would probably be easiest to just copy lexer_cpp.xml, and edit the filemasks and keywords.

Code completion is a little more difficult :).  The current Code Completion plugin will provide suggestions based on the keywords in the current lexer.  If you want more than that, it would require writing your own code completion plugin.
Title: Re: addition of a nother language
Post by: oBFusCATed on September 15, 2012, 04:23:58 pm
Code completion is a little more difficult :).  The current Code Completion plugin will provide suggestions based on the keywords in the current lexer.  If you want more than that, it would require writing your own code completion plugin.
And it will require changing some API interfaces here and there to minimize code and UI duplication between the different CC plugins.

You can always look at the Fortran plugins. I think they have implemented a CC for Fortran -> http://darmar.vgtu.lt/
Title: Re: addition of a nother language
Post by: AZ on September 15, 2012, 04:53:08 pm
...
You can always look at the Fortran plugins. I think they have implemented a CC for Fortran -> http://darmar.vgtu.lt/

There is gocode (https://github.com/nsf/gocode) daemon already. it's real good and widely used in the GO community. How difficult will be to integrate it ?

GO is C-like language, so i'll look into modifiyng the existing template as suggested. Thank you!

Another question how to add the parsing of the packages and jummps to definitions/ declarations?


Andrew
Title: Re: addition of a nother language
Post by: oBFusCATed on September 15, 2012, 05:20:03 pm
There is gocode (https://github.com/nsf/gocode) daemon already. it's real good and widely used in the GO community. How difficult will be to integrate it ?
Probably it won't be too hard to integrate. The problem is that there will be some fighting between the CC for C++ and CC for Go, but I've not dug too much into the codebase.
Please take a look at the Fortran's plugin and our codecompletion plugins.