helix-mirror/helix-term
Michael Davis 606b957172
Replace uses of lsp::Location with a custom Location type
The lsp location type has the lsp's URI type and a range. We can replace
that with a custom type private to the lsp commands module that uses the
core URI type instead.

We can't entirely replace the type with a new Location type in core.
That type might look like:

    pub struct Location {
        uri: crate::Uri,
        range: crate::Range,
    }

But we can't convert every `lsp::Location` to this type because for
definitions, references and diagnostics language servers send documents
which we haven't opened yet, so we don't have the information to convert
an `lsp::Range` (line+col) to a `helix_core::Range` (char indexing).

This cleans up the picker definitions in this file so that they can all
use helpers like `jump_to_location` and `location_to_file_location` for
the picker preview. It also removes the only use of the deprecated
`PathOrId::from_path_buf` function, allowing us to drop the owned
variant of that type in the child commit.
2024-09-03 09:48:32 -04:00
..
src Replace uses of lsp::Location with a custom Location type 2024-09-03 09:48:32 -04:00
tests Disable hard link integration test on Android 2024-07-27 22:34:41 -04:00
.gitignore Initial import. 2020-05-20 18:14:51 +09:00
build.rs chore: clean up clippy lints (#11377) 2024-08-01 06:39:46 +09:00
Cargo.toml build(deps): bump the rust-dependencies group with 4 updates (#11476) 2024-08-13 07:59:42 +02:00