Commit Graph

2734 Commits

Author SHA1 Message Date
Craftman2868
3e475e2677
Add more net/http functions and types
Adding all function and types can be useful in net/http.
2022-07-06 17:33:45 +02:00
Zachary Yedidia
9ce469f372 Update zyedidia/pty for openbsd support
Fixes #2335
2022-06-24 23:31:13 -07:00
Zachary Yedidia
03ae049c0f Use zyedidia/clipper for external clipboard
Micro will now also search for a program called micro-clip for handling
the clipboard. This allows the user to make a program called micro-clip
that micro will call out to for performing copy/paste. For copy it will
be called with `micro-clip -i <reg>` and the text will be provided on
stdin. For paste it will be called with `micro-clip -o <reg>` and micro
expects the text to be provided on stdout.
2022-06-14 08:40:57 -04:00
Zachary Yedidia
4194c502ae Update clipboard for WSL support 2022-06-12 15:39:33 +01:00
Zachary Yedidia
f32da00667 Add discussions note to readme 2022-06-10 11:19:05 +01:00
Zachary Yedidia
a285e814c1 Update tcell for OSC 52 fix
Ref #2444
2022-06-08 23:47:56 +01:00
Ethan Kinnear
6948cc88ef
Register Brewfiles as Ruby files (#2432)
A `Brewfile` (sometimes named `.Brewfile`) is a bundler for Homebrew packages.
Brewfiles are written in Ruby and are functionally similar to Gemfiles.

`homebrew-bundle` on GitHub: <https://github.com/Homebrew/homebrew-bundle>.
`brew bundle` Manpage: <https://docs.brew.sh/Manpage#bundle-subcommand>.
2022-06-08 00:07:59 +01:00
Ruzie
25a19e2f21
fix: add "unknown" type (#2445) 2022-06-08 00:07:38 +01:00
Mikko
c57c5c04e5
Julia syntax improvements (#2415)
* fix D syntax highlighting for integer literals with underscores

* improve julia syntax highlighting for strings, chars and operators
2022-05-15 13:00:59 -07:00
Lars Müller
656e0a8a7b
Lua syntax highlighting: Various fixes (#2426) 2022-05-15 13:00:44 -07:00
Lars Müller
176d1aa17a
Fix syntax highlighting of single-quoted strings (#2425) 2022-05-15 13:00:29 -07:00
Lars Müller
db3afc1c0d
Fix Lua number syntax highlighting (#2409)
* Fix Lua number syntax highlighting

* Number RegEx: Fix hex exponent

The hex exponent doesn't support hex digits, only decimals.
2022-04-28 15:28:28 -07:00
esdnm
dd69599f37
Update README.md (#2400) 2022-04-10 16:36:19 -07:00
Zachary Yedidia
2f4675eb93 Merge 2022-02-26 18:33:35 -08:00
Zachary Yedidia
56c825c44c Update minimum required Go version to 1.16
Fixes #2361
2022-02-26 18:33:12 -08:00
0x5c
987e409071
Added lines and percentage statusbar directives (#2055)
- "lines" for the number of lines in the buffer
- "percentage" for the percentage of the file at the current line

Fixes zyedidia#2049
2022-02-22 01:31:32 -08:00
Philippe Eberli
fe59e18e69
Error in documentation of +LINE:COL (#2205)
Its +LINE:COL not +LINE,COL
2022-02-14 13:32:46 -08:00
ftphikari
d3b9b37b07
runtime/syntax: add rudimentary Odin support (#2296)
Odin is a general-purpose programming language with distinct typing,
built for high performance, modern systems, and built-in data-oriented
data types. The Odin Programming Language, the C alternative for
the joy of programming. The Data-Oriented Language for Sane Software
Development.

https://odin-lang.org/
https://odin-lang.org/docs/overview/
https://github.com/odin-lang/Odin
2022-02-11 14:15:34 -08:00
Evan Shimoniak
9ca89ad300
Made apparent the functionality of the ftoptions plugin (#2321)
* Clarified meaning of indentchar setting

The description "sets the indentation character" combined with the default value of a space led me to believe that this was a way to set a preference for tabs/spaces and choose a number of spaces per indentation all at once. I've updated the description to try to make its true function clearer.

* Added note on rmtrailingws

This behavior was unexpected for me, so it's probably good to let other users know which option has precedence.

* Added details to help command

Initially I kept trying to use `help <command-name>` rather than `help commands`

* Added warning about ftoptions and tabstospaces

The current description for ftoptions states that it "alters some default options depending on the filetype", which hints at this behavior, but does not explicitly state it.

* Clarified specific functionality of ftoptions
2022-02-11 14:15:26 -08:00
Andrey Bienkowski
031d953ed5
Help: mention (un)indent in defaultkeys (#2358) 2022-02-11 14:13:35 -08:00
Shura
9ece5c8a3f
Perl syntax improvement (#2359)
* Perl syntax improvement

Fixed \" inside strings
Fixed comment coloring
Improved integer, float, strings variable coloring
Added regex coloring

* Update perl.yaml
2022-02-11 14:13:27 -08:00
Andrew
f20179519f
Detect more file types for git syntax highlighting (#2330)
* Update git-commit.yaml

This will enable syntax highlighting for merge commit messages

* Update git-commit.yaml
2022-01-08 19:51:15 -08:00
dependabot[bot]
80d0654847
Bump gopkg.in/yaml.v2 from 2.2.7 to 2.2.8 (#2329)
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.7...v2.2.8)

---
updated-dependencies:
- dependency-name: gopkg.in/yaml.v2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-06 18:14:50 -08:00
Zachary Yedidia
a40d171d9c Merge 2022-01-06 18:11:15 -08:00
Zachary Yedidia
1cf8cbe546 Update luar import path
Fixes #2306
2022-01-06 18:11:02 -08:00
Zachary Yedidia
409ac54605 Add unofficial discord to readme 2022-01-01 00:33:05 -05:00
Juan Francisco Cantero Hurtado
3a1ec088e2
Raku syntax: fix comments (#2318)
Code:
 # sub xyz(Str is encoded("utf8")) returns int32 is native("asdf") { * }
2021-12-31 18:51:53 -05:00
Juan Francisco Cantero Hurtado
a2d83132ca
Raku syntax: Fix strings and comments (#2311)
* Raku syntax: Fix strings and comments

Problematic code:
my @array1 = [
   "'", "a", "b"
];
my @array2 = [
   '"', 'a', 'b'
];
my @array3 = [
   "#", "a", "b"
];

I deleted "default" because it was breaking comments with urls after
of my changes.

Some parts were taken from:
https://github.com/hankache/raku.nanorc/blob/master/raku.nanorc

* Raku syntax: fix strings

Code:
sub xyz(Str is encoded('utf8')) returns int32 is native('asdf') { * }
sub xyz(Str is encoded("utf8")) returns int32 is native("asdf") { * }

From python3.yaml
2021-12-31 17:42:21 -05:00
Reilly Wood
580c32bcef
Fix repo.json info in plugin docs (#2313) 2021-12-31 02:06:53 -05:00
Owen Valentine
cc0af275c1
Adjust default keybinding text (#2293)
Fixes #2287
2021-12-24 22:32:15 -05:00
Juan Francisco Cantero Hurtado
fd20fc8837
Fix the syntax for Raku variables. (#2309)
The current version has problems with the last argument and the
brackets in this code:

sub myfunction(Int $x1, Int $x2){

}

Taken from:
https://github.com/hankache/raku.nanorc/blob/master/raku.nanorc
2021-12-21 23:47:31 -05:00
Jake Leahy
c442d7030d
Fix edge case when comment is at start of line (#2237) 2021-12-05 17:45:10 -08:00
antonl05
6998cb5602
add more types for nim (#2284) 2021-11-22 22:41:04 -08:00
Zachary Yedidia
d2dca2b6c3 Fix 2021-11-22 18:46:36 -08:00
Zachary Yedidia
0e63224dea Use abspath for local glob settings
Ref #2276
2021-11-22 18:45:19 -08:00
Hugo Hromic
0bbc3e7e3d
Add support for alternatives system in Debian package (#1935)
* Allows for micro to be selectable in the `editor` group
* Use same priority as in the nano package

Ref: https://wiki.debian.org/DebianAlternatives
2021-11-17 15:51:40 -08:00
Matthias Thym
dd8e341de2
Fix linter help formatting (#2280) 2021-11-17 12:59:16 -08:00
abaldota
d023aef6b5
Python syntax: multiline string should be constant.string, not comment (#2268)
* Python syntax: multiline string should be comment.string, not comment 

''' delimits multiline strings, not comments

* Python syntax: multiline string should be comment.string, not comment 

''' delimits multiline strings, not comments

* Update python3.yaml for python3.10 keywords
2021-11-14 21:54:56 -08:00
Herby Gillot
26c24c25c0
README: add MacPorts install info (#2265) 2021-11-06 20:18:24 -07:00
Evan Shimoniak
58e3cc1be0
Clarified some documentation (#2259)
* Clarified meaning of indentchar setting

The description "sets the indentation character" combined with the default value of a space led me to believe that this was a way to set a preference for tabs/spaces and choose a number of spaces per indentation all at once. I've updated the description to try to make its true function clearer.

* Added note on rmtrailingws

This behavior was unexpected for me, so it's probably good to let other users know which option has precedence.

* Added details to help command

Initially I kept trying to use `help <command-name>` rather than `help commands`
2021-11-02 13:26:14 -07:00
Zachary Yedidia
7df91eb038 Fix makefile for cross compilation 2021-10-29 04:47:23 +00:00
Dmitry Maluka
728d87ceba
Fix regression: non-working direct colors in syntax files (#2252)
After 9ad4437, directly specifying color names (instead of syntax groups)
in syntax files no longer works. In particular *.patch and *.diff files
are not highlighted, since in patch.yaml direct colors names are used.

Restore the previous behavior of GetColor (fallback to direct colors if
no syntax group found) to fix this regression, but also make some changes
in StringToStyle and StringToColor to still fix the issue which was fixed
by 9ad4437. In other words, ensure that there is no confusion between
direct colors ("red", "green" etc) and syntax groups omitted in the
colorscheme file.
2021-10-27 15:12:55 -07:00
Zachary Yedidia
a6796fcbd9 Update makefile generation rules
Ref #2229
2021-09-29 16:30:20 -07:00
Dmitry Maluka
ffbb257434
Support for highlighting all search matches (hlsearch) (#1762)
* Support for highlighting all search matches (hlsearch)

hlsearch is implemented efficiently using the buffer's line array,
somewhat similarly to the syntax highlighting.
Unlike the syntax highlighter which highlights the entire file,
hlsearch searches for matches for the displayed lines only.
Matches are searched when the given line is displayed first time
or after it was modified. Otherwise the previously found matches
are used.

* Add UnhighlightSearch action

and add it to the list of actions triggered by Esc key by default.

* Add comment explaining the purpose of search map

* Add hlsearch colors to colorschemes

Mostly just copied from the corresponding original (mostly vim) colorschemes.

* Highlight matches during/after replace as well

As a side effect it also changes the last search value, i.e. affects FindNext
and FindPrevious, but it's probably fine. In vim it works the same way.

* Improve hlsearch option description
2021-09-28 13:39:03 -07:00
Dmitry Maluka
9ad4437a98
Fix some issues with default colors in colorschemes (#2225)
* Fix default colors for unconfigured syntax groups

When GetColor is called for a syntax group not specified in the
colorscheme, it should fallback not to the terminal's default colors
(tcell.DefaultColor) but to the colorscheme's defaults (DefStyle)
which may be different from tcell.DefaultColor.

For example, if we are using micro's default colorscheme in a terminal
which uses a black-on-white theme, then dots and commas in Go files
("symbol" syntax group in go.yaml) are displayed black on a dark
background, i.e. barely visible.

* Avoid using terminal's default colors directly

If a syntax group color is set to "default" (which we have for some
syntax groups in some colorschemes), it defaults to the terminal's
default colors (tcell.DefaultColor), which is fine for 16-color
colorschemes but not quite fine for truecolor and 256-color
colorschemes which should not depend on the terminal colors.
It should default to the colorscheme's default (DefStyle) instead.

For example, if we are using micro's default colorscheme in a terminal
which uses a black-on-white theme, then "bool" type in C files
("type.extended" syntax group in c.yaml) is displayed black on a dark
background, i.e. barely visible.
2021-09-28 13:30:29 -07:00
Dmitry Maluka
a21a720941
Make 'make' do the same as 'make build' (#2217)
Fix a slight regression after ec3292: when 'make' is run without specifying
a target, it counter-intuitively runs fetch-tags instead of building micro.
2021-09-24 14:40:26 -07:00
Ryan Westlund
c2d7b62e8f
Fix #2190: Document goto command in commands.md (#2218) 2021-09-24 14:40:11 -07:00
Ryan Westlund
9270f17378
Fix #1943: 'Duplicated line' message being wrong (#2219) 2021-09-24 14:39:58 -07:00
TogoorooDev
395bfc2307
Syntax Highlighting Support for FreeBSD Kernel Configuration Files (#2220)
* added FreeBSD kernel configuration file format

* updated format, notably to highlight the word 'include'
2021-09-24 14:39:46 -07:00
Ali Kefia
a417ec4dcb
normalize path - force slash separator to access embed FS (#2197) 2021-08-25 16:26:54 -04:00