-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tags generated for SCSS include characters that prevent completion #3409
Comments
I found my comment about including the characters ([.%]) to tag names: I included the characters because the CSS parser included the characters. |
For the CSS parser, I think including the characters looks natural.
The CSS parser has input.css: ul li { padding-left: 1em; }
.foo a, .foo b { color: blue; } css.tags:
If we remove the characters from the tags having selector kind, understanding tags output becomes hard. The SCSS parser doesn't record selectors. input.scss:
scss.tags:
The kind names give users enough information about the tag entries. Keeping the SCSS parser and the CSS parser in the meaning of "kind names" is nice but optional. Supporting comfortable operation in vim is nice but optional. universal-ctags should be editor-neutral. Do you think removing the prefix characters is better even if you don't use vim? As I wrote in this comment, in my limited CSS and SCSS knowledge, the answer is yes. Thank you for your deliberate approach. So I got a chance to tell you my idea. |
...but... when the SCSS parser supports filling scope fields and fully-qualified tags, I guess we may need the prefix characters. |
For the record, PHP tags do not include the sigil (
The only use I can see for having an entire selector in the tag is for locating it in the source file. I can't imagine it would aid authoring CSS. I'd like to know what use people get from that kind, because it seems that would make it hard to find tags that don't begin with an exact search string.
I don't think it makes it particularly hard because the pattern it's matching is right there, so you can see what the keyword is, even without the
Yes, I just figured adding the punctuation was a break in compatibility because updating uctags broke completion for me.
I think yes because the punctuation is really just a delimiter, in |
Do you mean fully qualified names, like |
Prevent appended pseudos as well. This should make the tags file output more consistent with other language parsers, where the identifiers are more important than the delimiters that denote their types. This aids completion in existing tools and across languages (like HTML) where the delimiters are not used. Closes universal-ctags#3409
In my original, the punctuation used to denote classes is excluded from the tag itself. In @masatake's revised version, the
%
and.
are included, which breaks autocompletion in Vim because those characters are not normally part of keywords. One can add them withisk+=%,.
but this breaks chaining classes as%foo.bar
is then seen by Vim as a single keyword where humans and uctags do not.Also, the insertion of
:
into the keyword characters ofc
,P
&i
cause a similar issue to the above, and results in tags like.foo:not
. These are a bit unexpected because pseudo-classes have language-level completion support.I don't want to create a PR to undo those changes without knowing why they were made, so could someone please clarify those decisions?
Applying this patch, my tags work as expected with only
isk+=-
in my.vimrc
.The text was updated successfully, but these errors were encountered: