Contain the vimNotation syntax group, matching this at top level is
unnecessary and very slow.
The removed vimString and vimNumber definitions are broken and/or never
match. They have long been replaced by newer definitions.
closes: #16645
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: enabling termguicolors automatically confuses users. Since
querying the terminal for the RGB flag happens asynchronously,
enabling termguicolors is noticeable by users as the highlighting changes
and is therefore unexpected.
(after v9.1.1054)
Solution: comment out that part for now. We may need another way to
enable this in the future.
fixes: #16539fixes: #16568fixes: #16649
Signed-off-by: Christian Brabandt <cb@256bit.org>
The "Ukrainian enhanced keymap" allows you to type Ukrainian in Vim
using jcuken Windows layout.
Original file is made by Ivan Korneliuk and can be found at
https://github.com/vansha/ukrainian-enhanced.vim. It is being added here
with the permission of the author.
There is another ukrainian layout already in Vim, namely the
keymap\ukrainian-jcuken.vim script by Anatoli Sakhnik. But this one
differs in way it maps numeric keys. It uses values usual for Windows
users.
closes: #16628
Signed-off-by: Vladyslav Rehan <rehanvladyslav@gmail.com>
Signed-off-by: Ivan Korneliuk <vansha@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim tests are slow and flaky at the same time due to reliance
on timeouts which are unreliable.
Solution: improve Vim test performance and reduce flakiness
(Yee Cheng Chin)
A lot of Vim tests currently rely on waiting a specific amount of time
before asserting a condition. This is bad because 1) it is slow, as the
timeout is hardcoded, 2) it's unreliable as a resource-starved runner
may overshoot the timeout. Also, there are a lot of builtin sleep
commands in commonly used utilities like VerifyScreenDump and WaitFor()
which leads to a lot of unnecessary idle time.
Fix these issues by doing the following:
1. Make utilities like VerifyScreenDump and WaitFor use the lowest wait
time possible (1 ms). This essentially turns it into a spin wait. On
fast machines, these will finish very quickly. For existing tests
that had an implicit reliance on the old timeouts (e.g.
VerifyScreenDump had a 50ms wait before), fix the tests to wait that
specific amount explicitly.
2. Fix tests that sleep or wait for long amounts of time to instead
explicitly use a callback mechanism to be notified when a child
terminal job has finished. This allows the test to only take as much
time as possible instead of having to hard code an unreliable
timeout.
With these fixes, tests should 1) completely quickly on fast machines,
and 2) on slow machines they will still run to completion albeit slowly.
Note that previoulsy both were not true. The hardcoded timeouts meant
that on fast machines the tests were mostly idling wasting time, whereas
on slow machines, the timeouts often were not generous enough to allow
them to run to completion.
closes: #16615
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match Vim9 boolean and null literals in parenthesised expressions and
function argument lists.
- Match read-only registers in expressions.
closes: #16622
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: no support for protected new() method
Solution: support the protected "_new()" object method
(Yegappan Lakshmanan)
closes: #16604
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Currently syntax tests outputs all the Vim commands to the console,
which is annoying for a local developer but also makes the CI output
impossible to parse and just printing all the terminal output comes with
a performance penalty.
So let's just simply redirect all output to /dev/null similar to what
the script tests do.
This can be turned off locally for someone diagnosing issues but it
should not be the default behavior to output all terminal control
sequences to output in CI.
closes: #16612
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match variables after operators, including line continuations.
- Match option variables without leading whitespace.
- Explicitly match expression subscripts.
- Match Vim9 variables in LHS of assignments and method calls.
- Match option variables (&option) with a dedicated syntax group like
environment variables.
- Match list literals, fixes: #5830
- Match :{un}lockvar arguments.
- Match registers and environment variables in :let unpack lists.
- Match lambda expressions
- Match Vim9 scope blocks
- Match variables in :for subject
- Highlight user variables with Normal
- Improve this/super keyword matching, fixes: #15970closes: #16476
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Match both | separators and link to the Delimiter highlight group.
fixes#16584closes: #16590
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion doesn't work with multi lines
(Łukasz Jan Niemier)
Solution: handle linebreaks in completion code as expected
(glepnir)
fixes: #2505closes: #15373
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: cmmt files are not recognized
Solution: detect '*.cmmt' as trace32 filetype
(Christian Sax)
"*.cmmt" files use the same syntax as regular TRACE32 scripts,
but are intended as a kind of script template.
closes: #16598
Signed-off-by: Christoph Sax <c_sax@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Unable to persistently ignore events in a window and its buffers.
Solution: Add 'eventignorewin' option to ignore events in a window and buffer
(Luuk van Baal)
Add the window-local 'eventignorewin' option that is analogous to
'eventignore', but applies to a certain window and its buffers. Identify
events that should be allowed in 'eventignorewin', adapt "auto_event"
and "event_tab" to encode this information. Window context is not passed
onto apply_autocmds_group(), and when to ignore an event is a bit
ambiguous when "buf" is not "curbuf", rather than a large refactor, only
ignore an event when all windows into "buf" are ignoring the event.
closes: #16530
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
this change includes the following changes:
- a macro option must be #1–#9
- add \providecommand
- add starred versions of \newcommand, \newenvironment, and their
variants
- add number of arguments to \(re)newenvironment
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: has('bsd') is true for GNU/Hurd
Solution: exclude GNU/Hurd from BSD feature flag
(Zhaoming Luo)
GNU/Hurd, like Mac OS X, is a BSD-based system. It should exclude
has('bsd') feature just like what Mac OS X does. The __GNU__ pre-defined
macro indicates it's compiled for GNU/Hurd.
closes: #16580
Signed-off-by: Zhaoming Luo <zhmingluo@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: Mill files are not recognized
Solution: detect '*.mill' files as scala filetype
(author)
In the past [Mill](https://mill-build.org/mill/index.html) build files
were always `build.sc` and treated as Scala files. However as the 0.12.x
series of mill you can create a `build.mill` file. You can see a lot of
examples of this if you search
[GitHub](https://github.com/search?q=build.mill&type=code). This small
change just ensures that if you have a `*.mill` file it treats it as a
Scala file.
closes: #16585
Signed-off-by: Chris Kipp <ckipp@pm.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
while at it, clean up the tar plugin a bit and sort the patterns for the
tar and gzip plugin
References:
- https://github.com/lz4/lz4
- https://lz4.org/closes: #16591
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Corpulent Robin <177767857+corpulentrobin@users.noreply.github.com>
Match :0debuggreedy as a special case until better range/count support
is implemented.
closes: #16572
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Cannot control cursor positioning of getchar().
Solution: Add "cursor" flag to {opts}, with possible values "hide",
"keep" and "msg".
related: #10603closes: #16569
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: getchar() can't distinguish between C-I and Tab.
Solution: Add {opts} to pass extra flags to getchar() and getcharstr(),
with "number" and "simplify" keys.
related: #10603closes: #16554
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: no digraph for "Approaches the limit"
Solution: Add the digraph using .= (Hans Ginzel)
Add digraph Approaches the Limit
≐ U+2250 https://www.fileformat.info/info/unicode/char/2250/index.htmcloses: #16508
Signed-off-by: Hans Ginzel <hans@matfyz.cz>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: not possible to use plural forms with gettext()
Solution: implement ngettext() Vim script function (Christ van Willegen)
closes: #16561
Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem:
Saw the following error when invoking gx mapping with cursor on a URL:
Error detected while compiling function <SNR>95_GetWordUnderCursor:
line 7:
E1123: Missing comma before argument: return expand(user_var)
E116: Invalid arguments for function dist#vim9#Open
Solution:
The line before "return expand(...)" has two open parentheses but only
one close parenthesis. Add another close parenthesis.
closes: #16553
Signed-off-by: Morton Fox <github@qslw.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim always enables 'termguicolors' in a terminal, even
when not wanted (after v9.1.1054)
Solution: Respect `:set notermguicolors` in vimrc file
fixes: #16538fixes: #16539closes: #16540
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: translation(sr): Missing Serbian translation for the tutor
Solution: include new Serbian translation for the new tutor,
include translation for chapter 2 of the traditional tutor,
update the Makefiles for installing the runtime files
(Ivan Pešić)
closes: #16550
Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The version check introduced with commit edd4ac3e8 has a logic error.
Also it should only trigger when trying to use the netrw plugin and not
always.
fixes: #16541
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim doesn't highlight to be inserted text when completing
Solution: Add support for the "preinsert" 'completeopt' value
(glepnir)
Support automatically inserting the currently selected candidate word
that does not belong to the latter part of the leader.
fixes: #3433closes: #16403
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
relevant commits:
- deprecate!: netrw#Launch, netrw#Open and gx mappings
- refactor: move some utility functions in a private file
- feat: add function to deprecate features
- refactor!: remove NetrwClean command and function
- refactor: use appropriate directories to store temporary files
- refactor: better way to call vim.ui.open
- refactor(Open): prefer lua wrapper function instead of cmdline
- refactor!: drop vim 7 checks
- refactor: use vim.ui.open when using neovim
- refactor: remove s:CheckIfKde
- refactor: balloon functionality
- refactor!: remove netrw#Access function
closes: #16519
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim doesn't work well with TERM=xterm-direct
(Andrea Pappacoda)
Solution: detect if a terminal supports true-colors and
enable termguicolors
The terminfo database for xterm-direct contains both the (non-standard)
termcap RGB capability and a number of colors == 0x1000000 so it seems
either of those two options can be used to detect a terminal capable of
displaying true colors.
So set the termguicolor option automatically, when either of the two
options is detected. (for some reasons, my debian xterm (v393) does not
respond to XTGETTCAP query attempts, so falling back to the number of
colors seems like a good compromize)
fixes: #16327closes: #16490
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: insert-completed items are always sorted, although the LSP
spec[1] standard defines sortText in the returned
completionitem list. This means that the server has sorted the
results. When fuzzy is enabled, this will break the server's
sorting results.
Solution: disable sorting of candidates when "nosort" is set in
'completeopt'
[1]
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemcloses: #16501
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: N-Tripels and TriG files are not recognized
Solution: detect '*.nt' files as ntriples filetype and '*.trig' files
as trig filetype (Gordian Dziwis)
closes: #16493
Signed-off-by: Gordian Dziwis <gordian@dziw.is>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: Patch 9.1.1014 causes regressions
Solution: revert it for now
This reverts commit 57f0119358ed7f060d5020309b9043463121435f since this
causes some regressions:
https://github.com/vim/vim/pull/16440#issuecomment-2600235629
So revert "patch 9.1.1014: Vim9: variable not found in transitive
import" for now.
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: just files are not recognized
Solution: adjust filetype detection pattern, detect just shebang line,
include just ftplugin, indent and syntax plugin
(Peter Benjamin)
closes: #16466
Signed-off-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>