diff --git a/.tsqueryrc.json b/.tsqueryrc.json index 85e30ff..3192289 100644 --- a/.tsqueryrc.json +++ b/.tsqueryrc.json @@ -110,6 +110,7 @@ "comment": "Captures block comments", "comment.inclusive": "Captures line comments", "elixir": "Captures Elixir expressions", + "function": "Captures function identifiers", "heex": "Captures HEEx templates", "identifier": "Captures all identifiers (i.e. variables, functions, atoms, keywords, and module attributes)", "quoted_atom": "Captures quoted atoms", @@ -117,6 +118,7 @@ "sigil_round": "Captures sigils using round bracket delimiters", "sigil_square": "Captures sigils using square bracket delimiters", "sigil_quote": "Captures sigils using quote mark delimiters", + "slot": "Captures HEEx slot identifiers", "string": "Captures strings" }, "redactions": { diff --git a/languages/eex/config.toml b/languages/eex/config.toml index 71380fb..9c41797 100644 --- a/languages/eex/config.toml +++ b/languages/eex/config.toml @@ -17,6 +17,7 @@ tab_size = 2 scope_opt_in_language_servers = [ "elixir-ls", "expert", + "dexter", "next-ls", "lexical", ] @@ -25,6 +26,7 @@ scope_opt_in_language_servers = [ opt_into_language_servers = [ "elixir-ls", "expert", + "dexter", "next-ls", "lexical", ] diff --git a/languages/heex/config.toml b/languages/heex/config.toml index 57de8f4..363175b 100644 --- a/languages/heex/config.toml +++ b/languages/heex/config.toml @@ -18,6 +18,7 @@ tab_size = 2 scope_opt_in_language_servers = [ "elixir-ls", "expert", + "dexter", "next-ls", "lexical", "tailwindcss-language-server", @@ -27,6 +28,7 @@ scope_opt_in_language_servers = [ opt_into_language_servers = [ "elixir-ls", "expert", + "dexter", "next-ls", "lexical", ] @@ -35,5 +37,15 @@ opt_into_language_servers = [ completion_query_characters = ["-"] opt_into_language_servers = ["tailwindcss-language-server"] -[overrides.identifier] -word_characters = ["!", "?", "@"] +[overrides.function] +word_characters = ["!", "?"] +opt_into_language_servers = [ + "elixir-ls", + "expert", + "dexter", + "next-ls", + "lexical", +] + +[overrides.slot] +word_characters = ["!", "?"] diff --git a/languages/heex/overrides.scm b/languages/heex/overrides.scm index ad2f0f9..8cad6ba 100644 --- a/languages/heex/overrides.scm +++ b/languages/heex/overrides.scm @@ -7,14 +7,15 @@ (quoted_attribute_value) ] @string -; Function and slot identifiers -[ - (function) - (slot_name) -] @identifier +; Function identifiers +(function) @function + +; Slot identifiers +(slot_name) @slot ; Elixir expressions [ (expression) (directive) + (component_name) ] @elixir