nvim-config

Log | Files | Refs | Submodules | README

commit a6379bef2c3fee5410820549dff21a800a88e94e
parent 0ca773bb2ddbcf0f610d97f62a111da5c7fd7f58
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date:   Wed,  7 Sep 2022 11:26:55 +0200

fix: use extends directive for queries

Diffstat:
Dafter/queries/c/highlights.scm | 3---
Dafter/queries/highlights.scm | 6------
Dafter/queries/mem/highlights.scm | 6------
Dafter/queries/rust/highlights.scm | 6------
Minit.lua | 23-----------------------
Mlua/lsp_config.lua | 11-----------
Mqueries/c/highlights.scm | 2++
Mqueries/latex/highlights.scm | 1+
Aqueries/lua/highlights.scm | 5+++++
Aqueries/lua/injections.scm | 4++++
Mqueries/markdown/injections.scm | 2++
11 files changed, 14 insertions(+), 55 deletions(-)

diff --git a/after/queries/c/highlights.scm b/after/queries/c/highlights.scm @@ -1,3 +0,0 @@ -; ((identifier) @parameter -; (#is? @parameter parameter)) -; "goto" @Conceal diff --git a/after/queries/highlights.scm b/after/queries/highlights.scm @@ -1,6 +0,0 @@ -; (function_call (identifier) @function.builtin -; (#contains? @function.builtin "require" "pairs")) -; (do_statement ["do" "end"] @keyword) -; -; ((identifier) @parameter -; (#is? @parameter parameter)) diff --git a/after/queries/mem/highlights.scm b/after/queries/mem/highlights.scm @@ -1,6 +0,0 @@ -[ - "{" - "}" - ":" - "+" -] @DraculaYellow diff --git a/after/queries/rust/highlights.scm b/after/queries/rust/highlights.scm @@ -1,6 +0,0 @@ -(type_arguments - "<" @DraculaPink - ">" @DraculaPink) -(type_parameters - "<" @DraculaPink - ">" @DraculaPink) diff --git a/init.lua b/init.lua @@ -94,27 +94,4 @@ vim.cmd.colorscheme "oak" require "mappings" require "neogit-config" -do - local ignored_fts = { - gitcommit = true, - rebase = true, - text = true, - help = true, - } - vim.api.nvim_create_autocmd("BufRead", { - callback = function(src) - vim.api.nvim_create_autocmd("Filetype", { - once = true, - buffer = src.buf, - callback = function(opts) - local mline = vim.fn.line [['"]] - if not ignored_fts[vim.bo[opts.buf].filetype] and mline > 1 and mline <= vim.fn.line "$" then - vim.api.nvim_input [[g`"zz]] - end - end - }) - end - }) -end - return M diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua @@ -231,17 +231,6 @@ local system_lsps = { filetypes = { "go" }, }, - -- Special cases - zk = { - command = { "zk", "lsp" }, - filetypes = { 'markdown' }, - cfg = { - on_attach = on_attach, - capabilities = capabilities, - root_dir = vim.loop.cwd(), - } - }, - rust_analyzer = { filetypes = { "rust" }, root_markers = { "Cargo.toml", ".git" }, diff --git a/queries/c/highlights.scm b/queries/c/highlights.scm @@ -1,2 +1,4 @@ +;; extends + (preproc_if condition: (_) @_const (_) @comment (#eq? @_const "0")) diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm @@ -1,3 +1,4 @@ +;; extends ( (word) @spell (#not-has-ancestor? @spell diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm @@ -0,0 +1,5 @@ +;; extends + +((function_call . (identifier) @_exec + (arguments . (_) @none)) + (#eq? @_exec "exec_lua")) diff --git a/queries/lua/injections.scm b/queries/lua/injections.scm @@ -0,0 +1,4 @@ +;; extends + +((function_call . (identifier) @_exec (arguments (string) @lua)) + (#eq? @_exec "exec_lua")) diff --git a/queries/markdown/injections.scm b/queries/markdown/injections.scm @@ -1 +1,3 @@ +;; extends + (minus_metadata) @yaml