From 1888bdae7a473ddb2e7ad16666624560d2a6ed3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20F=C3=B6rster?= Date: Sun, 3 Dec 2023 13:56:51 +0100 Subject: [PATCH] Set final tab stop of \begin snippet --- CHANGELOG.md | 1 + crates/texlab/src/features/completion.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9509f63c..82dc56f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Do not report `undefined reference` errors when using `\nocite{*}` ([#964](https://github.com/latex-lsp/texlab/issues/964)) - Fix potential crash when parsing build log files ([#973](https://github.com/latex-lsp/texlab/issues/973)) +- Set the final tab stop of the `\begin` snippet inside the environment ([#963](https://github.com/latex-lsp/texlab/issues/963)) ## [5.11.0] - 2023-11-05 diff --git a/crates/texlab/src/features/completion.rs b/crates/texlab/src/features/completion.rs index 30dbb7a3..8e5fa2ad 100644 --- a/crates/texlab/src/features/completion.rs +++ b/crates/texlab/src/features/completion.rs @@ -169,7 +169,7 @@ impl<'a> ItemBuilder<'a> { if self.supports_snippets { result.kind = Some(Structure::Snippet.completion_kind()); result.text_edit = - Some(lsp_types::TextEdit::new(range, "begin{$1}\n\t\n\\end{$1}".into()).into()); + Some(lsp_types::TextEdit::new(range, "begin{$1}\n\t$0\n\\end{$1}".into()).into()); result.insert_text_format = Some(lsp_types::InsertTextFormat::SNIPPET); } else {