[fpc-pascal] Pascal Language Server
genericptr at gmail.com
Thu Apr 23 10:14:20 CEST 2020
> On Apr 23, 2020, at 3:00 PM, Michael Van Canneyt <michael at freepascal.org> 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 implement myself so it's good to not have to now.
I'm using the parser with "TPasElement" so I think that's fcl-passrc. It's a shame to have so many competing parsers but yours looked really solid to me.
Here the basics which code tools needs needs to provide:
1) Basic identifier completions like function, class, types names etc... these should be scope sensitive based on the document offset we receive from LSP.
2) Function parameter completions.
3) Class/record member completions.
4) Identifier references, i.e return all locations "DoThis" was called in the current workspace. (Workspace is the LSP term for the project). Code tools thus needs to parse all files in the workspace upon initialization.
5) Go to definition/declaration in workspace.
I would like to implement "code lens" which shows the context of a symbol in a popup window but I think only VScode supports this feature and it's no common so code tools may not be able to retrieve.
More information about the fpc-pascal