Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Broaden the config file search to include an fpcupdeluxe install. #83

Open
gcarreno opened this issue Dec 30, 2023 · 15 comments

Comments

@gcarreno
Copy link
Contributor

Hey Ryan(@genericptr),

When I finally came around to test this, since I'm now using Sublime-Text, I saw some issues.
The double / and the read errors I've addressed in #82.

But there's another thing I've noticed: It expects some config files to be in places that only a system wide install will put them.

Since I've been a long term fpcupdeluxe user, those config files are not there.
I, kinda, solved the issue with ln -s, soft links, but this is a bit annoying.

Could you consider broadening the config file search to include an fpcupdeluxe config folder?
With an fpcupdeluxe install, both the files you're looking for are in InstallFolder/config_lazarus.

With an fpcupdeluxe install, these are the relevant paths:

  • Compiler: InstallFolder/fpc/bin/<CPU>-<OS>/ppc*
  • Compiler Source: InstallFolder/fpcsrc
  • Lazarus binary and source: InstallFolder/lazarus
  • Most *.xml configs: InstallFolder/config_lazarus

Thank you very much in advance!!

Cheers,
Gus

@genericptr
Copy link
Owner

I'm not a Lazarus user so I don't have any useful feedback here. Searching more places seems smart to me but there may be unintended consequences I'm not aware of. What does @mvancanneyt think?

@gcarreno
Copy link
Contributor Author

Hey Ryan(@genericptr),

Those are indeed good and relevant points.

I think the only thing I can say is that, since fpcupdeluxe's thing is to have it all contained in a single folder, if we pass the "root" folder of said install, then the server should kinda be smart enough to get at it.

One thing would be to look for the very telling config_lazarus folder on the "root" folder.
Then from there, assume an fpcupdeluxe install, opposite a system wide install.

So, Michaël(@mvancanneyt), what's your take on this?

Cheers,
Gus

@mvancanneyt
Copy link
Collaborator

There is no telling where fpcupdeluxe installs a lazarus. So you need to pass it on from the client.

And if we're going to have to pass folder locations anyway, then we better pass on the lazarus config folder directly.
There is then no need to guess.

@gcarreno
Copy link
Contributor Author

Hey Michaël(@mvancanneyt),

And if we're going to have to pass folder locations anyway, then we better pass on the lazarus config folder directly.

Yes, absolutely, this makes tremendous sense.

My main gripe is that I'm completely unfamiliar with the current asked folders.

Could you please elaborate unto that? Many thanks !!

Cheers,
Gus

@mvancanneyt
Copy link
Collaborator

This article for Blaise Magazine hopefully will answer your question https://www.freepascal.org/~michael/articles/index.html#lazinvscode

If not, I'll try to elaborate....

@gcarreno
Copy link
Contributor Author

gcarreno commented Dec 31, 2023

Hey Michaël(@mvancanneyt),

I'll read that article!! Thanks !!

I'm testing it under Sublime-Text, installed via snap.
How far is the experience from VSCode?

Cheers,
Gus

@gcarreno
Copy link
Contributor Author

gcarreno commented Dec 31, 2023

Hey Michaël(@mvancanneyt),

I read the article.
For one, it's quite VSCode centric, so I'm not sure what to think about Sublime-Text.

It doesn't mention the /etc/pasls.cfg file, neither it's structure, or if it overrides or is over-ridden by the values on Sublime's LSP plugin configuration.
I actually added one to my system and deduced the INI values from code.
But I'm not even sure it's making any difference...

Then there's this on the README.md for the sublime config:

"syntaxes": [
    "Packages/FPC/FPC.sublime-syntax"
]

which points to a file that is not explained where to get it.

I have many confusing questions about all of the above, and maybe some more will arise.

Cheers,
Gus

@mvancanneyt
Copy link
Collaborator

I don't use and don't know sublime text, so I cannot write about it. If you have questions about that part, Ryan will need to answer it, he is using Sublime Text.

VS Code is used most of all these days, but more importantly, it is the editor that introduced the language protocol.
As such, it is to be expected that the article focuses on that.

@genericptr
Copy link
Owner

Then there's this on the README.md for the sublime config:

"syntaxes": [
    "Packages/FPC/FPC.sublime-syntax"
]

which points to a file that is not explained where to get it.

This seems like a mistake by me. Can you delete that line? That's my own syntax package which shouldn't be relevant. It may get sent the LSP package and used in some way though but I'm not sure.

@gcarreno
Copy link
Contributor Author

Hey Michaël(@mvancanneyt),

I understand the meaning of VSCode, and it's importance.

But you didn't answer my question about /etc/pasls.cfg importance in the hierarchy of acceptance of config.

Does it supersede the stuff on the LSP env section, of does that section take precedence?

Cheers,
Gus

@gcarreno
Copy link
Contributor Author

Hey Ryan(@genericptr),

Okydokes, I'll delete that. Thanks!!

Can you also edit the README.md, please?

Many thanks!!

Cheers,
Gus

@mvancanneyt
Copy link
Collaborator

Hey Michaël(@mvancanneyt),

I understand the meaning of VSCode, and it's importance.

But you didn't answer my question about /etc/pasls.cfg importance in the hierarchy of acceptance of config.

Does it supersede the stuff on the LSP env section, of does that section take precedence?

Cheers, Gus

The ENV section takes precedence.
The config file is in general only needed if you wish to use the proxy server, to specify the port.
It is recommended to use the configuration possibilities of VSCode (or Sublime Text or whatever editor is used as client)

@gcarreno
Copy link
Contributor Author

Hey Michaël(@mvancanneyt),

Okidokes, gotcha!!

I'll delete my /etc/pasls.cfg then, since I'm not using the proxy.

I'll report more about the functionality on another issue, since I don't have hover working and the context menu, that in the zig LSP is filled, contains no items in the pasls.

But getting back to the original issue topic, is it hard to get the fpcupdeluxe install thing implemented?

Cheers,
Gus

@mvancanneyt
Copy link
Collaborator

if you mean add a 'lazarus config directory' config option: no, it should not be difficult.

@gcarreno
Copy link
Contributor Author

gcarreno commented Jan 1, 2024

Hey Michaël(@mvancanneyt),

if you mean add a 'lazarus config directory' config option: no, it should not be difficult.

That's awesome to read !!
Thanks!!

If I feel up to it, I'll probably dig into the code and offer a PR. 🫂

Cheers,
Gus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants