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
Olivier Goffart
546d4aa689
LSP: completion of property names in binding
...
If there is already a ':' or a '=>'
2021-04-16 11:34:21 +02:00
Olivier Goffart
fe14099af9
Go to definition of callback connection and two ways binding
2021-04-16 09:23:44 +02:00
Olivier Goffart
702b3fc67a
Jump to definition of a property
2021-04-16 08:59:33 +02:00
Olivier Goffart
4ce2929b34
LSP: Move the completion code to its own module
2021-04-16 07:59:16 +02:00
Olivier Goffart
bcce36385d
LSP: code action to preview a particular component
2021-04-15 18:55:57 +02:00
Olivier Goffart
31a830e66d
viewer: when watching, we also need to watch the main file
2021-04-15 15:05:09 +02:00
Olivier Goffart
0e69ac1036
LSP: Auto complete the class names
2021-04-14 19:19:51 +02:00
Olivier Goffart
a3d29c6ba0
LSP: Jump to definition when the cursor is in a import statement
2021-04-14 18:50:12 +02:00
Olivier Goffart
130cc22207
LSP: fix completion or go to symbol of the file url constains special characters
...
such as space or so.
We were not decoding the URL properly if the URL was encoded
2021-04-14 18:09:44 +02:00
Olivier Goffart
9ce63b80b9
VS extension: Add a status bar bar item with status of the preview
2021-04-14 15:01:25 +02:00
Olivier Goffart
84e0b24550
Some refactoring of the syntax_nodes module
...
Ensure that the node always contains the write kind by panicking
if it doesn't.
Add some documentation for the macro that declares them
2021-04-14 11:46:49 +02:00
Simon Hausmann
36cbe0b342
Fix build
...
Amends commit afe3df6381
These functions were removed and need to be re-added in a different way in the interpreter for async
loading/embedding later
2021-04-14 11:01:43 +02:00
Simon Hausmann
afe3df6381
Remove the public API for registering fonts by path or memory chunk
...
This is not needed anymore in the light of being able to write `import "blah.ttf"` in .60 markup
2021-04-14 10:01:33 +02:00
Olivier Goffart
7a65f31cc1
the source_file is not optional
2021-04-13 17:26:24 +02:00
Olivier Goffart
84501e630a
Rename SyntaxNodeWithSourceFile to SyntaxNode
...
Same for SyntaxToken
2021-04-13 17:10:56 +02:00
Olivier Goffart
5c795e7bab
Use SyntaxNodeWithSourceFile everywhere instead of SyntaxNode
2021-04-13 17:10:56 +02:00
Olivier Goffart
15298f5626
Add the --auto-reload option to the viewer
2021-04-13 13:55:01 +02:00