profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/riccardoferretti/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

foambubble/foam 9085

A personal knowledge management and sharing system for VSCode

riccardoferretti/heroku.py 0

Heroku API wrapper for Python.

riccardoferretti/vscode 0

Visual Studio Code

issue commentfoambubble/foam

Dots break wiki links

I can get this issue. Here's a reproduction repository. Notice the files namespace1.a.md and namespace2.a.md

https://github.com/ingalless/foam-dot-issue-reproduction

Panke

comment created time in 2 hours

issue commentfoambubble/foam

Foam Graph is blank

I'm not getting anything in the Foam logs when the Graph is blank. If I reload the window and then try to view the graph then it becomes visible.

BUT if I delete a link/node, then the graph isn't refreshing and I'm seeing the below logs:

[info - 12:02:38 PM] Deleted: /Volumes/Data/1Brain/test-link.md [error - 12:02:38 PM] An error occurred in the graph view { "message": "Uncaught TypeError: Cannot read property 'id' of undefined", "filename": "vscode-webview-resource://a6fd8997-3934-49e1-8935-5e874af931bb/file///Users/<my-username>/.vscode/extensions/foam.foam-vscode-0.10.2/static/graphs/default/graph.js", "lineno": 233, "colno": 24, "error": {} } [warn - 12:02:38 PM] Link file:///Volumes/Data/1Brain/test-link.md in file:///Volumes/Data/1Brain/inbox.md is not valid.

Link to Repo: https://github.com/iamtherealgd/Brain

pyreton

comment created time in 7 hours

push eventfoambubble/foam

Jonathan

commit sha 590ec695073039581a862ffed4435a7834eb3a3c

Update documentation

view details

Jonathan

commit sha aeb4bff72a5dbbbc9a3bb1ae74376a0ae83a56c1

Fix grammar in docs

view details

push time in a day

pull request commentfoambubble/foam

Add ability to launch a daily note on startup

@riccardoferretti Reading the docs I have just noticed that it was marked as "future" functionality, so if I'm missing something here let me know! I won't be hurt if you decline the PR 😆

ingalless

comment created time in a day

PR opened foambubble/foam

Reviewers
Add ability to launch a daily note on startup

I had this idea this morning that I'd like my foam notes to open on startup

It then got me thinking "hey, it would be cool if it would land on my daily note on startup too!"

So, here's that feature.

Update to docs following shortly...

+9 -1

0 comment

2 changed files

pr created time in a day

create barnchfoambubble/foam

branch : feature/daily-notes

created branch time in a day

issue commentfoambubble/foam

Foam Graph is blank

@riccardoferretti

[error - 10:21:34 AM] An error occurred in the graph view
{
  "message": "Uncaught TypeError: Cannot read property 'id' of undefined",
  "filename": "vscode-webview-resource://5a811484-39da-4d25-9fdb-1bd349196e93/file///Users/val/.vscode/extensions/foam.foam-vscode-0.10.2/static/graphs/default/graph.js",
  "lineno": 233,
  "colno": 24,
  "error": {}
}
pyreton

comment created time in a day

issue openedfoambubble/foam

No wikilink suggestion for numeric filenames

  • Foam version: <!-- Check in the VSCode extension tab. --> v0.10.2
  • Platform: Windows
  • Issue occur on the foam template repo: Yes

Summary <!-- A clear and concise description of what the bug is.--> The filename for my daily notes is of the format yyyy-mm-dd.md which is completely numeric. There are no suggestions when I try to add a wikilink to an arbitrary date. However, when I have at least a single alphabet in the filename, the suggestions pop up. The wikilink is created successfully when I type out the filename manually.

Most likely related to #451.

Steps to reproduce

  1. Create a file with a complete numeric name, say 2021-02-26.md.
  2. Try to add a wikilink to it using [[]] and see no suggestion list appearing.

Additional information <!-- Add any other context about the problem here. --> Feel free to attach any of the following that might help with debugging the issue:

  • screenshots
  • a zip with a minimal repo to reproduce the issue
  • the Foam log in VsCode (see instructions)

created time in a day

issue commentfoambubble/foam

Foam Graph is blank

Also just updated to vscode 1.53.2, same issue.
Version: 1.53.2 (user setup) Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4 Date: 2021-02-11T11:48:04.245Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042

pyreton

comment created time in a day

issue commentfoambubble/foam

Foam Graph is blank

Same issue here on Windows 10 64bit, was working a couple days ago.

Version: 1.53.0 (user setup) Commit: 8490d3dde47c57ba65ec40dd192d014fd2113496 Date: 2021-02-03T20:36:38.611Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042

pyreton

comment created time in a day

issue commentfoambubble/foam

Link bug in Windows

Pretty sure the bug is inside the uri.ts: computeRelativePath()

itsme-alan

comment created time in 2 days

issue commentfoambubble/foam

Link bug in Windows

Pretty sure this is due to the difference in casing of the drive letter. Still happens for me with the 10.2 release

itsme-alan

comment created time in 2 days

pull request commentfoambubble/foam

Feature/blank note explorer view

@riccardoferretti I think I managed to clean up all of these items. Thanks again.

joeltjames

comment created time in 2 days

Pull request review commentfoambubble/foam

Feature/blank note explorer view

+import * as vscode from 'vscode';+import { Foam, Resource, isNote, isPlaceholder, isAttachment } from 'foam-core';+import {+  FilteredResourcesConfigGroupBy,+  getPlaceholdersConfig,+} from '../settings';+import { FoamFeature } from '../types';+import { FilteredResourcesProvider } from './filtered-resources';++const feature: FoamFeature = {+  activate: async (+    context: vscode.ExtensionContext,+    foamPromise: Promise<Foam>+  ) => {+    const foam = await foamPromise;+    const workspacesURIs = vscode.workspace.workspaceFolders.map(+      dir => dir.uri+    );+    const provider = new FilteredResourcesProvider(+      foam.workspace,+      foam.services.dataStore,+      'placeholders',+      'placeholder',+      isPlaceholderResource,+      {+        ...getPlaceholdersConfig(),+        workspacesURIs,+      }+    );++    context.subscriptions.push(+      vscode.window.registerTreeDataProvider(+        'foam-vscode.placeholders',+        provider+      ),+      vscode.commands.registerCommand(+        'foam-vscode.group-placeholders-by-folder',+        () => provider.setGroupBy(FilteredResourcesConfigGroupBy.Folder)+      ),+      vscode.commands.registerCommand(+        'foam-vscode.group-placeholders-off',+        () => provider.setGroupBy(FilteredResourcesConfigGroupBy.Off)+      ),+      foam.workspace.onDidAdd(() => {+        provider.refresh();+        foam.workspace.resolveLinks();

Yes, pulling in 0.10.1 seems to have resolved this.

joeltjames

comment created time in 2 days

Pull request review commentfoambubble/foam

Feature/blank note explorer view

+import * as path from 'path';+import * as vscode from 'vscode';+import * as fs from 'fs';+import {+  IDataStore,+  URI,+  FoamWorkspace,+  Resource,+  isAttachment,+  isPlaceholder,+  getTitle,+} from 'foam-core';+import micromatch from 'micromatch';+import {+  FilteredResourcesConfig,+  FilteredResourcesConfigGroupBy,+} from '../settings';+import { getContainsTooltip, getNoteTooltip } from '../utils';+import { dirname, join } from 'path';+import { FoamFeature } from '../types';+import { commands } from 'vscode';++const feature: FoamFeature = {+  activate: (context: vscode.ExtensionContext) => {+    context.subscriptions.push(+      commands.registerCommand(+        'foam-vscode.open-placeholder-note',+        async (uri: vscode.Uri) => {+          let dir: string;++          if (vscode.workspace.workspaceFolders) {+            dir = vscode.workspace.workspaceFolders[0].uri.fsPath.toString();+          }++          if (!dir) {+            const activeFile = vscode.window.activeTextEditor?.document;+            dir = activeFile ? dirname(activeFile.uri.fsPath) : null;+          }++          if (dir) {+            const path = join(dir, `${uri.path}.md`);+            await fs.promises.writeFile(path, `# ${uri.path}`);+            const ur = vscode.Uri.file(path);+            await vscode.window.showTextDocument(ur, {+              preserveFocus: false,+              preview: false,+            });+          }+        }+      )+    );+  },+};++export default feature;++export class FilteredResourcesProvider+  implements vscode.TreeDataProvider<FilteredResourceTreeItem> {+  // prettier-ignore+  private _onDidChangeTreeData: vscode.EventEmitter<FilteredResourceTreeItem | undefined | void> = new vscode.EventEmitter<FilteredResourceTreeItem | undefined | void>();+  // prettier-ignore+  readonly onDidChangeTreeData: vscode.Event<FilteredResourceTreeItem | undefined | void> = this._onDidChangeTreeData.event;+  // prettier-ignore+  private groupBy: FilteredResourcesConfigGroupBy = FilteredResourcesConfigGroupBy.Folder;+  private exclude: string[] = [];+  private filteredResources: Resource[] = [];+  private root = vscode.workspace.workspaceFolders[0].uri.path;++  constructor(+    private workspace: FoamWorkspace,+    private dataStore: IDataStore,+    private filteredNoteType: string,+    private filteredNoteContextValue: string,+    private filterPredicate: (resource: Resource, index: number) => boolean,+    config: FilteredResourcesProviderConfig

This was ported over from the original OrphanProvider, so I didn't give it much thought. I have extracted it from the settings and just include it as a different parameter to the constructor.

joeltjames

comment created time in 2 days

Pull request review commentfoambubble/foam

Feature/blank note explorer view

+import * as path from 'path';+import * as vscode from 'vscode';+import * as fs from 'fs';+import {+  IDataStore,+  URI,+  FoamWorkspace,+  Resource,+  isAttachment,+  isPlaceholder,+  getTitle,+} from 'foam-core';+import micromatch from 'micromatch';+import {+  FilteredResourcesConfig,+  FilteredResourcesConfigGroupBy,+} from '../settings';+import { getContainsTooltip, getNoteTooltip } from '../utils';+import { dirname, join } from 'path';+import { FoamFeature } from '../types';+import { commands } from 'vscode';++const feature: FoamFeature = {+  activate: (context: vscode.ExtensionContext) => {+    context.subscriptions.push(+      commands.registerCommand(+        'foam-vscode.open-placeholder-note',+        async (uri: vscode.Uri) => {+          let dir: string;++          if (vscode.workspace.workspaceFolders) {+            dir = vscode.workspace.workspaceFolders[0].uri.fsPath.toString();+          }++          if (!dir) {+            const activeFile = vscode.window.activeTextEditor?.document;+            dir = activeFile ? dirname(activeFile.uri.fsPath) : null;+          }++          if (dir) {+            const path = join(dir, `${uri.path}.md`);+            await fs.promises.writeFile(path, `# ${uri.path}`);+            const ur = vscode.Uri.file(path);+            await vscode.window.showTextDocument(ur, {+              preserveFocus: false,+              preview: false,+            });+          }+        }+      )+    );+  },+};++export default feature;++export class FilteredResourcesProvider+  implements vscode.TreeDataProvider<FilteredResourceTreeItem> {+  // prettier-ignore+  private _onDidChangeTreeData: vscode.EventEmitter<FilteredResourceTreeItem | undefined | void> = new vscode.EventEmitter<FilteredResourceTreeItem | undefined | void>();+  // prettier-ignore+  readonly onDidChangeTreeData: vscode.Event<FilteredResourceTreeItem | undefined | void> = this._onDidChangeTreeData.event;+  // prettier-ignore+  private groupBy: FilteredResourcesConfigGroupBy = FilteredResourcesConfigGroupBy.Folder;+  private exclude: string[] = [];+  private filteredResources: Resource[] = [];+  private root = vscode.workspace.workspaceFolders[0].uri.path;++  constructor(+    private workspace: FoamWorkspace,+    private dataStore: IDataStore,+    private filteredNoteType: string,+    private filteredNoteContextValue: string,+    private filterPredicate: (resource: Resource, index: number) => boolean,+    config: FilteredResourcesProviderConfig+  ) {+    this.groupBy = config.groupBy;+    this.exclude = this.getGlobs(config.workspacesURIs, config.exclude);+    this.setContext();+    this.computeFilteredResources();+  }++  setGroupBy(groupBy: FilteredResourcesConfigGroupBy): void {+    this.groupBy = groupBy;+    this.setContext();+    this.refresh();+  }++  private setContext(): void {+    vscode.commands.executeCommand(+      'setContext',+      `foam-vscode.${this.filteredNoteType}-grouped-by-folder`,+      this.groupBy === FilteredResourcesConfigGroupBy.Folder+    );+  }++  refresh(): void {+    this.computeFilteredResources();+    this._onDidChangeTreeData.fire();+  }++  getTreeItem(item: FilteredResourceTreeItem): vscode.TreeItem {+    return item;+  }++  getChildren(directory?: Directory): Thenable<FilteredResourceTreeItem[]> {+    if (!directory && this.groupBy === FilteredResourcesConfigGroupBy.Folder) {+      const directories = Object.entries(this.getFilteredResourcesByDirectory())+        .sort(([a], [b]) => a.localeCompare(b))+        .map(+          ([dir, filteredResources]) =>+            new Directory(dir, filteredResources, this.filteredNoteContextValue)+        );+      return Promise.resolve(directories);+    }++    if (directory) {+      const filteredResources = directory.resources.map(+        o => new FilteredResource(o, this.filteredNoteContextValue)+      );+      return Promise.resolve(filteredResources);+    }++    const filteredResources = this.filteredResources.map(+      o => new FilteredResource(o, this.filteredNoteContextValue)+    );+    return Promise.resolve(filteredResources);+  }++  async resolveTreeItem(+    item: FilteredResourceTreeItem+  ): Promise<FilteredResourceTreeItem> {+    if (item instanceof FilteredResource) {+      const content = await this.dataStore.read(item.resource.uri);+      item.tooltip = getNoteTooltip(content);+    }+    return item;+  }++  private computeFilteredResources(): void {+    this.filteredResources = this.workspace+      .list()+      .filter(this.filterPredicate)+      .filter(resource => !this.isMatch(resource.uri))+      .sort(this.sort);+  }++  private isMatch(uri: URI) {+    return micromatch.isMatch(uri.fsPath, this.exclude);+  }++  private getGlobs(fsURI: URI[], globs: string[]): string[] {+    globs = globs.map(glob => (glob.startsWith('/') ? glob.slice(1) : glob));++    const exclude: string[] = [];++    for (const fsPath of fsURI) {+      let folder = fsPath.path.replace(/\\/g, '/');+      if (folder.substr(-1) === '/') {+        folder = folder.slice(0, -1);+      }+      exclude.push(...globs.map(g => `${folder}/${g}`));+    }++    return exclude;+  }++  private getFilteredResourcesByDirectory(): FilteredResourcesByDirectory {+    const filtered: FilteredResourcesByDirectory = {};+    for (const resource of this.filteredResources) {+      const p = resource.uri.path.replace(this.root, '');+      const { dir } = path.parse(p);++      if (filtered[dir]) {+        filtered[dir].push(resource);+      } else {+        filtered[dir] = [resource];+      }+    }++    for (const k in filtered) {+      filtered[k].sort(this.sort);+    }++    return filtered;+  }++  private sort(a: Resource, b: Resource) {+    const titleA = getTitle(a);+    const titleB = getTitle(b);+    return titleA.localeCompare(titleB);+  }+}++export interface FilteredResourcesProviderConfig+  extends FilteredResourcesConfig {+  workspacesURIs: URI[];+  includeLinks?: boolean;

This was ported over from the old oprhans code, I'm not sure what this setting was intended to do, but it has been removed.

joeltjames

comment created time in 2 days

Pull request review commentfoambubble/foam

Feature/blank note explorer view

+import * as path from 'path';+import * as vscode from 'vscode';+import * as fs from 'fs';+import {+  IDataStore,+  URI,+  FoamWorkspace,+  Resource,+  isAttachment,+  isPlaceholder,+  getTitle,+} from 'foam-core';+import micromatch from 'micromatch';+import {+  FilteredResourcesConfig,+  FilteredResourcesConfigGroupBy,+} from '../settings';+import { getContainsTooltip, getNoteTooltip } from '../utils';+import { dirname, join } from 'path';+import { FoamFeature } from '../types';+import { commands } from 'vscode';++const feature: FoamFeature = {+  activate: (context: vscode.ExtensionContext) => {+    context.subscriptions.push(+      commands.registerCommand(+        'foam-vscode.open-placeholder-note',+        async (uri: vscode.Uri) => {+          let dir: string;++          if (vscode.workspace.workspaceFolders) {+            dir = vscode.workspace.workspaceFolders[0].uri.fsPath.toString();+          }++          if (!dir) {+            const activeFile = vscode.window.activeTextEditor?.document;+            dir = activeFile ? dirname(activeFile.uri.fsPath) : null;+          }++          if (dir) {+            const path = join(dir, `${uri.path}.md`);+            await fs.promises.writeFile(path, `# ${uri.path}`);+            const ur = vscode.Uri.file(path);+            await vscode.window.showTextDocument(ur, {+              preserveFocus: false,+              preview: false,+            });+          }+        }+      )+    );+  },+};++export default feature;++export class FilteredResourcesProvider+  implements vscode.TreeDataProvider<FilteredResourceTreeItem> {+  // prettier-ignore+  private _onDidChangeTreeData: vscode.EventEmitter<FilteredResourceTreeItem | undefined | void> = new vscode.EventEmitter<FilteredResourceTreeItem | undefined | void>();+  // prettier-ignore+  readonly onDidChangeTreeData: vscode.Event<FilteredResourceTreeItem | undefined | void> = this._onDidChangeTreeData.event;+  // prettier-ignore+  private groupBy: FilteredResourcesConfigGroupBy = FilteredResourcesConfigGroupBy.Folder;+  private exclude: string[] = [];+  private filteredResources: Resource[] = [];+  private root = vscode.workspace.workspaceFolders[0].uri.path;++  constructor(+    private workspace: FoamWorkspace,+    private dataStore: IDataStore,+    private filteredNoteType: string,+    private filteredNoteContextValue: string,+    private filterPredicate: (resource: Resource, index: number) => boolean,+    config: FilteredResourcesProviderConfig+  ) {+    this.groupBy = config.groupBy;+    this.exclude = this.getGlobs(config.workspacesURIs, config.exclude);+    this.setContext();+    this.computeFilteredResources();+  }++  setGroupBy(groupBy: FilteredResourcesConfigGroupBy): void {+    this.groupBy = groupBy;+    this.setContext();+    this.refresh();+  }++  private setContext(): void {+    vscode.commands.executeCommand(+      'setContext',+      `foam-vscode.${this.filteredNoteType}-grouped-by-folder`,

Yes, I like this a lot. I defined the commands as a getter on the provider, and then use a deconstructed array to insert those into the subscription.

joeltjames

comment created time in 2 days

Pull request review commentfoambubble/foam

Feature/blank note explorer view

+import * as path from 'path';+import * as vscode from 'vscode';+import * as fs from 'fs';+import {+  IDataStore,+  URI,+  FoamWorkspace,+  Resource,+  isAttachment,+  isPlaceholder,+  getTitle,+} from 'foam-core';+import micromatch from 'micromatch';+import {+  FilteredResourcesConfig,+  FilteredResourcesConfigGroupBy,+} from '../settings';+import { getContainsTooltip, getNoteTooltip } from '../utils';+import { dirname, join } from 'path';+import { FoamFeature } from '../types';+import { commands } from 'vscode';++const feature: FoamFeature = {+  activate: (context: vscode.ExtensionContext) => {+    context.subscriptions.push(+      commands.registerCommand(+        'foam-vscode.open-placeholder-note',+        async (uri: vscode.Uri) => {+          let dir: string;++          if (vscode.workspace.workspaceFolders) {+            dir = vscode.workspace.workspaceFolders[0].uri.fsPath.toString();+          }++          if (!dir) {+            const activeFile = vscode.window.activeTextEditor?.document;+            dir = activeFile ? dirname(activeFile.uri.fsPath) : null;+          }++          if (dir) {+            const path = join(dir, `${uri.path}.md`);+            await fs.promises.writeFile(path, `# ${uri.path}`);+            const ur = vscode.Uri.file(path);+            await vscode.window.showTextDocument(ur, {+              preserveFocus: false,+              preview: false,+            });+          }+        }+      )+    );+  },+};++export default feature;++export class FilteredResourcesProvider+  implements vscode.TreeDataProvider<FilteredResourceTreeItem> {+  // prettier-ignore+  private _onDidChangeTreeData: vscode.EventEmitter<FilteredResourceTreeItem | undefined | void> = new vscode.EventEmitter<FilteredResourceTreeItem | undefined | void>();+  // prettier-ignore+  readonly onDidChangeTreeData: vscode.Event<FilteredResourceTreeItem | undefined | void> = this._onDidChangeTreeData.event;+  // prettier-ignore+  private groupBy: FilteredResourcesConfigGroupBy = FilteredResourcesConfigGroupBy.Folder;+  private exclude: string[] = [];+  private filteredResources: Resource[] = [];+  private root = vscode.workspace.workspaceFolders[0].uri.path;++  constructor(+    private workspace: FoamWorkspace,+    private dataStore: IDataStore,+    private filteredNoteType: string,

I went with providerId

joeltjames

comment created time in 2 days

Pull request review commentfoambubble/foam

Feature/blank note explorer view

+import * as path from 'path';+import * as vscode from 'vscode';+import * as fs from 'fs';+import {+  IDataStore,+  URI,+  FoamWorkspace,+  Resource,+  isAttachment,+  isPlaceholder,+  getTitle,+} from 'foam-core';+import micromatch from 'micromatch';+import {+  FilteredResourcesConfig,+  FilteredResourcesConfigGroupBy,+} from '../settings';+import { getContainsTooltip, getNoteTooltip } from '../utils';+import { dirname, join } from 'path';+import { FoamFeature } from '../types';+import { commands } from 'vscode';++const feature: FoamFeature = {+  activate: (context: vscode.ExtensionContext) => {+    context.subscriptions.push(+      commands.registerCommand(+        'foam-vscode.open-placeholder-note',+        async (uri: vscode.Uri) => {+          let dir: string;++          if (vscode.workspace.workspaceFolders) {+            dir = vscode.workspace.workspaceFolders[0].uri.fsPath.toString();+          }++          if (!dir) {+            const activeFile = vscode.window.activeTextEditor?.document;+            dir = activeFile ? dirname(activeFile.uri.fsPath) : null;+          }++          if (dir) {+            const path = join(dir, `${uri.path}.md`);+            await fs.promises.writeFile(path, `# ${uri.path}`);+            const ur = vscode.Uri.file(path);+            await vscode.window.showTextDocument(ur, {+              preserveFocus: false,+              preview: false,+            });+          }+        }+      )+    );+  },+};++export default feature;++export class FilteredResourcesProvider

I ended up moving it to src/utils/grouped-resources-tree-data-provider.ts.

joeltjames

comment created time in 2 days

issue commentfoambubble/foam

Foam Graph is blank (M1 bug?)

Not on M1, but graph is also blank.

  macOS :                Big Sur 11.2.1
  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro11,1
  Processor Name:	Dual-Core Intel Core i5

VS Code

Version: 1.53.2
Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
Date: 2021-02-11T11:45:54.515Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 20.3.0

Foam 0.10.2

pyreton

comment created time in 2 days

issue openedfoambubble/foam

Foam Graph is blank (M1 bug?)

Open Foam Graph opens the panel, but it is blank. My best guess is this is because I am on the VSCode for Insiders build in order to get native M1 Apple Silicon support. (Foam Graph worked fine on previous Intel laptop using standard VSCode)

created time in 2 days

Pull request review commentfoambubble/foam

Feature/blank note explorer view

+import * as vscode from 'vscode';+import { Foam, Resource, isNote, isPlaceholder, isAttachment } from 'foam-core';+import {+  FilteredResourcesConfigGroupBy,+  getPlaceholdersConfig,+} from '../settings';+import { FoamFeature } from '../types';+import { FilteredResourcesProvider } from './filtered-resources';++const feature: FoamFeature = {+  activate: async (+    context: vscode.ExtensionContext,+    foamPromise: Promise<Foam>+  ) => {+    const foam = await foamPromise;+    const workspacesURIs = vscode.workspace.workspaceFolders.map(+      dir => dir.uri+    );+    const provider = new FilteredResourcesProvider(+      foam.workspace,+      foam.services.dataStore,+      'placeholders',+      'placeholder',+      isPlaceholderResource,+      {+        ...getPlaceholdersConfig(),+        workspacesURIs,+      }+    );++    context.subscriptions.push(+      vscode.window.registerTreeDataProvider(+        'foam-vscode.placeholders',+        provider+      ),+      vscode.commands.registerCommand(+        'foam-vscode.group-placeholders-by-folder',+        () => provider.setGroupBy(FilteredResourcesConfigGroupBy.Folder)+      ),+      vscode.commands.registerCommand(+        'foam-vscode.group-placeholders-off',+        () => provider.setGroupBy(FilteredResourcesConfigGroupBy.Off)+      ),+      foam.workspace.onDidAdd(() => {+        provider.refresh();+        foam.workspace.resolveLinks();

If we don't resolve the links, then placeholders do not get updated. This is an issue when we click a true "placeholder" in the explorer view, which creates a blank note for that "placeholder". The blank note then shows up, but the "placeholder" link is still present. Resolving links cleans up the placeholders.

joeltjames

comment created time in 2 days

issue commentfoambubble/foam

Feat: graph visualization for directory structure

I would love to have directories act as nodes in a graph.

Currently I have my knowledge organized as:

knowledge/
  dev/
    python/
      profilers.md

... and so on, but that makes a profilers.md just floating, unrelated article. I am not sure if I should change my note taking style (I feel one weekend with Dendron changed me ;) ).

It's easier for me to navigate in VS Code through the folder relations I designed (ex.: CTRL-P, type py pro, first hint is correct) whether having everything in one bucket and keep relations in wiki links. How in such case I should search for python related profilers information (assuming I would like to have a similar articles for many languages).

File name conflicts though...

davidde

comment created time in 2 days

pull request commentfoambubble/foam

Feature/blank note explorer view

@riccardoferretti, I just pushed a few commits to address your feedback. Thanks for the suggestions.

joeltjames

comment created time in 3 days

pull request commentfoambubble/foam-template

Document templates in-place

@riccardoferretti Good suggestions! Applied 👍🏻

ingalless

comment created time in 4 days

push eventfoambubble/foam-template

ingalless

commit sha e119125381f07f747cd9342eadd93c5d9d713dc5

Improve template copy Co-authored-by: Riccardo <code@riccardoferretti.com>

view details

push time in 4 days

issue commentfoambubble/foam

Support for Footnotes

Afaik this is has to do with the MD renderer you are using. Could you elaborate on what exactly you're trying to accomplish (i.e. where should they be supported)

zomars

comment created time in 4 days

issue commentfoambubble/foam

Feature: Graphing only a selection of tags

Hello! I'm glad you've shown interest in our project. As of now the graph is unable to show tags but that is in worklist. In the meantime, I'd be glad to know more about your ideas on data visualization. Either here, or on our Discord.

DrakeWhu

comment created time in 4 days

issue openedfoambubble/foam

Feature: Graphing only a selection of tags

My idea is something like a command where you can put the name of one or several tags and the output is only the graph for given tags

For example: Foam: Show Graph {#tag} should graph only the bubbles in #tag

Foam: Show Graph {#tag1,#tag2,#tag3} should show all nodes in those three tags

It would be really useful when comparing 2 broad tags (quantum mechanics and condensed matter physics are 2 tags I have, I'd like to compare them graphically for example)

Other idea I have about this kind of visualization is that nodes from different tags could be different colours to make it even more visual (quantum mechanics red, condensed matter physics blue, for example).

I have a lot of ideas about data visualization but the only one that I really need now is this one. It gets hard to compare tags with 30-40+ bubbles on them each

created time in 4 days

PR opened foambubble/foam-template

Document templates in-place

Relates to: https://github.com/foambubble/foam/pull/359

+17 -0

0 comment

1 changed file

pr created time in 4 days