36 lines
1.1 KiB
Markdown
36 lines
1.1 KiB
Markdown
---
|
||
title: "LSIF"
|
||
type: entity
|
||
tags: [code-intelligence, index-format, exchange]
|
||
sources: [lsp-index-engineer]
|
||
last_updated: 2026-04-25
|
||
---
|
||
|
||
## Definition
|
||
|
||
LSIF(Language Server Index Format)是一种预计算语义数据的标准化交换格式,允许在不运行语言服务器的情况下直接加载代码索引数据。
|
||
|
||
## Purpose
|
||
|
||
LSIF 解决了以下问题:
|
||
- 语言服务器启动慢 → 直接加载预计算索引
|
||
- 协作场景 → 团队成员共享索引而非各自运行 LSP
|
||
- CI/CD → 在流水线中预先生成索引
|
||
- 跨平台 → 不同编辑器共享同一索引源
|
||
|
||
## Usage in LSP/Index Engineer
|
||
|
||
LSP/Index Engineer 的语义索引基础设施支持 LSIF 导入/导出:
|
||
- 导入:加载预先生成的 LSIF 数据,零延迟启动
|
||
- 导出:将 nav.index.jsonl 数据导出为 LSIF 格式
|
||
|
||
## Relationship to nav.index.jsonl
|
||
|
||
LSIF 和 nav.index.jsonl 相互补充:
|
||
- LSIF:用于交换和分发的标准化格式
|
||
- nav.index.jsonl:LSP/Index Engineer 的内部流式索引格式
|
||
|
||
## Aliases
|
||
- Language Server Index Format
|
||
- LSIF
|