diff options
Diffstat (limited to 'support/texlab/crates/texlab/src')
-rw-r--r-- | support/texlab/crates/texlab/src/features/formatting/bibtex_internal.rs | 6 | ||||
-rw-r--r-- | support/texlab/crates/texlab/src/server/options.rs | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/support/texlab/crates/texlab/src/features/formatting/bibtex_internal.rs b/support/texlab/crates/texlab/src/features/formatting/bibtex_internal.rs index 0070765b4b..8d5894c256 100644 --- a/support/texlab/crates/texlab/src/features/formatting/bibtex_internal.rs +++ b/support/texlab/crates/texlab/src/features/formatting/bibtex_internal.rs @@ -1,6 +1,6 @@ use base_db::{Document, Workspace}; use lsp_types::{FormattingOptions, TextEdit}; -use rowan::{TextLen, TextRange}; +use rowan::TextLen; use crate::util::line_index_ext::LineIndexExt; @@ -17,7 +17,7 @@ pub fn format_bibtex_internal( }; let output = bibfmt::format(&data.root_node(), &document.line_index, &options); - let range = TextRange::new(0.into(), document.text.text_len()); - let range = document.line_index.line_col_lsp_range(range)?; + let end = document.line_index.line_col_lsp(document.text.text_len())?; + let range = lsp_types::Range::new(lsp_types::Position::new(0, 0), end); Some(vec![lsp_types::TextEdit::new(range, output)]) } diff --git a/support/texlab/crates/texlab/src/server/options.rs b/support/texlab/crates/texlab/src/server/options.rs index c718e49c16..72b2b127fb 100644 --- a/support/texlab/crates/texlab/src/server/options.rs +++ b/support/texlab/crates/texlab/src/server/options.rs @@ -1,4 +1,3 @@ -use std::path::PathBuf; use std::time::Duration; use base_db::{Config, Formatter, SynctexConfig}; @@ -187,7 +186,7 @@ impl From<Options> for Config { .log_directory .unwrap_or_else(|| config.build.pdf_dir.clone()); - config.build.output_filename = value.build.filename.map(PathBuf::from); + config.build.output_filename = value.build.filename; config.diagnostics.allowed_patterns = value .diagnostics |