oxc/crates/oxc_language_server
dalaoshu e85827b63f
fix(oxc_language_server): use file_path instead of uri_path (#8736)
closes #8594 

This is because previously, oxlintrc.path was determined by
`path.canonicalize().unwrap_or_else(|_| path.to_path_buf())`, but after
#8214, it was changed to `path.to_path_buf()`. As a result,
`\\?\D:\shulaoda` became `D:\shulaoda`. This caused the condition
`uri_path.starts_with(gitignore.path())` to evaluate as `true`,
preventing the bypass of the `is_ignore` check and exposing the original
code issue.


b1499e6711/crates/oxc_language_server/src/main.rs (L531-L533)
2025-01-26 15:40:22 +01:00
..
src fix(oxc_language_server): use file_path instead of uri_path (#8736) 2025-01-26 15:40:22 +01:00
Cargo.toml feat(data_structures): add rope (#7764) 2024-12-10 10:30:04 +00:00
README.md feat(editor): Create a command to apply all auto-fixes for the current active text editor (#7672) 2024-12-13 13:46:05 +08:00

oxc_language_server

This crate provides an LSP Server which is used inside an editor or IDE.

Server Capabilities

Supported LSP Specifications from Server

Workspace

workspace/didChangeConfiguration

The server expects this request when settings like run, enable or configPath are changed. The server will revalidate or reset the diagnostics for all open files and send one or more textDocument/publishDiagnostics requests to the client.

workspace/didChangeWatchedFiles

The server expects this request when the oxlint configuration is changed. The server will revalidate the diagnostics for all open files and send one or more textDocument/publishDiagnostics requests to the client.

TextDocument

textDocument/didOpen

The server will validate the file content and send a textDocument/publishDiagnostics request to the client.

textDocument/didSave

When the configuration run is set to onSave, the server will validate the file content and send a textDocument/publishDiagnostics request to the client.

textDocument/didChange

When the configuration run is set to onType, the server will validate the file content and send a textDocument/publishDiagnostics request to the client.

textDocument/didClose

It will remove the reference internal.

textDocument/codeAction

Returns a list of CodeAction

Expected LSP Specification from Client

TextDocument

textDocument/publishDiagnostics

Returns a PublishDiagnostic object