Commit graph

3849 commits

Author SHA1 Message Date
George Harker
cb568af539 use indent.X syntax for captures and properties of set directives
update CONTRIBUTING.md

adjust indents for bass

fix doc capture comment
2023-03-24 13:07:53 -04:00
George Harker
b4fcc61175 split delimiter into open_delimiter and close_delimiter 2023-03-24 13:07:53 -04:00
George Harker
d1333dd7e5 refactor(indent)!: Rework indent, aligned indent
indents now use @indent.X style captures, and indent.PROP for properties to set on those captures, as documented in the help.

Captures are:

indent.auto
indent.begin
indent.end
indent.dedent
indent.branch
indent.ignore
indent.align
indent.zero

Properties are:

indent.immediate
indent.start_at_same_line
indent.open_delimiter
indent.close_delimiter
indent.increment
indent.avoid_last_matching_next

Multiple opening delims on one line and multiple closing on a line are collapsed so as not to over indent,

The final line of @indent.align blocks which must in some cases be treated specially to avoid clashing with the next line is treated the same regardless of whether the @indent.align capture actually uses aligned indentation or just normal indentation. The indent.avoid_last_matching_next property controls this.

Adjust python to use these.

List, set, dict and tuple all use @indent.align which permits both hanging and aligned styles.

Finally, try: on it’s own will indent when typing live but make no guaranteeds about whole-file formatting.

