Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Michael Van Canneyt
On Fri, 24 Apr 2020, Ryan Joseph via fpc-pascal wrote: On Apr 24, 2020, at 10:23 AM, Ryan Joseph wrote: Just tested on my language server and the problem is you provided a null error key, which is not in the protocol. I've never seen the fpjsonrpc unit before so I don't know where this

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Michael Van Canneyt
On Fri, 24 Apr 2020, Ryan Joseph via fpc-pascal wrote: OK, I just downloaded the laz sources and rebuilt from scratch (as usual) and it's building with the 3.3.1 now. I'm testing the server in Sublime Text and first thing I get is: LSP: invalid response payload {'id': 1, 'result':

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 24, 2020, at 10:23 AM, Ryan Joseph wrote: > > Just tested on my language server and the problem is you provided a null > error key, which is not in the protocol. > > I've never seen the fpjsonrpc unit before so I don't know where this got > inserted but it needs to be removed. I

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 24, 2020, at 9:52 AM, Ryan Joseph wrote: > > LSP: invalid response payload {'id': 1, 'result': {'capabilities': > {'completionProvider': {'triggerCharacters': None, 'allCommitCharacters': > None, 'resolveProvider': False}, 'textDocumentSync': {'openClose': True, > 'change': 1}}},

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
OK, I just downloaded the laz sources and rebuilt from scratch (as usual) and it's building with the 3.3.1 now. I'm testing the server in Sublime Text and first thing I get is: LSP: invalid response payload {'id': 1, 'result': {'capabilities': {'completionProvider': {'triggerCharacters':

[fpc-pascal] Debug-Adapter-Protocol support for fpDebug

2020-04-23 Thread Joost van der Sluis
Hi all, I didn't want to share this yet, but it is related to the Pascal Language Server so maybe some of you might be interested. I'm working on the support of the debug-adapter-protocol for fpDebug. It's quite easy to implement, as there already is a json-based tcp/ip interface.

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Christo Crause via fpc-pascal
On Thu, 23 Apr 2020, 21:43 Ryan Joseph via fpc-pascal, < fpc-pascal@lists.freepascal.org> wrote: > ok, did this and now getting: > > /Users/ryanjoseph/Developer/lazarus/components/lazdebuggergdbmi/gdbmidebugger.pp(63,16) > Fatal: (10022) Can't find unit PropEdits used by GDBMIDebugger > > svn up

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Sven Barth via fpc-pascal
Am 23.04.2020 um 16:28 schrieb Ryan Joseph via fpc-pascal: On Apr 23, 2020, at 9:11 PM, Arjan Adriaanse wrote: lazbuild --compiler=/usr/lib/fpc/3.2.0/ppcx64 pasls.lpi is there a macOS installer for 3.2? I found a link to a FTP server but I don't see this exists. Maybe fix that bug in trunk

Re: [fpc-pascal] Issues with svn?

2020-04-23 Thread Michael Van Canneyt
On Thu, 23 Apr 2020, Martin wrote: I suddenly start receiving errors: B:\FPC\SVN\build_fixes_3_2\fpcsrc Error running context: An existing connection was forcibly closed by the remote  host. B:\FPC\SVN\build_fixes_3_2\fpcdocs Unable to connect to a repository at URL  

[fpc-pascal] Issues with svn?

2020-04-23 Thread Martin
I suddenly start receiving errors: B:\FPC\SVN\build_fixes_3_2\fpcsrc Error running context: An existing connection was forcibly closed by the remote  host. B:\FPC\SVN\build_fixes_3_2\fpcdocs Unable to connect to a repository at URL  'https://svn.freepascal.org/svn/fpcdocs/trunk' Error running

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 10:07 PM, Mattias Gaertner via fpc-pascal > wrote: > > Please post the last couple of lines, e.g. starting at the last > ppcx64 call. > /bin/cp -f Makefile.compiled units/x86_64-darwin/nogui/IDEIntf.compiled /Applications/Xcode.app/Contents/Developer/usr/bin/make -C

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Mattias Gaertner via fpc-pascal
On Thu, 23 Apr 2020 21:54:58 +0700 Ryan Joseph via fpc-pascal wrote: > > On Apr 23, 2020, at 9:51 PM, Mattias Gaertner via fpc-pascal > > wrote: > > > > You have old ppu files. > > > > For example: > > make distclean all > > ok, did this and now getting: > >

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 9:51 PM, Mattias Gaertner via fpc-pascal > wrote: > > You have old ppu files. > > For example: > make distclean all ok, did this and now getting: /Users/ryanjoseph/Developer/lazarus/components/lazdebuggergdbmi/gdbmidebugger.pp(63,16) Fatal: (10022) Can't find unit

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Mattias Gaertner via fpc-pascal
On Thu, 23 Apr 2020 21:41:34 +0700 Ryan Joseph via fpc-pascal wrote: > I just tried update my lazarus sources using "svn up" and now I'm > getting another strange error when using lazbuild. > > /Users/ryanjoseph/Developer/lazarus/components/ideintf/ideintf.pas:11:3: > fatal: Can't find unit

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Nico Neumann via fpc-pascal
You also need to update your Lazarus version: https://github.com/graemeg/lazarus/commit/0bf882fb5b71fb3288ef5571998617fe8a5d3cd0 Am Do., 23. Apr. 2020 um 15:22 Uhr schrieb Ryan Joseph via fpc-pascal < fpc-pascal@lists.freepascal.org>: > > > > On Apr 23, 2020, at 9:11 PM, Arjan Adriaanse wrote:

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Arjan Adriaanse
Not sure about an installer for macOS, but you should be able to build FPC 3.2.0 from the source found here ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/source/ [1] using your older compiler. Also note that I use the latest Lazarus release 2.0.8, because older versions did not seem to build

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
I just tried update my lazarus sources using "svn up" and now I'm getting another strange error when using lazbuild. /Users/ryanjoseph/Developer/lazarus/components/ideintf/ideintf.pas:11:3: fatal: Can't find unit LazarusPackageIntf used by IDEIntf Do I need to do something else to get the

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 9:11 PM, Arjan Adriaanse wrote: > > lazbuild --compiler=/usr/lib/fpc/3.2.0/ppcx64 pasls.lpi is there a macOS installer for 3.2? I found a link to a FTP server but I don't see this exists. Maybe fix that bug in trunk is the better idea. My lazarus sources are old also

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 9:11 PM, Arjan Adriaanse wrote: > > The CodeToolBoss actually keeps a cache of files which are loaded at > the 'textDocument/didOpen' notification. When the user changes text at > the client side, even without saving, a 'textDocument/didChange' > notification is sent

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Mattias Gaertner via fpc-pascal
On Thu, 23 Apr 2020 20:45:58 +0700 Ryan Joseph via fpc-pascal wrote: > > On Apr 23, 2020, at 8:20 PM, Arjan Adriaanse > > wrote: > > > > Perhaps not all the used generics features are available yet in > > older FPC versions. I use the most recent release candidate from > >

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 9:11 PM, Mattias Gaertner via fpc-pascal > wrote: > > If LSP updates parser_test.pas, then codetools will notice. > > If LSP only sends changes, then you have to apply these changes to > codetools codebuffers: > Code.Insert/Delete/Replace/Move > > Modified codebuffers

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Arjan Adriaanse
On Thu, 23 Apr 2020 20:45:58 +0700 Ryan Joseph via fpc-pascal wrote: > > On Apr 23, 2020, at 8:20 PM, Arjan Adriaanse > > wrote: > > > > Perhaps not all the used generics features are available yet in > > older FPC versions. I use the most recent release candidate from > >

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Mattias Gaertner via fpc-pascal
On Thu, 23 Apr 2020 20:45:58 +0700 Ryan Joseph via fpc-pascal wrote: > > On Apr 23, 2020, at 8:20 PM, Arjan Adriaanse > > wrote: > > > > Perhaps not all the used generics features are available yet in > > older FPC versions. I use the most recent release candidate from > >

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 8:20 PM, Arjan Adriaanse wrote: > > Perhaps not all the used generics features are available yet in older > FPC versions. I use the most recent release candidate from > ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/ [2], but will > investigate if older versions also

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Arjan Adriaanse
On Thu, 23 Apr 2020 19:37:02 +0700 Ryan Joseph via fpc-pascal wrote: > You did a nice job structuring it I think and providing a template to > scale up from. What language(s) are you coming from and why did you > decide to make a language server for Pascal if you're not a Pascal > user? Just

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 6:29 PM, Arjan Adriaanse wrote: > > Also, any feedback on my existing code is welcome, especially since > this is my first Pascal project. You did a nice job structuring it I think and providing a template to scale up from. What language(s) are you coming from and why

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Michael Van Canneyt
On Thu, 23 Apr 2020, Sven Barth via fpc-pascal wrote: Arjan Adriaanse schrieb am Do., 23. Apr. 2020, 08:33: I am new to Pascal programming and since I like using Emacs, I wanted to try to improve its support for editing Pascal code. I decided to implement an LSP server which text editors

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Sven Barth via fpc-pascal
Arjan Adriaanse schrieb am Do., 23. Apr. 2020, 08:33: > I am new to Pascal programming and since I like using Emacs, I wanted > to try to improve its support for editing Pascal code. I decided to > implement an LSP server which text editors can use as back-end for > providing IDE features. The

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Arjan Adriaanse
Glad to know this is needed and thank you for your interest. I made some initial issues I could think of on the repository page at https://github.com/arjanadriaanse/pascal-language-server/issues [1]. Anyone is free to pick these up or create new issues, for example feature requests. Regardless

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Luca Olivetti
El 23/4/20 a les 10:05, Michael Van Canneyt ha escrit: Come to think of it, I suppose this is one more reason why 'modern' web development consists out of 1000-s of small files with essentially 1 function... To keep LSP happy :) Unless it's java, then every one of those 1000 files will be

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Michael Van Canneyt
On Thu, 23 Apr 2020, Mattias Gaertner via fpc-pascal wrote: Ryan Joseph via fpc-pascal hat am 23. April 2020 um 10:58 geschrieben: > On Apr 23, 2020, at 3:49 PM, Mattias Gaertner via fpc-pascal wrote: > > 3) Class/record member completions. > I guess you mean identifier completion

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Mattias Gaertner via fpc-pascal
> Ryan Joseph via fpc-pascal hat am 23. April > 2020 um 10:58 geschrieben: > > > > On Apr 23, 2020, at 3:49 PM, Mattias Gaertner via fpc-pascal > > wrote: > > > 3) Class/record member completions. > > I guess you mean identifier completion after a dot. > > Exactly. Fields or methods and

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 3:49 PM, Mattias Gaertner via fpc-pascal > wrote: > >> >> 3) Class/record member completions. > > I guess you mean identifier completion after a dot. Exactly. Fields or methods and helpers even if possible. I assume that exists. Btw, the names you're giving like

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Mattias Gaertner via fpc-pascal
> Ryan Joseph via fpc-pascal hat am 23. April > 2020 um 10:14 geschrieben: > > > > On Apr 23, 2020, at 3:00 PM, Michael Van Canneyt > > wrote: > > > > I think the decision to use the codetoolboss is the best, see above as to > > why. > > Very well. I assume the code tools parses the

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Michael Van Canneyt
On Thu, 23 Apr 2020, Ryan Joseph via fpc-pascal wrote: On Apr 23, 2020, at 3:00 PM, Michael Van Canneyt wrote: I think the decision to use the codetoolboss is the best, see above as to why. Very well. I assume the code tools parses the entire project and keeps the symbols in a

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 3:00 PM, Michael Van Canneyt > wrote: > > I think the decision to use the codetoolboss is the best, see above as to why. Very well. I assume the code tools parses the entire project and keeps the symbols in a database? That was something I was going to have to

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Michael Van Canneyt
On Thu, 23 Apr 2020, Ryan Joseph via fpc-pascal wrote: On Apr 23, 2020, at 2:08 PM, Michael Van Canneyt wrote: VSCode has omnipascal ? (The TMS Web core VS Code studio plugin uses this, and it seems pretty complete) yes it does but they don't support ObjFPC mode syntax very well which

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Michael Van Canneyt
On Thu, 23 Apr 2020, Ryan Joseph via fpc-pascal wrote: Arjan, I briefly skimmed over your code and it looks like instead of using the "DocParser" unit that I was using the parse the files, you're directly using the Lazarus "CodeToolBoss" which I don't have any experience with. I think it

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
Arjan, I briefly skimmed over your code and it looks like instead of using the "DocParser" unit that I was using the parse the files, you're directly using the Lazarus "CodeToolBoss" which I don't have any experience with. I think it was Michael actually who instructed me to use this parser but

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
> On Apr 23, 2020, at 2:08 PM, Michael Van Canneyt > wrote: > > VSCode has omnipascal ? > (The TMS Web core VS Code studio plugin uses this, and it seems pretty > complete) yes it does but they don't support ObjFPC mode syntax very well which means things like the "generic" keyword and "is

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Michael Van Canneyt
On Thu, 23 Apr 2020, Ryan Joseph via fpc-pascal wrote: yes! Pascal *badly* needs this to be productive outside of Lazarus. I use Sublime Text and frequently now VSCode but not having good code tools is getting painful. VSCode has omnipascal ? (The TMS Web core VS Code studio plugin uses

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Ryan Joseph via fpc-pascal
yes! Pascal *badly* needs this to be productive outside of Lazarus. I use Sublime Text and frequently now VSCode but not having good code tools is getting painful. In fact I already started a language server some months ago (and since been busy with out stuff) but I think you've made more

[fpc-pascal] Pascal Language Server

2020-04-23 Thread Arjan Adriaanse
I am new to Pascal programming and since I like using Emacs, I wanted to try to improve its support for editing Pascal code. I decided to implement an LSP server which text editors can use as back-end for providing IDE features. The server is implemented in Free Pascal and uses the CodeTools