mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-13 11:00:58 +00:00
Merge
This commit is contained in:
commit
0efc919f24
5 changed files with 75 additions and 12 deletions
|
|
@ -91,9 +91,10 @@ func (b *Buffer) findUp(r *regexp.Regexp, start, end Loc) ([2]Loc, bool) {
|
|||
l = util.SliceStart(l, end.X)
|
||||
}
|
||||
|
||||
match := r.FindIndex(l)
|
||||
all_matches := r.FindAllIndex(l, -1)
|
||||
|
||||
if match != nil {
|
||||
if all_matches != nil {
|
||||
match := all_matches[len(all_matches)-1]
|
||||
start := Loc{charpos + util.RunePos(l, match[0]), i}
|
||||
end := Loc{charpos + util.RunePos(l, match[1]), i}
|
||||
return [2]Loc{start, end}, true
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -31,6 +31,10 @@ Here is a list of terminal emulators and their status:
|
|||
|
||||
* `gnome-terminal`: does not support OSC 52.
|
||||
|
||||
* `alacritty`: supported.
|
||||
|
||||
* `foot`: supported.
|
||||
|
||||
**Summary:** If you want copy and paste to work over SSH, then you
|
||||
should set `clipboard` to `terminal`, and make sure your terminal
|
||||
supports OSC 52.
|
||||
|
|
|
|||
|
|
@ -83,8 +83,9 @@ function preinit()
|
|||
makeLinter("pylint", "python", "pylint", {"--output-format=parseable", "--reports=no", "%f"}, "%f:%l: %m")
|
||||
makeLinter("flake8", "python", "flake8", {"%f"}, "%f:%l:%c: %m")
|
||||
makeLinter("shfmt", "shell", "shfmt", {"%f"}, "%f:%l:%c: %m")
|
||||
makeLinter("shellcheck", "shell", "shellcheck", {"-f", "gcc", "%f"}, "%f:%l:%c:.+: %m")
|
||||
makeLinter("swiftc", "swift", "xcrun", {"swiftc", "%f"}, "%f:%l:%c:.+: %m", {"darwin"}, true)
|
||||
makeLinter("swiftc", "swift", "swiftc", {"%f"}, "%f:%l:%c:.+: %m", {"linux"}, true)
|
||||
makeLinter("swiftc-linux", "swift", "swiftc", {"%f"}, "%f:%l:%c:.+: %m", {"linux"}, true)
|
||||
makeLinter("yaml", "yaml", "yamllint", {"--format", "parsable", "%f"}, "%f:%l:%c:.+ %m")
|
||||
makeLinter("nix-linter", "nix", "nix-linter", {"%f"}, "%m at %f:%l:%c", {"linux"}, true)
|
||||
|
||||
|
|
|
|||
|
|
@ -24,15 +24,27 @@ rules:
|
|||
- constant.string:
|
||||
start: "\""
|
||||
end: "\""
|
||||
skip: "\\\\."
|
||||
skip: '\\.'
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.specialChar: '\\.'
|
||||
|
||||
- constant.string:
|
||||
start: "r#+\""
|
||||
end: "\"#+"
|
||||
rules: []
|
||||
|
||||
# Character literals
|
||||
# NOTE: This is an ugly hack to work around the fact that rust uses
|
||||
# single quotes both for character literals and lifetimes.
|
||||
# Match all character literals.
|
||||
- constant.string: "'(\\\\.|.)'"
|
||||
# Match the '"' literal which would otherwise match
|
||||
# as a double quoted string and destroy the highlighting.
|
||||
- constant.string:
|
||||
start: "'\""
|
||||
end: "'"
|
||||
rules: []
|
||||
|
||||
- comment:
|
||||
start: "//"
|
||||
end: "$"
|
||||
|
|
@ -49,4 +61,3 @@ rules:
|
|||
start: "#!\\["
|
||||
end: "\\]"
|
||||
rules: []
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue