universal-ctags / issues-we-will-not-fix-in-soon Goto Github PK
View Code? Open in Web Editor NEWThis is the place for archving issues we will not (or cannot) fix in near future
This is the place for archving issues we will not (or cannot) fix in near future
I am indexing the Mozilla mdn CSS web documents , and making tags accordingly. I have the documentation related to the CSS properties and some other topics in one single file localdocu.mdncssdan
, each topic starts with #
followed by a newline then the name of the topic.
The following is a simplified view of the document.
This page was last modified on Jul 7, 2023 by MDN contributors.
(...)
#
animation-composition
The animation-composition CSS property specifies the composite operation
to use when multiple animations affect the same property simultaneously.
(...)
This page was last modified on Jun 26, 2023 by MDN contributors.
#
animation-delay
The animation-delay CSS property specifies the amount of time to wait
from applying the animation to an element before beginning to perform
(...)
What I have is the following rule
--kinddef-mdncssdantags=t,topic,topics
--mline-regex-mdncssdantags=/^#\n(\w.*)$/\1/t/{mgroup=0}
Which works , detecting the tags , but the regex is refering to as the destiny of the tags is shifted some lines up
animation-composition localdocu.mdncssdan /^This page was last modified on Jul 7, 2023 by MDN contributors.$/;" t
animation-delay localdocu.mdncssdan /^This page was last modified on Jun 26, 2023 by MDN contributors.$/;" t
So this is not accurate, when I open say animation-delay
, it will go 3 lines up to the This page was last modified....
, and the biggest issue is that, when this line is the same for other topics (say I have got other topic which its 3 lines upper is that same This page was last modified on Jun 26
, then the tag referecing system is completely messed up)
$ ctags --version
Universal Ctags 5.9.0, Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Sep 3 2021, 18:12:18
URL: https://ctags.io/
Optional compiled features: +wildcards, +regex, +gnulib_regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc, +optscript
I heard there was a way to get Vim to jump to the position of the tag, instead of the start of the line.
Say I have the following code (with the cursor at |
):
function myFunction() {
}
|myFunction()
When I press C-]
my cursor jumps to:
|function myFunction() {
Supposedly Vim supports placing the cursor in the position shown below, if the tags file contains the right data (for example the column number to place the cursor). I can't exactly find where this is documented though
function |myFunction() {
I'm having a hard time understanding how tags can be useful, and I'm hoping I'm simply unaware of a commonly used way to lookup tags that is better than what I have been doing. if such a tags lookup feature does not exist, this is a suggestion to add such a feature.
Here is my problem with tags. People seem to be really focused on the automated generation a tags file with lots of information to distinguish each tag, rather than an automatically smart way to lookup a tag. I will now rephrase this as an example. It might sound like I'm asking for Neovim help and not tags help, but I will try to explain why I think it should all be handled by the same program, the one capable of generating the tags.
I am primarily interested in tags for the purpose of doing code lookup from an editor, or providing autocomplete information to an editor. In my case I happen to be using Neovim. So let's say I have some file open, and the cursor pointed at a method call. I do a code lookup using tags. At this point, the editor does not take into account the context from which I'm looking up the tag. But why should the editor know how to parse the file and understand the code, when that is what the tags program was good at? If the editor was capable of doing that, it wouldn't need a tag generating program.
From my perspective, the program that is capable of understanding the code well enough to parse it and make tags, needs to be activated when doing a tags lookup, otherwise the lookup will not be very intelligent, or will require the person doing the lookup to write a very specific lookup query based on mentally parsing the code rather than the computer parsing it and writing that tag lookup query for you. So I'm wondering if universal ctags provides that type of lookup feature. One that accepts as its' input the file path and current contents (which may be different from what is saved), and the line and character range, or something like that. It would then activate the same parser it used to generate the tags, and figure out which tag is most appropriate for that context.
Even though that is the type of feature I am looking for, even if it existed, it would still leave me confused about the purpose of tags. Why fire up the parser and parse everything, just to find out how to search the tags file, which was previously generated by firing up the parser and parsing everything? Why not just do a parse and return the information directly rather than from a tags file? I guess there might be efficiency gains by doing a full parse every time the tags file is generated, and then only doing a partial parse to decide how to search the tags file?
Sometimes, the comments are multi-bytes and not UTF-8 encoded. In this case, the comment bytes in tag file could not match the one in source codes, since the encoding is different.
Could an option provided to avoid comments in tag search pattern to avoid such problem?
Thanks!
I wish for being able to annotate tags by their author (from git blame).
How can it be reasonably achieved?
The tags output you expect:
main foo.c /^main(void)$/;" kind:function line:2 blame:[email protected]
I suppose it's quite possible to do through external wrapper script to annotate tags fed from ctags output.
But can I achive the reverse thing -- plug this script into the middle of ctags pipeline?
Which benefits could it provide comparing with plugging it after ctags?
I strive for most naturally flowing solution.
I use following command to parse the test.cpp and result is as following.
universal-ctags-x64.exe --output-format=json --langmap=c:+.inc.def --kinds-c=+plz --fields=+ne -o - D:\projects\demo\test.cpp
test.cpp
const ProcItemStru g_strc[5] = {
{JOB1, JOB1, 0, 0, JOB1}, {JOB1, JOB1, 0, 0, JOB1},
{JOB1, JOB1, 0, 0, JOB1}, {JOB1, JOB1, 0, 0, JOB1},
{JOB1, JOB1, 0, 0, JOB1},
};
if I have got file content, any ways to use ctags to parse the text in memory directly?
Suppose i have big C/C++ projects and ctags run slow for generating all tags on this projects. Is this possible for ctags to update only for updated files?, the information of the updated files can be from git status. Thanks!
Idea: parse changeset removed/added lines and modify tags database in-place accordingly by removing tags from -
lines and adding tags from +
lines. In theory it may significantly reduce time to update tagfile and will allow to automatically run ctags from pre-commit and post-checkout hooks without user workflow disruption.
Suggested command:
git diff-index -U0 $(git rev-list -1 --before=$(date +%s -r tags) master) | ctags --incremental ...
The question: is it feasible?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.