Recent

Author Topic: IDE In-Source Configuration  (Read 873 times)

ALLIGATOR

  • Full Member
  • ***
  • Posts: 152
IDE In-Source Configuration
« on: March 29, 2025, 08:05:24 am »
Hello, Lazarus has the ability to customize user-defined markup settings

And these settings are for the whole IDE on a given installation, I suggest to think about such a solution (necessity, format, possibilities), that some IDE parameters can be set in the source code of a file, i.e. the settings can be individual for each file, not for the whole IDE. They can be defined in the header of the source code in a comment of the form:
Code: Pascal  [Select][+][-]
  1. {lazarus_config: “pattern”: bg:#AABBCC fg:#00FF00}

Or another possible, option to allow these settings to be stored in a .lpr, .lps, .lpi file
To allow portability between different IDE installations

This is just a suggestion to think about what might be useful from such individual parameter customization (via project files, or source files), as opposed to centralized (via IDE)

Maybe someone has additional ideas, or ideas why this is not a good way to do it
All options are welcome!

TRon

  • Hero Member
  • *****
  • Posts: 4351
Re: IDE In-Source Configuration
« Reply #1 on: March 29, 2025, 02:43:37 pm »
I think it is a bad idea  :)

Reason, because it sounds like a programmer who is lazy not wanting to build things at runtime but rather at design-time and then requires a patch to be able to manipulate things as an afterthought.

At least, the message in your post sounded to me that way.

Would you be able to provide a practical example of what you have in mind that is currently not possible or difficult to accomplish with current available functionality, e.g. what would be the benefit of such a feature.
« Last Edit: March 29, 2025, 02:58:57 pm by TRon »
Today is tomorrow's yesterday.

ALLIGATOR

  • Full Member
  • ***
  • Posts: 152
Re: IDE In-Source Configuration
« Reply #2 on: March 29, 2025, 04:01:35 pm »

I'm not quite sure what the programmer's laziness has to do with it, and also the runtime job 💁‍♂️

very simple example

customize a user-defined syntax highlighting, and then port it to another Lazarus installation, e.g. via git

I don't really need it, I suggested it as a follow-up to this issue:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40881#note_2421412634

but perhaps the collective mind will come up with some more useful examples of application, I am not an advocate for either side in this matter, I just brought it up for discussion

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11137
  • Debugger - SynEdit - and more
    • wiki
Re: IDE In-Source Configuration
« Reply #3 on: March 30, 2025, 11:15:33 am »
Putting those into the source code is not gonna happen.

Project settings wouldn't be completely impossible... though they would need to be stripped of keyboard settings.
And they still pose the issue, that if someone opens a downloaded source they don't want a color flood to happen.
 
And there would be a problem, if the file gets opened in an IDE with a diff color scheme (dark vs light). Then any such "in source color" would look terrible.

So basically this is only for a single person to sync between 2 IDE setups.




IMHO a better way would be to have

1) Import/export of the global settings. So you can have them on all your IDE synced

2) for words added via keyboard, store them in the session (optional)
Then you wouldn't edit the list in the global settings but instead add via key combo (there are some other limits by that..)

However, unlikely to happen soon

 

TinyPortal © 2005-2018