Commit graph

364 commits

Author SHA1 Message Date
Olivier Goffart
6530518dd6 Some fixups after review 2021-05-11 14:59:57 +02:00
Olivier Goffart
da1deb714b Updater: Remove colspan/rowspan/row/col when not in a GridLayout
This was ignored before, and now it would be an error
2021-05-11 14:59:57 +02:00
Olivier Goffart
fd2f8eb3fb Make sure to make the UI thread also exit when the LSP server panics 2021-05-07 11:54:30 +02:00
Olivier Goffart
3ebeb1654c LSP: don't advertize things we don't support 2021-05-07 11:15:09 +02:00
Jocelyn Turcotte
beadd38b3e Add Sublime Text files to the license check configuration 2021-05-03 10:30:15 +02:00
Jocelyn Turcotte
d468d10d63 LSP: Add Sublime Text instructions and syntax highlighting
The syntax highlighting was mostly ported from sixtyfps.ksyntaxhighlighter.xml
and the VSCode extension, so they could theoretically be updated together.
2021-05-03 10:30:15 +02:00
Olivier Goffart
c119d28237 LSP: Make sure the sender channel is droped when closing
It might keep alive the IO thread otherwise
2021-05-02 15:10:48 +02:00
Olivier Goffart
16fe50fed1 Add documentation about tools in the README 2021-05-02 09:22:32 +02:00
Simon Hausmann
ef1a605953 Add support for showing warning diagnostics in the online editor 2021-04-30 15:43:05 +02:00
Olivier Goffart
4d4bbd6fd6 sixtyfps-fmt: reformat callback declaration and connections 2021-04-30 11:28:02 +02:00
Olivier Goffart
ee5674ce15 Fix license header 2021-04-29 15:08:32 +02:00
Olivier Goffart
f871867608 WIP: formater tool 2021-04-29 13:44:12 +02:00
Olivier Goffart
4dc9a6ee78 Add links in some README
Since they are going to be shown out of context
2021-04-27 17:14:30 +02:00
Simon Hausmann
7240f5c5e9 Fix loading of relative paths on Windows
We use std::fs::canonicalize() and that may produce paths like

    `\\\\?\\C:\\foobar\\baz.60`

where the leading `\?` disables all parsing.

