[fpc-pascal] Pascal Language Server

Michael Van Canneyt michael at freepascal.org
Tue Apr 28 14:47:09 CEST 2020



On Tue, 28 Apr 2020, Ryan Joseph via fpc-pascal wrote:

>
>
>> On Apr 28, 2020, at 4:04 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
>> 
>> You can do what most VSCode/Atom project managers seem to, add package.json
>> or somesuch:
>> 
>> {
>>  "pascal-lsp" : {
>>    "projectfile" : "yourproject.pas",
>>    "searchpath" : ["a","b"]
>>  }
>> }
>
>
> Yes, that's what the plugin for Sublime Text does also. Users will have to provide a "initializationOptions" to the language server which contains extra information. It would also be possible to add a lazarus project file and get the options from there but I'll let a lazarus user implement that later.
>
> Here's what I have now from a ST project file (which is plain JSON):
>
> "settings":
> 	{
> 		"LSP":
> 		{
> 			"pascal-language-server":
> 			{
> 				"enabled": true,
> 				"initializationOptions":
> 				{
> 					"FPCOptions": [
> 						"-Fu./sources"
> 					],
> 					"program": "./Main.pas"
> 				}
> 			}
> 		},
> ....

Great !

Incredibly looking forward to test-driving this in Atom...  :-)

Michael.


More information about the fpc-pascal mailing list