Update 2024-08-21

This commit is contained in:
Kristofers Solo
2024-08-21 22:56:15 +03:00
parent 49ced08d78
commit 89989c222f
25 changed files with 271 additions and 142 deletions

View File

@@ -3,3 +3,5 @@ vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2
vim.opt_local.wrap = true
vim.opt_local.spell = true
vim.wo.foldlevel = 99
vim.wo.conceallevel = 2

View File

@@ -16,13 +16,12 @@ end
local embedded_sql = vim.treesitter.query.parse(
"rust",
[[
(macro_invocation
(scoped_identifier
path: (identifier) @path (#eq? @path "sqlx"))
(token_tree
(raw_string_literal) @sql)
(#offset! @sql 1 0 -1 0))
([
(string_literal)
(raw_string_literal)
] @sql
(#match? @sql "(SELECT|select|INSERT|insert|UPDATE|update|DELETE|delete).+(FROM|from|INTO|into|VALUES|values|SET|set).*(WHERE|where|GROUP BY|group by)?")
(#offset! @sql 0 1 0 -1))
]]
)