foambubble / foam

A personal knowledge management and sharing system for VSCode
https://foambubble.github.io/
Other
15.5k stars 665 forks source link

Ability to link to line numbers in code #1417

Open sbussard opened 2 hours ago

sbussard commented 2 hours ago

Is your feature request related to a problem? Please describe.

Documentation for code

Describe the solution you'd like

Something like this

[see code](./path/to/code.cpp#L30)

should open up the file at the specified line number, like github does.

Describe alternatives you've considered

Hosting the files works but is not an option. They have to be local.

Screenshots or Videos

No response

sbussard commented 2 hours ago

You can link to code files when updating foam settings like so, but it doesn't work for line numbers

"foam.files.attachmentExtensions": "cpp h c",
sbussard commented 2 hours ago

Update: just noticed it works in preview mode but not in edit mode. Will leave this open to see if this is a foam issue.