diff options
| -rw-r--r-- | config/nvim/queries/typescript/injections.scm | 10 | ||||
| -rw-r--r-- | config/nvim/queries/zig/injections.scm | 20 | ||||
| -rw-r--r-- | vimrc | 5 |
3 files changed, 32 insertions, 3 deletions
diff --git a/config/nvim/queries/typescript/injections.scm b/config/nvim/queries/typescript/injections.scm new file mode 100644 index 0000000..7c1e4e9 --- /dev/null +++ b/config/nvim/queries/typescript/injections.scm @@ -0,0 +1,10 @@ +((template_string + (string_fragment) @injection.content) + (#set! injection.language "sql") + (#match? @injection.content "^[ \t\r\n]*(SELECT|CREATE|INSERT|UPDATE|DELETE|ALTER|DROP|REPLACE)[ \t\r\n].*(TABLE|COLUMN|FROM|WHERE|VALUES|INTO)")) + +((template_string + (string_fragment) @injection.content) + (#set! injection.language "html") + (#match? @injection.content "<[a-zA-Z]+[^>]*>")) + diff --git a/config/nvim/queries/zig/injections.scm b/config/nvim/queries/zig/injections.scm new file mode 100644 index 0000000..992ec08 --- /dev/null +++ b/config/nvim/queries/zig/injections.scm @@ -0,0 +1,20 @@ +((string + (string_content) @injection.content) + (#set! injection.language "sql") + (#match? @injection.content "^[ \t\r\n]*(SELECT|CREATE|INSERT|UPDATE|DELETE|ALTER|DROP|REPLACE)[ \t\r\n].*(TABLE|COLUMN|FROM|WHERE|VALUES|INTO)")) + +((variable_declaration + (multiline_string) @injection.content) + (#set! injection.language "sql") + (#match? @injection.content "^[ \t\r\n]*(SELECT|CREATE|INSERT|UPDATE|DELETE|ALTER|DROP|REPLACE)[ \t\r\n].*(TABLE|COLUMN|FROM|WHERE|VALUES|INTO)")) + +((variable_declaration + (multiline_string) @injection.content) + (#set! injection.language "html") + (#match? @injection.content "<[a-zA-Z]+[^>]*>")) + +((string + (string_content) @injection.content) + (#set! injection.language "html") + (#match? @injection.content "<[a-zA-Z]+[^>]*>")) + @@ -75,7 +75,6 @@ lua <<EOF }) }) - cmp.setup.filetype('gitcommit', { sources = cmp.config.sources({ { name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). @@ -130,9 +129,7 @@ lua <<EOF percentile = 1 }) - -- Set up lspconfig. local capabilities = require('cmp_nvim_lsp').default_capabilities() - -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled. require('lspconfig')['clangd'].setup { capabilities = capabilities } @@ -386,6 +383,7 @@ endfunction let g:tabby_keybinding_accept = '<Tab>' autocmd Filetype json,jsonc let g:indentLine_setConceal = 0 autocmd Filetype javascriptreact,typescriptreact TSEnable indent +autocmd Filetype * call tabby#inline_completion#keybindings#Setup() function! SWB() execute('call lightline#bufferline#go_previous()') @@ -558,6 +556,7 @@ hi def link @lsp.typemod.variable.defaultLibrary.javascript Special hi def link @lsp.typemod.variable.defaultLibrary.typescript Special hi def link @punctuation.special.javascript Delimiter hi def link @lsp.type.keywordLiteral.zig Special +hi def link @lsp.type.string.zig NONE hi @type.builtin.cpp guifg=#ea5ce2 hi SpecialChar ctermfg=9 guifg=#e4600e |
