Add Tailwind server to TSX

This commit is contained in:
Julia 2023-08-28 11:56:44 -04:00
parent ded6decb29
commit 35b7787e02
3 changed files with 6 additions and 1 deletions

View file

@ -104,6 +104,7 @@ pub fn init(languages: Arc<LanguageRegistry>, node_runtime: Arc<NodeRuntime>) {
vec![
Arc::new(typescript::TypeScriptLspAdapter::new(node_runtime.clone())),
Arc::new(typescript::EsLintLspAdapter::new(node_runtime.clone())),
Arc::new(tailwind::TailwindLspAdapter::new(node_runtime.clone())),
],
);
language(
@ -112,7 +113,6 @@ pub fn init(languages: Arc<LanguageRegistry>, node_runtime: Arc<NodeRuntime>) {
vec![
Arc::new(typescript::TypeScriptLspAdapter::new(node_runtime.clone())),
Arc::new(typescript::EsLintLspAdapter::new(node_runtime.clone())),
Arc::new(tailwind::TailwindLspAdapter::new(node_runtime.clone())),
],
);
language(

View file

@ -103,6 +103,7 @@ impl LspAdapter for TailwindLspAdapter {
"html": "html",
"css": "css",
"javascript": "javascript",
"typescriptreact": "typescriptreact",
},
}))
}
@ -122,6 +123,7 @@ impl LspAdapter for TailwindLspAdapter {
("HTML".to_string(), "html".to_string()),
("CSS".to_string(), "css".to_string()),
("JavaScript".to_string(), "javascript".to_string()),
("TSX".to_string(), "typescriptreact".to_string()),
]
.into_iter(),
)

View file

@ -16,3 +16,6 @@ brackets = [
[overrides.element]
line_comment = { remove = true }
block_comment = ["{/* ", " */}"]
[overrides.string]
word_characters = ["-"]