Fix warning in json file:
> This activation event can be removed as VS Code generates these automatically from your package.json contribution declarations.
The latest wasm-pack version creates, by default, a package.json
that has a "type": "module" entry in it.
We invoke wasm-pack to build the lsp module and store it in the out/
folder. Next we run esbuild to place out/extension.js - the main entry
point - into the same directory. That directory now also has the
wasm-pack generated package.json, which has the "type": "module", which
doesn't match our CJS out/extension.js.
When VS code does require("/path/to/extension/out/extension.js"),
node.js complains that extension.js is not an ESM because
out/package.json claims that it should be.
The fix here is to not generate the package.json file we don't need
anyway.
Code is generated from grammar.js, which gets built into a library. That
library gets loaded by a text editor. So someone might argue that the GPL might
infect that text editor.
We do not want that argument to come up, so let's use MIT for that code.
Prospective fix for loading of image when using the vscode extension from the web
(eg, via https://github.dev)
URL is different in a local web extension and in a online web extension.
In a local web extension, it still use file:// for urls, but online, it
uses vscode-vfs:// url. And we wouldn't map it because it doesn't start
with file://
I couldn't find a reason looking at the git history why we check for
file://, I assumed this might have been because of builtin:/, but I
checked and these still work both with the wasm in the native extension,
and as a web extension
Commit 183278c0e8 exposed the following
statement to the parser with a trailing semicolon:
if (val > 50) {
return green;
} else if val > 40 {
return yellow;
} else {
return blue;
};
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
As per API review:
- In the Rust and C++ API we use `set_nine_slice_edges` because the getter couldn't start with 9
- in english we spell number less than 10 with letters and this is a name
The `storage.type` is for the type keyword such as `class` or
`function` or `var`, not for our own types. These are `entity.name.type`
Similarily, `variable.langguage` is for the variable keyword like `this`
or `self`
Reference: https://macromates.com/manual/en/language_grammars#naming_conventions
Also the "property" scope was putting all identifiers in the binding as
a variable, which is just highlighting the whole binding
The latest tree-sitter made it glaringly obvious
that some of our tests ended up containing
`MISSING` nodes, inserted where tree-sitter
expected a token that it did not see in the input.
Fix those bugs in the parser.
Clean up the `grammar.js` file and improve the queries.
Document how to inject `slint` into the rust parser to get highlighting
for the `slint!` macro in rust files.
Right now, the winit window adaptor will force a px value on the width
and height once the ui is up.
We should then override that again with 100% after the UI is shown