-
Notifications
You must be signed in to change notification settings - Fork 53
Use nim track for goto definition and find usages
#434
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
Open
moigagoo
wants to merge
39
commits into
master
Choose a base branch
from
feature/nim_track
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 35 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
1ddab8b
Bump dependency versions.
moigagoo 770331d
CI: Update Nimble to 0.22.3.
moigagoo 911d077
Add config prop to toggle `nim track`-based goto def and find refs.
moigagoo b6e5590
LSP: Add `nim track` paths to definition and usages.
moigagoo 9c4346a
Add `nim track` handling module.
moigagoo 344988b
MCP: Add `nim track` path for find usages.
moigagoo 643d3eb
Format witn nph 0.6.2.
moigagoo 7d72b30
Tests: MCP: Cover `nim track` path.
moigagoo 1f38107
Tests: LSP: Cover `nim track` path.
moigagoo a4844ee
Require Nim 2.3.1 for `nim track`.
moigagoo 728cdc9
Require Nim#head for `nim track`.
moigagoo 35fe171
CI: Update Nimble version.
moigagoo f931845
Remove lock file.
moigagoo 4b38124
Hide `nim track` behind feature.
moigagoo 85c153f
Format witn nph 0.6.2.
moigagoo 0668507
Fix typo in define name.
moigagoo b1a4ff7
Remove feature usage.
moigagoo 7f24905
Use nim binary from the project when possible.
moigagoo 41958bc
Tests: Move track tests to a separate module.
moigagoo 67f1735
Tests: Move track tests to a separate module.
moigagoo 576cbe5
Tests: Add a track test project.
moigagoo 68900b3
Use getNimPath to get the project Nim instead of using the global one.
moigagoo dd7fde1
CI: Install Nimble fork with nim#head fix.
moigagoo cec97cd
Format with nph.
moigagoo 7235bb6
Remove workaround for `nimble dump` not handling nim#head.
moigagoo 4609067
Tests: trackproject: Do no require unittest2.
moigagoo fea5411
ls: getWorkingDir: Return project dir by default.
moigagoo 2267a4f
ls: getNimPath: Look for Nim binary in the project.
moigagoo 4a77e45
LSP: Make getNimPath async.
moigagoo 56b8283
ls: getNimSuggestPathAndVersion: Call `nimble dump` in the project di…
moigagoo e4956e1
ls: getWorkingDir: Export proc.
moigagoo 4855a57
LSP: Make getNimPath async.
moigagoo 0d5f64a
track: Use nim binary from the project when possible.
moigagoo 2bdedce
Handle cancellation: kill child processes and re-reise CancellationEr…
moigagoo 98e62df
Read from stdout and stderr concurrently with the `nim track` process.
moigagoo 85c18f3
Revert "Bump dependency versions."
moigagoo 20f24e2
Track API: Catch CancelledError as e.
moigagoo 90e9292
Run `nimble dump` in the project dir instead of the cwd.
moigagoo 3d9769d
LSP: Fall back to nimsuggest on find refs and goto def for unsaved fi…
moigagoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
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.
what happens when it is enabled in a nim version that doesnt support track?
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.
You'll get an error:
The reasoning behind this decision is, this is a very experimental feature, it requires development version of Nim and some dedication. You can't accidentally turn it on, if it's on, you know what you did. So I thought I shouldn't invest too much into handling this, the simplest logic will do. If
invalid command: trackis in the stderr, that means you're not using Nim#devel.