mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
docs: fix typos
This commit is contained in:
parent
598b878a2b
commit
4612212c72
13 changed files with 14 additions and 14 deletions
|
|
@ -10,7 +10,7 @@ function M.notify(msg, log_level, opts)
|
||||||
vim.notify(msg, log_level, vim.tbl_extend("force", default_opts, opts or {}))
|
vim.notify(msg, log_level, vim.tbl_extend("force", default_opts, opts or {}))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns the system specific path seperator.
|
-- Returns the system specific path separator.
|
||||||
---@return string
|
---@return string
|
||||||
function M.get_path_sep()
|
function M.get_path_sep()
|
||||||
return (fn.has "win32" == 1 and not vim.opt.shellslash:get()) and "\\" or "/"
|
return (fn.has "win32" == 1 and not vim.opt.shellslash:get()) and "\\" or "/"
|
||||||
|
|
@ -37,7 +37,7 @@ M.join_space = M.generate_join " "
|
||||||
--- - A table with name 'commands' should be defined in 'mod' which needs to be passed as
|
--- - A table with name 'commands' should be defined in 'mod' which needs to be passed as
|
||||||
--- the commands param of this function
|
--- the commands param of this function
|
||||||
---
|
---
|
||||||
---@param mod string, Name of the module that resides in the heirarchy - nvim-treesitter.module
|
---@param mod string, Name of the module that resides in the hierarchy - nvim-treesitter.module
|
||||||
---@param commands table, Command list for the module
|
---@param commands table, Command list for the module
|
||||||
--- - {command_name} Name of the vim user defined command, Keys:
|
--- - {command_name} Name of the vim user defined command, Keys:
|
||||||
--- - {run}: (function) callback function that needs to be executed
|
--- - {run}: (function) callback function that needs to be executed
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
;; For the most part this means that some things have to be assigned multiple
|
;; For the most part this means that some things have to be assigned multiple
|
||||||
;; groups.
|
;; groups.
|
||||||
;; By doing this we can add a basic capture and then later refine it with more
|
;; By doing this we can add a basic capture and then later refine it with more
|
||||||
;; specialied captures.
|
;; specialized captures.
|
||||||
;; This can mean that sometimes things are highlighted weirdly because they
|
;; This can mean that sometimes things are highlighted weirdly because they
|
||||||
;; have multiple highlight groups applied to them.
|
;; have multiple highlight groups applied to them.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@
|
||||||
(hex_integer_literal)
|
(hex_integer_literal)
|
||||||
(decimal_integer_literal)
|
(decimal_integer_literal)
|
||||||
(decimal_floating_point_literal)
|
(decimal_floating_point_literal)
|
||||||
; TODO: inaccessbile nodes
|
; TODO: inaccessible nodes
|
||||||
; (octal_integer_literal)
|
; (octal_integer_literal)
|
||||||
; (hex_floating_point_literal)
|
; (hex_floating_point_literal)
|
||||||
] @number
|
] @number
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
|
|
||||||
(command_substitution "$" @punctuation.bracket)
|
(command_substitution "$" @punctuation.bracket)
|
||||||
|
|
||||||
; non-bultin command names
|
; non-builtin command names
|
||||||
(command name: (word) @function.call)
|
(command name: (word) @function.call)
|
||||||
|
|
||||||
; derived from builtin -n (fish 3.2.2)
|
; derived from builtin -n (fish 3.2.2)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
(element (self_closing_tag))
|
(element (self_closing_tag))
|
||||||
] @indent
|
] @indent
|
||||||
|
|
||||||
; These tags are usually written one-lined and doesnt use self-closing tags so special-cased them
|
; These tags are usually written one-lined and doesn't use self-closing tags so special-cased them
|
||||||
; but add indent to the tag to make sure attributes inside them are still indented if written multi-lined
|
; but add indent to the tag to make sure attributes inside them are still indented if written multi-lined
|
||||||
(
|
(
|
||||||
(start_tag
|
(start_tag
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@
|
||||||
(type_identifier) @function)?
|
(type_identifier) @function)?
|
||||||
(#lua-match? @_import "^[a-z]"))
|
(#lua-match? @_import "^[a-z]"))
|
||||||
|
|
||||||
; TODO: Seperate labeled returns/breaks/continue/super/this
|
; TODO: Separate labeled returns/breaks/continue/super/this
|
||||||
; Must be implemented in the parser first
|
; Must be implemented in the parser first
|
||||||
(label) @label
|
(label) @label
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -370,7 +370,7 @@
|
||||||
(statement ((identifier) @repeat
|
(statement ((identifier) @repeat
|
||||||
(#lua-match? @repeat "^[cC][oO][nN][tT][iI][nN][uU][eE]$")))
|
(#lua-match? @repeat "^[cC][oO][nN][tT][iI][nN][uU][eE]$")))
|
||||||
|
|
||||||
; -- Identifier type inferrence
|
; -- Identifier type inference
|
||||||
|
|
||||||
; VERY QUESTIONABLE: Highlighting of identifiers based on spelling
|
; VERY QUESTIONABLE: Highlighting of identifiers based on spelling
|
||||||
(exprBinary ((identifier) @constant
|
(exprBinary ((identifier) @constant
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
name: (identifier) @function)
|
name: (identifier) @function)
|
||||||
(yul_evm_builtin) @function.builtin
|
(yul_evm_builtin) @function.builtin
|
||||||
|
|
||||||
; Use contructor coloring for special functions
|
; Use constructor coloring for special functions
|
||||||
(constructor_definition "constructor" @constructor)
|
(constructor_definition "constructor" @constructor)
|
||||||
(fallback_receive_definition "receive" @constructor)
|
(fallback_receive_definition "receive" @constructor)
|
||||||
(fallback_receive_definition "fallback" @constructor)
|
(fallback_receive_definition "fallback" @constructor)
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@
|
||||||
"xsd_optional"
|
"xsd_optional"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
; Extended Kewords
|
; Extended Keywords
|
||||||
[
|
[
|
||||||
"client"
|
"client"
|
||||||
"idempotent"
|
"idempotent"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
(interpreted_string_literal) @string
|
(interpreted_string_literal) @string
|
||||||
(string_interpolation) @none
|
(string_interpolation) @none
|
||||||
|
|
||||||
; TODO: Have differnt highlight to make then standout + highlight }{$ as special
|
; TODO: Have different highlight to make then standout + highlight }{$ as special
|
||||||
; ((string_interpolation
|
; ((string_interpolation
|
||||||
; (identifier) @constant
|
; (identifier) @constant
|
||||||
; "$" @punctuation.special
|
; "$" @punctuation.special
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
; highlights.scm
|
; highlights.scm
|
||||||
|
|
||||||
; higlight comments and symbols
|
; highlight comments and symbols
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
(symbol) @symbol
|
(symbol) @symbol
|
||||||
(member_access_expression (_) (identifier) @symbol)
|
(member_access_expression (_) (identifier) @symbol)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
; Keywords
|
; Keywords
|
||||||
|
|
||||||
[
|
[
|
||||||
; block delimeters
|
; block delimiters
|
||||||
(module_keyword)
|
(module_keyword)
|
||||||
"endmodule"
|
"endmodule"
|
||||||
"program"
|
"program"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ describe("indent PHP:", function()
|
||||||
run:new_line("example.php", { on_line = 11, text = "// new line starts 1 indentation to far", indent = 4 })
|
run:new_line("example.php", { on_line = 11, text = "// new line starts 1 indentation to far", indent = 4 })
|
||||||
run:new_line(
|
run:new_line(
|
||||||
"example2.php",
|
"example2.php",
|
||||||
{ on_line = 5, text = "indendation with `enter` in insert mode is not correct", indent = 4 }
|
{ on_line = 5, text = "indentation with `enter` in insert mode is not correct", indent = 4 }
|
||||||
)
|
)
|
||||||
run:new_line("issue-2497.php", { on_line = 5, text = "$a =", indent = 4 })
|
run:new_line("issue-2497.php", { on_line = 5, text = "$a =", indent = 4 })
|
||||||
run:new_line("unfinished-call.php", { on_line = 6, text = "$a =", indent = 0 })
|
run:new_line("unfinished-call.php", { on_line = 6, text = "$a =", indent = 0 })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue