nortakales / vs-code-qalc

Interactive scratchpad calculator for VS Code
MIT License
68 stars 2 forks source link

Add setting for global declarations #27

Closed luis-c465 closed 1 year ago

luis-c465 commented 1 year ago

Fixes #13

Adds the setting qalc.globalDeclarations which is an array of declarations (or lines) which will applied to every qalc file. Defaults to [].

Settings

Screenshot 2023-05-19 at 10 47 13 AM Screenshot 2023-05-19 at 10 47 24 AM

Example of output

Screenshot 2023-05-19 at 10 46 57 AM

Notes

The global declarations are evaluated and added every time the document is updated. So possibly to avoid performance issues in the future, the global declarations should be added and cached when the extension starts or the setting is changed.