Commit graph

26 commits

Author SHA1 Message Date
James Westman
860580e560
completions: Add object value completions
For object properties, add completions for named objects in the
blueprint and for matching classes in imported namespaces. Also add null
and bind.
2025-05-03 08:27:29 -05:00
James Westman
64b96137f5
completions: Add completer for import statements 2025-05-03 08:27:29 -05:00
James Westman
f5cef37db8
completions: Add translation-domain completer 2025-05-03 08:27:28 -05:00
James Westman
3d0593bc2b
completions: Complete available namespaces
Add completions for namespaces in the typelib path that can be imported.
Accepting the completion automatically adds an import statement.
2025-05-03 08:27:28 -05:00
James Westman
bf4d8579b6
lsp: Fix completions when editing existing item
Many completion snippets insert more than just the name. For example,
the object completer inserts the braces and places your cursor inside
them automatically, to save some typing. However, if you're changing the
class of an existing object, this isn't what you want. Changed so that
if the next token is '{', only the name is inserted.

Made similar changes to the property and signal completers.
2025-05-03 08:27:28 -05:00
James Westman
8c6f8760f7 language: Add expression literals
Add expression literals, so you can set properties of type
Gtk.Expression.
2025-01-04 17:09:57 +00:00
James Westman
9b9fab832b
Add tests, remove unused code, fix bugs
- Added tests for more error messages
- Test the "go to reference" feature at every character index of every
test case
- Delete unused code and imports
- Fix some bugs I found along the way
2024-12-22 18:00:39 -06:00
James Westman
5b0f662478
completions: Detect translatable properties
Looked through the Gtk documentation (and a few other libraries) to make
a list of all the properties that should probably be translated. If a
property is on the list, the language server will mark it as translated
in completions.
2024-12-21 17:47:36 -06:00
James Westman
22514b96dc completions: Fix invalid escape sequence 2024-07-29 17:36:41 -05:00
Sonny Piers
896dd7f824 fix linter 2024-07-04 22:07:02 +00:00
Sonny Piers
b76f4eef50 lsp: Use snippet for object completion 2024-07-04 22:07:02 +00:00
Sonny Piers
8c102cf9dc lsp: Fix syntax for signal completion 2024-07-04 22:07:02 +00:00
Sonny Piers
a075b26769 lsp: Extend completion documentation 2024-07-04 22:07:02 +00:00
z00000000z
bcac788456 completions: property_completer improvements 2023-08-23 16:21:37 +00:00
Ivan Kalinin
582502c1b4 completions: fix property value completion 2023-08-13 10:42:03 +03:00
James Westman
56274d7c1f completions: Fix signal completion 2023-07-25 18:54:58 -05:00
gregorni
3730e2e726 Add isort to CI and run on files 2023-07-09 14:26:37 +00:00
James Westman
a9f6bf8d89 Remove unused imports and code 2023-05-06 15:30:18 -05:00
James Westman
88f5b4f1c7
Fix template types 2023-04-08 20:10:16 -05:00
James Westman
2033bd9e16
types: Add UncheckedType
This allows us to remember information about an external type, such as
its name, while still marking it as unchecked.
2022-12-25 14:04:36 -06:00
James Westman
8fee46ec68
Format using black 2022-12-19 11:52:59 -06:00
James Westman
0a0389b1f8
grammar: Create an AST node for type names 2022-07-09 16:05:10 -05:00
James Westman
93f2a27e35
completions: Add Gtk class completions
Fixes #49
2022-03-12 18:00:01 -06:00
James Westman
cb35acad17 Fix mypy issues 2022-01-28 14:07:29 -06:00
James Westman
ee5f32622f reorganization: Finish moving parsing and AST 2022-01-26 22:37:51 -06:00
James Westman
544d152fb6
Rename to blueprint-compiler
This isn't an official GTK project so better to avoid using "GTK" in the
name.
2021-12-01 15:35:58 -06:00
Renamed from gtkblueprinttool/completions.py (Browse further)