From 3dc1186978a531a15f33572bc26f0e20081f6169 Mon Sep 17 00:00:00 2001 From: timothyhutz Date: Mon, 22 Apr 2024 19:44:29 -0400 Subject: [PATCH] removed duplicate in lang-support MD file with vector dedup. --- book/src/generated/lang-support.md | 10 +++++----- xtask/Cargo.toml | 2 +- xtask/src/docgen.rs | 17 ++++++++--------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 45cc1384d7ec8..6522319c52104 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -1,6 +1,6 @@ | Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default LSP | | --- | --- | --- | --- | --- | -| ada | ✓ | ✓ | | `ada_language_server`, `ada_language_server` | +| ada | ✓ | ✓ | | `ada_language_server` | | adl | ✓ | ✓ | ✓ | | | agda | ✓ | | | | | astro | ✓ | | | | @@ -66,7 +66,7 @@ | glimmer | ✓ | | | `ember-language-server` | | glsl | ✓ | ✓ | ✓ | | | gn | ✓ | | | | -| go | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` | +| go | ✓ | ✓ | ✓ | `golangci-lint-langserver`, `gopls` | | godot-resource | ✓ | | | | | gomod | ✓ | | | `gopls` | | gotmpl | ✓ | | | `gopls` | @@ -116,7 +116,7 @@ | lua | ✓ | ✓ | ✓ | `lua-language-server` | | make | ✓ | | ✓ | | | markdoc | ✓ | | | `markdoc-ls` | -| markdown | ✓ | | | `marksman`, `markdown-oxide` | +| markdown | ✓ | | | `markdown-oxide`, `marksman` | | markdown.inline | ✓ | | | | | matlab | ✓ | ✓ | ✓ | | | mermaid | ✓ | | | | @@ -143,7 +143,7 @@ | perl | ✓ | ✓ | ✓ | `perlnavigator` | | php | ✓ | ✓ | ✓ | `intelephense` | | php-only | ✓ | | | | -| pkgbuild | ✓ | ✓ | ✓ | `pkgbuild-language-server`, `bash-language-server` | +| pkgbuild | ✓ | ✓ | ✓ | `bash-language-server`, `pkgbuild-language-server` | | pkl | ✓ | | ✓ | | | po | ✓ | ✓ | | | | pod | ✓ | | | | @@ -217,6 +217,6 @@ | xit | ✓ | | | | | xml | ✓ | | ✓ | | | xtc | ✓ | | | | -| yaml | ✓ | | ✓ | `yaml-language-server`, `ansible-language-server` | +| yaml | ✓ | | ✓ | `ansible-language-server`, `yaml-language-server` | | yuck | ✓ | | | | | zig | ✓ | ✓ | ✓ | `zls` | diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 25d8955e5a1f2..25e341aaacbbf 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -16,4 +16,4 @@ helix-term = { path = "../helix-term" } helix-core = { path = "../helix-core" } helix-view = { path = "../helix-view" } helix-loader = { path = "../helix-loader" } -toml = "0.8" +toml = "0.8" \ No newline at end of file diff --git a/xtask/src/docgen.rs b/xtask/src/docgen.rs index 034d9918eaf7b..6c752958f5f49 100644 --- a/xtask/src/docgen.rs +++ b/xtask/src/docgen.rs @@ -1,7 +1,6 @@ use crate::helpers; use crate::path; use crate::DynError; - use helix_term::commands::TYPABLE_COMMAND_LIST; use helix_term::health::TsFeature; use std::fs; @@ -95,14 +94,14 @@ pub fn lang_features() -> Result { .to_owned(), ); } - row.push( - lc.language_servers - .iter() - .filter_map(|ls| config.language_server.get(&ls.name)) - .map(|s| md_mono(&s.command.clone())) - .collect::>() - .join(", "), - ); + let mut v: Vec = lc.language_servers + .iter() + .filter_map(|ls| config.language_server.get(&ls.name)) + .map(|s| md_mono(&s.command.clone())) + .collect::>(); + v.sort(); + v.dedup(); + row.push(v.as_slice().join(", ")); md.push_str(&md_table_row(&row)); row.clear();