8363 Commits

Author SHA1 Message Date
Andry Ogorodnik
f1e7229594 Enable LSP highlighting by default
Disable LSP semantic tooltips by default

(no-tn-check)
2026-02-12 16:13:23 +02:00
Andry Ogorodnik
0815e2bb06 Fixes for LSP semantic highlighting:
Tacking in account the document version when applying highlighting
 to prevent applying old info to the changed document.

Fixed full/range request. Now we send a range request on
 document changes.

GPS.Style expanded. Added underline, underline color,
 strikethrough, strikethrough color with Python API suppotr

Styles now support hierarchical updating, so some properties
 can be changed in a parent style and it will be applied to
 all children except the overriden explicitly.

Implemented support for LSP styles in TextMate themes and
 all styles can be adjusted there.

 Added default styles for LSP similar to VS Code

For eng/ide/gnatstudio#618
2026-02-09 17:10:45 +02:00
Anthony Leonardo Gracio
c5aee67fa6 Apply 1 suggestion(s) to 1 file(s) 2026-02-04 14:37:39 +00:00
Anthony Leonardo Gracio
6b2e535de8 Apply 1 suggestion(s) to 1 file(s) 2026-02-04 14:37:36 +00:00
Andry Ogorodnik
bb9a633eef Semantic (highlighting) inspector
Shows semanic tokens and modifiers in the editor tooltip.
Added "LSP-Semantic-Highlighting-Tooltip" preference to turn
it on/off. By default - disabled.

For eng/ide/gnatstudio#617
2026-01-27 18:55:37 +02:00
Eric Botcazou
c04c096013 Fix freezing issues coming from expression functions
The upcoming compiler change trades spurious errors (reject-valid bugfixes)
for valid errors (accept-invalid bugfixes), and now flags a few problematic
constructs in the codebase:

gps-editors.ads:1291:04: error: deferred constant "Nil_Editor_Mark" is frozen before completion
gps-editors.ads:1291:04: error: because expression of function "Create_Mark" is frozen here
gps-editors.ads:1291:04: error: as a primitive operation of type "Dummy_Editor_Location" frozen here
gps-editors.ads:1291:04: error: expression function "Create_Mark" is declared at line 1230
gps-editors.ads:1326:04: error: full constant declaration appears too late
gps-editors.ads:1587:04: error: deferred constant "Nil_Editor_Cursor" is frozen before completion
gps-editors.ads:1587:04: error: because expression of function "Get_Main_Cursor" is frozen here
gps-editors.ads:1587:04: error: as a primitive operation of type "Dummy_Editor_Buffer" frozen here
gps-editors.ads:1587:04: error: expression function "Get_Main_Cursor" is declared at line 1341
gps-editors.ads:1672:04: error: full constant declaration appears too late

language-abstract_language_tree.ads:503:04: error: deferred constant "No_Semantic_Node_Array" is frozen before completion
language-abstract_language_tree.ads:503:04: error: because expression of function "Children" is frozen here
language-abstract_language_tree.ads:503:04: error: as a primitive operation of type "Dummy_Semantic_Node" frozen here
language-abstract_language_tree.ads:503:04: error: expression function "Children" is declared at line 410
language-abstract_language_tree.ads:506:04: error: deferred constant "No_Semantic_Node_Array" is frozen before completion
language-abstract_language_tree.ads:506:04: error: because expression of function "Root_Nodes" is frozen here
language-abstract_language_tree.ads:506:04: error: as a primitive operation of type "Dummy_Semantic_Tree" frozen here
language-abstract_language_tree.ads:506:04: error: expression function "Root_Nodes" is declared at line 477
language-abstract_language_tree.ads:509:04: error: full constant declaration appears too late

xref.ads:367:13: error: this primitive operation is declared too late
xref.ads:371:13: error: this primitive operation is declared too late
[...]

There is a chicken-and-egg issue in language-abstract_language_tree.ads,
whereby the completions of the constants at the end of the file freeze
each other, so there is no legal declaration order for the completions.
Therefore one of them is turned into a function (which is completed by
an expression function) to break the circularity.

Issue: eng/toolchain/gnat#1701
2026-01-17 11:36:22 +01:00
Anthony Leonardo Gracio
9e9d2e4b17 Enable LSP Semantic Highlighting by default
For eng/ide/gnatstudio#604
2026-01-16 10:36:24 +00:00
Anthony Leonardo Gracio
8f25481cd7 Remove unused packages
For eng/ide/gnatstudio#589
2026-01-06 15:12:21 +00:00
Anthony Leonardo Gracio
ba22917f46 Auto reload project when modyfying them through GS
Add a preference to control that.

For eng/ide/gnatstudio#608
2026-01-05 15:26:57 +00:00
Anthony Leonardo Gracio
11672bc929 Update copyright year for GS sources
(no-issue-check)
2026-01-05 12:41:13 +00:00
Vadim Godunko
a22776ea98 Fix build after bump. 2025-12-22 18:39:46 +04:00
Anthony Leonardo Gracio
c0e304c1de Rename label of the LSP semantic highlighting preference
And use a boolean preference instead of enumerated values.

For eng/ide/gnatstudio#603
2025-12-11 11:05:27 +00:00
Anthony Leonardo Gracio
f2859d32d2 Remove LAL-based preferences
All these preferences and their implementation were implemented
before the LSP, and they are all disabled by default.

LAL-based features such as semantic highlighting, block folding are
now implemented in the ALS.

For eng/ide/gnatstudio#603
2025-12-11 11:05:27 +00:00
Boulanger
5e8019e7ce Update LSP formatting preferences
- Enable limit format by default
- Change the name of fallback mechanism and hide its preference

For eng/ide/ada_language_server#1729
2025-11-28 17:35:32 +01:00
Boulanger
6180cd36b7 Improve TextEdits performance
- Merge the concept of Avoid_Move_Cursor and Freeze_Cursor.
- Compute minimal edits only if for the TextEdits affecting a
cursor
- Freeze the cursor when applying TextEdits
- Fix condition in completion window where we are deleting the
window and then trying to access it.
- Fix wrong preference name in test (it was the same by default
for C++)

Closes eng/ide/gnatstudio#582
2025-11-28 16:34:13 +00:00
Maxim Reznik
fb93dbd4b4 Prevent Studio from intercepting Home/End key
presses in the console, so that the presses are passed on to the process
(such as bash) and processed correctly.
2025-11-19 13:58:00 +00:00
Javier Miranda
99e12a13fe Fix sources after enforcing RM 8.6(27.1) in the compiler
* browsers-canvas.adb (Highlight_Related_Items): Add explicit type conversion.
* browsers-dependency_items.adb (Set_Dependency_Browser_Provider): ditto.
* browsers-entities.adb (Add_Type): ditto.
* browsers-scripts.adb (On_Edited): ditto.
  (Diagram_Handler): ditto.
  (Item_Handler): ditto.
* gnathub-metrics.adb (Register_Listener): ditto.
  (Unregister_Listener): ditto.
* find_utils.adb (Initialize): ditto.
* learn.adb (Unregister_Listener): ditto.

For eng/toolchain/gnat#1292
2025-10-29 12:04:05 +00:00
Vadim Godunko
ddaf165b0d Replace concatenation by formatter. 2025-10-23 17:14:18 +00:00
Vadim Godunko
3e23d57226 Change type of New_Location that accept character offset. 2025-10-23 16:17:26 +00:00
Vadim Godunko
aae46c2f00 Use Editable_Line_Type in New_Location_At_Line 2025-10-23 16:17:26 +00:00
Andry Ogorodnik
ff3ad3ea0c Highlighting global/local variables based on LSP
For eng/ide/gnatstudio#389
2025-10-23 15:18:21 +00:00
Vadim Godunko
92ad15b8b1 Remove Project Properties from GNAT Studio
This is needed in order to prepare the transition to GPR2.

Project edition should be done by editing the .gpr files now, with
the help of the Ada Language Server.

Documentation and comments have been updated accordingly and tests
checking the Project Properties GUI have been removed.

For eng/ide/gnatstudio#569
2025-10-23 10:17:57 +00:00
Anthony Leonardo Gracio
5ab352789b Set onTypeFormatting to 'Indent' by default
Since formatting of the previous block still has some
issues on the ALS side.

For eng/ide/gnatstudio#138
2025-10-13 13:25:59 +00:00
Boulanger
29cb78a858 Add preference for new fallback formatter setting
Fix limit formatting condition

Fix Get_Iter_At_Screen_Position defaulting to the first Iter
when trying to get the last iter (this happens when a buffer
doesn't have EOF)

Fix Before_Delete_Text invalid conversions between Line_Offset
and Visible_Columns (missing tab expansions).

Improve IndentOnly string comparison

Add tests

Depends-On: eng/ide/ada_language_server!2116

For eng/ide/ada_language_server#1713
2025-10-09 10:44:26 +02:00
Vadim Godunko
8b2df195bb Improve LSP position to GS location conversion 2025-10-07 08:39:29 +04:00