> Ryan Joseph via fpc-pascal <fpc-pascal@lists.freepascal.org> hat am 23. April 
> 2020 um 10:14 geschrieben:
> 
> 
> > On Apr 23, 2020, at 3:00 PM, Michael Van Canneyt <mich...@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.

These parsers are optimized for different purposes.
fcl-passrc is for parsing like a compiler. It parses everything everytime and 
has neither functions to alter code nor code completion.
codetools is for parsing only needed unit interfaces/implementations and when a 
file changes, parse only things that have changed. And it provides many code 
completions. 


> 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.

IdentifierCompletion


> 2) Function parameter completions.

FindCodeContext
see lazarus/ide/codecontextform.pas for an example.


> 3) Class/record member completions.

I guess you mean identifier completion after a dot.
 
> 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.

FindReferences

 
> 5) Go to definition/declaration in workspace.

FindDeclaration
 
> 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.

What do you mean with "context"? Codetools can give you all kind of context.

Mattias
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to