mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
chore: fix typos
This commit is contained in:
parent
968621dfad
commit
6a4fdb317d
15 changed files with 20 additions and 20 deletions
4
.github/ISSUE_TEMPLATE/language-request.md
vendored
4
.github/ISSUE_TEMPLATE/language-request.md
vendored
|
|
@ -7,6 +7,6 @@ assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Language informations**
|
**Language information**
|
||||||
|
|
||||||
Please paste any useful informations here !
|
Please paste any useful information here !
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ First of all, thank you very much for contributing to `nvim-treesitter`.
|
||||||
If you haven't already, you should really come and reach out to us on our [gitter](https://gitter.im/nvim-treesitter/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
|
If you haven't already, you should really come and reach out to us on our [gitter](https://gitter.im/nvim-treesitter/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
|
||||||
room, so we can help you with any question you might have!
|
room, so we can help you with any question you might have!
|
||||||
|
|
||||||
As you know, `nvim-treesitter` is roughly splitted in two parts :
|
As you know, `nvim-treesitter` is roughly split in two parts :
|
||||||
|
|
||||||
- Parser configurations : for various things like `locals`, `highlights`
|
- Parser configurations : for various things like `locals`, `highlights`
|
||||||
- What we like to call *modules* : tiny lua modules that provide a given feature, based on parser configurations
|
- What we like to call *modules* : tiny lua modules that provide a given feature, based on parser configurations
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ EOF
|
||||||
|
|
||||||
## Adding queries
|
## Adding queries
|
||||||
|
|
||||||
Queries are what `nvim-treesitter` uses to extract informations from the syntax tree; they are
|
Queries are what `nvim-treesitter` uses to extract information from the syntax tree; they are
|
||||||
located in the `queries/{language}/*` runtime directories (like the `queries` folder of this plugin), e.g., `queries/{language}/{locals,highlights,textobjects}.scm`.
|
located in the `queries/{language}/*` runtime directories (like the `queries` folder of this plugin), e.g., `queries/{language}/{locals,highlights,textobjects}.scm`.
|
||||||
Other modules may require additional queries such as `folding.scm`.
|
Other modules may require additional queries such as `folding.scm`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ Authors:
|
||||||
==============================================================================
|
==============================================================================
|
||||||
INTRODUCTION *nvim-treesitter-intro*
|
INTRODUCTION *nvim-treesitter-intro*
|
||||||
|
|
||||||
nvim-treesitter wraps the Neovim treesitter API to provide functionnalities
|
nvim-treesitter wraps the Neovim treesitter API to provide functionalities
|
||||||
such as highlighting and incremental selection, and a command to easily
|
such as highlighting and incremental selection, and a command to easily
|
||||||
install parsers.
|
install parsers.
|
||||||
|
|
||||||
|
|
@ -205,7 +205,7 @@ Perform the |:TSInstall| operation synchronously.
|
||||||
*:TSInstallInfo*
|
*:TSInstallInfo*
|
||||||
:TSInstallInfo~
|
:TSInstallInfo~
|
||||||
|
|
||||||
List informations about currently installed parsers
|
List information about currently installed parsers
|
||||||
|
|
||||||
*:TSUpdate*
|
*:TSUpdate*
|
||||||
:TSUpdate {language} ...~
|
:TSUpdate {language} ...~
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ local folds_levels = tsutils.memoize_by_buf_tick(function(bufnr)
|
||||||
-- ( \n ( \n )) \n (( \n ) \n )
|
-- ( \n ( \n )) \n (( \n ) \n )
|
||||||
-- versus
|
-- versus
|
||||||
-- ( \n ( \n ) \n ( \n ) \n )
|
-- ( \n ( \n ) \n ( \n ) \n )
|
||||||
-- If it did have such a mechansim, (trimmed_level - last_trimmed_level)
|
-- If it did have such a mechanism, (trimmed_level - last_trimmed_level)
|
||||||
-- would be the correct number of starts to pass on.
|
-- would be the correct number of starts to pass on.
|
||||||
if trimmed_level - last_trimmed_level > 0 then
|
if trimmed_level - last_trimmed_level > 0 then
|
||||||
prefix = ">"
|
prefix = ">"
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ end)
|
||||||
--
|
--
|
||||||
-- "parent": Uses the parent of the containing scope, basically, skipping a scope
|
-- "parent": Uses the parent of the containing scope, basically, skipping a scope
|
||||||
-- "global": Uses the top most scope
|
-- "global": Uses the top most scope
|
||||||
-- "local": Uses the containg scope of the definition. This is the default
|
-- "local": Uses the containing scope of the definition. This is the default
|
||||||
--
|
--
|
||||||
-- @param node: the definition node
|
-- @param node: the definition node
|
||||||
-- @param bufnr: the buffer
|
-- @param bufnr: the buffer
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ query.add_predicate("has-type?", function(match, pattern, bufnr, pred)
|
||||||
return vim.tbl_contains(types, node:type())
|
return vim.tbl_contains(types, node:type())
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Just avoid some anoying warnings for this directive
|
-- Just avoid some annoying warnings for this directive
|
||||||
query.add_directive("make-range!", function() end)
|
query.add_directive("make-range!", function() end)
|
||||||
|
|
||||||
query.add_directive("downcase!", function(match, _, bufnr, pred, metadata)
|
query.add_directive("downcase!", function(match, _, bufnr, pred, metadata)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
;; have multiple highlight groups applied to them.
|
;; have multiple highlight groups applied to them.
|
||||||
|
|
||||||
|
|
||||||
;; >> Litterals
|
;; >> Literals
|
||||||
|
|
||||||
(
|
(
|
||||||
(dis_expr) @comment
|
(dis_expr) @comment
|
||||||
|
|
@ -292,7 +292,7 @@
|
||||||
.
|
.
|
||||||
(_))
|
(_))
|
||||||
|
|
||||||
; Funciton definitions
|
; Function definitions
|
||||||
(list_lit
|
(list_lit
|
||||||
.
|
.
|
||||||
(sym_lit) @_keyword.function
|
(sym_lit) @_keyword.function
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
(identifier) @definition.parameter))
|
(identifier) @definition.parameter))
|
||||||
(optional_parameter_declaration
|
(optional_parameter_declaration
|
||||||
declarator: (identifier) @definition.parameter)
|
declarator: (identifier) @definition.parameter)
|
||||||
;; Class / struct defintions
|
;; Class / struct definitions
|
||||||
(class_specifier) @scope
|
(class_specifier) @scope
|
||||||
|
|
||||||
(reference_declarator
|
(reference_declarator
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
((namespace_identifier) @reference
|
((namespace_identifier) @reference
|
||||||
(set! reference.kind "namespace"))
|
(set! reference.kind "namespace"))
|
||||||
|
|
||||||
;; Function defintions
|
;; Function definitions
|
||||||
(template_function
|
(template_function
|
||||||
name: (identifier) @definition.function) @scope
|
name: (identifier) @definition.function) @scope
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
; == Mustache Statements ===
|
; == Mustache Statements ===
|
||||||
|
|
||||||
; Hightlight the whole statement, to color brackets and separators
|
; Highlight the whole statement, to color brackets and separators
|
||||||
(mustache_statement) @tag.delimiter
|
(mustache_statement) @tag.delimiter
|
||||||
|
|
||||||
; An identifier in a mustache expression is a variable
|
; An identifier in a mustache expression is a variable
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
(quote_expression
|
(quote_expression
|
||||||
(identifier)) @symbol
|
(identifier)) @symbol
|
||||||
|
|
||||||
;; Parsing error! foo (::Type) get's parsed as two quote expressions
|
;; Parsing error! foo (::Type) gets parsed as two quote expressions
|
||||||
(argument_list
|
(argument_list
|
||||||
(quote_expression
|
(quote_expression
|
||||||
(quote_expression
|
(quote_expression
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
; Variables
|
; Variables
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
; Reset highlighing in f-string interpolations
|
; Reset highlighting in f-string interpolations
|
||||||
(interpolation) @none
|
(interpolation) @none
|
||||||
|
|
||||||
;; Identifier naming conventions
|
;; Identifier naming conventions
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
;;; Programm structure
|
;;; Program structure
|
||||||
(module) @scope
|
(module) @scope
|
||||||
|
|
||||||
(class_definition
|
(class_definition
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,9 @@
|
||||||
; Assume other uppercase names constants.
|
; Assume other uppercase names constants.
|
||||||
; NOTE: In order to distinguish constants we highlight
|
; NOTE: In order to distinguish constants we highlight
|
||||||
; all the identifiers that are uppercased. But this solution
|
; all the identifiers that are uppercased. But this solution
|
||||||
; is not suitable for all occurences e.g. it will highlight
|
; is not suitable for all occurrences e.g. it will highlight
|
||||||
; an uppercased method as a constant if used with no params.
|
; an uppercased method as a constant if used with no params.
|
||||||
; Introducing highlightning for those specific cases, is probably
|
; Introducing highlighting for those specific cases, is probably
|
||||||
; best way to resolve the issue.
|
; best way to resolve the issue.
|
||||||
((identifier) @constant (#match? @constant "^[A-Z]"))
|
((identifier) @constant (#match? @constant "^[A-Z]"))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
"|"
|
"|"
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
; Delimeters
|
; Delimiters
|
||||||
[
|
[
|
||||||
";"
|
";"
|
||||||
"."
|
"."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue