* support integer highlighting
* add missing keywords and move some to where they fit better
* add missing operators
* fix previous commit
* add and
* add import
* Add enum keyword to PHP (8.1) syntax
* Specify only keywords that are valid as type declarations as PHP types
boolean, integer and resource are not valid type name.
* Add match keyword to PHP (8.2) syntax
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
* 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
* 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
* 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
* 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`
* 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
Improvements:
- Use proper scope names for better colorization
- Better regex to detect binary, octal, decimal and hexadecimal numbers
- Extend some definitions based on the Vlang docs
Co-authored-by: AAAA <dev@onerbs.com>
Make the regular expression much more precise:
* match literal dots instead of any char (match rc.conf but not rcXconf)
* match special filenames exactly (match PKGBUILD but not myPKGBUILD.something)
Run build-all to update internal/config/runtime.go
closes#2163
Highlight character literals started with a single quote (').
Importantly this ensures correct highlighting for the character literal '"'.
Limitation: rust char literals contain exactly one character, however this isn't checked by the highlighter.
Closes#2160
* shellcheck as a new shell linter + runtime.go out of git control
* keep runtime.go and keep both shfmt and shellcheck since we can remove from custom conf
* Added highlighting for user-defined types
Provides automatic highlighting of user-defined types ending with either "_t" or "_T", as is seen in editors such as Nano, or within GitHub itself.
* Update cpp.yaml
Softwrap implementation enhanced to fix various issues with scrolling,
centering, relocating etc.
The main idea is simple: work not with simple line numbers but
with (Line, Row) pairs, where Line is a line number in the buffer
and Row is a visual line (a row) number within this line.
The logic remains mostly the same, but simple arithmetic operations
on line numbers are replaced with corresponding operations on
(Line, Row) pairs.
Fixes#632, #1657
Don't highlight things that don't exist, add some missing keywords,
highlight true/false/nil as constants instead of keywords, and
highlight types as types instead of constants.
- move type cast keywords into operators, since that's their syntactic function
- fix a single dot being matched as a constant.number
- add the missing caret operator
* Overall syntax highlighting improvements for C++
Most of these changes are based on the information on cppreference.com;
specifically from here: https://en.cppreference.com/w/cpp/keyword
- made `identifier` actually match any identifier
- add ~ as an operator
- add `static_assert` as a keyword (statement)
- add keywords that are interchangeable with operators as operators
- add keywords `sizeof`, `alignof` and `typeid` as operators
- add the quasi-keywords `asm`, `fortran` and `final`, `override`
- add the keyword `nullptr`
- add `_Pragma` as a preprocessor keyword
- add C++20 (concepts and modules) -related keywords
- add casting keywords
- add the keyword (specifier) `noexcept`
- remove `nothrow` (because it's not any more special than `vector` is)
- add `wchar_t` and `charXX_t` types
- add cv type keywords as `type.keyword`s
- move some fitting keywords into `type.keywords`
(mostly because they appear in/near type signatures etc.)
I didn't include coroutine-related language features,
primarily because there is no good source of information
about them other than the ISO C++ standard.
* Further changes to C++ syntax highlighting
- reverted the changes to the `identifier` regex, since most
colorschemes color it the same as `type`s and/or `statement`s
- fix the 2nd `type` regex (the word boundaries were in only two pipe-options)
- move `nullptr` back into `constant.bool`,
since it looks better in-editor this way (imo)
- add `?` as an operator
- add regexes that match all the correct number literals, and nothing else
(see https://en.cppreference.com/w/cpp/language/floating_literal)
(that is, if I haven't made a mistake)
* Python3: Add built-in object 'cls'
* Python3: Add the bitwise negation operator ~
* Python3: Add support for hexadeximal and binary numerical literals
* Python3: Rewrite '(__foo__|__bar__)' as '__(foo|bar)__', add known '__i.*__' methods
* Python3: Add __iter__ as a magic method, sort the list of magic methods
* Python3: Numerical literals: Add support for '_', disallow leading 0 for decimals
* fixup! Python3: Numerical literals: Add support for '_', disallow leading 0 for decimals
hex oct and bin have different sets of allowed digits
* Python3: Add support for floating point numbers with optional scientific notation
* Python3: stop single-line strings at EOL
* Python3: Add support for TODO and FIXME in comments
* Python3: Add support for the ^ bitwise xor operator
When commenting a selection, the plugin won't just toggle each
line individually but will only uncomment the block if it is all
comments.
The comment plugin also now takes into account any number of spaces
between the comment character and the text. For example '//comment' will
be uncommented properly, as well as '// comment'.
Fixes#1758
This commit introduces several improvements to the backup system.
* Backups are made every 8 seconds for buffers that have been modified
since the last backup.
* The `permbackup` option allows users to specify that backups should
be kept permanently.
* `The backupdir` option allows users to store backups in a custom
directory.
Fixes#1641Fixes#1536
Ref #1539 (removes possibility of race condition for backups)
The old notation (for example `CtrlG`) causes confusion when combined
with new notation needed for alt (`Alt-g`) due to Alt being case
sensitive. Previously both formats were supported, but the documentation
and defaults used a combination. This commit only uses the new notation
for consistency.
Ref #1470
This option is disabled by default, and when enabled causes micro
to parse `:line:col` as a location for the cursor rather than
as part of the filename.
Closes#1650Closes#1685
* Added hybrid line numbers
* Changed rulerhybrid to relativeruler, modified documentation accordingly.
* Reverted go.mod and go.sum
I don't know how they got changed but they are good now.
Co-authored-by: Colin Hughes <semilin@pop-os.localdomain>
* Adds command "tabmove ±n", for better tab management
* Added tabmove to help:commands
* Replace uses of util.Min, util.Max with util.Clamp
Browsing code and discovered `util.Clamp`, ideal for this section of my code
* oops, missed an arg
* Typo, again