all repos

init.lua @ 85224db

my nvim config
2 files changed, 5 insertions(+), 7 deletions(-)
fix(treesitter): highlight sql in go code
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-01-03 22:17:04 +0200
Parent: 987e6bd
M lua/plugins/treesitter.lua

@@ -8,9 +8,7 @@ { "nvim-treesitter/nvim-treesitter-context", config = true },

{ "nvim-treesitter/playground", name = "nvim-treesitter-playground" }, }, build = function() - pcall(function() - vim.cmd "TSUpdate" - end) + pcall(vim.cmd.TSUpdate) end, config = function() require("nvim-treesitter.configs").setup {

@@ -25,7 +23,6 @@ "gitignore",

"gitcommit", "query", "sql", - "json", }, indent = { enable = true, disable = { "python" } }, highlight = { enable = true, additional_vim_regex_highlighting = false },
M queries/go/injections.scm

@@ -1,10 +1,11 @@

;; sql ([(interpreted_string_literal) - (raw_string_literal)] @sql - (#contains? @sql + (raw_string_literal)] @injection.content + (#contains? @injection.content "--sql" "-- sql" "select" "insert" "update" "delete" "from" "into" "values" "set" "where" "group by" "--SQL" "-- SQL" "SELECT" "INSERT" "UPDATE" "DELETE" "FROM" "INTO" "VALUES" "SET" "WHERE" "GROUP BY") - (#offset! @sql 0 1 0 -1)) + (#offset! @injection.content 0 1 0 -1) + (#set! injection.language "sql")) ;; json ((const_spec