feat: queries

This commit is contained in:
max miliano 2024-02-22 09:18:08 -03:00
parent aff094ef2b
commit 8816e2a797
13 changed files with 71 additions and 26 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
build/
sample

View file

@ -18,7 +18,7 @@ labore culpa sint ad nisi Lorem pariatur.
```lua
return {
{
'github.com/maxmx03/dracula.nvim',
'maxmx03/dracula.nvim',
lazy = false,
priority = 1000,
config = function ()

View file

@ -0,0 +1,3 @@
; extends
(start_tag (tag_name) @tag (#set! "priority" 127))
(end_tag (tag_name) @tag (#set! "priority" 127))

View file

@ -1,12 +1,7 @@
; extends
((class_name) @function (#set! "priority" 125))
((pseudo_class_selector) @type (#set! "priority" 125))
((class_selector) @type (#set! "priority" 125))
((plain_value) @constant (#set! "priority" 125))
((id_selector) @constructor (#set! "priority" 125))
(tag_name) @tag
(id_name) @function
(unit) @keyword
(property_name) @type
"#" @keyword
"," @keyword
":" @keyword
"." @keyword

View file

@ -0,0 +1,5 @@
; extends
(jsx_self_closing_element (identifier) @tag (#set! "priority" 127))
(jsx_opening_element (identifier) @tag (#set! "priority" 127))
(jsx_closing_element (identifier) @tag (#set! "priority" 127))

View file

@ -0,0 +1,3 @@
; extends
(function_call (identifier) @function (#set! "priority" 130))

View file

@ -1,4 +1,2 @@
; extends
((atx_heading) @markup.heading (#set! "priority" 125))
((indented_code_block) @type (#set! "priority" 125))
(language) @keyword
((block_quote) @comment (#set! "priority" 125))

View file

@ -0,0 +1,5 @@
; extends
(jsx_self_closing_element (identifier) @tag (#set! "priority" 127))
(jsx_opening_element (identifier) @tag (#set! "priority" 127))
(jsx_closing_element (identifier) @tag (#set! "priority" 127))

View file

@ -1,4 +0,0 @@
vim.api.nvim_set_hl(0, 'xmlTagName', { link = '@tag' })
vim.api.nvim_set_hl(0, 'xmlTag', { link = '@tag.delimiter' })
vim.api.nvim_set_hl(0, 'xmlAttrib', { link = '@tag.attribute' })
vim.api.nvim_set_hl(0, 'xmlProcessingDelim', { link = '@tag.delimiter' })

View file

@ -1,5 +1,5 @@
-- Dracula colorscheme
-- Repo: github.com/maxmx03/dracula.nvim
-- Repo: maxmx03/dracula.nvim
-- Maintainer: Max Del Canto <github.com/maxmx03>
-- License: MIT License
require('dracula').load 'dracula'

View file

@ -100,7 +100,7 @@ specification:
name: dracula-soft
author: Max Del Canto
repo: github.com/maxmx03/dracula.nvim
repo: maxmx03/dracula.nvim
contact: "github.com/maxmx03"
license: "MIT License"
config:
@ -438,7 +438,7 @@ highlights:
- name: "@type"
<<: *class
- name: "@type.builtin"
<<: *class
<<: *keyword
- name: "@type.definition"
<<: *class
- name: "@type.qualifier"
@ -457,6 +457,8 @@ highlights:
<<: *function
- name: "@constructor"
<<: *class
- name: "@constructor.lua"
<<: *delimiter
- name: "@operator"
<<: *keyword
- name: "@keyword"
@ -551,6 +553,15 @@ highlights:
<<: *tagAttribute
- name: "@tag.delimiter"
<<: *delimiter
- name: "@property.yaml"
fg: cyan
- name: "@property.json"
fg: cyan
- name: "@property.css"
fg: cyan
- name: "@property.scss"
fg: cyan
- nvim-lspconfig:
- name: "@lsp.type.class"
<<: *class
@ -792,9 +803,13 @@ highlights:
bg: base04
- which-key.nvim:
- name: WhichKey
<<: *function
- name: WhichKeyDesc
<<: *parameter
- name: WhichKeySeparator
<<: *keyword
- name: WhichKeyGroup
fg: orange
fg: purple
- dashboard-nvim:
- name: DashboardHeader
fg: red

View file

@ -100,7 +100,7 @@ specification:
name: dracula
author: Max Del Canto
repo: github.com/maxmx03/dracula.nvim
repo: maxmx03/dracula.nvim
contact: "github.com/maxmx03"
license: "MIT License"
config:
@ -437,7 +437,7 @@ highlights:
- name: "@type"
<<: *class
- name: "@type.builtin"
<<: *class
<<: *keyword
- name: "@type.definition"
<<: *class
- name: "@type.qualifier"
@ -456,6 +456,8 @@ highlights:
<<: *function
- name: "@constructor"
<<: *class
- name: "@constructor.lua"
<<: *delimiter
- name: "@operator"
<<: *keyword
- name: "@keyword"
@ -550,6 +552,15 @@ highlights:
<<: *tagAttribute
- name: "@tag.delimiter"
<<: *delimiter
- name: "@property.yaml"
fg: cyan
- name: "@property.json"
fg: cyan
- name: "@property.css"
fg: cyan
- name: "@property.scss"
fg: cyan
- nvim-lspconfig:
- name: "@lsp.type.class"
<<: *class
@ -791,9 +802,13 @@ highlights:
bg: base04
- which-key.nvim:
- name: WhichKey
<<: *function
- name: WhichKeyDesc
<<: *parameter
- name: WhichKeySeparator
<<: *keyword
- name: WhichKeyGroup
fg: orange
fg: purple
- dashboard-nvim:
- name: DashboardHeader
fg: red

View file

@ -185,6 +185,8 @@
---@field NvimTreeEndOfBuffer? table
---@field NvimTreeWinSeparator? table
---@field WhichKey? table
---@field WhichKeyDesc? table
---@field WhichKeySeparator? table
---@field WhichKeyGroup? table
---@field DashboardHeader? table
---@field DashboardFooter? table
@ -350,7 +352,7 @@ M.set_highlight = function(colors, config)
nvim_set_hl('@character.special', { fg = colors.yellow })
nvim_set_hl('@character.printf', { fg = colors.red })
nvim_set_hl('@type', { fg = colors.cyan })
nvim_set_hl('@type.builtin', { fg = colors.cyan })
nvim_set_hl('@type.builtin', { fg = colors.pink })
nvim_set_hl('@type.definition', { fg = colors.cyan })
nvim_set_hl('@type.qualifier', { fg = colors.pink })
nvim_set_hl('@function', { fg = colors.green })
@ -360,6 +362,7 @@ M.set_highlight = function(colors, config)
nvim_set_hl('@function.method', { fg = colors.green })
nvim_set_hl('@function.method.call', { fg = colors.green })
nvim_set_hl('@constructor', { fg = colors.cyan })
nvim_set_hl('@constructor.lua', { fg = colors.base0 })
nvim_set_hl('@operator', { fg = colors.pink })
nvim_set_hl('@keyword', { fg = colors.pink })
nvim_set_hl('@keyword.coroutine', { fg = colors.pink })
@ -405,6 +408,10 @@ M.set_highlight = function(colors, config)
nvim_set_hl('@tag', { fg = colors.pink })
nvim_set_hl('@tag.attribute', { fg = colors.green })
nvim_set_hl('@tag.delimiter', { fg = colors.base0 })
nvim_set_hl('@property.yaml', { fg = colors.cyan })
nvim_set_hl('@property.json', { fg = colors.cyan })
nvim_set_hl('@property.css', { fg = colors.cyan })
nvim_set_hl('@property.scss', { fg = colors.cyan })
end
if config.plugins['nvim-lspconfig'] then
@ -526,8 +533,10 @@ M.set_highlight = function(colors, config)
end
if config.plugins['which-key.nvim'] then
nvim_set_hl('WhichKey', { fg = colors.pink })
nvim_set_hl('WhichKeyGroup', { fg = colors.orange })
nvim_set_hl('WhichKey', { fg = colors.green })
nvim_set_hl('WhichKeyDesc', { fg = colors.orange, italic = true })
nvim_set_hl('WhichKeySeparator', { fg = colors.pink })
nvim_set_hl('WhichKeyGroup', { fg = colors.purple })
end
if config.plugins['dashboard-nvim'] then