Hi all.
Geany has been as good to me over the past year or two of Lisping as it was with anything involving curly braces, but I would be interested in writing/contributing code to improve the support for tagging and autocompletion.
Unless I’m doing something horribly wrong, Common Lisp is not supported by the symbol list out of the box the way that Python or C files are. So, I take it I would need to write a parser of the type under tagmanager/ctags in git — there isn’t one for Common Lisp at present. Is this correct? Syntax highlighting for Lisps (for what syntax there is) works fine but I would like to work on making the symbol list functional as well.
Take care,
James
On 15-03-19 09:26 AM, James Brierley wrote:
Hi all.
Geany has been as good to me over the past year or two of Lisping as it was with anything involving curly braces, but I would be interested in writing/contributing code to improve the support for tagging and autocompletion.
Unless I’m doing something horribly wrong, Common Lisp is not supported by the symbol list out of the box the way that Python or C files are. So, I take it I would need to write a parser of the type under tagmanager/ctags in git — there isn’t one for Common Lisp at present. Is this correct? Syntax highlighting for Lisps (for what syntax there is) works fine but I would like to work on making the symbol list functional as well.
What would it show, just a flat sequence of Lists with a Symbol in the car position? Syntactically it should be the most trivial parser in CTags to write, but it might be more challenging to show a meaningful symbols tree for it (ex. should it handle quoting? show non-alpha symbols like !@#$%^&? functions in `cond` branches, etc).
BTW, it sounds like you have the right idea WRT adding a parser.
Cheers, Matthew Brush
On 15-03-19 03:03 PM, Matthew Brush wrote:
On 15-03-19 09:26 AM, James Brierley wrote:
Hi all.
Geany has been as good to me over the past year or two of Lisping as it was with anything involving curly braces, but I would be interested in writing/contributing code to improve the support for tagging and autocompletion.
Unless I’m doing something horribly wrong, Common Lisp is not supported by the symbol list out of the box the way that Python or C files are. So, I take it I would need to write a parser of the type under tagmanager/ctags in git — there isn’t one for Common Lisp at present. Is this correct? Syntax highlighting for Lisps (for what syntax there is) works fine but I would like to work on making the symbol list functional as well.
What would it show, just a flat sequence of Lists with a Symbol in the car position? Syntactically it should be the most trivial parser in CTags to write, but it might be more challenging to show a meaningful symbols tree for it (ex. should it handle quoting? show non-alpha symbols like !@#$%^&? functions in `cond` branches, etc).
BTW, it sounds like you have the right idea WRT adding a parser.
And to make it even more sweet, here's one:
https://github.com/fishman/ctags/blob/master/lisp.c
Cheers, Matthew Brush
BTW, it sounds like you have the right idea WRT adding a parser.
And to make it even more sweet, here's one:
How about that! I will see if I can plug this into Geany at least.
Might well be back asking more questions ;)
Take care,
James
-- James Brierley http://slippy.dynu.net/~james/
Hate democracy? All the more reason to vote: http://bit.ly/1ErcOTx 7th May 2015 | #AnyoneButUkip | Save Britain, save yourself!
Hi Matthew.
BTW, it sounds like you have the right idea WRT adding a parser.
Relieved to hear my C source reading skills have improved.
What would it show, just a flat sequence of Lists with a Symbol in the car position? Syntactically it should be the most trivial parser in CTags to write, but it might be more challenging to show a meaningful symbols tree for it (ex. should it handle quoting? show non-alpha symbols like !@#$%^&? functions in `cond` branches, etc).
I think that tagging functions and macros at global scope would be a start — I had a poke around the DocBook (of all things) parser and from a skim through the way it marks out chapters and sections using their id attributes it looks like a similar strategy would work for Common Lisp. If you have something at global scope like:
(defmacro my-cool-macro (...) (...))
it shouldn’t be too hard to write parsing functionality to gulp the next word as the name of the macro (or ‘the symbol to which the macro is bound’ to be pedantic) and create a tag reflecting it. Of course, things get a heck of a lot more complex with some Lisps (one of my current pet projects makes heavy use of CL’s packaging functionality, for instance) but it would be a decent place to start making meaningful contributions to Geany. :)
Take care,
James
On 20 March 2015 at 08:03, Matthew Brush mbrush@codebrainz.ca wrote:
On 15-03-19 09:26 AM, James Brierley wrote:
Hi all.
Geany has been as good to me over the past year or two of Lisping as it was with anything involving curly braces, but I would be interested in writing/contributing code to improve the support for tagging and autocompletion.
Unless I’m doing something horribly wrong, Common Lisp is not supported by the symbol list out of the box the way that Python or C files are. So, I take it I would need to write a parser of the type under tagmanager/ctags in git — there isn’t one for Common Lisp at present. Is this correct? Syntax highlighting for Lisps (for what syntax there is) works fine but I would like to work on making the symbol list functional as well.
There is a lisp parser at https://github.com/fishman/ctags/blob/master/lisp.c which does functions. Maybe you would want to expand it to macros as well (assuming tagmangler can handle that ;-)
Cheers Lex
What would it show, just a flat sequence of Lists with a Symbol in the car position? Syntactically it should be the most trivial parser in CTags to write, but it might be more challenging to show a meaningful symbols tree for it (ex. should it handle quoting? show non-alpha symbols like !@#$%^&? functions in `cond` branches, etc).
BTW, it sounds like you have the right idea WRT adding a parser.
Cheers, Matthew Brush
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Hello guys,
Unfortunately the aforementioned symbol list integration just isn’t happening for me. What can I say: I just find ctags and all too hard :) Functional programming has spoiled me. If anyone else wanted to pick this up, I would be a happy fellow.
However, I am instead refocusing my efforts elsewhere, and am writing a plugin to provide some of the other Lisp intergration I would like. I’ve already got rudimentary code to make use of the ‘click in the margin to add breakpoints’ Scintilla feature, and I’m aiming also for an integrated REPL and associated ‘highlight something and evaluate it’ functionality.
Alpha version to appear shortly, non-programming life commitments permitting.
Take care,
James