Includes lucario387:fix-align-indent
2023-03-24 13:07:53 -04:00
Lewis Russell
90ead4ed58 fix: shim 0.9 deprecations 2023-03-24 16:05:38 +01:00
Lucario387
c7b9f68d03
feat(vue): add tsx/jsx injection queries (#4550)
* feat(vue): add tsx/jsx injection queries

- add a test

- style: format vue/injections.scm
2023-03-24 14:38:19 +00:00
Amaan Qureshi
17a81d7b35 feat(luadoc): add more annotations 2023-03-24 08:19:13 -04:00
kylo252
1f087c91f5
fix(health): check required neovim version (#4330)
* fix(health): check required neovim version

* fixup(health)!: require v0.8.3 for is_in_node_range

* fixup(readme)!: always prefer latest neovim
2023-03-24 03:36:30 +01:00
Amaan Qureshi
87cf2abeb6 feat(typescript): add various missing function/method captures 2023-03-22 18:03:20 -04:00
Matthias Queitsch
9db3769c4b highlights(sql): bump lockfile 2023-03-22 22:01:21 +01:00
Matthias Queitsch
97a354ff44 highlights(sql): add new keywords for views and defaults 2023-03-22 22:01:21 +01:00
Turiiya
dbdbd71b41 fix(v): add vlang as filetype 2023-03-22 11:48:36 +01:00
Amaan Qureshi
40670af980 feat: add Bass 2023-03-22 06:34:30 -04:00
Anthony Shi
9253ce66f9 fix(python): add object as @type.builtin 2023-03-22 05:27:28 -04:00
GitHub
9b4e8c1b97 Update parsers: glimmer 2023-03-22 02:56:38 -04:00
Benny Powers
19d9af8fb0 feat(html): injections in <script type>
refactor(html): remove superfluous injection query

fix(html): associate "module" type with "javascript"
2023-03-22 02:28:21 -04:00
Benny Powers
972da989bc test: ecma injections 2023-03-22 02:28:21 -04:00
Benny Powers
d228b51cd7 test: html injections 2023-03-22 02:28:21 -04:00
Stephan Seitz
8ae2c8ff49 highlights(proto): make "include"/"package" @include 2023-03-21 07:10:24 -04:00
Zhizhen He
181a580190 fix: revert for solidity 2023-03-21 02:23:52 -04:00
Zhizhen He
a1df50a79f docs: fix typo 2023-03-21 02:23:52 -04:00
GitHub
2e85a7f4f3 Update parsers: glimmer, sql 2023-03-21 07:05:15 +01:00
ObserverOfTime
379305aa7f fix(parsers): alias sh to bash 2023-03-21 00:00:05 +02:00
ObserverOfTime
25b656a4b7 comment(highlights): reduce user mention priority 2023-03-20 04:47:56 -04:00
Amaan Qureshi
bc23db2515 feat: add Luadoc 2023-03-20 04:20:49 -04:00
Amaan Qureshi
581fc14cea queries(lua): add more keywords related to variable/function builtins, debug, and coroutines 2023-03-20 03:13:41 -04:00
Amaan Qureshi
2170a36416 fix(lua): properly highlight labels 2023-03-20 03:13:00 -04:00
Benny Powers
4536156f32
injections(html): input regex patterns (#4521)
* injections(html): input regex patterns

replaces regex part of #2577
2023-03-19 08:32:42 -04:00
Benny Powers
38f878a1cd fix: svg injection in ecma tagged literals 2023-03-19 08:20:16 -04:00
Benny Powers
f15db0b652 style: alternation in template literal query 2023-03-19 08:20:16 -04:00
Benny Powers
1ba94e9f01 fix(ecma): template literal injections
see e3ebc8ec5d (commitcomment-104824257) for explanation

This also assigns the HTML parser for SVG tagged literals, since svg uses the HTML parser
2023-03-19 08:20:16 -04:00
Amaan Qureshi
6a269f197e fix(cpp): nullptr should be @constant.builtin 2023-03-19 08:14:10 -04:00
GitHub
f1a0b815ba Update parsers: qmljs, swift 2023-03-19 11:25:11 +01:00
derekstride
dcb9a89ab4 Use pre-generated parser files for sql grammar 2023-03-16 21:48:28 +01:00
Amaan Qureshi
f3fbc7c9a7 fix: check if repo location exists for local paths 2023-03-16 19:18:26 +01:00
Amaan Qureshi
17c275bfff feat: add LLVM TableGen 2023-03-16 10:58:50 -04:00
Pham Huy Hoang
01e8a51451 feat(python): add "return" patterns to @indent_end
`return ...` is usually the last line of a
function/statement, so mark some possible patterns of `return` with
`@indent_end` to dedent the line after it
2023-03-16 13:41:19 +01:00
Adam Wolski
273d5e9ac5 fix(windows): treat any non-cmd shell as powershell like in selector 2023-03-16 04:23:14 -04:00
Adam Wolski
677dd11c6a fix(windows): fix invalid powershell separator during install 2023-03-16 04:23:14 -04:00
GitHub
e6f9a4b7c3 Update parsers: bash, scala 2023-03-16 09:08:20 +01:00
Pham Huy Hoang
f5ddd8f92e fix(python): add missing @indent_end 2023-03-16 03:46:01 -04:00
George Harker
fa0644667e fix: change folding algorithm to fix Python indents 2023-03-15 22:44:59 +01:00
GitHub
cd436f92f6 Update parsers: elixir, haskell, php, sql 2023-03-15 08:45:15 +01:00
GitHub
89e5fa66cf Update parsers: mlir, rasi 2023-03-14 08:33:56 +01:00
Ramkumar Ramachandra
5c4ea53070 parsers: add tree-sitter-mlir parser
The parser is currently in development, and 60-80% of MLIR files in the
test suite of MLIR, within the Arith, Math, SCF, Tensor, and Linalg
dialects parse successfully.
2023-03-14 01:50:12 +01:00
GitHub
834f1dcb87 Update parsers: scala 2023-03-13 10:59:54 +01:00
GitHub
9c2009ce36 Update parsers: php, scala, swift, thrift, tsx, typescript 2023-03-13 10:41:15 +01:00
Amaan Qureshi
3eae9ded42 feat(thrift): update queries based on upstream changes 2023-03-13 05:24:58 -04:00
August Damiani
5b505f5658 docs: consistent in README 2023-03-12 22:13:31 -04:00
Peter Lamby
e3ebc8ec5d
fix(ecma): inject properly based on "call_expression"
Also add a comment what the query does.
2023-03-12 16:27:40 +00:00
GitHub
a6cc614409 Update parsers: racket, scheme 2023-03-12 10:24:10 +01:00