Re: Clojure docstring style

2016-09-22 Thread Leon Grapenthin
Couldn"t you just do it like this? 1. Parse docstring into symbols 2. If symbol is defined in the current ns, hyperlink 3. If symbol is namespace-qualified, hyperlink 4. If symbol is name of an arg, hyperlink This should leave very few false positives where an english word is the name of a var

Re: Clojure docstring style

2016-09-21 Thread Narendra Joshi
Backticks are turned into links in cider-doc so I do this only for other definitions. To refer to arguments in a batch, I use: varname- description varname2 - description2 I am not using anything for inline references to function parameters. But it would have been great if there was a

Re: Clojure docstring style

2016-09-21 Thread John Gabriele
On Wednesday, September 21, 2016 at 1:10:37 PM UTC-4, John Gabriele wrote: > > On Wednesday, September 21, 2016 at 9:54:23 AM UTC-4, Eli Naeher wrote: >> >> On Wed, Sep 21, 2016, at 06:36 AM, nare...@helpshift.com wrote: >> >> Is there a convention to be followed for referring the parameters of a

Re: Clojure docstring style

2016-09-21 Thread John Gabriele
On Wednesday, September 21, 2016 at 9:54:23 AM UTC-4, Eli Naeher wrote: > > On Wed, Sep 21, 2016, at 06:36 AM, nare...@helpshift.com > wrote: > > Is there a convention to be followed for referring the parameters of a > function in the docstring, e.g. for emacs lisp we upcase the parameter name?

Re: Clojure docstring style

2016-09-21 Thread Eli Naeher
On Wed, Sep 21, 2016, at 06:36 AM, naren...@helpshift.com wrote: > Is there a convention to be followed for referring the parameters of > a function in the docstring, e.g. for emacs lisp we upcase the > parameter name? Uppercase is (or was) also pretty standard style in Common Lisp. In Clojure

Re: Clojure docstring style

2016-09-21 Thread narendra
Is there a convention to be followed for referring the parameters of a function in the docstring, e.g. for emacs lisp we upcase the parameter name? On Sunday, May 15, 2016 at 11:12:11 PM UTC+5:30, cskksc wrote: > > Hello, > We are working on a new feature in CIDER which would parse a docstring

Re: Clojure docstring style

2016-05-16 Thread Phillip Lord
The problem is that the var might not be a var yet. You'd have to re-render code after evaluation. Phil Christopher Small writes: > Seems like this shouldn't be a problem as long as you only try to render a > link if there's actually such a var. This might be a little

Re: Clojure docstring style

2016-05-16 Thread Matching Socks
Cider could be most *helpful* by linking all words that could possibly be linked. Everyone uses clojure.core, after all. Cider could be most *elegant* by not attempting these links at all. Cider could be most *Emacs-like *by letting users override the symbol detector with an Elisp function.

Re: Clojure docstring style

2016-05-15 Thread James Reeves
On 16 May 2016 at 00:57, Christopher Small wrote: > > Seems like this shouldn't be a problem as long as you only try to render a > link if there's actually such a var. > You could have some text you wish to render as code, which doesn't relate to a var but by coincidence

Re: Clojure docstring style

2016-05-15 Thread Christopher Small
Seems like this shouldn't be a problem as long as you only try to render a link if there's actually such a var. This might be a little messier, but would make things (overall) nicer (I think) because you wouldn't have to think about a separate bit of syntax. The rendering would just happen

Re: Clojure docstring style

2016-05-15 Thread James Reeves
If the docstrings are written in markdown, this would conflict as something in backticks isn't necessarily a var name. In Codox, I used the wiki-link style: [[clojure.core/map]]. - James On 15 May 2016 at 18:40, cskksc wrote: > Hello, > We are working on a new feature in

Clojure docstring style

2016-05-15 Thread cskksc
Hello, We are working on a new feature in CIDER which would parse a docstring and create hyperlinks that follow the functions/vars/interop-forms mentioned there. It is very similar to the "See Also" links shown by ClojureDocs . Right now, we are using backticks to