diff --git a/lua/plugins/config.lua b/lua/plugins/config.lua index d75071a..59ffc83 100644 --- a/lua/plugins/config.lua +++ b/lua/plugins/config.lua @@ -398,9 +398,9 @@ function M.lsp_zero() "svelte", "angularls", "tailwindcss", - "templ", + --"templ", --"gopls", - --"htmx", + --"htmx", }) lsp.configure("pyright", { @@ -423,7 +423,7 @@ function M.lsp_zero() filetypes = { "html", "htmldjango", "templ" }, }) - lsp.on_attach(function(client, bufnr) + lsp.on_attach(function(client, _) if client.name == "svelte" then vim.api.nvim_create_autocmd("BufWritePost", { pattern = { "*.js", "*.ts" }, diff --git a/queries/python/injections.scm b/queries/python/injections.scm index bee3b54..ec2bcfd 100644 --- a/queries/python/injections.scm +++ b/queries/python/injections.scm @@ -1,31 +1,56 @@ -(type (string (string_content) @python)) +(type + (string + (string_content) @injection.content + (#set! injection.include-children) + (#set! injection.language "python"))) -(type (subscript (string (string_content) @python))) +(type + (subscript + (string + (string_content) @injection.content + (#set! injection.include-children) + (#set! injection.language "python")))) ((assignment - (type (identifier) @_type) - (string (string_content) @python)) + (type + (identifier) @_type) + (string + (string_content) @injection.content + (#set! injection.include-children) + (#set! injection.language "python"))) (#eq? @_type "TypeAlias")) ((assignment - (type (string (string_content) @_type)) - (string (string_content) @python)) + (type + (string + (string_content) @_type)) + (string + (string_content) @injection.content + (#set! injection.include-children) + (#set! injection.language "python"))) (#eq? @_type "TypeAlias")) (class_definition (argument_list (subscript (string - (string_content) @python)))) + (string_content) @injection.content + (#set! injection.include-children) + (#set! injection.language "python"))))) -(((string (string_content) @python) @_str) +(((string + (string_content) @injection.content + (#set! injection.include-children) + (#set! injection.language "python")) @_str) (#match? @_str "^r.*$")) ((call (identifier) @_function (argument_list (string - (string_content) @python))) + (string_content) @injection.content + (#set! injection.include-children) + (#set! injection.language "python")))) (#any-of? @_function "cast" "NewType" "TypeVar" "TypedDict")) ; Too slow