-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
...highlighter/crates/scip-syntax/src/snapshots/scip_syntax__test__scip_snapshot_example.c.snap
Show resolved
Hide resolved
static uint sweet_sweet_numbers[5] = {23, 420, 69, 42, 7}; | ||
// ^^^^^^^^^^^^^^^^^^^ definition(Variable) scip-ctags sweet_sweet_numbers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a separate StaticVariable
Kind here: https://sourcegraph.com/github.com/sourcegraph/scip@main/-/blob/bindings/typescript/scip.ts?L1353:13
...highlighter/crates/scip-syntax/src/snapshots/scip_syntax__test__scip_snapshot_example.c.snap
Show resolved
Hide resolved
docker-images/syntax-highlighter/crates/scip-syntax/testdata/example.c
Outdated
Show resolved
Hide resolved
I've mentioned some missing test cases inline. Some more test cases to add:
|
Thanks @varungandhi-src! |
...highlighter/crates/scip-syntax/src/snapshots/scip_syntax__test__scip_snapshot_example.c.snap
Outdated
Show resolved
Hide resolved
docker-images/syntax-highlighter/crates/scip-syntax/queries/c/scip-tags.scm
Outdated
Show resolved
Hide resolved
1b61573
to
89a9d9d
Compare
Another thing: pointers to pointers! struct connection **my_ptr_ptr; |
...highlighter/crates/scip-syntax/src/snapshots/scip_syntax__test__scip_snapshot_example.c.snap
Show resolved
Hide resolved
89a9d9d
to
e0c3393
Compare
Okay, in the name of simplicity I simplified a lot of things:
I think that's in the spirit of what we're after here, @jtibshirani, right? Let me know if we aim for more correctness, then I'll take another stab. Otherwise, I think we can always follow-up and tweak some things. |
@mrnugget the simplifications look great and seem like the right trade-off. Our intended use cases for symbol kinds don't require a high level of precision (it's just ranking and showing the kinds for symbol search). I'll review again shortly. |
Update: talked with @tjdevries a bit and he also confirmed that getting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I see all the important kinds to detect.
This is part of https://github.com/sourcegraph/sourcegraph/issues/58024 and adds scip-ctags support for C.
Test plan