Skip to content

Conversation

@nickcabral
Copy link

This change adds "jump to file" functionality when file nodes in the tag tree are clicked. The file is opened and focused if it isn't yet open in a tab, or just focused if it is already open in a tab.

I also made the following changes:

  • Make treeDataProvider use vscode the findFiles function for searching.
  • Read files and scan for tags asynchronously.

I haven't yet added tests around the change(s). There don't seem to be existing cases around the class I touched, so maybe that's fine for now.

    - make treeDataProvider use vscode the findFiles function for searching
    - read files and scan for tags asynchronously
@nickcabral
Copy link
Author

After re-reading #3, I'm thinking the changes here don't implement that request. This change just opens the file when a tag is clicked in the tree, but it doesn't specifically "go to each of the occurrences of a tag in the file". I can add that as part of this PR or as follow-up, whichever you prefer. The functionality I have here does seem useful independent of the preferred "go to a specific line in the file".

@blakedietz
Copy link
Owner

You're right. However, I would rather keep the pr as is and we can do another pr to get the outcome requested in #3.

Copy link
Owner

@blakedietz blakedietz left a comment

Choose a reason for hiding this comment

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

Checked it out and tested it, everything works great.

@@ -1,6 +1,5 @@
import { debounce } from "debounce";
import * as fs from "fs";
import * as recursiveReadDir from "recursive-readdir";
Copy link
Owner

Choose a reason for hiding this comment

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

We'll need to pull this out of package.json but I'm not going to block your pr because of that.

Copy link
Author

Choose a reason for hiding this comment

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

Good call, I missed that.

@blakedietz blakedietz merged commit 6196b80 into blakedietz:develop Mar 5, 2019
blakedietz added a commit that referenced this pull request Mar 5, 2019
* docs(vscode-logo): Adds logo for extension (#20)

* docs(logo): Add logo

* build(config.yml): Add release branch

* feat(Sorting): Sort the tag tree by tag and file (#21)

Sort the tag tree alphbetically first by tags, then by file.

Resolves #11

* style(tag-tree-data-provider.ts): Add some space in the import statement

* ci(config.yml): Add develop branch to trigger ci

* fix(icon.png): Renames nested-tags-logo.png to icon.png

* perf(tag-tree-data-provider.ts): Scan files asynchronously (#24)

* Scan files asynchronously
* Only include markdown files

* docs(CHANGELOG.md): Automatically publish changes to CHANGELOG.md (#25)

Automatically publish changes to CHANGELOG.md

* feat(go to file): add file-open command to file nodes (#34)

- make treeDataProvider use vscode the findFiles function for searching
    - read files and scan for tags asynchronously

* build(recursive-readdir): Remove recursive-readdir as a dependency

* ci(package.json): Change run order of the plugins for semantic release
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