Skip to content

Add API to get the language in which a symbol is defined and the symbol provider for a source file #177

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

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jan 26, 2024

This will be used by sourcekit-lsp’s cross-file rename.

@ahoppen ahoppen force-pushed the ahoppen/get-source-language branch from b6a4594 to 9e1db56 Compare January 26, 2024 23:15
@ahoppen ahoppen force-pushed the ahoppen/get-source-language branch from 9e1db56 to a335a47 Compare January 27, 2024 01:06
@ahoppen
Copy link
Member Author

ahoppen commented Feb 1, 2024

swiftlang/sourcekit-lsp#1038

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Feb 1, 2024

swiftlang/sourcekit-lsp#1038

@swift-ci Please test Windows

Comment on lines +35 to +36
llvm::sys::TimePoint<> modTime, Optional
<SymbolProviderKind> SymProviderKind)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did clang-format do that? Please tell me it didn't 😅

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that was me messing up the formatting

return true
}

if result == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this worth it? Would be a pretty weird state to be in, may as well just return the first.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t have strong opinions either way. indexstoredb_index_units_containing_file also shouldn’t return many files so not sure if exiting early really makes a difference.

@ahoppen ahoppen merged commit ca29517 into swiftlang:main Feb 2, 2024
@ahoppen ahoppen deleted the ahoppen/get-source-language branch February 2, 2024 21:52
ahoppen added a commit to ahoppen/indexstore-db that referenced this pull request Feb 2, 2024
ahoppen added a commit that referenced this pull request Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants