4280 Commits

Author SHA1 Message Date
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
99a0ead1af Do not duplicate tooltip messages
Avoid duplicating messages when several different
information are displayed on the same editor
line (e.g: a message + an action).

For eng/ide/gnatstudio#614
2026-01-20 15:49:02 +00:00
Andry Ogorodnik
fb878cbe58 Fix the source view's side area tooltip flipping
For this tooltip we did not set an area where the cursor is
allowed to move without redrawing the tooltip. This led to
hiding/showing it constantly on each mouse micro movement.
This flipping can be seen by the user on a slow system or
a remote setup.

For eng/ide/gnatstudio#598
2026-01-15 12:40:45 +02: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
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
720b78a283 Revamp Do_Not_Move_Cursor
- Change the type to Integer to refcount it when its frozen
  multiple times.
- Update the documentation: the cursor can move but we are not
  emitting cursor movements notifications.
- Remove LSP pref, disabling it is only slowing the process
2025-11-28 16:34:13 +00: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
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
Anthony Leonardo Gracio
e27b1e09b2 Revert formatters to 'Legacy' for Ada
This is a bit too soon to enable LSP formatting
by default: a few issues have been identified, and
we need to fix them before making it the default.

For eng/ide/gnatstudio#138
2025-10-14 14:14:41 +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
Boulanger
37eb00104c Add defensive code
Closes eng/ide/gnatstudio#573
2025-09-16 15:50:14 +02:00
Boulanger
881e0a68f7 Use GNATformat by default
Enable LSP as the Ada formatting provider by default

Closes eng/ide/gnatstudio#139
2025-09-08 17:28:30 +02:00
Boulanger
945f40c471 Completion Module triggered indentation twice
RangeFormatting and OnTypeFormatting were triggered together
when pressing Enter while the Completion Window was opened.

Add a test

Closes eng/ide/gnatstudio#570
2025-09-04 15:00:01 +00:00
Andry Ogorodnik
0ac2f38d9f Do not duplicate source buffer when file is renamed
For eng/ide/gnatstudio#354
2025-09-02 08:47:19 +00:00
Anthony Leonardo Gracio
eeb160bd2f Display pulse bar on editors when formatting
For eng/ide/gnatstudio#566
2025-08-11 15:30:46 +00:00
Boulanger
c58d7de73c Allow the cursor to move by default
Add a test

Closes eng/ide/gnatstudio#565
2025-08-05 17:52:36 +02:00
Boulanger
5a2fc753f3 Add defensive code for Loc_Changed after closing an editor
Closes eng/ide/gnatstudio#556
2025-07-09 10:27:01 +00:00
Boulanger
3894119c61 Revamp Formatting Preferences
Create preferences for each languages using LSP.
Use by default the old engine for non-lsp language.
Remove Use-GNATFormat preference, we don't want to support
gnatpp anymore so it should be the default.
Move all the legacies Ada formatting preferences to Advanced:
keep them for now because we are still using the Legacy engine
by default.

Fix limit LSP span to filter Changes and not the Minimal Changes.

Adapt tests to the new preferences.

Closes eng/ide/gnatstudio#548
2025-06-04 13:53:25 +00:00
Boulanger
825e56a6bb Fix regressions.
It was using the wrong New_Location function (the one creating
a location from an offset and not a Line...)

For eng/ide/gnatstudio#522
2025-05-22 12:39:41 +00:00
Boulanger
8896c0f55b Second Pass
Move logic in Src_Editor_Module and Src_Editor_Buffer
Change Choice_Preference to use VSS
Remove the use of String_List_Access
Explictly allow to set a default value
2025-05-15 17:40:24 +02:00