Open
Conversation
…p functions (closes #508) feat(bol.R): add source reference cache building for package functions This change introduces a new function `nvim.build.srcref` to build source reference caches for functions in R packages, enhancing the goto definition feature. fix(Makefile): include definition.c in source files for build This ensures that the new definition handling logic is compiled into the rnvimserver application. fix(data_structures.c): add srcref file reading and validation This change allows the application to read and validate source reference files, supporting the new goto definition functionality. fix(data_structures.h): add srcref field to PkgData struct This addition supports storing source reference data for R packages. feat(definition): add symbol definition resolution feature Introduce a new feature to resolve symbol definitions using cached data or fallback to R for lookup. This enhances the ability to locate symbols efficiently within packages, improving the overall functionality of the application.
Add .clang-format file to enforce code style based on LLVM style.
Adjust line breaks and indentation in C files for better readability.
I ran clang-format on all c files for consistency.
In my `conform.lua`, I have this now:
```lua
clang_format = {},
```
f7b944d to
4b06caf
Compare
Member
|
Is it ready for review? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
srcref_cache (R side): Addednvim.build.srcref()inbol.Rto pre-build a per-package cache (srcref_<pkg>_<version>) that maps functions to their source file, line, and column. Gets built at the same time as theobjls_/args_caches.New
definition.cmodule (C side): Goto-definition now lives inrnvimserverunder a new'G'command. It hits the in-memorysrcref_cache first, and only falls back to a live R call (nvimcom:::send_definition) if it doesn't find anything.PkgDatastruct: Added asrcreffield to load thesrcref_file into memory, same wayobjls_andargs_are handled.Lua cleanup: Dropped
find_in_package()andhandle_definition_response()fromdefinition.lua. The handler just sends a'G'tornvimservernow, and it works as soon asR_Nvim_status >= 2— no need to wait for R to be fully up (status7) like before.Formatting: Ran
.clang-formaton the C files. This changed code formatting in only 2-3 files.