Hi,
Really appreciate the fix to make CSS autocompletion better in Geany.
Regarding creating a full CSS tags file with properties description, I've been delaying to make one because it is not usable in current Geany so it is not worth the effort. However, you can try my current CSS tags file here: https://github.com/trongthanh/geany-for-front-end-dev/blob/master/config/gea... with some properties already having value descriptions. If the calltip triggered by colon is supported, I'm definitely going to make a complete tags files.
About my tags files set, I have shared it on the wiki under the article: http://wiki.geany.org/howtos/frontend (The tags files are still actively updated so I haven't shared it on the tags article yet)
Cheers, Thanh
On 6 Oct, 2012, at 10:03 PM, devel-request@lists.geany.org wrote:
Message: 2 Date: Sat, 06 Oct 2012 14:30:55 +0200 From: Colomban Wendling lists.ban@herbesfolles.org To: geany-devel@uvena.de Subject: Re: [Geany-Devel] [Geany-devel] Fix autocompletion for CSS files Message-ID: 5070247F.2080107@herbesfolles.org Content-Type: text/plain; charset=ISO-8859-1
Hey,
Le 05/10/2012 07:58, Thanh Tran a ?crit :
Hi guys,
I'm a front-end web developer and I enjoy using Geany so much. Currently with some global tags files and minor filetypes tweak, I'm able to code HTML & JavaScript quite comfortably.
However, it is still a pain to make use of the global tag completion in CSS since Geany doesn't recognize minus/short dash "-" character as a word character and terminate the auto completion hint box as soon as I type the "-" character. Another issue with this is experimental vendor prefixed properties (for e.g: -webkit-filter) are not hinted if I don't remove the initial "-".
I fixed this one (and you did it correctly -- at least as correctly as we do now). And you're right, it gives a way better CSS experience :)
I'm not an experienced C/C++ developer so I avoided touching Geany source code as much as possible. But for this one I have to tinker with the source and was able to fix the issue with some quick edits. I'm aware that my edits might break things and are not root cause solutions. So I'm hoping that you guys can help fix it. My edits whi ch I'm sharing here are just to get the ideas:
https://github.com/trongthanh/geany/commit/35d782ce584006d5570657b08cf2be3ca... https://github.com/trongthanh/geany/commit/da01cf86ff09b5ac5c083b7dd05b6770f...
Besides, my edits also add colon ":" as trigger character to show the calltip (in CSS ONLY of course) so that it will display useful information to set value for the CSS property. (see attachment). With a full CSS tags file, the autocompletion and the calltip will greatly enhance CSS coding experience in Geany. Again, this is just my proposal.
This may be interesting, though I'm not 100% sure it fits that well in Geany's core, it might be too specific -- and although it's not strictly speaking a problem, things should rather either be general-purpose, configurable or provided with language-specific goodies. I'll take a look at it.
BTW, I'm not aware of any CSS tag file that includes the properties' descriptions, do you have one? And if yes, would you mind providing it for other to use it, e.g. on our wiki? :) https://wiki.geany.org/tags/start#css_tags
In another note, I already tried adding "-" to wordchars settings in filetypes.css and use editor_find_current_word_sciwc() but it is only effective if I r emove the dash in whitespace_chars in filetypes.common. The risk of breaking things by changing the filetypes.common is too great that I can't use that function. But ultimately, I have a feeling that current Geany hasn't use everything Scintilla providing and is not flexible enough when handling word chars & white space chars.
The problem is that our filetypes.common's whitespace_chars overrides every wordchars -- even filetype-specific ones. I fixed this in the Git for wordchars to take precedence over whitespace_chars, which actually seems more natural and more useful to me too.
Actually Scintilla classifies 4 kinds of characters: newlines, spaces words and punctuation. We only define spaces and words. I'm not sure if we should rather set punctuation, or if we should provide a setting for it, I don't know correctly enough what Scintilla does with those to decide. Word is pretty obvious -- and documented -- but the other three seems more vague.
Anyway, it should be better now.
Anyway, I'm pretty happy with Geany right now and believe that Geany can be better than commercialized one like SublimeText which I think is overrated.
He he, thanks!
Regards, Colomban