Skip to content

Language Server Indexing Format (LSIF) generator for .net

License

Notifications You must be signed in to change notification settings

tcz717/LsifDotnet

Repository files navigation

LsifDotnet .NET 6.0NugetNugetGitHub all releases

Visit https://lsif.dev/ to learn about LSIF.

Example scenario: Sourcegraph precise code intelligence (lsif-dotnet repo)

Only tested in win platform and don't support VisualBasic yet.

Implmented LSIF data:

  • textDocument/hover
  • textDocument/references
  • textDocument/definition
  • moniker

Requirement

Installed .net 6.0

Install via nuget

Package Home

dotnet tool install --global LsifDotnet 
dotnet lsif

Usage

PS C:\Downloads\lsif-dotnet-win-0.0.1-beta6\win> .\lsif-dotnet.exe -h
Description:
  An indexer that dumps lsif information from dotnet solution.

Usage:
  lsif-dotnet [<SolutionFile>] [options]

Arguments:
  <SolutionFile>  The solution to be indexed. Default is the only solution file in the current folder.

Options:
  -o, --output <output>                The lsif dump output file. [default: dump.lsif]
  -d, --dot                            Dump graphviz dot file.
  -s, --svg                            Dump graph svg file. (by quickchart.io/graphviz API)
  -c, --culture <culture>              The culture used to show hover info. [default: zh-CN]
  -q, --quiet                          Be more quiet
  -p, --parallelism <parallelism>      How many hover content generation tasks can be handled at the same time. When
                                       unset or set to 0, use legacy indexer, relative slow but need less memory.
  -i, --index <index>                  The start index of lsif items. Use a different file when concatenating other
                                       lsif files.
  -e, --excludedFiles <excludedFiles>  Absolute paths of the files to be excluded in the output,this can be either a
                                       source code file or a project file
  --version                            Show version information
  -?, -h, --help                       Show help and usage information

Dump a solution's lsif file

Goto the folder of the solution file and run:

 .\lsif-dotnet.exe

And a dump.lsif file will be created in the current folder.

Download:

Github Release: https://github.com/tcz717/LsifDotnet/releases

Next

  • Formated logging
  • Linux/OSX verfication
  • Unit tests
  • VB support
  • nuget information extraction
  • More lsif features