removed duplicate in lang-support MD file with vector dedup. (#10563)
This commit is contained in:
parent
9daf5c6f8b
commit
bb43a90b86
2 changed files with 21 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
||||||
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default LSP |
|
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default LSP |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| ada | ✓ | ✓ | | `ada_language_server`, `ada_language_server` |
|
| ada | ✓ | ✓ | | `ada_language_server` |
|
||||||
| adl | ✓ | ✓ | ✓ | |
|
| adl | ✓ | ✓ | ✓ | |
|
||||||
| agda | ✓ | | | |
|
| agda | ✓ | | | |
|
||||||
| astro | ✓ | | | |
|
| astro | ✓ | | | |
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use crate::helpers;
|
use crate::helpers;
|
||||||
use crate::path;
|
use crate::path;
|
||||||
use crate::DynError;
|
use crate::DynError;
|
||||||
|
|
||||||
use helix_term::commands::TYPABLE_COMMAND_LIST;
|
use helix_term::commands::TYPABLE_COMMAND_LIST;
|
||||||
use helix_term::health::TsFeature;
|
use helix_term::health::TsFeature;
|
||||||
|
use std::collections::HashSet;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
||||||
pub const TYPABLE_COMMANDS_MD_OUTPUT: &str = "typable-cmd.md";
|
pub const TYPABLE_COMMANDS_MD_OUTPUT: &str = "typable-cmd.md";
|
||||||
|
@ -95,14 +95,25 @@ pub fn lang_features() -> Result<String, DynError> {
|
||||||
.to_owned(),
|
.to_owned(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
row.push(
|
let mut seen_commands = HashSet::new();
|
||||||
lc.language_servers
|
let mut commands = String::new();
|
||||||
.iter()
|
for ls_config in lc
|
||||||
.filter_map(|ls| config.language_server.get(&ls.name))
|
.language_servers
|
||||||
.map(|s| md_mono(&s.command.clone()))
|
.iter()
|
||||||
.collect::<Vec<_>>()
|
.filter_map(|ls| config.language_server.get(&ls.name))
|
||||||
.join(", "),
|
{
|
||||||
);
|
let command = &ls_config.command;
|
||||||
|
if !seen_commands.insert(command) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if !commands.is_empty() {
|
||||||
|
commands.push_str(", ");
|
||||||
|
}
|
||||||
|
|
||||||
|
commands.push_str(&md_mono(command));
|
||||||
|
}
|
||||||
|
row.push(commands);
|
||||||
|
|
||||||
md.push_str(&md_table_row(&row));
|
md.push_str(&md_table_row(&row));
|
||||||
row.clear();
|
row.clear();
|
||||||
|
|
Loading…
Add table
Reference in a new issue