I have created a kdevelp template to make it easier to create a basic project from within the KDevelop IDE:
https://github.com/xyz32/KDevelop-template
The template will setup nimble build (right click/build), and will create an executor for you so you can lunch your application strait from the IDE.
Update: The repository now contains a template for creating a nim file as well.
I am now trying to figure out how the nim idetools work. So far I can only get this as an output:
nim idetools --context --track:test.nim,8,17 ./test.nim
config/nim.cfg(45, 2) Hint: added path: '/home/xyz/.babel/pkgs/' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/gtk2-1.0' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/opengl-1.0' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/cairo-1.0' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/templates-0.1' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/bcrypt-0.2.1' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/nimble-0.6.0' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/x11-1.0' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/io-usb-0.1' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/jester-0.1.0' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/xyz/.nimble/pkgs/' [Path]
Hint: used config file '/media/data/xyz/apps/Nim/config/nim.cfg' [Conf]
Hint: used config file '/home/xyz/projects/test/src/test.nim.cfg' [Conf]
and the code is something like this:
proc fibonacci(n: int): float =
if n < 2:
return cast[float](n)
return fibonacci(n-1) + fibonacci(n-2)
when isMainModule:
echo fibonacci(50)
I tried to look into NimStudio but as far as I can tell they are using a nimsuggest.exe?
proc.StartInfo.FileName = NSIni.Get("Main","nimsuggest.exe");
Any hints on what I am missing? Thank you.
Looks like the devel version of nimsuggest is not building with the devel compiler:
/home/xyz/.nimble/pkgs/compiler-0.10.3/compiler/nimfix/prettybase.nim(10, 7) Error: cannot open 'ast'
FAILURE: Execution failed with exit code 1
Nimble install may not work, but manual compile should work. See
UPDATE:
KDevelop can now create nim project based on nimble, it can build, install and debug, including breakpoints.
Here is a short demo: https://vimeo.com/135918228
Thank you.
Note that both nim and nimble have to be in your bin path. If they are not create a link to them into your home/bin folder. For example: $>ln -s /...(path to nim binary)/nim /home/myLinuxUser/bin
I will put this into the readme as well.
That is a really old KDevelop: KDevelop 4.3.1 Released .... Thu, 04/19/2012 - 10:16 I don't know if that version even supports templates.
Google suggests that it is possible to get a newer version of it: http://askubuntu.com/questions/418170/install-kdevelop-on-ubuntu-13-04
Unfortunately I am using an RPM based distribution, so I can not help you more then that.
I am still around, fighting with UDP sockets in Nim but still around :)
The plugin works fine for me.
Do note that for syntax highlighting all KDE services have moved to a new framework (KSyntaxHighlighting) so to get that working you need to add the files in "$HOME/.local/share/org.kde.syntax-highlighting/syntax"