Altering semantic semantic-complete-analyze-inline completion
Andrea Turso <[email protected]> Wed, 26 Aug 2015 00:02:38 +0100
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <CADL_vSLd3JLCstuPSOQPPH_SHC87kXo7MT6XgqNm+VFYkbp0Bw@mail.gmail.com> |
Hello, tl;dr: the completion displayer class (semantic-complete- inline-analyzer-displayor-class) only controls only the appearance of the completion candidate so how can I alter the completion string when it's actually inserted in the buffer, for example to drop the first character under a specific condition? What would be the recommended way of handling this odd completion requirement? In PHP class fields – being variables – they all notoriously begin with a $ symbol which creates an interesting problem when the completion happens when completing instance attributes, for example: $this->fieldName; To complicate things, static fields are accessed with the self:: or static:: prefix so ideally I would like to be able to control this behaviour based on that. At first I thought about catering for this directly in the parser to strip the first char off certain tags either by means of changing the regexp analyser for variables – provided that capturing groups work? – or with some lisp code in the grammar actions, alternatively a custom tag and/or macro. The only somewhat related option that propped up in my search was the variable semantic-complete-inline-analyzer-displayor-class, which I think only affects how the possible completions get displayed and doesn't seem like a good starting point. Thanks, Andrea. ------------------------------------------------------------------------------ _______________________________________________ cedet-semantic mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cedet-semantic