diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2020-09-12 20:57:01 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-09-14 18:27:20 +0200 |
| commit | bcf421b4e7f164dfc8aca8a94949adda2bdda10f (patch) | |
| tree | 2a5d4c5c91f37a81058986bf3d3598beb257d3b6 /queries/python | |
| parent | Folds: rename query files to folds.scm to be consistent (diff) | |
| download | nvim-treesitter-bcf421b4e7f164dfc8aca8a94949adda2bdda10f.tar nvim-treesitter-bcf421b4e7f164dfc8aca8a94949adda2bdda10f.tar.gz nvim-treesitter-bcf421b4e7f164dfc8aca8a94949adda2bdda10f.tar.bz2 nvim-treesitter-bcf421b4e7f164dfc8aca8a94949adda2bdda10f.tar.lz nvim-treesitter-bcf421b4e7f164dfc8aca8a94949adda2bdda10f.tar.xz nvim-treesitter-bcf421b4e7f164dfc8aca8a94949adda2bdda10f.tar.zst nvim-treesitter-bcf421b4e7f164dfc8aca8a94949adda2bdda10f.zip | |
Fix #307: Use and document TSVariable/TSVariableBuiltin in all languages
Diffstat (limited to 'queries/python')
| -rw-r--r-- | queries/python/highlights.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index e991e28d3..b71544eca 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -1,6 +1,9 @@ ;; From tree-sitter-python licensed under MIT License ; Copyright (c) 2016 Max Brunsfeld +; Variables +(identifier) @variable + ; Reset highlighing in f-string interpolations (interpolation) @Normal @@ -105,8 +108,8 @@ (none) @constant.builtin [(true) (false)] @boolean -((identifier) @constant.builtin - (#match? @constant.builtin "self")) +((identifier) @variable.builtin + (#match? @variable.builtin "self")) (integer) @number (float) @float @@ -232,8 +235,8 @@ ((class_definition body: (block (function_definition - parameters: (parameters . (identifier) @constant.builtin)))) - (#vim-match? @constant.builtin "^(self|obj|cls)$")) + parameters: (parameters . (identifier) @variable.builtin)))) + (#vim-match? @variable.builtin "^(self|obj|cls)$")) ;; Error (ERROR) @error |
