Skip to content

Commit cdcd4f3

Browse files
committed
markdown table format
1 parent 220bc46 commit cdcd4f3

File tree

6 files changed

+4
-25
lines changed

6 files changed

+4
-25
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hx-lsp"
3-
version = "0.2.8-dev"
3+
version = "0.2.8"
44
authors = ["erasin <erasinoo@gmail.com>"]
55
edition = "2024"
66
description = "One LSP server support snippets and actions for helix editor."

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ An LSP tool that provides custom code snippets and Code Actions for [Helix Edito
1717
- Table Formater (action)
1818
The line of the selected area consists of '|: -'.
1919
- Order,Unorder,Task List (action)
20-
- Task done toggle (action)
2120
- Bold/Italic/Strikethrough (action)
2221

2322
## Install

src/action.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ mod test {
299299
use super::shell;
300300
use anyhow::Result;
301301

302-
#[test]
302+
// #[test]
303+
#[allow(dead_code)]
303304
fn test_basic_command() -> Result<()> {
304305
// 测试基础命令执行
305306
#[cfg(unix)]

src/markdown.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ pub(super) fn actions(
2323
let range_content = get_range_content(doc, &params.range).unwrap_or("".into());
2424
let mut items = Vec::new();
2525

26-
// 表格必须为三行以上,第二行起存在表头为 `- :|`
2726
if params.range.end.line - params.range.start.line > 1 {
2827
items.push(("Table Format", table::format(range_content, params.range)));
2928
}
@@ -63,13 +62,6 @@ pub(super) fn actions(
6362
new_text: format!("~~{range_content}~~"),
6463
}],
6564
));
66-
67-
// 单字符选择
68-
if params.range.start.character + 1 == params.range.end.character {
69-
// let line = doc.line(params.range.start.line as usize);
70-
// line.chars().find_map(f)
71-
// TODO TextEdit
72-
}
7365
}
7466

7567
items

src/markdown/list.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,9 @@ pub fn convert_to_list(
7373
// 跳过空行
7474
if line.to_string().trim().is_empty() {
7575
current_levels.clear();
76-
// prev_indent = None;
7776
return None;
7877
}
7978

80-
// // 确定是否需要添加列表标记
81-
// let mut add_prefix = true;
82-
// if let Some(prev) = prev_indent {
83-
// // 如果当前行与上一行缩进相同,且上一行添加了前缀,则继续添加
84-
// add_prefix = indent == prev;
85-
// }
86-
// prev_indent = Some(indent);
87-
88-
// if !add_prefix {
89-
// return None;
90-
// }
91-
9279
// 更新缩进层级栈
9380
while !current_levels.is_empty() && *current_levels.last().unwrap() > indent {
9481
current_levels.pop();

0 commit comments

Comments
 (0)