From b6909bc41ad998dac9a0a8198535ba0f21a32c22 Mon Sep 17 00:00:00 2001 From: Ivan Ermakov Date: Thu, 6 Apr 2023 10:28:08 +0700 Subject: [PATCH 01/23] Add gdformat support (#6614) --- languages.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/languages.toml b/languages.toml index 0d5b322221dd..48c1345c85ba 100644 --- a/languages.toml +++ b/languages.toml @@ -1545,6 +1545,7 @@ file-types = ["gd"] shebangs = [] roots = ["project.godot"] auto-format = true +formatter = { command = "gdformat", args = ["-"] } comment-token = "#" indent = { tab-width = 4, unit = "\t" } From fc4ca96c2986bc875f1fc6e2cb164dcaf4f4a09c Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 5 Apr 2023 22:29:17 -0500 Subject: [PATCH 02/23] Update tree-sitter to v0.20.10 (#6608) We used a git dependency to take advantage of the latest fixes in master but a new release is now available: https://crates.io/crates/tree-sitter/0.20.10 --- Cargo.lock | 5 +++-- Cargo.toml | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3421fbbc417..26448c425701 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2192,8 +2192,9 @@ dependencies = [ [[package]] name = "tree-sitter" -version = "0.20.9" -source = "git+https://github.com/tree-sitter/tree-sitter?rev=c51896d32dcc11a38e41f36e3deb1a6a9c4f4b14#c51896d32dcc11a38e41f36e3deb1a6a9c4f4b14" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e747b1f9b7b931ed39a548c1fae149101497de3c1fc8d9e18c62c1a66c683d3d" dependencies = [ "cc", "regex", diff --git a/Cargo.toml b/Cargo.toml index aaa21659ada3..c6351889748d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,3 @@ inherits = "test" package.helix-core.opt-level = 2 package.helix-tui.opt-level = 2 package.helix-term.opt-level = 2 - -[patch.crates-io] -tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "c51896d32dcc11a38e41f36e3deb1a6a9c4f4b14" } From 951e8686e8182ca9a914ea8ea864c7234349d391 Mon Sep 17 00:00:00 2001 From: Gyeongwan Koh Date: Fri, 7 Apr 2023 01:18:39 +0900 Subject: [PATCH 03/23] Colorize inlay hints in the boo_berry theme (#6625) --- runtime/themes/boo_berry.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/themes/boo_berry.toml b/runtime/themes/boo_berry.toml index 62e3b372c184..d3a3e22328f4 100644 --- a/runtime/themes/boo_berry.toml +++ b/runtime/themes/boo_berry.toml @@ -52,6 +52,7 @@ "ui.virtual.whitespace" = { fg = "berry_desaturated" } "ui.virtual.ruler" = { bg = "berry_dim" } "ui.virtual.indent-guide" = { fg = "berry_fade" } +"ui.virtual.inlay-hint" = { fg = "berry_desaturated" } "diff.plus" = { fg = "mint" } "diff.delta" = { fg = "gold" } From c22ebfe62ed0404a0f7328e3a5100c971f864004 Mon Sep 17 00:00:00 2001 From: Erasin Wang Date: Fri, 7 Apr 2023 00:26:41 +0800 Subject: [PATCH 04/23] Add Hurl Support (#6450) * Add http Support It's like [vscode-restclient](https://github.com/Huachao/vscode-restclient) - https://github.com/erasin/tree-sitter-http/tree/main/tests * Add Hurl Support --- book/src/generated/lang-support.md | 1 + languages.toml | 14 +++ runtime/queries/hurl/highlights.scm | 127 ++++++++++++++++++++++++++++ runtime/queries/hurl/indents.scm | 11 +++ runtime/queries/hurl/injections.scm | 14 +++ 5 files changed, 167 insertions(+) create mode 100644 runtime/queries/hurl/highlights.scm create mode 100644 runtime/queries/hurl/indents.scm create mode 100644 runtime/queries/hurl/injections.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 48667f2e5cc3..d71acc566062 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -59,6 +59,7 @@ | heex | ✓ | ✓ | | `elixir-ls` | | hosts | ✓ | | | | | html | ✓ | | | `vscode-html-language-server` | +| hurl | ✓ | | ✓ | | | idris | | | | `idris2-lsp` | | iex | ✓ | | | | | ini | ✓ | | | | diff --git a/languages.toml b/languages.toml index 48c1345c85ba..c5c69b9b6ce8 100644 --- a/languages.toml +++ b/languages.toml @@ -2422,3 +2422,17 @@ language-server = { command = "nimlangserver" } [[grammar]] name = "nim" source = { git = "https://github.com/aMOPel/tree-sitter-nim", rev = "240239b232550e431d67de250d1b5856209e7f06" } + +[[language]] +name = "hurl" +scope = "source.hurl" +injection-regex = "hurl" +file-types = ["hurl"] +roots = [] +comment-token = "#" +indent = { tab-width = 2, unit = " " } + +[[grammar]] +name = "hurl" +source = { git = "https://github.com/pfeiferj/tree-sitter-hurl", rev = "264c42064b61ee21abe88d0061f29a0523352e22" } + diff --git a/runtime/queries/hurl/highlights.scm b/runtime/queries/hurl/highlights.scm new file mode 100644 index 000000000000..c066b28447d9 --- /dev/null +++ b/runtime/queries/hurl/highlights.scm @@ -0,0 +1,127 @@ +[ + "[QueryStringParams]" + "[FormParams]" + "[MultipartFormData]" + "[Cookies]" + "[Captures]" + "[Asserts]" + "[Options]" + "[BasicAuth]" +] @attribute + +(comment) @comment + +[ + (key_string) + (json_key_string) +] @variable.other.member + +(value_string) @string +(quoted_string) @string +(json_string) @string +(file_value) @string.special.path +(regex) @string.regex + +[ + "\\" + (regex_escaped_char) + (quoted_string_escaped_char) + (key_string_escaped_char) + (value_string_escaped_char) + (oneline_string_escaped_char) + (multiline_string_escaped_char) + (filename_escaped_char) + (json_string_escaped_char) +] @constant.character.escape + +(method) @type.builtin +(multiline_string_type) @type + +[ + "status" + "url" + "header" + "cookie" + "body" + "xpath" + "jsonpath" + "regex" + "variable" + "duration" + "sha256" + "md5" + "bytes" +] @function.builtin + +(filter) @attribute + +(version) @string.special +[ + "null" + "cacert" + "location" + "insecure" + "max-redirs" + "retry" + "retry-interval" + "retry-max-count" + (variable_option "variable") + "verbose" + "very-verbose" +] @constant.builtin + +(boolean) @constant.builtin.boolean + +(variable_name) @variable + +[ + "not" + "equals" + "==" + "notEquals" + "!=" + "greaterThan" + ">" + "greaterThanOrEquals" + ">=" + "lessThan" + "<" + "lessThanOrEquals" + "<=" + "startsWith" + "endsWith" + "contains" + "matches" + "exists" + "includes" + "isInteger" + "isFloat" + "isBoolean" + "isString" + "isCollection" +] @keyword.operator + +(integer) @constant.numeric.integer +(float) @constant.numeric.float +(status) @constant.numeric +(json_number) @constant.numeric.float + +[ + ":" + "," +] @punctuation.delimiter + +[ + "[" + "]" + "{" + "}" + "{{" + "}}" +] @punctuation.special + +[ + "base64," + "file," + "hex," +] @string.special \ No newline at end of file diff --git a/runtime/queries/hurl/indents.scm b/runtime/queries/hurl/indents.scm new file mode 100644 index 000000000000..d436f76fd4ab --- /dev/null +++ b/runtime/queries/hurl/indents.scm @@ -0,0 +1,11 @@ +[ + (json_object) + (json_array) + (xml_tag) +] @indent + +[ + "}" + "]" + (xml_close_tag) +] @outdent diff --git a/runtime/queries/hurl/injections.scm b/runtime/queries/hurl/injections.scm new file mode 100644 index 000000000000..a0d238173d5d --- /dev/null +++ b/runtime/queries/hurl/injections.scm @@ -0,0 +1,14 @@ +((comment) @injection.content + (#set! injection.language "comment")) + +((json_value) @injection.content + (#set! injection.language "json")) + +((xml) @injection.content + (#set! injection.language "xml")) + +((multiline_string + (multiline_string_type) @injection.language + (multiline_string_content) @injection.content) + (#set! injection.include-children) + (#set! injection.combined)) From 7ce52e5b2c5fb1d8c9c5c783ec2072b6b9f97663 Mon Sep 17 00:00:00 2001 From: Casper Rogild Storm Date: Thu, 6 Apr 2023 18:30:47 +0200 Subject: [PATCH 05/23] Added `ferra` theme (#6619) * Added ferra theme * Updated with author information * Conform to themelint --- runtime/themes/ferra.toml | 84 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 runtime/themes/ferra.toml diff --git a/runtime/themes/ferra.toml b/runtime/themes/ferra.toml new file mode 100644 index 000000000000..da5339e2e06d --- /dev/null +++ b/runtime/themes/ferra.toml @@ -0,0 +1,84 @@ +# Author : Casper Rogild Storm + +"comment" = { fg = "ferra_bark", modifiers = ["italic"] } +"constant" = { fg = "ferra_sage" } +"function" = { fg = "ferra_coral" } +"function.macro" = { fg = "ferra_mist" } +"keyword" = { fg = "ferra_mist" } +"operator" = { fg = "ferra_mist" } +"punctuation" = { fg = "ferra_blush" } +"string" = { fg = "ferra_sage" } +"type" = { fg = "ferra_rose" } +"variable" = { fg = "ferra_blush" } +"variable.builtin" = { fg = "ferra_rose" } +"tag" = { fg = "ferra_sage" } +"label" = { fg = "ferra_sage" } +"attribute" = { fg = "ferra_blush" } +"namespace" = { fg = "ferra_blush" } +"module" = { fg = "ferra_blush" } + +"markup.heading" = { fg = "ferra_sage", modifiers = ["bold"] } +"markup.heading.marker" = { fg = "ferra_bark" } +"markup.list" = { fg = "ferra_mist" } +"markup.bold" = { modifiers = ["bold"] } +"markup.italic" = { modifiers = ["italic"] } +"markup.strikethrough" = { modifiers = ["crossed_out"] } +"markup.link.url" = { fg = "ferra_rose", modifiers = ["underlined"] } +"markup.link.text" = { fg = "ferra_rose" } +"markup.quote" = { fg = "ferra_bark" } +"markup.raw" = { fg = "ferra_coral" } + +"ui.background" = { bg = "ferra_night" } +"ui.cursor" = { fg = "ferra_night", bg = "ferra_blush" } +"ui.cursor.match" = { fg = "ferra_night", bg = "ferra_bark" } +"ui.cursor.select" = { fg = "ferra_night", bg = "ferra_rose" } +"ui.cursor.insert" = { fg = "ferra_night", bg = "ferra_coral" } +"ui.linenr" = { fg = "ferra_bark" } +"ui.linenr.selected" = { fg = "ferra_blush" } +"ui.cursorline" = { fg = "ferra_blush", bg = "ferra_ash" } +"ui.statusline" = { fg = "ferra_blush", bg = "ferra_ash" } +"ui.statusline.inactive" = { fg = "ferra_bark", bg = "ferra_ash" } +"ui.statusline.normal" = { fg = "ferra_ash", bg = "ferra_blush" } +"ui.statusline.insert" = { fg = "ferra_ash", bg = "ferra_coral" } +"ui.statusline.select" = { fg = "ferra_ash", bg = "ferra_rose" } +"ui.popup" = { fg = "ferra_blush", bg = "ferra_ash" } +"ui.window" = { fg = "ferra_bark", bg = "ferra_night" } +"ui.help" = { fg = "ferra_blush", bg = "ferra_ash" } +"ui.text" = { fg = "ferra_blush" } +"ui.text.focus" = { fg = "ferra_coral" } +"ui.menu" = { fg = "ferra_blush", bg = "ferra_ash" } +"ui.menu.selected" = { fg = "ferra_coral", bg = "ferra_ash" } +"ui.selection" = { bg = "ferra_umber", fg = "ferra_night" } +"ui.selection.primary" = { bg = "ferra_night", fg = "ferra_umber" } +"ui.virtual" = { fg = "ferra_bark" } +"ui.virtual.whitespace" = { fg = "ferra_bark" } +"ui.virtual.ruler" = { fg = "ferra_night", bg = "ferra_ash" } +"ui.virtual.indent-guide" = { fg = "ferra_ash" } +"ui.virtual.inlay-hint" = { fg = "ferra_bark" } + +"diff.plus" = { fg = "ferra_sage" } +"diff.delta" = { fg = "ferra_blush" } +"diff.minus" = { fg = "ferra_ember" } + +"error" = { fg = "ferra_ember" } +"warning" = { fg = "ferra_honey" } +"info" = { fg = "ferra_blush" } +"hint" = { fg = "ferra_blush" } + +"diagnostic.warning" = { underline = { color = "ferra_honey", style = "curl" } } +"diagnostic.error" = { underline = { color = "ferra_ember", style = "curl" } } +"diagnostic.info" = { underline = { color = "ferra_blush", style = "curl" } } +"diagnostic.hint" = { underline = { color = "ferra_blush", style = "curl" } } + +[palette] +ferra_night = "#2b292d" +ferra_ash = "#383539" +ferra_umber = "#4d424b" +ferra_bark = "#6F5D63" +ferra_mist = "#D1D1E0" +ferra_sage = "#B1B695" +ferra_blush = "#fecdb2" +ferra_coral = "#ffa07a" +ferra_rose = "#F6B6C9" +ferra_ember = "#e06b75" +ferra_honey = "#F5D76E" From 4b32b544fc57c53e1406fa7705068f0222498019 Mon Sep 17 00:00:00 2001 From: Clara Hobbs Date: Thu, 6 Apr 2023 12:35:05 -0400 Subject: [PATCH 06/23] Add textobject queries for Julia (#6588) * Add textobjects queries for Julia * Update docs for Julia textobject queries --- book/src/generated/lang-support.md | 2 +- runtime/queries/julia/textobjects.scm | 46 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 runtime/queries/julia/textobjects.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index d71acc566062..12cd2babf9a3 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -69,7 +69,7 @@ | json | ✓ | | ✓ | `vscode-json-language-server` | | jsonnet | ✓ | | | `jsonnet-language-server` | | jsx | ✓ | ✓ | ✓ | `typescript-language-server` | -| julia | ✓ | | ✓ | `julia` | +| julia | ✓ | ✓ | ✓ | `julia` | | kdl | ✓ | | | | | kotlin | ✓ | | | `kotlin-language-server` | | latex | ✓ | ✓ | | `texlab` | diff --git a/runtime/queries/julia/textobjects.scm b/runtime/queries/julia/textobjects.scm new file mode 100644 index 000000000000..1927c2b1843b --- /dev/null +++ b/runtime/queries/julia/textobjects.scm @@ -0,0 +1,46 @@ +(function_definition (_)? @function.inside) @function.around + +(short_function_definition (_)? @function.inside) @function.around + +(macro_definition (_)? @function.inside) @function.around + +(struct_definition (_)? @class.inside) @class.around + +(abstract_definition (_)? @class.inside) @class.around + +(primitive_definition (_)? @class.inside) @class.around + +(parameter_list + ; Match all children of parameter_list *except* keyword_parameters + ([(identifier) + (slurp_parameter) + (optional_parameter) + (typed_parameter) + (tuple_expression) + (interpolation_expression) + (call_expression)] + @parameter.inside . ","? @parameter.around) @parameter.around) + +(keyword_parameters + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + +(argument_list + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + +(type_parameter_list + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + +(line_comment) @comment.inside + +(line_comment)+ @comment.around + +(block_comment) @comment.inside + +(block_comment)+ @comment.around + +(_expression (macro_identifier + (identifier) @_name + (#match? @_name "^(test|test_throws|test_logs|inferred|test_deprecated|test_warn|test_nowarn|test_broken|test_skip)$") + ) + . + (macro_argument_list) @test.inside) @test.around From 3dd715a115880831e3a0f75a3c00f0b6e1a8364f Mon Sep 17 00:00:00 2001 From: Danillo Melo Date: Thu, 6 Apr 2023 13:37:45 -0300 Subject: [PATCH 07/23] Update Ruby Highlights (#6587) * update ruby highlights * Updated SQL injection.scm * Move private, public, protected to builtin methods --- languages.toml | 2 +- runtime/queries/ruby/highlights.scm | 120 +++++++++++++++++++--------- runtime/queries/ruby/injections.scm | 6 ++ 3 files changed, 89 insertions(+), 39 deletions(-) diff --git a/languages.toml b/languages.toml index c5c69b9b6ce8..a1a2f0a1db26 100644 --- a/languages.toml +++ b/languages.toml @@ -606,7 +606,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "ruby" -source = { git = "https://github.com/tree-sitter/tree-sitter-ruby", rev = "4c600a463d97e36a0ca5ac57e11f3ac8c297a0fa" } +source = { git = "https://github.com/tree-sitter/tree-sitter-ruby", rev = "206c7077164372c596ffa8eaadb9435c28941364" } [[language]] name = "bash" diff --git a/runtime/queries/ruby/highlights.scm b/runtime/queries/ruby/highlights.scm index 898f8f794627..7c69276ba6cf 100644 --- a/runtime/queries/ruby/highlights.scm +++ b/runtime/queries/ruby/highlights.scm @@ -1,44 +1,67 @@ ; Keywords [ + "BEGIN" + "END" "alias" - "and" "begin" - "break" - "case" "class" - "def" "do" - "else" - "elsif" "end" - "ensure" - "for" - "if" - "in" "module" - "next" - "or" + "in" "rescue" - "retry" - "return" - "then" - "unless" - "until" + "ensure" +] @keyword + +[ + "if" + "else" + "elsif" "when" + "case" + "unless" + "then" +] @keyword.control.conditional + +[ + "for" "while" + "retry" + "until" + "redo" +] @keyword.control.repeat + +[ "yield" -] @keyword + "return" + "next" + "break" +] @keyword.control.return + +[ + "def" + "undef" +] @keyword.function + +((identifier) @keyword.control.import + (#match? @keyword.control.import "^(require|require_relative|load|autoload)$")) + +[ + "or" + "and" + "not" +] @keyword.operator -((identifier) @keyword - (#match? @keyword "^(private|protected|public)$")) +((identifier) @keyword.control.exception + (#match? @keyword.control.exception "^(raise|fail)$")) ; Function calls -((identifier) @function.method.builtin - (#eq? @function.method.builtin "require")) +((identifier) @function.builtin + (#match? @function.builtin "^(attr|attr_accessor|attr_reader|attr_writer|include|prepend|refine|private|protected|public)$")) -"defined?" @function.method.builtin +"defined?" @function.builtin (call method: [(identifier) (constant)] @function.method) @@ -58,7 +81,10 @@ ] @variable.other.member ((identifier) @constant.builtin - (#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$")) + (#match? @constant.builtin "^(__FILE__|__LINE__|__ENCODING__)$")) + +((constant) @constant.builtin + (#match? @constant.builtin "^(ENV|ARGV|ARGF|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING)$")) ((constant) @constant (#match? @constant "^[A-Z\\d_]+$")) @@ -66,22 +92,23 @@ (constant) @constructor (self) @variable.builtin -(super) @variable.builtin +(super) @function.builtin +[(forward_parameter)(forward_argument)] @variable.parameter +(keyword_parameter name:((_)":" @variable.parameter) @variable.parameter) +(optional_parameter name:((_)"=" @operator) @variable.parameter) +(optional_parameter name: (identifier) @variable.parameter) +(splat_parameter name: (identifier) @variable.parameter) @variable.parameter +(hash_splat_parameter name: (identifier) @variable.parameter) @variable.parameter +(method_parameters (identifier) @variable.parameter) (block_parameter (identifier) @variable.parameter) (block_parameters (identifier) @variable.parameter) -(destructured_parameter (identifier) @variable.parameter) -(hash_splat_parameter (identifier) @variable.parameter) -(lambda_parameters (identifier) @variable.parameter) -(method_parameters (identifier) @variable.parameter) -(splat_parameter (identifier) @variable.parameter) - -(keyword_parameter name: (identifier) @variable.parameter) -(optional_parameter name: (identifier) @variable.parameter) ((identifier) @function.method (#is-not? local)) -(identifier) @variable +[ + (identifier) +] @variable ; Literals @@ -96,10 +123,11 @@ [ (simple_symbol) (delimited_symbol) - (hash_key_symbol) (bare_symbol) ] @string.special.symbol +(pair key: ((_)":" @string.special.symbol) @string.special.symbol) + (regex) @string.regexp (escape_sequence) @constant.character.escape @@ -112,7 +140,7 @@ (nil) (true) (false) -]@constant.builtin +] @constant.builtin (interpolation "#{" @punctuation.special @@ -121,20 +149,36 @@ (comment) @comment ; Operators - [ -"=" +":" +"?" +"~" "=>" "->" +"!" ] @operator +(assignment + "=" @operator) + +(operator_assignment + operator: ["+=" "-=" "*=" "**=" "/=" "||=" "|=" "&&=" "&=" "%=" ">>=" "<<=" "^="] @operator) + +(binary + operator: ["/" "|" "==" "===" "||" "&&" ">>" "<<" "<" ">" "<=" ">=" "&" "^" "!~" "=~" "<=>" "**" "*" "!=" "%" "-" "+"] @operator) + +(range + operator: [".." "..."] @operator) + [ "," ";" "." + "&." ] @punctuation.delimiter [ + "|" "(" ")" "[" diff --git a/runtime/queries/ruby/injections.scm b/runtime/queries/ruby/injections.scm index 321c90add371..1a865df1969f 100644 --- a/runtime/queries/ruby/injections.scm +++ b/runtime/queries/ruby/injections.scm @@ -1,2 +1,8 @@ ((comment) @injection.content (#set! injection.language "comment")) + +((heredoc_body + (heredoc_content) @injection.content + (heredoc_end) @name + (#set! injection.language "sql")) + (#eq? @name "SQL")) From b663b89529b40d00d4db580901cccacdd35c63cf Mon Sep 17 00:00:00 2001 From: Michael <20937441+KMikeeU@users.noreply.github.com> Date: Thu, 6 Apr 2023 21:48:10 +0200 Subject: [PATCH 08/23] xml: highlight .xsd as XML files (#6631) xsd or "XML Schema Definition" files are in XML format and should therefore be highlighted as such --- languages.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.toml b/languages.toml index a1a2f0a1db26..51ef3bcf8605 100644 --- a/languages.toml +++ b/languages.toml @@ -2069,7 +2069,7 @@ source = { git = "https://github.com/Unoqwy/tree-sitter-kdl", rev = "e1cd292c6d1 name = "xml" scope = "source.xml" injection-regex = "xml" -file-types = ["xml", "mobileconfig", "plist", "xib", "storyboard", "svg"] +file-types = ["xml", "mobileconfig", "plist", "xib", "storyboard", "svg", "xsd"] indent = { tab-width = 2, unit = " " } roots = [] From 1148ce1fd9941e00bd416bce1f06a987d0e7b5f2 Mon Sep 17 00:00:00 2001 From: karei <31644842+kareigu@users.noreply.github.com> Date: Fri, 7 Apr 2023 03:19:48 +0300 Subject: [PATCH 09/23] Add support for Robot Framework files (#6611) * Add support for Robot Framework files * Run docgen --- book/src/generated/lang-support.md | 1 + languages.toml | 14 ++++++++++++++ runtime/queries/robot/highlights.scm | 21 +++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 runtime/queries/robot/highlights.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 12cd2babf9a3..3f56dd606b32 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -117,6 +117,7 @@ | rego | ✓ | | | `regols` | | rescript | ✓ | ✓ | | `rescript-language-server` | | rmarkdown | ✓ | | ✓ | `R` | +| robot | ✓ | | | `robotframework_ls` | | ron | ✓ | | ✓ | | | rst | ✓ | | | | | ruby | ✓ | ✓ | ✓ | `solargraph` | diff --git a/languages.toml b/languages.toml index 51ef3bcf8605..c643beab19c9 100644 --- a/languages.toml +++ b/languages.toml @@ -1437,6 +1437,20 @@ comment-token = "//" indent = { tab-width = 4, unit = " " } grammar = "rust" +[[language]] +name = "robot" +scope = "source.robot" +injection-regex = "robot" +file-types = ["robot", "resource"] +comment-token = "#" +roots = [] +indent = { tab-width = 4, unit = " " } +language-server = { command = "robotframework_ls" } + +[[grammar]] +name = "robot" +source = { git = "https://github.com/Hubro/tree-sitter-robot", rev = "f1142bfaa6acfce95e25d2c6d18d218f4f533927" } + [[language]] name = "r" scope = "source.r" diff --git a/runtime/queries/robot/highlights.scm b/runtime/queries/robot/highlights.scm new file mode 100644 index 000000000000..60f416b7b699 --- /dev/null +++ b/runtime/queries/robot/highlights.scm @@ -0,0 +1,21 @@ +(comment) @comment +(ellipses) @punctuation.delimiter + +(section_header) @keyword +(extra_text) @comment + +(setting_statement) @keyword + +(variable_definition (variable_name) @variable) + +(keyword_definition (name) @function) +(keyword_definition (body (keyword_setting) @keyword)) + +(test_case_definition (name) @property) + +(keyword_invocation (keyword) @function) + +(argument (text_chunk) @string) +(argument (scalar_variable) @string.special) +(argument (list_variable) @string.special) +(argument (dictionary_variable) @string.special) From e856906f766aa6d58aba6f6bca9e2e1879b1629d Mon Sep 17 00:00:00 2001 From: Daniel Sedlak Date: Fri, 7 Apr 2023 17:10:38 +0200 Subject: [PATCH 10/23] Fix typos (#6643) --- helix-core/src/position.rs | 4 ++-- helix-core/src/selection.rs | 2 +- helix-core/src/shellwords.rs | 4 ++-- helix-core/src/text_annotations.rs | 4 ++-- helix-lsp/src/client.rs | 14 +++++++------- helix-lsp/src/lib.rs | 6 +++--- helix-lsp/src/snippet.rs | 12 ++++++------ helix-term/src/application.rs | 4 ++-- helix-term/src/commands.rs | 22 +++++++++++----------- helix-term/src/commands/dap.rs | 4 ++-- helix-term/src/commands/lsp.rs | 26 +++++++++++++------------- helix-term/src/commands/typed.rs | 4 ++-- helix-term/src/ui/document.rs | 8 ++++---- helix-term/src/ui/fuzzy_match.rs | 6 +++--- helix-term/src/ui/fuzzy_match/test.rs | 4 ++-- helix-term/src/ui/overlay.rs | 2 +- helix-term/src/ui/picker.rs | 2 +- helix-term/tests/test/movement.rs | 2 +- helix-tui/src/backend/crossterm.rs | 6 +++--- helix-view/src/editor.rs | 2 +- helix-view/src/theme.rs | 2 +- 21 files changed, 70 insertions(+), 70 deletions(-) diff --git a/helix-core/src/position.rs b/helix-core/src/position.rs index 04bf8c31f253..ee764bc64aa7 100644 --- a/helix-core/src/position.rs +++ b/helix-core/src/position.rs @@ -109,7 +109,7 @@ pub fn visual_coords_at_pos(text: RopeSlice, pos: usize, tab_width: usize) -> Po /// softwrapping positions are estimated with an O(1) algorithm /// to ensure consistent performance for large lines (currently unimplemented) /// -/// Usualy you want to use `visual_offset_from_anchor` instead but this function +/// Usually you want to use `visual_offset_from_anchor` instead but this function /// can be useful (and faster) if /// * You already know the visual position of the block /// * You only care about the horizontal offset (column) and not the vertical offset (row) @@ -291,7 +291,7 @@ pub fn pos_at_visual_coords(text: RopeSlice, coords: Position, tab_width: usize) /// /// If no (text) grapheme starts at exactly at the specified column the /// start of the grapheme to the left is returned. If there is no grapheme -/// to the left (for example if the line starts with virtual text) then the positiong +/// to the left (for example if the line starts with virtual text) then the positioning /// of the next grapheme to the right is returned. /// /// If the `line` coordinate is beyond the end of the file, the EOF diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs index 8e93c633e4ad..259b131a4202 100644 --- a/helix-core/src/selection.rs +++ b/helix-core/src/selection.rs @@ -38,7 +38,7 @@ use std::borrow::Cow; /// Ranges are considered to be inclusive on the left and /// exclusive on the right, regardless of anchor-head ordering. /// This means, for example, that non-zero-width ranges that -/// are directly adjecent, sharing an edge, do not overlap. +/// are directly adjacent, sharing an edge, do not overlap. /// However, a zero-width range will overlap with the shared /// left-edge of another range. /// diff --git a/helix-core/src/shellwords.rs b/helix-core/src/shellwords.rs index 0883eb9172ae..9d873c366c99 100644 --- a/helix-core/src/shellwords.rs +++ b/helix-core/src/shellwords.rs @@ -294,14 +294,14 @@ mod test { #[test] fn test_lists() { let input = - r#":set statusline.center ["file-type","file-encoding"] '["list", "in", "qoutes"]'"#; + r#":set statusline.center ["file-type","file-encoding"] '["list", "in", "quotes"]'"#; let shellwords = Shellwords::from(input); let result = shellwords.words().to_vec(); let expected = vec![ Cow::from(":set"), Cow::from("statusline.center"), Cow::from(r#"["file-type","file-encoding"]"#), - Cow::from(r#"["list", "in", "qoutes"]"#), + Cow::from(r#"["list", "in", "quotes"]"#), ]; assert_eq!(expected, result); } diff --git a/helix-core/src/text_annotations.rs b/helix-core/src/text_annotations.rs index e60931845fae..11d19d485642 100644 --- a/helix-core/src/text_annotations.rs +++ b/helix-core/src/text_annotations.rs @@ -172,7 +172,7 @@ impl TextAnnotations { for char_idx in char_range { if let Some((_, Some(highlight))) = self.overlay_at(char_idx) { // we don't know the number of chars the original grapheme takes - // however it doesn't matter as highlight bounderies are automatically + // however it doesn't matter as highlight boundaries are automatically // aligned to grapheme boundaries in the rendering code highlights.push((highlight.0, char_idx..char_idx + 1)) } @@ -203,7 +203,7 @@ impl TextAnnotations { /// Add new grapheme overlays. /// - /// The overlayed grapheme will be rendered with `highlight` + /// The overlaid grapheme will be rendered with `highlight` /// patched on top of `ui.text`. /// /// The overlays **must be sorted** by their `char_idx`. diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index 29a67988a508..93e822c44420 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -52,8 +52,8 @@ pub struct Client { root_path: std::path::PathBuf, root_uri: Option, workspace_folders: Mutex>, - initalize_notify: Arc, - /// workspace folders added while the server is still initalizing + initialize_notify: Arc, + /// workspace folders added while the server is still initializing req_timeout: u64, } @@ -92,14 +92,14 @@ impl Client { return true; } - // this server definitly doesn't support multiple workspace, no need to check capabilities + // this server definitely doesn't support multiple workspace, no need to check capabilities if !may_support_workspace { return false; } let Some(capabilities) = self.capabilities.get() else { let client = Arc::clone(self); - // initalization hasn't finished yet, deal with this new root later + // initialization hasn't finished yet, deal with this new root later // TODO: In the edgecase that a **new root** is added // for an LSP that **doesn't support workspace_folders** before initaliation is finished // the new roots are ignored. @@ -108,7 +108,7 @@ impl Client { // documents LSP client handle. It's doable but a pretty weird edgecase so let's // wait and see if anyone ever runs into it. tokio::spawn(async move { - client.initalize_notify.notified().await; + client.initialize_notify.notified().await; if let Some(workspace_folders_caps) = client .capabilities() .workspace @@ -234,7 +234,7 @@ impl Client { root_path, root_uri, workspace_folders: Mutex::new(workspace_folders), - initalize_notify: initialize_notify.clone(), + initialize_notify: initialize_notify.clone(), }; Ok((client, server_rx, initialize_notify)) @@ -279,7 +279,7 @@ impl Client { "utf-16" => Some(OffsetEncoding::Utf16), "utf-32" => Some(OffsetEncoding::Utf32), encoding => { - log::error!("Server provided invalid position encording {encoding}, defaulting to utf-16"); + log::error!("Server provided invalid position encoding {encoding}, defaulting to utf-16"); None }, }) diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index a59fa31e418d..31ee1d75cb7d 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -152,10 +152,10 @@ pub mod util { // > ‘\n’, ‘\r\n’ and ‘\r’. Positions are line end character agnostic. // > So you can not specify a position that denotes \r|\n or \n| where | represents the character offset. // - // This means that while the line must be in bounds the `charater` + // This means that while the line must be in bounds the `character` // must be capped to the end of the line. // Note that the end of the line here is **before** the line terminator - // so we must use `line_end_char_index` istead of `doc.line_to_char(pos_line + 1)` + // so we must use `line_end_char_index` instead of `doc.line_to_char(pos_line + 1)` // // FIXME: Helix does not fully comply with the LSP spec for line terminators. // The LSP standard requires that line terminators are ['\n', '\r\n', '\r']. @@ -893,7 +893,7 @@ fn start_client( /// * if the file is outside `workspace` return `None` /// * start at `file` and search the file tree upward /// * stop the search at the first `root_dirs` entry that contains `file` -/// * if no `root_dirs` matchs `file` stop at workspace +/// * if no `root_dirs` matches `file` stop at workspace /// * Returns the top most directory that contains a `root_marker` /// * If no root marker and we stopped at a `root_dirs` entry, return the directory we stopped at /// * If we stopped at `workspace` instead and `workspace_is_cwd == false` return `None` diff --git a/helix-lsp/src/snippet.rs b/helix-lsp/src/snippet.rs index a4f049e8349f..ebf3da2401a7 100644 --- a/helix-lsp/src/snippet.rs +++ b/helix-lsp/src/snippet.rs @@ -61,7 +61,7 @@ fn render_elements( offset: &mut usize, tabstops: &mut Vec<(usize, (usize, usize))>, newline_with_offset: &str, - include_placeholer: bool, + include_placeholder: bool, ) { use SnippetElement::*; @@ -89,7 +89,7 @@ fn render_elements( offset, tabstops, newline_with_offset, - include_placeholer, + include_placeholder, ); } &Tabstop { tabstop } => { @@ -100,14 +100,14 @@ fn render_elements( value: inner_snippet_elements, } => { let start_offset = *offset; - if include_placeholer { + if include_placeholder { render_elements( inner_snippet_elements, insert, offset, tabstops, newline_with_offset, - include_placeholer, + include_placeholder, ); } tabstops.push((*tabstop, (start_offset, *offset))); @@ -127,7 +127,7 @@ fn render_elements( pub fn render( snippet: &Snippet<'_>, newline_with_offset: &str, - include_placeholer: bool, + include_placeholder: bool, ) -> (Tendril, Vec>) { let mut insert = Tendril::new(); let mut tabstops = Vec::new(); @@ -139,7 +139,7 @@ pub fn render( &mut offset, &mut tabstops, newline_with_offset, - include_placeholer, + include_placeholder, ); // sort in ascending order (except for 0, which should always be the last one (per lsp doc)) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 130a74af61d8..f7d7fa636226 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -25,7 +25,7 @@ use crate::{ config::Config, job::Jobs, keymap::Keymaps, - ui::{self, overlay::overlayed}, + ui::{self, overlay::overlaid}, }; use log::{debug, error, warn}; @@ -169,7 +169,7 @@ impl Application { std::env::set_current_dir(first).context("set current dir")?; editor.new_file(Action::VerticalSplit); let picker = ui::file_picker(".".into(), &config.load().editor); - compositor.push(Box::new(overlayed(picker))); + compositor.push(Box::new(overlaid(picker))); } else { let nr_of_files = args.files.len(); for (i, (file, pos)) in args.files.into_iter().enumerate() { diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index b55f1ab72bd7..17669924cf02 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -54,7 +54,7 @@ use crate::{ job::Callback, keymap::ReverseKeymap, ui::{ - self, editor::InsertEvent, lsp::SignatureHelp, overlay::overlayed, FilePicker, Picker, + self, editor::InsertEvent, lsp::SignatureHelp, overlay::overlaid, FilePicker, Picker, Popup, Prompt, PromptEvent, }, }; @@ -1561,7 +1561,7 @@ fn half_page_down(cx: &mut Context) { } #[allow(deprecated)] -// currently uses the deprected `visual_coords_at_pos`/`pos_at_visual_coords` functions +// currently uses the deprecated `visual_coords_at_pos`/`pos_at_visual_coords` functions // as this function ignores softwrapping (and virtual text) and instead only cares // about "text visual position" // @@ -2147,7 +2147,7 @@ fn global_search(cx: &mut Context) { Some((path.clone().into(), Some((*line_num, *line_num)))) }, ); - compositor.push(Box::new(overlayed(picker))); + compositor.push(Box::new(overlaid(picker))); }, )); Ok(call) @@ -2421,7 +2421,7 @@ fn append_mode(cx: &mut Context) { fn file_picker(cx: &mut Context) { let root = find_workspace().0; let picker = ui::file_picker(root, &cx.editor.config()); - cx.push_layer(Box::new(overlayed(picker))); + cx.push_layer(Box::new(overlaid(picker))); } fn file_picker_in_current_buffer_directory(cx: &mut Context) { @@ -2438,12 +2438,12 @@ fn file_picker_in_current_buffer_directory(cx: &mut Context) { }; let picker = ui::file_picker(path, &cx.editor.config()); - cx.push_layer(Box::new(overlayed(picker))); + cx.push_layer(Box::new(overlaid(picker))); } fn file_picker_in_current_directory(cx: &mut Context) { let cwd = std::env::current_dir().unwrap_or_else(|_| PathBuf::from("./")); let picker = ui::file_picker(cwd, &cx.editor.config()); - cx.push_layer(Box::new(overlayed(picker))); + cx.push_layer(Box::new(overlaid(picker))); } fn buffer_picker(cx: &mut Context) { @@ -2508,7 +2508,7 @@ fn buffer_picker(cx: &mut Context) { Some((meta.id.into(), Some((line, line)))) }, ); - cx.push_layer(Box::new(overlayed(picker))); + cx.push_layer(Box::new(overlaid(picker))); } fn jumplist_picker(cx: &mut Context) { @@ -2590,7 +2590,7 @@ fn jumplist_picker(cx: &mut Context) { Some((meta.path.clone()?.into(), Some((line, line)))) }, ); - cx.push_layer(Box::new(overlayed(picker))); + cx.push_layer(Box::new(overlaid(picker))); } impl ui::menu::Item for MappableCommand { @@ -2664,7 +2664,7 @@ pub fn command_palette(cx: &mut Context) { } } }); - compositor.push(Box::new(overlayed(picker))); + compositor.push(Box::new(overlaid(picker))); }, )); } @@ -4185,7 +4185,7 @@ pub fn completion(cx: &mut Context) { None => return, }; - // setup a chanel that allows the request to be canceled + // setup a channel that allows the request to be canceled let (tx, rx) = oneshot::channel(); // set completion_request so that this request can be canceled // by setting completion_request, the old channel stored there is dropped @@ -4238,7 +4238,7 @@ pub fn completion(cx: &mut Context) { let (view, doc) = current_ref!(editor); // check if the completion request is stale. // - // Completions are completed asynchrounsly and therefore the user could + // Completions are completed asynchronously and therefore the user could //switch document/view or leave insert mode. In all of thoise cases the // completion should be discarded if editor.mode != Mode::Insert || view.id != trigger_view || doc.id() != trigger_doc { diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs index dac1e9d5258d..8efdc9cfa516 100644 --- a/helix-term/src/commands/dap.rs +++ b/helix-term/src/commands/dap.rs @@ -2,7 +2,7 @@ use super::{Context, Editor}; use crate::{ compositor::{self, Compositor}, job::{Callback, Jobs}, - ui::{self, overlay::overlayed, FilePicker, Picker, Popup, Prompt, PromptEvent, Text}, + ui::{self, overlay::overlaid, FilePicker, Picker, Popup, Prompt, PromptEvent, Text}, }; use dap::{StackFrame, Thread, ThreadStates}; use helix_core::syntax::{DebugArgumentValue, DebugConfigCompletion, DebugTemplate}; @@ -270,7 +270,7 @@ pub fn dap_launch(cx: &mut Context) { let templates = config.templates.clone(); - cx.push_layer(Box::new(overlayed(Picker::new( + cx.push_layer(Box::new(overlaid(Picker::new( templates, (), |cx, template, _action| { diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index 78dbc0be9e70..7a26b3cf6024 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -26,7 +26,7 @@ use helix_view::{ use crate::{ compositor::{self, Compositor}, ui::{ - self, lsp::SignatureHelp, overlay::overlayed, DynamicPicker, FileLocation, FilePicker, + self, lsp::SignatureHelp, overlay::overlaid, DynamicPicker, FileLocation, FilePicker, Popup, PromptEvent, }, }; @@ -372,7 +372,7 @@ pub fn symbol_picker(cx: &mut Context) { }; let picker = sym_picker(symbols, current_url, offset_encoding); - compositor.push(Box::new(overlayed(picker))) + compositor.push(Box::new(overlaid(picker))) } }, ) @@ -431,7 +431,7 @@ pub fn workspace_symbol_picker(cx: &mut Context) { future.boxed() }; let dyn_picker = DynamicPicker::new(picker, Box::new(get_symbols)); - compositor.push(Box::new(overlayed(dyn_picker))) + compositor.push(Box::new(overlaid(dyn_picker))) }, ) } @@ -454,7 +454,7 @@ pub fn diagnostics_picker(cx: &mut Context) { DiagnosticsFormat::HideSourcePath, offset_encoding, ); - cx.push_layer(Box::new(overlayed(picker))); + cx.push_layer(Box::new(overlaid(picker))); } } @@ -471,7 +471,7 @@ pub fn workspace_diagnostics_picker(cx: &mut Context) { DiagnosticsFormat::ShowSourcePath, offset_encoding, ); - cx.push_layer(Box::new(overlayed(picker))); + cx.push_layer(Box::new(overlaid(picker))); } impl ui::menu::Item for lsp::CodeActionOrCommand { @@ -491,7 +491,7 @@ impl ui::menu::Item for lsp::CodeActionOrCommand { /// /// While the `kind` field is defined as open ended in the LSP spec (any value may be used) /// in practice a closed set of common values (mostly suggested in the LSP spec) are used. -/// VSCode displays each of these categories seperatly (seperated by a heading in the codeactions picker) +/// VSCode displays each of these categories separately (separated by a heading in the codeactions picker) /// to make them easier to navigate. Helix does not display these headings to the user. /// However it does sort code actions by their categories to achieve the same order as the VScode picker, /// just without the headings. @@ -521,7 +521,7 @@ fn action_category(action: &CodeActionOrCommand) -> u32 { } } -fn action_prefered(action: &CodeActionOrCommand) -> bool { +fn action_preferred(action: &CodeActionOrCommand) -> bool { matches!( action, CodeActionOrCommand::CodeAction(CodeAction { @@ -600,12 +600,12 @@ pub fn code_action(cx: &mut Context) { } // Sort codeactions into a useful order. This behaviour is only partially described in the LSP spec. - // Many details are modeled after vscode because langauge servers are usually tested against it. + // Many details are modeled after vscode because language servers are usually tested against it. // VScode sorts the codeaction two times: // // First the codeactions that fix some diagnostics are moved to the front. // If both codeactions fix some diagnostics (or both fix none) the codeaction - // that is marked with `is_preffered` is shown first. The codeactions are then shown in seperate + // that is marked with `is_preferred` is shown first. The codeactions are then shown in separate // submenus that only contain a certain category (see `action_category`) of actions. // // Below this done in in a single sorting step @@ -627,10 +627,10 @@ pub fn code_action(cx: &mut Context) { return order; } - // if one of the codeactions is marked as prefered show it first + // if one of the codeactions is marked as preferred show it first // otherwise keep the original LSP sorting - action_prefered(action1) - .cmp(&action_prefered(action2)) + action_preferred(action1) + .cmp(&action_preferred(action2)) .reverse() }); @@ -955,7 +955,7 @@ fn goto_impl( }, move |_editor, location| Some(location_to_file_location(location)), ); - compositor.push(Box::new(overlayed(picker))); + compositor.push(Box::new(overlaid(picker))); } } } diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index afc3d7069894..3c954d20f6d3 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -116,7 +116,7 @@ fn open(cx: &mut compositor::Context, args: &[Cow], event: PromptEvent) -> let call: job::Callback = job::Callback::EditorCompositor(Box::new( move |editor: &mut Editor, compositor: &mut Compositor| { let picker = ui::file_picker(path, &editor.config()); - compositor.push(Box::new(overlayed(picker))); + compositor.push(Box::new(overlaid(picker))); }, )); Ok(call) @@ -1335,7 +1335,7 @@ fn lsp_workspace_command( let picker = ui::Picker::new(commands, (), |cx, command, _action| { execute_lsp_command(cx.editor, command.clone()); }); - compositor.push(Box::new(overlayed(picker))) + compositor.push(Box::new(overlaid(picker))) }, )); Ok(call) diff --git a/helix-term/src/ui/document.rs b/helix-term/src/ui/document.rs index 39c209505fca..80da1c5427b7 100644 --- a/helix-term/src/ui/document.rs +++ b/helix-term/src/ui/document.rs @@ -118,7 +118,7 @@ pub fn render_document( fn translate_positions( char_pos: usize, - first_visisble_char_idx: usize, + first_visible_char_idx: usize, translated_positions: &mut [TranslatedPosition], text_fmt: &TextFormat, renderer: &mut TextRenderer, @@ -126,7 +126,7 @@ fn translate_positions( ) { // check if any positions translated on the fly (like cursor) has been reached for (char_idx, callback) in &mut *translated_positions { - if *char_idx < char_pos && *char_idx >= first_visisble_char_idx { + if *char_idx < char_pos && *char_idx >= first_visible_char_idx { // by replacing the char_index with usize::MAX large number we ensure // that the same position is only translated once // text will never reach usize::MAX as rust memory allocations are limited @@ -259,7 +259,7 @@ pub fn render_text<'t>( } } - // aquire the correct grapheme style + // acquire the correct grapheme style if char_pos >= style_span.1 { style_span = styles.next().unwrap_or((Style::default(), usize::MAX)); } @@ -404,7 +404,7 @@ impl<'a> TextRenderer<'a> { let cut_off_start = self.col_offset.saturating_sub(position.col); let is_whitespace = grapheme.is_whitespace(); - // TODO is it correct to apply the whitspace style to all unicode white spaces? + // TODO is it correct to apply the whitespace style to all unicode white spaces? if is_whitespace { style = style.patch(self.whitespace_style); } diff --git a/helix-term/src/ui/fuzzy_match.rs b/helix-term/src/ui/fuzzy_match.rs index b406702ff95e..22dc3a7fab2a 100644 --- a/helix-term/src/ui/fuzzy_match.rs +++ b/helix-term/src/ui/fuzzy_match.rs @@ -54,7 +54,7 @@ impl QueryAtom { } fn indices(&self, matcher: &Matcher, item: &str, indices: &mut Vec) -> bool { - // for inverse there are no indicies to return + // for inverse there are no indices to return // just return whether we matched if self.inverse { return self.matches(matcher, item); @@ -120,7 +120,7 @@ enum QueryAtomKind { /// /// Usage: `foo` Fuzzy, - /// Item contains query atom as a continous substring + /// Item contains query atom as a continuous substring /// /// Usage `'foo` Substring, @@ -213,7 +213,7 @@ impl FuzzyQuery { Some(score) } - pub fn fuzzy_indicies(&self, item: &str, matcher: &Matcher) -> Option<(i64, Vec)> { + pub fn fuzzy_indices(&self, item: &str, matcher: &Matcher) -> Option<(i64, Vec)> { let (score, mut indices) = self.first_fuzzy_atom.as_ref().map_or_else( || Some((0, Vec::new())), |atom| matcher.fuzzy_indices(item, atom), diff --git a/helix-term/src/ui/fuzzy_match/test.rs b/helix-term/src/ui/fuzzy_match/test.rs index 3f90ef6813ec..5df79eeb155e 100644 --- a/helix-term/src/ui/fuzzy_match/test.rs +++ b/helix-term/src/ui/fuzzy_match/test.rs @@ -7,8 +7,8 @@ fn run_test<'a>(query: &str, items: &'a [&'a str]) -> Vec { items .iter() .filter_map(|item| { - let (_, indicies) = query.fuzzy_indicies(item, &matcher)?; - let matched_string = indicies + let (_, indices) = query.fuzzy_indices(item, &matcher)?; + let matched_string = indices .iter() .map(|&pos| item.chars().nth(pos).unwrap()) .collect(); diff --git a/helix-term/src/ui/overlay.rs b/helix-term/src/ui/overlay.rs index 5b2bc806093d..ff184d4073fa 100644 --- a/helix-term/src/ui/overlay.rs +++ b/helix-term/src/ui/overlay.rs @@ -16,7 +16,7 @@ pub struct Overlay { } /// Surrounds the component with a margin of 5% on each side, and an additional 2 rows at the bottom -pub fn overlayed(content: T) -> Overlay { +pub fn overlaid(content: T) -> Overlay { Overlay { content, calc_child_size: Box::new(|rect: Rect| clip_rect_relative(rect.clip_bottom(2), 90, 90)), diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index e73088e528fa..e7a7de9095db 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -794,7 +794,7 @@ impl Component for Picker { // might be inconsistencies. This is the best we can do since only the // text in Row is displayed to the end user. let (_score, highlights) = FuzzyQuery::new(self.prompt.line()) - .fuzzy_indicies(&line, &self.matcher) + .fuzzy_indices(&line, &self.matcher) .unwrap_or_default(); let highlight_byte_ranges: Vec<_> = line diff --git a/helix-term/tests/test/movement.rs b/helix-term/tests/test/movement.rs index e10ec6f5db3b..9a48cdbcb9fb 100644 --- a/helix-term/tests/test/movement.rs +++ b/helix-term/tests/test/movement.rs @@ -391,7 +391,7 @@ async fn cursor_position_newly_opened_file() -> anyhow::Result<()> { #[tokio::test(flavor = "multi_thread")] async fn cursor_position_append_eof() -> anyhow::Result<()> { - // Selection is fowards + // Selection is forwards test(( "#[foo|]#", "abar", diff --git a/helix-tui/src/backend/crossterm.rs b/helix-tui/src/backend/crossterm.rs index 4d44f187d076..9d70a9fb0ab2 100644 --- a/helix-tui/src/backend/crossterm.rs +++ b/helix-tui/src/backend/crossterm.rs @@ -344,9 +344,9 @@ impl ModifierDiff { } } -/// Crossterm uses semicolon as a seperator for colors -/// this is actually not spec compliant (altough commonly supported) -/// However the correct approach is to use colons as a seperator. +/// Crossterm uses semicolon as a separator for colors +/// this is actually not spec compliant (although commonly supported) +/// However the correct approach is to use colons as a separator. /// This usually doesn't make a difference for emulators that do support colored underlines. /// However terminals that do not support colored underlines will ignore underlines colors with colons /// while escape sequences with semicolons are always processed which leads to weird visual artifacts. diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 34c59b9b4b75..80c47ed083a8 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -851,7 +851,7 @@ pub struct Editor { pub config_events: (UnboundedSender, UnboundedReceiver), /// Allows asynchronous tasks to control the rendering /// The `Notify` allows asynchronous tasks to request the editor to perform a redraw - /// The `RwLock` blocks the editor from performing the render until an exclusive lock can be aquired + /// The `RwLock` blocks the editor from performing the render until an exclusive lock can be acquired pub redraw_handle: RedrawHandle, pub needs_redraw: bool, /// Cached position of the cursor calculated during rendering. diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs index 5d79ff26b7dd..a8cc59260291 100644 --- a/helix-view/src/theme.rs +++ b/helix-view/src/theme.rs @@ -128,7 +128,7 @@ impl Loader { let parent_palette = parent_theme_toml.get("palette"); let palette = theme_toml.get("palette"); - // handle the table seperately since it needs a `merge_depth` of 2 + // handle the table separately since it needs a `merge_depth` of 2 // this would conflict with the rest of the theme merge strategy let palette_values = match (parent_palette, palette) { (Some(parent_palette), Some(palette)) => { From af88a3c15cc4ddbb1e2f2ea6492868ffb8aba40b Mon Sep 17 00:00:00 2001 From: gibbz00 Date: Sat, 8 Apr 2023 14:18:11 +0200 Subject: [PATCH 11/23] Fix #6605: Remove soft-wrap.enable option wrapping. (#6656) Co-authored-by: gibbz00 --- helix-core/src/syntax.rs | 2 +- helix-view/src/document.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 40846967518f..0e6696db0f84 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -555,7 +555,7 @@ impl LanguageConfiguration { #[serde(default, rename_all = "kebab-case", deny_unknown_fields)] pub struct SoftWrap { /// Soft wrap lines that exceed viewport width. Default to off - pub enable: Option, + pub enable: bool, /// Maximum space left free at the end of the line. /// This space is used to wrap text at word boundaries. If that is not possible within this limit /// the word is simply split at the end of the line. diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index eca6002653f5..65a5a6e22850 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1444,9 +1444,8 @@ impl Document { .as_ref() .and_then(|config| config.soft_wrap.as_ref()); let enable_soft_wrap = language_soft_wrap - .and_then(|soft_wrap| soft_wrap.enable) - .or(editor_soft_wrap.enable) - .unwrap_or(false); + .map(|soft_wrap| soft_wrap.enable) + .unwrap_or_else(|| editor_soft_wrap.enable); let max_wrap = language_soft_wrap .and_then(|soft_wrap| soft_wrap.max_wrap) .or(config.soft_wrap.max_wrap) From 25858ec2e3265a2cfc562e39136beb76df77953b Mon Sep 17 00:00:00 2001 From: Jan Scheer Date: Sat, 8 Apr 2023 14:18:33 +0200 Subject: [PATCH 12/23] themes: add inlay-hint to nightfox (#6655) --- runtime/themes/nightfox.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/themes/nightfox.toml b/runtime/themes/nightfox.toml index 8cddbbaef63b..fad56d189570 100644 --- a/runtime/themes/nightfox.toml +++ b/runtime/themes/nightfox.toml @@ -33,6 +33,7 @@ "ui.virtual.ruler" = { bg = "bg3" } # Vertical rulers (colored columns in editing area). "ui.virtual.whitespace" = { fg = "bg3" } # Whitespace markers in editing area. "ui.virtual.indent-guide" = { fg = "black" } # Vertical indent width guides +"ui.virtual.inlay-hint" = { fg = "comment", bg = "bg2" } # Default style for inlay hints of all kinds "ui.statusline" = { fg = "fg2", bg = "bg0" } # Status line. "ui.statusline.inactive" = { fg = "fg3", bg = "bg0" } # Status line in unfocused windows. From 58e457a4e1037caf43c17dea93c5321c1ae74103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Sat, 8 Apr 2023 21:50:43 +0900 Subject: [PATCH 13/23] Revert "Fix #6605: Remove soft-wrap.enable option wrapping. (#6656)" This caused a bug that would ignore the global config. This reverts commit af88a3c15cc4ddbb1e2f2ea6492868ffb8aba40b. --- helix-core/src/syntax.rs | 4 +++- helix-view/src/document.rs | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 0e6696db0f84..c34ea81a3a09 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -555,7 +555,9 @@ impl LanguageConfiguration { #[serde(default, rename_all = "kebab-case", deny_unknown_fields)] pub struct SoftWrap { /// Soft wrap lines that exceed viewport width. Default to off - pub enable: bool, + // NOTE: Option on purpose because the struct is shared between language config and global config. + // By default the option is None so that the language config falls back to the global config unless explicitly set. + pub enable: Option, /// Maximum space left free at the end of the line. /// This space is used to wrap text at word boundaries. If that is not possible within this limit /// the word is simply split at the end of the line. diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 65a5a6e22850..eca6002653f5 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1444,8 +1444,9 @@ impl Document { .as_ref() .and_then(|config| config.soft_wrap.as_ref()); let enable_soft_wrap = language_soft_wrap - .map(|soft_wrap| soft_wrap.enable) - .unwrap_or_else(|| editor_soft_wrap.enable); + .and_then(|soft_wrap| soft_wrap.enable) + .or(editor_soft_wrap.enable) + .unwrap_or(false); let max_wrap = language_soft_wrap .and_then(|soft_wrap| soft_wrap.max_wrap) .or(config.soft_wrap.max_wrap) From 6dabd36491673db0110e8b78f9489fa9354708c6 Mon Sep 17 00:00:00 2001 From: Arnar Date: Sun, 9 Apr 2023 21:23:01 +0200 Subject: [PATCH 14/23] Update gleam grammar (#6641) --- languages.toml | 2 +- runtime/queries/gleam/highlights.scm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/languages.toml b/languages.toml index c643beab19c9..fa725aafaecd 100644 --- a/languages.toml +++ b/languages.toml @@ -1425,7 +1425,7 @@ language-server = { command = "gleam", args = ["lsp"] } [[grammar]] name = "gleam" -source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "d6cbdf3477fcdb0b4d811518a356f9b5cd1795ed" } +source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "ae79782c00656945db69641378e688cdb78d52c1" } [[language]] name = "ron" diff --git a/runtime/queries/gleam/highlights.scm b/runtime/queries/gleam/highlights.scm index 34b3ce65cde5..56222b8fd2c3 100644 --- a/runtime/queries/gleam/highlights.scm +++ b/runtime/queries/gleam/highlights.scm @@ -77,6 +77,7 @@ "if" "import" "let" + "panic" "todo" "try" "type" From 78b516430adcfb68e5a0989c5af6b9a096175674 Mon Sep 17 00:00:00 2001 From: Alireza Alavi <63902085+alirezaalavi87@users.noreply.github.com> Date: Sun, 9 Apr 2023 22:53:57 +0330 Subject: [PATCH 15/23] Fix minor grammar issue in 'from-vim' docs (#6667) --- book/src/from-vim.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/book/src/from-vim.md b/book/src/from-vim.md index 6ace9102746d..ffd5addc65fd 100644 --- a/book/src/from-vim.md +++ b/book/src/from-vim.md @@ -2,9 +2,9 @@ Helix's editing model is strongly inspired from Vim and Kakoune, and a notable difference from Vim (and the most striking similarity to Kakoune) is that Helix -follows the `selection → action` model. This means that the whatever you are -going to act on (a word, a paragraph, a line, etc) is selected first and the -action itself (delete, change, yank, etc) comes second. A cursor is simply a +follows the `selection → action` model. This means that whatever you are +going to act on (a word, a paragraph, a line, etc.) is selected first and the +action itself (delete, change, yank, etc.) comes second. A cursor is simply a single width selection. See also Kakoune's [Migrating from Vim](https://github.com/mawww/kakoune/wiki/Migrating-from-Vim) and Helix's [Migrating from Vim](https://github.com/helix-editor/helix/wiki/Migrating-from-Vim). From 76825c7b661f4526856627bf1e34f024088f3fda Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Mon, 10 Apr 2023 03:26:18 +0800 Subject: [PATCH 16/23] Fix ayu theme markup unreadable bg (#6538) * Fix ayu theme markup unreadable bg * Add modifiers for markup --- runtime/themes/ayu_dark.toml | 5 ++++- runtime/themes/ayu_light.toml | 7 +++++-- runtime/themes/ayu_mirage.toml | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/runtime/themes/ayu_dark.toml b/runtime/themes/ayu_dark.toml index 211d423f4e43..1e1aab91eaaa 100644 --- a/runtime/themes/ayu_dark.toml +++ b/runtime/themes/ayu_dark.toml @@ -22,7 +22,10 @@ "namespace" = "blue" "markup.heading" = "orange" "markup.list" = "yellow" -"markup.raw.block" = { bg = "gray", fg = "orange" } +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "orange", modifiers = ["italic"] } +"markup.strikethrough" = { modifiers = ["crossed_out"] } +"markup.raw.block" = "orange" "markup.link.url" = "blue" "markup.link.text" = "yellow" "markup.link.label" = "green" diff --git a/runtime/themes/ayu_light.toml b/runtime/themes/ayu_light.toml index 4b0ba1db76bd..d4cb56de8a5b 100644 --- a/runtime/themes/ayu_light.toml +++ b/runtime/themes/ayu_light.toml @@ -22,8 +22,11 @@ "namespace" = "blue" "markup.heading" = "orange" "markup.list" = "yellow" -"markup.raw.block" = { bg = "gray", fg = "orange" } -"markup.link.url" = "blue" +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "orange", modifiers = ["italic"] } +"markup.strikethrough" = { modifiers = ["crossed_out"] } +"markup.raw.block" = "orange" +"markup.link.url" = { fg = "blue", modifiers = ["underlined"] } "markup.link.text" = "yellow" "markup.link.label" = "green" "markup.quote" = "yellow" diff --git a/runtime/themes/ayu_mirage.toml b/runtime/themes/ayu_mirage.toml index 5afe0acd91ac..b27efc1cccb1 100644 --- a/runtime/themes/ayu_mirage.toml +++ b/runtime/themes/ayu_mirage.toml @@ -22,7 +22,10 @@ "namespace" = "blue" "markup.heading" = "orange" "markup.list" = "yellow" -"markup.raw.block" = { bg = "gray", fg = "orange" } +"markup.bold" = { fg = "orange", modifiers = ["bold"] } +"markup.italic" = { fg = "orange", modifiers = ["italic"] } +"markup.strikethrough" = { modifiers = ["crossed_out"] } +"markup.raw.block" = "orange" "markup.link.url" = "blue" "markup.link.text" = "yellow" "markup.link.label" = "green" From 894c2b9edb112dd0a3f97c3955d5996929d2828c Mon Sep 17 00:00:00 2001 From: Nico Bos Date: Sun, 9 Apr 2023 21:57:41 +0200 Subject: [PATCH 17/23] Add Windows install instructions using Winget (#6602) --- book/src/install.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/book/src/install.md b/book/src/install.md index a0e24de72371..5f1651ae9945 100644 --- a/book/src/install.md +++ b/book/src/install.md @@ -12,6 +12,7 @@ - [macOS](#macos) - [Homebrew Core](#homebrew-core) - [Windows](#windows) + - [Winget](#winget) - [Scoop](#scoop) - [Chocolatey](#chocolatey) - [MSYS2](#msys2) @@ -109,9 +110,17 @@ brew install helix ## Windows -Install on Windows using [Scoop](https://scoop.sh/), [Chocolatey](https://chocolatey.org/) +Install on Windows using [Winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/), [Scoop](https://scoop.sh/), [Chocolatey](https://chocolatey.org/) or [MSYS2](https://msys2.org/). +### Winget +Windows Package Manager winget command-line tool is by default available on Windows 11 and modern versions of Windows 10 as a part of the App Installer. +You can get [App Installer from the Microsoft Store](https://www.microsoft.com/p/app-installer/9nblggh4nns1#activetab=pivot:overviewtab). If it's already installed, make sure it is updated with the latest version. + +```sh +winget install Helix.Helix +``` + ### Scoop ```sh From e72ad1e731877570c6f728e1490485e4b31524a5 Mon Sep 17 00:00:00 2001 From: not Date: Sun, 9 Apr 2023 20:14:48 -0500 Subject: [PATCH 18/23] theme(rose-pine): Improve whitespace and search matches colors (#6679) * feat: make whitespace characters more readable * feat: make search matches more discernable * fix: reduce importance of whitespace characters * feat: add background to ui.text.focus https://github.com/rose-pine/helix/pull/4 Co-authored-by: Iorvethe <58810330+Iorvethe@users.noreply.github.com> --- runtime/themes/rose_pine.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/themes/rose_pine.toml b/runtime/themes/rose_pine.toml index ea17ac224667..e1d968941b52 100644 --- a/runtime/themes/rose_pine.toml +++ b/runtime/themes/rose_pine.toml @@ -32,11 +32,11 @@ "ui.help" = { fg = "subtle", bg = "overlay" } "ui.text" = { fg = "text" } -# "ui.text.focus" = {} +"ui.text.focus" = { bg = "overlay" } "ui.text.info" = { fg = "subtle" } "ui.virtual.ruler" = { bg = "overlay" } -"ui.virtual.whitespace" = { fg = "highlight_low" } +"ui.virtual.whitespace" = { fg = "highlight_high" } "ui.virtual.indent-guide" = { fg = "muted" } "ui.virtual.inlay-hint" = { fg = "subtle" } @@ -61,6 +61,7 @@ "diagnostic.info" = { underline = { color = "foam", style = "curl" } } "diagnostic.warning" = { underline = { color = "gold", style = "curl" } } "diagnostic.error" = { underline = { color = "love", style = "curl" } } +"special" = "rose" "attribute" = "iris" From 5106a124edc738d5add32a7a862124b9b715e320 Mon Sep 17 00:00:00 2001 From: tippfehlr Date: Mon, 10 Apr 2023 17:09:45 +0200 Subject: [PATCH 19/23] Fix `file-picker.follow-symlinks` config option name in docs (#6685) --- book/src/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/configuration.md b/book/src/configuration.md index 4c8ff0647cbf..38f9f9eb2383 100644 --- a/book/src/configuration.md +++ b/book/src/configuration.md @@ -161,7 +161,7 @@ All git related options are only enabled in a git repository. | Key | Description | Default | |--|--|---------| |`hidden` | Enables ignoring hidden files | true -|`follow-links` | Follow symlinks instead of ignoring them | true +|`follow-symlinks` | Follow symlinks instead of ignoring them | true |`deduplicate-links` | Ignore symlinks that point at files already shown in the picker | true |`parents` | Enables reading ignore files from parent directories | true |`ignore` | Enables reading `.ignore` files | true From 686a1e2f311932c2fcfeee6e8384ab8ce959d618 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 10 Apr 2023 10:52:03 -0500 Subject: [PATCH 20/23] Update tree-sitter-git-commit (#6692) Trailers are now supported, for example 'Co-authored-by' or 'Signed-off-by'. Commits are also now recognized in message bodies. --- languages.toml | 2 +- runtime/queries/git-commit/highlights.scm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/languages.toml b/languages.toml index fa725aafaecd..479777f9e239 100644 --- a/languages.toml +++ b/languages.toml @@ -1194,7 +1194,7 @@ text-width = 72 [[grammar]] name = "git-commit" -source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "bd0ca5a6065f2cada3ac6a82a66db3ceff55fa6b" } +source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "db88cffa3952dd2328b741af5d0fc69bdb76704f" } [[language]] name = "diff" diff --git a/runtime/queries/git-commit/highlights.scm b/runtime/queries/git-commit/highlights.scm index 20f58ee57966..319d76569e56 100644 --- a/runtime/queries/git-commit/highlights.scm +++ b/runtime/queries/git-commit/highlights.scm @@ -10,5 +10,9 @@ (change kind: "modified" @diff.delta) (change kind: "renamed" @diff.delta.moved) -[":" "->" (scissors)] @punctuation.delimiter +(trailer + key: (trailer_key) @variable.other.member + value: (trailer_value) @string) + +[":" "=" "->" (scissors)] @punctuation.delimiter (comment) @comment From f8b7e95481fee5c9a7ee4def990985a068acbc3a Mon Sep 17 00:00:00 2001 From: Konstantin Keller <30801340+koskeller@users.noreply.github.com> Date: Tue, 11 Apr 2023 00:55:52 +0300 Subject: [PATCH 21/23] LSP: Gracefully handle 'workspace/configuration' from a stopped server (#6693) --- helix-term/src/application.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index f7d7fa636226..4d28c8bed0c7 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -1033,8 +1033,7 @@ impl Application { None => self .editor .language_servers - .get_by_id(server_id) - .unwrap() + .get_by_id(server_id)? .config()?, }; if let Some(section) = item.section.as_ref() { From ed67aa864d02b611d94da7f2eceaa6a04a3d5c37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:55:34 +0900 Subject: [PATCH 22/23] build(deps): bump libc from 0.2.140 to 0.2.141 (#6700) Bumps [libc](https://github.com/rust-lang/libc) from 0.2.140 to 0.2.141. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.140...0.2.141) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- helix-term/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26448c425701..195a2201b256 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1425,9 +1425,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.140" +version = "0.2.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" [[package]] name = "libloading" diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml index 5222ddaa15f6..b240f1d82348 100644 --- a/helix-term/Cargo.toml +++ b/helix-term/Cargo.toml @@ -68,7 +68,7 @@ grep-searcher = "0.1.11" [target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100 signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] } -libc = "0.2.140" +libc = "0.2.141" [build-dependencies] helix-loader = { version = "0.6", path = "../helix-loader" } From b9b4ed5c6c68e8c2c744e779b5c4d1c148a60f47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:55:55 +0900 Subject: [PATCH 23/23] build(deps): bump bitflags from 2.0.2 to 2.1.0 (#6699) Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.0.2 to 2.1.0. - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/2.0.2...2.1.0) --- updated-dependencies: - dependency-name: bitflags dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 10 +++++----- helix-core/Cargo.toml | 2 +- helix-tui/Cargo.toml | 2 +- helix-view/Cargo.toml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 195a2201b256..472b3152a463 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,9 +75,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1" +checksum = "c70beb79cbb5ce9c4f8e20849978f34225931f665bb49efa6982875a4d5facb3" [[package]] name = "bstr" @@ -1081,7 +1081,7 @@ version = "0.6.0" dependencies = [ "ahash 0.8.3", "arc-swap", - "bitflags 2.0.2", + "bitflags 2.1.0", "chrono", "dunce", "encoding_rs", @@ -1207,7 +1207,7 @@ dependencies = [ name = "helix-tui" version = "0.6.0" dependencies = [ - "bitflags 2.0.2", + "bitflags 2.1.0", "cassowary", "crossterm", "helix-core", @@ -1240,7 +1240,7 @@ version = "0.6.0" dependencies = [ "anyhow", "arc-swap", - "bitflags 2.0.2", + "bitflags 2.1.0", "chardetng", "clipboard-win", "crossterm", diff --git a/helix-core/Cargo.toml b/helix-core/Cargo.toml index e5c5f8f1a24e..887a83cfcc8b 100644 --- a/helix-core/Cargo.toml +++ b/helix-core/Cargo.toml @@ -29,7 +29,7 @@ tree-sitter = "0.20" once_cell = "1.17" arc-swap = "1" regex = "1" -bitflags = "2.0" +bitflags = "2.1" ahash = "0.8.3" hashbrown = { version = "0.13.2", features = ["raw"] } dunce = "1.0" diff --git a/helix-tui/Cargo.toml b/helix-tui/Cargo.toml index 5a250bdc1f88..3d8a20d13883 100644 --- a/helix-tui/Cargo.toml +++ b/helix-tui/Cargo.toml @@ -16,7 +16,7 @@ include = ["src/**/*", "README.md"] default = ["crossterm"] [dependencies] -bitflags = "2.0" +bitflags = "2.1" cassowary = "0.3" unicode-segmentation = "1.10" crossterm = { version = "0.26", optional = true } diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml index 4f7b08edd191..f9d28795d9fb 100644 --- a/helix-view/Cargo.toml +++ b/helix-view/Cargo.toml @@ -14,7 +14,7 @@ default = [] term = ["crossterm"] [dependencies] -bitflags = "2.0" +bitflags = "2.1" anyhow = "1" helix-core = { version = "0.6", path = "../helix-core" } helix-loader = { version = "0.6", path = "../helix-loader" }