added latex support and reorg ftplugins
This commit is contained in:
parent
7f1b34fd6f
commit
f2eaf7c67a
38 changed files with 600 additions and 234 deletions
15
queries/markdown/textobjects.scm
Normal file
15
queries/markdown/textobjects.scm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
; (atx_heading
|
||||
; heading_content: (_) @class.inner) @class.outer
|
||||
;
|
||||
; (setext_heading
|
||||
; heading_content: (_) @class.inner) @class.outer
|
||||
;
|
||||
; (thematic_break) @class.outer
|
||||
|
||||
(fenced_code_block (code_fence_content) @block.inner) @block.outer
|
||||
|
||||
[
|
||||
(paragraph)
|
||||
(list)
|
||||
] @block.outer
|
||||
|
||||
50
queries/r/textobjects.scm
Normal file
50
queries/r/textobjects.scm
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
; block
|
||||
; call
|
||||
(call) @call.outer
|
||||
|
||||
(arguments) @call.inner
|
||||
|
||||
; class
|
||||
; comment
|
||||
(comment) @comment.outer
|
||||
|
||||
; conditional
|
||||
(if_statement
|
||||
condition: (_)? @conditional.inner) @conditional.outer
|
||||
|
||||
; function
|
||||
[
|
||||
(function_definition)
|
||||
] @function.outer
|
||||
|
||||
(function_definition
|
||||
[
|
||||
(call)
|
||||
(binary_operator)
|
||||
] @function.inner) @function.outer
|
||||
|
||||
|
||||
; loop
|
||||
[
|
||||
(while_statement)
|
||||
(for_statement)
|
||||
(repeat_statement)
|
||||
] @loop.outer
|
||||
|
||||
(while_statement
|
||||
body: (_) @loop.inner)
|
||||
|
||||
(repeat_statement
|
||||
body: (_) @loop.inner)
|
||||
|
||||
(for_statement
|
||||
body: (_) @loop.inner)
|
||||
|
||||
; statement
|
||||
|
||||
(program
|
||||
(_) @statement.outer)
|
||||
|
||||
; number
|
||||
(float) @number.inner
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue