HNCode² is the successor to HNCode, an extension no longer being developed. The idea behind HNCode was to provide a custom webview inside VSCode to browse Hacker News, eventually adding a code style view. However, due to the extreme simplicity of Hacker News itself, it made sense to instead provide it as a Tree View, for more discreet browsing in VSCode. This is HNCode².
- Browse Top, New, Ask and Show HN in a tree view.
- Go straight to external URLs or self posts from the tree view.
- Expand the items to reveal amount of comments.
- Click on expanded items to go straight to the comments in Hacker News.
This extension requires Visual Studio Code 1.38.0 or later to work properly.
This extension contributes the following settings:
hncode2.limitation: Set the amount of items to be loaded on the front page.
hncode2.defaultView: Set the Default View of the tree view. Possible items are: 'top', 'new', 'ask' and 'show'.
hncode2.requestTimeout: Set the timeout for requests in milliseconds (ms).
- Sometimes, requests may time out without an appropriate error being displayed.
The documentation for this extension is available at https://www.soeren.codes/hncode2/ and provided via TypeDoc.
- CHANGED: Request Timeout down from 10.000 ms to 500 ms.
- NEW: Better error handling when no internet connectioon present (thanks to @ekarbe!)
- NEW: Integration tests for API calls.
- NEW: Added socket timeout to API calls.
- NEW: Selected entries (Top, New etc) are now greyed out.
- REMOVED: Unnecessary image resources.
- CHANGED: This extension is no longer a preview.
- NEW: Hosted documentation provided by TypeDoc.
- FIXED: Routing errors in documentation.
- FIXED: Various bugfixes.
- CHANGED: Removed unnecessary API calls in extension.ts (thanks @ekarbe!)
- NEW: Marketplace Icon added.
- CHANGED: HNCode² is now named Hacker News for VSCode to increase visibility in Marketplace.
- NEW: The amount of comments is now shown when expanding a story in tree view.
- NEW: A link to comment section has been provided when clicking on "x comments".
- FIXES: Various.
- NEW: Browse Ask, Top, Show and New HN through Context Actions.
- NEW: Go straight to external URL when clicking on story, including Ask and Show HN.
- IN PROGRESS: Show link to comments when expanding a story.
- FIXED: Bad URL when clicking on HN self posts.
- FIXED: No longer show post ID next to post.
- IN PROGRESS: Display 1 to n numbers next to entries.
- activate(context: ExtensionContext): Promise<void>
- getAsk(): Promise<Array<number>>
- getNew(): Promise<Array<number>>
- getShow(): Promise<Array<number>>
- getStories(stories: Array<number>): Promise<HNData>
- getStory(id?: undefined | string): Promise<HNData>
Optional id: undefined | string
- getTop(): Promise<Array<number>>