Problem: filetype: Kawasaki Robots files are not recognized
Solution: Detect *.pg as kawasaki_as filetype, add filetype detection
for *.as as atlas or kawasaki_as filetype (KnoP-01).
In Kawasaki robots (https://kawasakirobotics.com/products-robots/)
AS language
*.pg is the extention for a program file and
*.as is for a complete backup.
closes: vim/vim#20370dec3d6c7da
Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
Problem:
It is repetitive to map multiple keymaps to do the same thing. Here are some
cases where being able to do this would be useful:
-- Visual movement for both j/k and down/up:
vim.keymap.set({ 'n', 'x' }, { 'j', '<Down>' }, 'v:count == 0 ? "gj" : "j"', { expr = true })
vim.keymap.set({ 'n', 'x' }, { 'k', '<Up>' }, 'v:count == 0 ? "gk" : "k"', { expr = true })
-- Map multiple keys to `<Nop>` concisely:
vim.keymap.set({ 'n', 'x' }, { '<Leader>', '<Localleader>', '<CR>' }, '<Nop>')
-- Remove multiple keymaps at once:
vim.keymap.del('n', { 'gri', 'grn', 'grr' })
Solution:
Support the `lhs` of `vim.keymap.set()` and `vim.keymap.del()` being a table, in
the same way that `modes` can be.
Problem:
Currently, only some filesystems (Btrfs, ext2, ext3, ext4) have full
support of accessing the `dirent` entry-type. On other filesystems,
`uv.fs_scandir_next` may return `nil` for an existing but unsupported
entry-type.
This means consumers (such as `fs.dir()`), cannot know if `nil` means
"non-existent" or "unsupported".
Solution:
Fall back to `uv.fs_lstat` when `etype` is `nil`; return "unknown" if it
fails.
Problem: The "%v" item in 'errorformat' interprets the reported
screen column using the buffer's 'tabstop', so the cursor
jumps to the wrong column when 'tabstop' is not 8
(vimpostor).
Solution: When resolving a "%v" column, always count a <tab> as 8
screen columns, independent of 'tabstop', matching the
column numbers reported by compilers; keep the multi-byte
handling. Also use "%v" in the gcc compiler file and
update the documentation (Hirohito Higashi).
fixes: vim/vim#20321closes: vim/vim#2035944dcad20f2
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: vimpostor <21310755+vimpostor@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Remove `g:algol68_symbolic_operators` config variable, these operators
are now always highlighted along with bold word operators
- Remove GSL `/-` operator, this was a typo in the implementation and
now fixed in the latest Genie release as `/=`
closes: vim/vim#201955333d9b670
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem:
Deduplicating LSP locations in the default handler changes list behavior for every user, while some configurations may intentionally return matching locations from multiple clients.
Solution:
Document how users can deduplicate locations in an on_list handler with vim.list.unique().
Co-authored-by: Deepak kudi <deepakkudi23@adsl-172-10-9-116.dsl.sndg02.sbcglobal.net>
Co-authored-by: Puneet Dixit <236133619+puneetdixit200@users.noreply.github.com>
Problem: Redrawing when a loaded buffer is not shown in any window on
the current tabpage.
Solution: Check that buffer is shown in a (normal) window before redrawing.
Problem: filetype: too many Bitbake include files are recognized
(Brahmajit Das, after v9.1.1732)
Solution: Tighten the pattern to detect BitBake include files, update
tests (Martin Schwan).
Be more strict when detecting BitBake inc files. In particular, only
match include keywords and variable assignments at the beginning of a
line (excluding whitespace).
Use non-capturing groups to slightly improve performance.
Use regex or-operators to exactly match BitBake assignment operators.
The previous expression would falsely match
FOO .=. "bar"
, which is not valid BitBake syntax. The new capturing group is more
specific and matches only valid assignments.
fixes: vim/vim#20288closes: vim/vim#203352df68c8e4b
Co-authored-by: Martin Schwan <m.schwan@phytec.de>
Problem: A leading space in the result of a %{} item is sometimes
stripped, and an all-digit result is converted to a number.
Solution: Add %0{} atom which inserts the expression result verbatim
(glepnir)
fixes: vim/vim#3898closes: vim/vim#20315e8d7a40b98
Co-authored-by: glepnir <glephunter@gmail.com>
Problem: tests: matchit plugin is not tested
Solution: Add test_plugin_matchit, improve b:match_words for the html
filetype plugin (Andrey Starodubtsev)
`b:match_words` which contains patterns used by `matchit` plugin to find
tag's counterpath, is fixed so that matching happens using the whole
tag, not just its first letter.
Also, it allows to find matching tag in case if there are spaces or
attributes after tag name.
fixes: chrisbra/matchit#51closes: vim/vim#203133a90b2ba8e
Co-authored-by: Andrey Starodubtsev <andrey.starodubtsev@gmail.com>
Anchor the return type separator ':' with a lookbehind as the relevant
nextgroup options use skipwhite.
closes: vim/vim#20319dfdeba16d7
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: spell: a word in a .dic file with many postponed prefix or
compound flags overflows the fixed-size store_afflist[MAXWLEN]
buffer in get_pfxlist() and get_compflags().
Solution: Add bounds checks (Yasuhiro Matsumoto).
closes: vim/vim#202869a920e8254
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Problem: tests: no test for using shellescape() in combination with :!
Solution: Add a test that checks runtime files for using wrong
combination of shellescape() with ! ex command
This has lead to a few security relevant issues, so add a test that
checks all runtime files for any ! followed by a shellescape() that does
not use the {special} arg.
related: Commit: 3fb5e58fbc63d86a3e65f1a141b0d67af2 (patch 9.2.0479:
[security]: runtime(tar): command injection in tar plugin)
closes: vim/vim#20286
Supported by AI
fccc2adc98
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem:
We can resolve the `CompletionItem.detail` field but don't advertise
this capability.
Solution:
Add `detail` to
`textDocument.completion.completionItem.resolveSupport.properties`.
Problem:
The logic for generating the complete item `info` is spread across
`_lsp_to_complete_items`, the `CompleteChanged` event handler, and
`CompletionResolver:request`. This has previously caused the `info`
shown for resolved (via `completionItem/resolve`) and unresolved items
to differ.
Solution:
Centralise the logic in a new `complete_item_info` function which is now
solely responsible for determining:
1. The `info` to show.
2. The markup kind of the `info`.
3. Whether the `info` is complete.
This simplifies the interaction between the 3 functions mentioned in the
problem:
- `_lsp_to_complete_items` calls `complete_item_info` and passes along
the markup kind and whether the item needs resolving via the complete
item's `user_data`.
- The `CompleteChanged` consumes the markup kind and whether the
item needs resolving from the complete item's `user_data`.
- `CompletionResolver:request`, like `_lsp_to_complete_items` calls
`complete_item_info` again and updates the current `info` if it's
changed.
Problem:
`CompletionItem.detail` is only shown in the info popup if the server
supports `completionItem/resolve`.
Solution:
If the server doesn't support `completionItem/resolve`, prepend the
complete item `info` with `CompletionItem.detail` in a fenced codeblock,
same as we do when the server supports `completionItem/resolve`.
To ensure that completion items are displayed in the same way,
regardless of whether the server supports `completionItem/resolve`, i've
extracted out the test logic from the `selecting an item triggers
completionItem/resolve + (snippet) preview` case so that we can run the
same tests against a server which supports `completionItem/resolve` and
one which doesn't. Hopefully this should prevent the two behaviours
diverging again.
Problem:
If `CompletionItem.documentation` is populated but `detail` is not, then
`detail` is not resolved.
Solution:
Ensure that we resolve a `CompletionItem` if either `detail` or
`documentation` are not populated.
I've also removed `detail` from the popup menu since otherwise it will
be populated in both the popup menu and the info popup after the
`CompletionItem` has been resolved. I think the info popup is the best
place for it anyway as when there is a completion item with a long popup
menu entry (when `detail` is a medium/long function signature for
instance), the whole popup menu gets widened and this steals horizontal
space that could be used to display the `documentation`. Now with
`detail` and `documentation` in the info popup, they share the same
horizontal space. This also aligns with how VSCode, nvim-cmp, blink.cmp,
and mini.nvim display `detail`.
Problem:
When a resolved `CompletionItem` with kind `Snippet` populates
`textEdit` instead of `insertText`, the contents are not previewed.
Solution:
Generate the snippet preview from `textEdit.newText` as well.
Problem: Processing of a very long message may take a long time; there
is no visual feedback of work being done, and no way to abort
processing.
Calculating text height for spill indicator inhibits
performance for very long message.
Solution: Whenever writing part of a message is taking longer than 100ms,
show the first part of the message, while checking for CTRL-C.
Calculate ('wrap'-ed) text height accurately until 'lines',
use line count beyond that.