Add Tailwind autocomplete for Vue (#10078)
This fixes #4403 by adding TailwindLsp to .vue files too and autocomplete aswell  Release Notes: - Added Tailwind support in `.vue` files ([#4403](https://github.com/zed-industries/zed/issues/4403)).
This commit is contained in:
parent
ad03a7e72c
commit
15ef3f3017
4 changed files with 17 additions and 1 deletions
|
@ -312,7 +312,10 @@ pub fn init(
|
||||||
language!("ocaml-interface", vec![Arc::new(ocaml::OCamlLspAdapter)]);
|
language!("ocaml-interface", vec![Arc::new(ocaml::OCamlLspAdapter)]);
|
||||||
language!(
|
language!(
|
||||||
"vue",
|
"vue",
|
||||||
vec![Arc::new(vue::VueLspAdapter::new(node_runtime.clone()))]
|
vec![
|
||||||
|
Arc::new(vue::VueLspAdapter::new(node_runtime.clone())),
|
||||||
|
Arc::new(tailwind::TailwindLspAdapter::new(node_runtime.clone())),
|
||||||
|
]
|
||||||
);
|
);
|
||||||
language!("proto");
|
language!("proto");
|
||||||
language!("terraform", vec![Arc::new(terraform::TerraformLspAdapter)]);
|
language!("terraform", vec![Arc::new(terraform::TerraformLspAdapter)]);
|
||||||
|
|
|
@ -127,6 +127,7 @@ impl LspAdapter for TailwindLspAdapter {
|
||||||
("HEEX".to_string(), "phoenix-heex".to_string()),
|
("HEEX".to_string(), "phoenix-heex".to_string()),
|
||||||
("ERB".to_string(), "erb".to_string()),
|
("ERB".to_string(), "erb".to_string()),
|
||||||
("PHP".to_string(), "php".to_string()),
|
("PHP".to_string(), "php".to_string()),
|
||||||
|
("Vue.js".to_string(), "vue".to_string()),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,9 @@ brackets = [
|
||||||
{ start = "`", end = "`", close = true, newline = false, not_in = ["string"] },
|
{ start = "`", end = "`", close = true, newline = false, not_in = ["string"] },
|
||||||
]
|
]
|
||||||
word_characters = ["-"]
|
word_characters = ["-"]
|
||||||
|
scope_opt_in_language_servers = ["tailwindcss-language-server"]
|
||||||
prettier_parser_name = "vue"
|
prettier_parser_name = "vue"
|
||||||
|
|
||||||
|
[overrides.string]
|
||||||
|
word_characters = ["-"]
|
||||||
|
opt_into_language_servers = ["tailwindcss-language-server"]
|
||||||
|
|
7
crates/languages/src/vue/overrides.scm
Normal file
7
crates/languages/src/vue/overrides.scm
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
(comment) @comment
|
||||||
|
|
||||||
|
[
|
||||||
|
(raw_text)
|
||||||
|
(attribute_value)
|
||||||
|
(quoted_attribute_value)
|
||||||
|
] @string
|
Loading…
Add table
Add a link
Reference in a new issue