helix/helix-core/src
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
..
doc_formatter correctly wrap at text-width 2024-07-15 16:34:14 +02:00
increment Use non-deprecated chrono Duration functions 2024-03-14 14:13:56 +09:00
syntax Fix finding injection layer in tree cursor with nested layers (#11365) 2024-07-31 05:29:31 +09:00
auto_pairs.rs chore: clean up clippy lints (#11377) 2024-08-01 06:39:46 +09:00
chars.rs Revert "Replace unicode-general-category with icu-properties (#10989)" (#11006) 2024-06-23 10:05:53 +09:00
comment.rs toggling of block comments (#4718) 2024-02-27 22:36:25 +09:00
config.rs Add glob file type support (#8006) 2024-02-11 18:24:20 +01:00
diagnostic.rs render diagnostic inline 2024-07-15 16:35:30 +02:00
diff.rs delete outdated reference to cessen/ropey#25 (#4928) 2022-11-28 19:07:47 -06:00
doc_formatter.rs fix typo in doc_formatter.rs 2024-07-15 16:35:30 +02:00
fuzzy.rs Bump nucleo to v0.4.1 2024-07-15 09:31:32 -04:00
graphemes.rs render diagnostic inline 2024-07-15 16:35:30 +02:00
history.rs Prefer RopeSlice to &Rope in helix_core::syntax 2023-07-27 11:50:19 +09:00
indent.rs chore: clean up clippy lints (#11377) 2024-08-01 06:39:46 +09:00
lib.rs render diagnostic inline 2024-07-15 16:35:30 +02:00
line_ending.rs Add config for default line ending (#5621) 2023-06-16 12:02:15 -05:00
macros.rs Split parts of helix-term into helix-view. 2020-09-21 18:24:16 +09:00
match_brackets.rs Add curly single and double quotes to BRACKETS (#10971) 2024-06-18 10:40:19 +02:00
movement.rs Add commands for movement by subwords (#8147) 2024-08-08 13:57:59 -05:00
object.rs specify direction for select_prev_sibling and select_next_sibling (#10542) 2024-04-23 08:41:03 -05:00
position.rs fix scrolling/movement for multiline virtual text 2024-07-15 16:35:31 +02:00
rope_reader.rs search buffer contents during global search (#5652) 2023-07-11 21:26:11 +09:00
search.rs Jump to the next number on the line before incrementing (#1778) 2022-04-01 22:14:37 +09:00
selection.rs keep (cursor) position when exactly replacing text (#5930) 2024-08-10 00:40:34 +09:00
shellwords.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
surround.rs test: match around closest pair tree-sitter version 2024-04-24 16:36:13 -04:00
syntax.rs chore: clean up clippy lints (#11377) 2024-08-01 06:39:46 +09:00
test.rs fix test::plain 2023-03-20 18:34:40 -05:00
text_annotations.rs ignore empty virtual text layers 2024-07-15 16:35:31 +02:00
textobject.rs test: match around closest pair tree-sitter version 2024-04-24 16:36:13 -04:00
transaction.rs keep (cursor) position when exactly replacing text (#5930) 2024-08-10 00:40:34 +09:00
uri.rs Replace uses of lsp::Location with a custom Location type 2024-09-03 09:48:32 -04:00
wrap.rs don't break on hyphen with :reflow (#8569) 2023-10-21 07:58:36 -05:00