aboutsummaryrefslogtreecommitdiffstats
path: root/queries/php
Commit message (Collapse)AuthorAgeFilesLines
* feat(format): extra newline after modelinePhạm Huy Hoàng2024-02-291-0/+1
|
* feat: add the php_only parser included in tree-sitter-php (#5876)tk-shirasaka2024-01-205-557/+5
| | | | | | | | Add parser `php_only` for PHP files without HTML embedded. Make queries for combined parser `php` inherit from `php_only` (no extensions needed). --------- Co-authored-by: shirasaka <tk.shirasaka@gmail>
* chore: query formattingPham Huy Hoang2024-01-194-186/+240
|
* feat!: align standard captures with upstreamChristian Clason2024-01-191-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Sharing highlight queries with upstream tree-sitter and Helix is difficult. Solution: Where reasonable, use capture names in tree-sitter's standard list or Helix's Atom-style hierarchy. Specifically: * tree-sitter "standard capture names" (https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72): - `@parameter` -> `@variable.parameter` - `@field` -> `@variable.member` - `@namespace` -> `@module` - `@float` -> `@number.float` - `@symbol` -> `@string.special.symbol` - `@string.regex` -> `@string.regexp` - `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below) - `@text.title` -> `@markup.heading` - `@text.literal` -> `@markup.raw` - `@text.reference` -> `@markup.link` - `@text.uri` -> `@markup.link.url` (in markup links) - `@string.special` -> `@markup.link.label` (non-url links) - `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`) * Helix captures (https://docs.helix-editor.com/master/themes.html#syntax-highlighting): - `@method` -> `@function.method` - `@method.call` -> `@function.method.call` - `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}` - `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}` - `@text.uri` -> `@string.special.url` (outside markup) - `@preproc` -> `@keyword.directive` - `@define` -> `@keyword.directive`(`.define`?) - `@storageclass` -> `@keyword.storage` - `@conditional` -> `@keyword.conditional` - `@debug` -> `@keyword.debug` - `@exception` -> `@keyword.exception` - `@include` -> `@keyword.import` - `@repeat` -> `@keyword.repeat` * cleanup - remove some redundant `@conceal` (but still allow it for conceal-only patterns) - remove obsolete `@error` (syntax linting is out of scope for this repo) - sort, cleanup capture list in `CONTRIBUTING.md`
* feat(locals)!: switch to upstream capturesChristian Clason2024-01-191-19/+19
|
* refactor: Remove all `(ERROR) @error` capturesPham Huy Hoang2023-10-251-2/+0
| | | | | | | | | | | | As discussed in PR#5421, capturing `@error` is inconsistent, requiring deep nesting (or priority) in order to correctly have red backgrounds to it. Some queries has this capture, some don't. For consistency purposes, removing all of them is more preferable. For re-enabling error, either add `(ERROR) @error` or `(ERROR _ @error)` to your custom queries.
* refactor: improve readabilityCarlos Afonso2023-10-151-2/+10
|
* fix(php): fix indentation for in between bracesCarlos Afonso2023-10-151-2/+2
|
* fix(php): highlight `never` as `@type.builtin` (#5522)nsfisis2023-10-141-0/+1
|
* fixup: php injectionsChristian Clason2023-08-121-10/+0
|
* fix(php): heredocs injections & highlightsObserverOfTime2023-08-122-0/+20
|
* Add PHP heredoc and nowdoc injections (#4866)CalebW2023-08-121-3/+13
|
* chore(injections)!: update injection syntax to 0.9Pham Huy Hoang2023-08-121-5/+19
| | | | | | | | | Since 0.9, @lang syntax is still available as fallback but will soon be deprecated. Because of that, new syntax should be adopted once 0.9 becomes the baseline requirements for nvim-treesitter - update health check - update doc
* queries/*/highlights.scm : remove `@spell` for stringsShellCode332023-08-071-1/+1
|
* lint(locals): use `#set!` to keep query linter happyChristian Clason2023-06-221-13/+13
|
* fix(php_inject): add missing @combined to textPham Huy Hoang2023-04-141-1/+1
|
* use indent.X syntax for captures and properties of set directivesGeorge Harker2023-03-241-5/+5
| | | | | | | | update CONTRIBUTING.md adjust indents for bass fix doc capture comment
* highlights(php): use `lua-match?`Ananda Umamil2023-02-121-2/+2
| | | | Co-authored-by: Stephan Seitz <stephan.seitz@fau.de>
* highlights(php): remove typedef capture from `as`Ananda Umamil2023-02-121-1/+1
|
* highlights(php): fix `@constant` queriesAnanda Umamil2023-02-121-7/+9
|
* highlights(php): fix queries related to namespacesAnanda Umamil2023-02-121-11/+22
|
* highlights(php): `instanceof` operandAnanda Umamil2023-01-281-0/+3
|
* Use `@parameter` captureAnanda Umamil2023-01-281-1/+1
|
* Apply the suggestion from @Lucario387Ananda Umamil2023-01-281-3/+1
| | | Co-authored-by: Lucario387 <hoangtun0810@gmail.com>
* highlights(php): declare directives and `:`Ananda Umamil2023-01-281-0/+7
|
* feat(php): improve indents for match and switch (#3953)gbprod2022-12-091-0/+3
|
* fix(php): add missing php fold querygbprod2022-12-061-0/+1
|
* highlights(php): use more specific groupsObserverOfTime2022-11-261-7/+10
|
* improve php variables and $this highlightsNikita Sklyarov2022-11-251-3/+2
|
* Add regex injections for php (#3592)gbprod2022-10-281-1/+7
|
* feat(php): add queries for bash injectionsgbprod2022-10-121-0/+11
| | | | | This commit allows to inject bash syntax into relevant function arguments and shell expression.
* feat(php): improve php foldsgbprod2022-10-121-3/+12
|
* fix(php): add indent for enumsgbprod2022-10-101-0/+1
|
* Fix php indent for short array declarationgbprod2022-10-061-0/+1
|
* highlights(php): add spellLaytan Laats2022-09-261-2/+2
|
* Split func/method definition from calls in several programming language querieslfenzo2022-08-031-4/+4
|
* highlights(php): highlight more string types and escapes (#3226)Matty Patatty2022-07-271-2/+4
|
* highlights(php): highlight readonly keywordshirasaka2022-06-041-0/+1
|
* indents(php): @auto on comment and ERRORprzepompownia2022-05-151-1/+3
| | | | | | | | | | Currently with ```vim setlocal autoindent setlocal smartindent ``` in `after/indent/php.vim` it allows correct indentation inside PHP docblocks.
* highlights(php): improve highlight for attributesnsfisis2022-05-131-0/+4
|
* highlights(php): argument name as parameterWilman Barrios2022-03-171-0/+3
|
* highlights(php): add namespace aliasing name as typeWilman Barrios2022-02-261-0/+1
|
* highlights(php): highlight use declaration name as typeWilman Barrios2022-02-191-0/+2
|
* highlights(php): highlight traits names as typeWilman Barrios2022-02-191-0/+2
|
* indents(php): don't use aligned_indent for phpStephan Seitz2022-02-131-5/+2
| | | | Fixes #2497
* indents(php): add another testStephan Seitz2022-02-051-3/+5
|
* indents(php): align with C indentationStephan Seitz2022-01-241-3/+2
| | | | Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/2357
* parsers: add phpdoc parser (experimental)Michael Härtl2022-01-201-1/+1
|
* fix(php) match magic and single letter constantsMichael Härtl2022-01-191-1/+3
|
* highlights(php): detect constructor calls on instantiationMichael Härtl2022-01-171-5/+7
|