alefragnani / vscode-language-pascal

Pascal language extension for Visual Studio Code
MIT License
216 stars 47 forks source link

[BUG] - Installing on windows #133

Closed duzenko closed 1 year ago

duzenko commented 1 year ago

The doc says:

You have to install 4 tools: GNU Global 6.5 or higher (http://www.gnu.org/software/global/global.html)

Opening that link, then going to Downloads https://www.gnu.org/software/global/download.html For windows it gives an external link again

DOS and Windows 32 version are distributed by Jason Hood.

That link is dead So how do we get this working on Windows?

alefragnani commented 1 year ago

Hi @duzenko ,

Well, if the link is dead, I suggest you to try again later. Maybe it is a temporary issue. Otherwise, the extension won't work on Windows anymore, because it depends on these tools to work.

I'm not using Pascal/Delphi that much lately, so I'm not planning to build an LSP myself. But if you know another tool that could provide similar features, let me know. Depending on how similar they are, I could add support to it, or leave it open to someone open a PR to support it.

Hope this helps.

alefragnani commented 1 year ago

Just to let you know, I just tested download both tools and the URLs are up again.

I suggest you to download them and store the installers somewhere, so you could copy it instead of redownloading

Hope this helps

duzenko commented 1 year ago

@alefragnani Thanks, but why do we need them at all? I mean, it's enough to have a build task that calls fpc.exe and a launch configuration for gdb that starts the compiled program in debugging mode.

alefragnani commented 1 year ago

Hi @duzenko,

I didn’t use FreePascal that much but, AFAIK, fpc.exe is the compiler, not a parser or a language server. Which means, it is used to compile a Pascal program, but not to provide an interface for methods/functions and their references inside the source code, which is necessary for Code Navigation, like Go to Symbol, Go to Declaration, Go to References (https://github.com/alefragnani/vscode-language-pascal#code-navigation).

If you don’t need this feature, there is no need to install gtags nor global, and you can skip those steps.

Hope this helps

alefragnani commented 1 year ago

Otherwise, if you know some native FreePascal tool that does the same as the gtags/global combination, I would be happy to be aware of, and use it, at least for FreePascal users. A PR with such improvement would be welcome too.