When `baz.60` imports another `.60` file using a relative path `../fob.60`,
we call `Path::join()`, which really just appends strings, producing

    ``\\\\?\\C:\\foobar\\../fob.60`

When calling `canonicalize()` again on this path, the function fails,
because any parsing was disabled,
so neither the forward slash nor the .. are resolved.

So while the forward slash handling could be solved with `components()` we
still run into

    https://users.rust-lang.org/t/unable-to-parse-relative-directories-in-windows-unc-paths/8164

To circumvent all this, use the dunce crate to canonicalize in a way on Windows
that avoids UNC paths.
2021-04-27 11:02:23 +02:00
Olivier Goffart
3380383787 Bump version number
(Does not include docs and README yet)
2021-04-26 13:16:48 +02:00
Olivier Goffart
f620351cbf Go to definition of structs
Also add the struct in the outline
2021-04-24 15:06:58 +02:00
Olivier Goffart
f0050c2a08 LSP: add outline 2021-04-24 15:06:58 +02:00
Olivier Goffart
092c52475a
Update README.md
Add a screenshot of the qtcreator configuration
2021-04-23 22:00:39 +02:00
Olivier Goffart
422ed0b767 LSP preview: fix the Qt preview
We can't start sending events from the thread before the QApplication
is properly initialized.
So add a state in the state machine and wait until the event loop is initialized
to send the first event.
2021-04-23 18:04:56 +02:00
Simon Hausmann
d899eaf094 Delay the start of the gui event loop until a preview is requested
This is part of #204 and has the additional benefit that at least on macOS
the icon in the dock doesn't appear out of a sudden but only when the user
explicitly requested a preview.
2021-04-23 17:36:11 +02:00
Olivier Goffart
847f3b26e4 Hide internal type in auto-completions 2021-04-23 15:06:37 +02:00
Olivier Goffart
5f15c9b363 LSP: goto definition on a "PREVIEW" comment will show the preview 2021-04-23 14:45:48 +02:00
Simon Hausmann
a92a39ba92 Add docs for basic vim lsp integration
Code action support is still missing. In theory it seems it should be supported, but somehow it's not detected yet.
2021-04-23 10:44:21 +02:00
Olivier Goffart
f19af6b55c Fix the kate syntax highlighting
- The file must start witch `<?xml`
 - The priority must be more than the C priority becuase file starting with
   `/*` might get the C mime type
2021-04-23 09:16:53 +02:00
Olivier Goffart
f85657e65c Add a README for the LSP 2021-04-23 09:16:39 +02:00
Olivier Goffart
dc7a782fd5 LSP: don't advertize things we don't support 2021-04-22 20:15:07 +02:00
Olivier Goffart
0b5723bb47 Add definition for kate syntax highlighting
I did not know in which directory to put it, so i put it there for now
2021-04-22 20:15:07 +02:00
Simon Hausmann
4580953950 Try to fix the icon title on macOS
... by setting the bundle identifier
2021-04-22 08:47:42 +02:00
Olivier Goffart
b0685fe849 Updator: change logical_length to length 2021-04-21 17:44:53 +02:00
Olivier Goffart
91ed04a72c Make length (still the default for all property) be the logical length
And a new `physical_length` is now the physical_length unit

Note: this does not change the runtime part yet
2021-04-21 17:15:19 +02:00
Simon Hausmann
3b22baa5e2 Try to build the vs code extension binaries for macOS as bundles
Using cargo-bundle allows for the inclusion of the extension logo
as app icon and that subsequently replaces the generic "exec"
icon in the macOS dock with the extension logo.

Fixes #197
2021-04-21 17:02:14 +02:00
Simon Hausmann
e6d8f0c900 lsp: Provide a simple implementation of the color representation request
This allows conveniently picking colors through the color picker, for recognized
color literals.
2021-04-20 11:23:55 +02:00
Olivier Goffart
59654472d2 LSP: color providers 2021-04-18 23:27:14 +02:00
Olivier Goffart
63844a5907 LSP: auto-completion in paths
For import and @image
2021-04-18 15:16:12 +02:00
Olivier Goffart
3f3a4c4ec9 Store the actual property declaration node
so that the goto definition can go to the right location
2021-04-18 14:19:38 +02:00
Olivier Goffart
04f4428965 More snippet support 2021-04-18 13:30:04 +02:00
Olivier Goffart
80e92e3ed5 LSP: Use snippets for keyword completion 2021-04-18 13:14:41 +02:00
Olivier Goffart
1268844c40 LSP: keyword computation only need to be done at the element level 2021-04-18 12:39:19 +02:00
Olivier Goffart
41057c9e55 LSP: Goto definition in expressions 2021-04-17 12:50:47 +02:00
Olivier Goffart
a31b8f51d9 LSP: d-duplicate some code 2021-04-17 12:50:47 +02:00
Olivier Goffart
06f2223bb2 LSP: move code around 2021-04-17 12:50:47 +02:00
Olivier Goffart
a83449b630 LSP: type completion 2021-04-17 09:32:46 +02:00
Olivier Goffart
131f4d6682 LSP: Improvements on complete ergonomics 2021-04-17 08:57:42 +02:00
Olivier Goffart
b94ea38965 LSP: completion in second level of expressions 2021-04-17 08:31:17 +02:00
Olivier Goffart
3a167710b9 LSP: Have expression autocompletion in more contexts 2021-04-17 00:16:59 +02:00
Olivier Goffart
7d6bcc40be LSP: Use the recently refactored lookup system 2021-04-16 23:41:59 +02:00
Olivier Goffart
ad298a309f WIP: LSP autocompletion of expression 2021-04-16 23:41:59 +02:00
Olivier Goffart
deaaef8cd3 LSP Preview: detect if the component to preview is a Window
Then we don't need to wrap Window in Window
2021-04-16 11:34:21 +02:00
Olivier Goffart
5877e75f8f LSP: fix reloading a specific component 2021-04-16 11:34:21 +02:00
Olivier Goffart
dcedaad402 LSP: Use the same machanism to avoid re-compiling the preview more often than needed
Just use an atomic counter to count the number of pending event so that
there is at most one pending event at the time.
2021-04-16 11:34:21 +02:00