It seems that it nim it's only possible to create recursive procs not recursive procedural vars e.g.
this works fine:
proc fibo(n : int) : int=
    if n > 1:
        fibo(n-1) + fibo(n-2)
    else:
        1
echo fibo(5)
let fibo = proc(n : int) : int=
    if n > 1:
        fibo(n-1) + fibo(n-2)
    else:
        1
echo fibo(5)
this is how I implemented a javascript function to gracefully fade out an html element and finally remove it from the DOM:
proc `[]`*(node : Element, key : cstring) : cstring=
    {.emit: [result, "=", node, ".style[", key, "]"].}
proc `[]=`*(node : Element, key, value : cstring) =
    {.emit: [node, ".style[", key, "] = ", value, ";"].}
proc remove*(n : Node) = n.parentNode.removeChild(n)
proc fadeAndRemove*(el : Element, then = proc() = discard) =
    var opacity = parseFloat(el["opacity"])
    if isNaN(opacity):
        opacity = 1
    var step = opacity / 20
    var cb2 : proc()
    let cb = proc() =
        opacity -= step
        el["opacity"] = $opacity
        if opacity > 0:
            discard window.setTimeout(cb2, 25)
        else:
            el.remove()
            then()
    cb2 = cb
    discard window.setTimeout(cb, 25)
Let's see what the compiler says to your example:
rec.nim(3, 9) Error: undeclared identifier: 'fibo'
Using a var to forward-declare the function before the body is type-checked solves your problem:
var fibo: proc(n: int): int
fibo = proc(n: int): int =
  if n > 1:
    fibo(n-1) + fibo(n-2)
  else:
    1
echo fibo(5)
# using a `var`, it can be rebind:
import future
template recFun(name, signature, body) =
  var name: signature
  name = signature => body
recFun fibo, (n: int) -> int:
  if n > 1:
    fibo(n-1) + fibo(n-2)
  else:
    1
echo fibo(5)  # 8
# evil rebind:
fibo = (n: int) => n
# Clojure-style recur!
import future
template recFun(signature, body): untyped =
  block:
    var recur {.inject.}: signature
    recur = signature => body
    recur
let fibo = recFun((n: int) -> int):
  if n > 1:
    recur(n-1) + recur(n-2)
  else:
    1
echo fibo(5)  # 8
# evil rebind prevented:
# fibo = (n: int) => n
@Udiknedormin thank for your answer, forward declaring the var seems a much better solution than declaring a second proc var, I think I will simply go that way. The example you posted with templates are very interesting but I think they are a bit overkill. I understand that it is not possible for the compiler to infer the return type of a recursive function as I've already seen it in Scala, but I think it should be able to make the binding if I declare the type:
let fibo: proc(n: int): int = proc(n: int): int =
  if n > 0:
    fibo(n-1) + fibo(n-2)
  else:
    1