Commit graph

343 commits

Author SHA1 Message Date
Tobias Hunger
e62d9e0695 lsp: Remember which files are open in the editor
... and ignore them on file change notifications: The
Editor manages the file content, so we do not need to
care for the on-disk content for these files.
2024-10-10 09:31:11 +02:00
Tobias Hunger
d87833a6bd lsp: Add a filesystem watch request to our LS
Get a notification of any file change/deleteion. This feels like
overdoing it a bit, but we need to reload when resources change
and those can be anything.
2024-10-10 09:31:11 +02:00
Nigel Breslaw
6beb0c3f02
chore: Update npm dependencies
Update biome
Update typescript
Update esbuild
2024-10-08 13:13:49 +03:00
Tobias Hunger
35cfed3a10 vscode: Request interesting buffers only
Ask VSCode to only send files stored on disc to the LSP,
not random other kinds of buffers. The LS can not make
sense of anything else anyway as it can nto get to
the resources stored next to buffer it works on.

For WASm we can load more kinds of buffers. Whitelist a range
of possibnle buffer schemes, incl. `vscode-vfs` which is used
on `github.dev`.

This does stop VSCode from asking the LS to process random
other buffers like those containing a git diff of a slint file.

Fixes: #6375
2024-10-08 10:32:47 +02:00
Nigel Breslaw
a97b7c7d92
Replace npm with pnpm
Replaces the use of NPM with PNPM. This should make it quick and easy to update any of the dependencies as dependabot will now see everything in one go.
2024-10-07 15:38:26 +03:00
Update Translations Bot
f041075e76 Update Translations: extract strings 2024-10-01 03:14:44 +00:00
Tobias Hunger
e437977637 vscode: Add tmGrammar test 2024-09-30 13:31:18 +02:00
Nguyễn Hồng Quân
6da1d4f30d Add doc for Helix editor 2024-09-26 10:11:39 +02:00
ogoffart
eb273a63ee Bump version number to 1.9.0 2024-09-25 11:49:15 +00:00
Josh Wood
6a131e2648
Added PropertyAnimation.direction property for controlling animation direction (#6261)
Closes #6260

ChangeLog: Added property for controlling animation direction
2024-09-24 19:55:24 +02:00
Olivier Goffart
f3ba16c5cf Revert release preparation
1.8.0 was released. Cleanup

This reverts commit ca66a6af4a.
This reverts commit 98fde8c543.
This reverts commit 45bb5b34b6.
This reverts commit 3b891acef2.
2024-09-23 15:36:16 +02:00
Olivier Goffart
98fde8c543 CI: workaround faillure cleanring the README
The script errors oput in the CI:
`sed: 1: "README.md": invalid command code R`

Bypass the script for now, we'll revert that commit later
2024-09-23 12:53:33 +02:00
Simon Hausmann
6de1f4ebf2 VS Code Extension: Exclude developer information from the README published to the VS Code Marketplace 2024-09-19 10:54:43 +02:00
Simon Hausmann
b3dcf00e36 Add a paragraph about how to preview the preview 2024-09-19 09:59:08 +02:00
Simon Hausmann
efdc737e45 Minor grammar fix
(use plural)
2024-09-19 09:54:03 +02:00
Nigel Breslaw
b36a66e405
Enable more js/tsc biome rules
noUselessConstructor
useNodejsImportProtocol
noImplicitAnyLet
2024-09-13 10:04:39 +02:00
Nigel Breslaw
2bee820ccf
Start to enable default javscript/typescript lint rules
This enables the recommended rules useConst and useImportType
2024-09-12 16:08:52 +02:00
Tobias Hunger
f1da741c8c vscode: Apply biome fixes
No manual change in this PR at all, just the result of
`npm run lint:fix`.
2024-09-12 15:03:04 +02:00
Nigel Breslaw
a218c945ad
Use Biome across monorepo and for Slintpad (#6080)
Puts a shared biome.json in the root.
Deletes the prettier config files.
Deletes the unused pre-commit hooks.
Applies biome linting and formatting to the slintpad project.
2024-09-11 13:07:55 +02:00
Simon Hausmann
cc97571af0 VS Code: Remove Cargo.toml substitution for new project picker
This isn't needed anymore :)
2024-09-11 10:05:40 +02:00
Simon Hausmann
d7007f5356 VS Code Telemetry: Attempt to detect the programming languages used 2024-09-10 17:10:12 +02:00
Simon Hausmann
bb85d2e6c3 VS Code: Fix activation telemetry event
Send the event only if Slint code is edited, which is as soon as we
provide a code lens ("Show Preview"). This works for .slint files as
well as Rust files where the slint macro is embedded.
2024-09-10 17:10:12 +02:00
Simon Hausmann
f85cb45e88 Add support for telemetry collection with the VS code web extension 2024-09-06 16:29:57 +02:00
Nigel Breslaw
3663ffc3c3
vscode: Replace {{project-name}} with actual name in Rust template (#5981) 2024-08-28 16:07:35 +02:00
Olivier Goffart
45a9c7235a vscode: report LSP panic as telemetry error
We write the panic message in a file to communicate with the vscode
extension
2024-08-27 11:10:09 +02:00
Nigel Breslaw
1d434ad242
Turn on syntax, linting and code formatting checks for the VSCode project
Enables the following checks for the editors/vscode extension project on CI:
- Typescript syntax checking.
- Code formating (biome).
- Code linting (biome).

Documents usage in Readme.md
2024-08-26 17:59:13 +02:00
Simon Hausmann
1a1b498082 Only report telemetry to slint.dev if we're running in production mode
Otherwise report to staging.slint.dev
2024-08-26 15:45:05 +02:00
Simon Hausmann
589aeec4f7 Reduce size of VS code extension production builds
Follow basically the steps of https://code.visualstudio.com/api/working-with-extensions/bundling-extension#using-esbuild to
minify the JS and omit source maps.
2024-08-26 14:58:18 +02:00
Simon Hausmann
15304c950c VS code extension: Report basic usage telemetry 2024-08-26 14:51:34 +02:00
Nigel Breslaw
fe55b0cb32
refactor: Tidy the vscode project (#5936)
Removed unused images.
Sets NPM versions to exact version e.g 8.2.1, not ^8.0.0. (prepare for dependabot).
Update all dependencies.
Use npm clean-install instead of npm install. This means an up to date package-lock.json file must exist in the project. Ensuring local development and the CI are repeatable builds that use the same dependency packages.
2024-08-26 12:04:49 +02:00
Nigel Breslaw
4ca3760ea1
vscode: Better options on project location (#5924)
This always asks for the user to select a location for the project.
If VScode is already in a folder it will default to that location.

Then at the end the user is asked if they wish to open the project in a new window, the current window or current window, but new workspace.

Typescript tweaked to be less hardcoded strings with potential errors from typos.
2024-08-25 17:53:37 +02:00
Nigel Breslaw
93e663ac9f
vscode: Don't offer 'Create new project' on web 2024-08-23 14:31:59 +02:00
Olivier Goffart
ec7b3cfb2d vscode: rename the "Slint LSP" output name to just "Slint" 2024-08-23 11:58:08 +02:00
Olivier Goffart
ffd0477cd7 vscode extension: make sure the "Slint LSP" output always exist
It is used to show the output of `debug()`.
User don't find this output if it doesn't exist before there is any
debug output. So make sure it always exist.

(Note: this is not for the browser version, since then we use
console.log instead of the "Slint LSP" output from stderr)
2024-08-23 11:58:08 +02:00
Nigel Breslaw
700c0a967c
Add a New Project quick pick
This enhances the extension:

If you open the command palette (CMD + Shift + P) there is a new 'Slint: Create New Project'.
This will talk you through new project creation, language selection and open a new window.

This PR also installs Biome that was missed out of an earlier change.
2024-08-22 18:24:23 +02:00
Olivier Goffart
b9434de282 Fix web vscode extension
We need to load slint_lsp_wasm_bg.wasm for it to load the LSP
webassembly
2024-08-22 16:23:55 +02:00
Nigel Breslaw
be02f6e046
Replace eslint and prettier with biome.js
Biome is a Rust based replacement for eslint and prettier and runs much faster.
2024-08-22 15:29:57 +02:00
Simon Hausmann
449e0f3307 Revert use of pnpm for VS Code extension build, as discussed
with Nigel., as discussed
with Nigel., as discussed
with Nigel., as discussed
with Nigel.

This reverts commit 295334a7b9 and
ab49903a06.
2024-08-22 14:32:40 +02:00
Nigel Breslaw
295334a7b9
Fix Vscode publish failing due to PNPM (#5894) 2024-08-22 08:15:01 +02:00
Nigel Breslaw
ab49903a06
Use pnpm to build the vscode extension (#5888)
Replaces npm with pnpm for building the extension.
2024-08-21 15:55:12 +02:00
Olivier Goffart
672611a169 vscode: selection in wasm preview should show the text document on a different side
highjack the code to show the text document when we detect it comes from
the preview panel, in order to not show the code in the active panel,
but to the left of it (or to the right when the preview is already to
the left)
2024-08-20 14:25:33 +02:00
ogoffart
4dd7d96a28 Bump version number to 1.8.0 2024-08-15 12:44:46 +00:00
Olivier Goffart
8db0403469 vscode extension: Make the error message in case of crash a single line
Better to limit the lines in the log to make it easier to locate the
real error
2024-08-12 15:53:45 +02:00
Tobias Hunger
1639274486 slintpad/vscode: Get rid of the shared files
Theyre are no more shared files, so move the files
into vscode and set up a syntax check over there.

That was not possible before as the typescript
compiler would error out on the shared files being
outside its root directory.
2024-08-12 12:45:59 +02:00
ogoffart
bbf7edc5a3 Bump version number to 1.7.2 2024-08-09 09:52:17 +00:00
Tobias Hunger
d9f8a751fe vscode: Remove dead code related to property editor 2024-08-08 16:39:37 +02:00
Olivier Goffart
b6167bd96f vscode: set the tab icon for the embedded preview 2024-08-07 10:01:24 +02:00
Olivier Goffart
c98ba05d95 janitor: vscode: remove useless activation event
Fix warning in json file:

> This activation event can be removed as VS Code generates these automatically from your package.json contribution declarations.
2024-08-07 09:39:07 +02:00
Olivier Goffart
7b4668b481 Vscode extension: add Slint icon to .slint file 2024-08-06 22:53:05 +02:00
ogoffart
aa25e3cd44 Bump version number to 1.7.1 2024-07-23 12:05:34 +00:00