* added common code from vscode repo
lots of good utility functions and objects, especially around lifecycle and event management
* added datastore and logger services
* refactored bootstrap to consolidate behavior in foam-core
* tags treeview now updates when files are saved
* updated node engine version to match vscode's
* using new event model for foam graph events
* Initial work to create new note from template
* Treat template as snippet string
* Small refactor
* Improve semantics of focusNote
* Ask for filename, not title
Authored-by: Jonathan Ingall <jonny@mondago.com>
* Add documentation to the settings getters
* Reduce code noise in the bootstrap method
Files are now all processed in one method,
without `filter`s or `map`s to avoid reallocating arrays.
`addFile` is now inlined, as its function was mostly noise and became
unused.
`isLocalMarkdown` is now done right after listing all workspace files,
before applying the ignore globs.
`registerFiles` merely deals with registering several files,
instead of requiring a loop each time several files are to be
registered.
* Add documentation and type annotations
* Rephrase filterAndRegister docstring
* added test with d3 and g6
* spiked on three graph libraries
* removed unnecessary deps
* small clean up
* picked implementation, cleaned code and added selection
* use title as graph node name instead of note basename
* reloading graph when adding/removing notes
* fixed graph construction to remove node duplicates
* using file name for notes that don't have an h1 title
* added utility functions
* fixed link highlighting bug
* fixed various checks and lint errors
* Start working on date snippets
* Refactor logic to share across date features
* Start providing computed values
This may need to be changed to a Thenable
* Make calculated snippets functional
* Add support for any number
* Comment the code
These comments should be removed later
* Make "+" in snippet work
* Refactor changes
* Remove unused imports
* Add days of week snippets
* Add a shortcut for yesterday's note
* Rename focusDailyNote function
* Move pathExists to utils
* Make navigation on snippet selection configurable
Co-authored-by: Jonathan Ingall <jonny@mondago.com>
* added support for graph middleware via local plugin
* added support for parsing extension points / plugins
* improved parser plugin and added docs
* improved name of parameter
* need to enable local plugins, and improved configuration system
For security reasons local plugins are off by default.
The feature can be enabled via a flag in the foam configuration, which has been expanded to support this case.
The configuration system now reads a `config.json` file inside the `.foam` directory as well as a `~/.foam/config.json` file to configure the system.
Only the user specific configuration file can be used to enable local plugins, as a security measure against malicious repos.
* added prettier configuration file
This ensures consistency across machines as well as an explicit source of truth
* Access correct property on error to display stack trace
* Fix crash when file contains only frontmatter
* Add test for generateHeadings when the file only contains frontmatter
Co-authored-by: Ankit Tiwari <ankitt255@gmail.com>
After #208, id for each note in NoteGraph is hashed. However, in generateReferenceList in file wikilink-reference-generation.ts, the id is still given by the file path, which compromised the core functionality. This PR fixed this bug.
* decoupled ID from note slug
* added vscode debug configuration to work with vscode-jest extension
* made things prettier
* Add a test for parsing empty frontmatter
* Use astPositionToVsCodePosition util function
* fixed a TODOs around URIs and added tests
* added tests around notes querying
* removing unused imports
* Fix typo
* implemented PR feedback
* fixed lint warnings and renamed method for consistency
* removed unnecessary checks and fix compilation error in tests
Co-authored-by: Ankit Tiwari <ankitt255@gmail.com>
* feat: setup jest for foam-vscode
* Add failing test (fails due to missing vscode dependency)
* feat: add vscode mock
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>