Oh My ClaudeCode
Tools

LSP

Language Server Protocol을 통한 코드 인텔리전스 도구 12종

개요

LSP 도구는 Language Server Protocol 기반 코드 인텔리전스입니다. 타입 정보, 정의 이동, 참조 찾기, 에러 진단, 심볼 검색, 리네이밍을 할 수 있습니다.

언어 서버가 설치되어 있어야 합니다 (typescript-language-server, pylsp, rust-analyzer, gopls 등). lsp_servers로 설치 상태를 확인할 수 있습니다.

도구 목록

lsp_hover

지정한 위치의 타입 정보와 문서를 반환합니다.

lsp_hover(file="src/auth.ts", line=42, character=10)

lsp_goto_definition

심볼의 정의 위치로 이동합니다.

lsp_goto_definition(file="src/auth.ts", line=42, character=10)

lsp_find_references

심볼의 모든 사용 위치를 찾습니다.

lsp_find_references(file="src/auth.ts", line=42, character=10)

lsp_document_symbols

파일의 구조 개요 (함수, 클래스, 인터페이스 등)를 반환합니다.

lsp_document_symbols(file="src/auth.ts")

lsp_workspace_symbols

워크스페이스 전체에서 심볼을 검색합니다.

lsp_workspace_symbols(query="UserConfig")

lsp_diagnostics

파일의 에러, 경고, 힌트를 반환합니다.

lsp_diagnostics(file="src/auth.ts")

코드 변경 후 타입 에러를 즉시 확인하는 데 유용합니다.

lsp_diagnostics_directory

프로젝트 전체의 진단 결과를 반환합니다.

lsp_diagnostics_directory(path="src/")

복잡한 멀티 파일 변경 후 전체 프로젝트의 타입 에러를 확인합니다.

lsp_prepare_rename

리네이밍이 유효한지 미리 확인합니다.

lsp_prepare_rename(file="src/auth.ts", line=42, character=10)

lsp_rename

프로젝트 전체에서 심볼의 이름을 변경합니다.

lsp_rename(file="src/auth.ts", line=42, character=10, newName="AuthService")

lsp_code_actions

사용 가능한 리팩토링 액션 목록을 반환합니다.

lsp_code_actions(file="src/auth.ts", startLine=40, endLine=50)

lsp_code_action_resolve

코드 액션의 상세 내용을 반환합니다.

lsp_code_action_resolve(action=<action_object>)

lsp_servers

사용 가능한 언어 서버 목록과 설치 상태를 반환합니다.

lsp_servers()

환경 변수

변수기본값설명
OMC_LSP_TIMEOUT_MS15000LSP 요청 타임아웃 (ms). 큰 저장소나 느린 서버에서 증가

문제 해결

문제해결
LSP 도구 미동작언어 서버 설치: npm install -g typescript-language-server
타임아웃OMC_LSP_TIMEOUT_MS 증가
서버 상태 확인lsp_servers()로 설치 상태 확인

On this page