Commit Graph

29213 Commits

Author SHA1 Message Date
Famiu Haque
75b80516d5
build: fix link error for _BitScanForward64 (#28173)
Problem: The usage of `_BitScanForward64` causes linking to fail on some systems.
Solution: Correctly check if it exists using `check_c_source_compiles`.
2024-04-05 09:56:35 +08:00
zeertzjq
dc69c475a5
vim-patch:9.1.0262: Test for TextChanged is flaky with ASAN (#28180)
Problem:  Test for TextChanged is flaky with ASAN.
Solution: Wait for the file to be non-empty.
          (zeertzjq)

closes: vim/vim#14404

4a65391ca2
2024-04-05 07:24:25 +08:00
dundargoc
e016f5bee6 test: reduce exec_lua calls
`exec_lua` makes code slighly harder to read, so it's beneficial to
remove it in cases where it's possible or convenient.

Not all `exec_lua` calls should be removed even if the test passes as it
changes the semantics of the test even if it happens to pass.

From https://github.com/neovim/neovim/pull/28155#discussion_r1548185779:

"Note for tests like this, which fundamentally are about conversion, you
end up changing what conversion you are testing. Even if the result
happens to be same (as they often are, as we like the rules to be
consistent if possible), you are now testing the RPC conversion rules
instead of the vim script to in-process lua conversion rules."

From https://github.com/neovim/neovim/pull/28155#discussion_r1548190152:

"A test like this specifies that the cursor is valid immediately and not
after a separate cycle of normal (or an other input-processing) mode."
2024-04-04 13:10:11 +02:00
Christian Clason
56701cd21e vim-patch:08d2401fbc6d
runtime(netrw): filetype not detected when editing remote files

fixes: vim/vim#14400

08d2401fbc

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-04 10:29:58 +02:00
zeertzjq
15a2dd9e96
vim-patch:89cc03af71d9 (#28168)
runtime(doc): sort filetype.txt in the alphabetical order (vim/vim#14395)

89cc03af71

Co-authored-by: K.Takata <kentkt@csc.jp>
2024-04-04 06:19:13 +08:00
zeertzjq
a469745338
vim-patch:9.1.0259: Normal mode TextChanged isn't tested properly (#28167)
Problem:  Normal mode TextChanged isn't tested properly.
Solution: Combine Test_Changed_ChangedI() and Test_Changed_ChangedI_2()
          and also run it on Windows. Fix a typo in main.c.
          (zeertzjq)

closes: vim/vim#14396

c422662933
2024-04-04 06:11:17 +08:00
bfredl
1b55ed58ec
Merge pull request #28156 from bfredl/attr_extend
refactor(tests): allow to extend the new base set of attrs
2024-04-03 13:39:08 +02:00
Raphael
dbc0fa9bd6
fix(stdpath): remove duplicate directories (#26653) 2024-04-03 18:44:57 +08:00
bfredl
ab0d3c4098
Merge pull request #28157 from fredizzimo/fsundvik/fix-io
fix: prevent child processes from inheriting ui channel file descriptors
2024-04-03 12:35:57 +02:00
Christian Clason
e74cd1d9ff vim-patch:9.1.0253: filetype: typespec files are not recognized
Problem:  filetype: typespec files are not recognized
Solution: Detect '*.tsp' files as typespec
          (Hilmar Wiegand)

Specs is at https://typespec.io/

closes: vim/vim#14392

6c9f4f98f1

Co-authored-by: Hilmar Wiegand <me@hwgnd.de>
2024-04-03 10:45:29 +02:00
zeertzjq
99b3a068de
vim-patch:8.2.4098: typing "interrupt" at debug prompt may keep exception around (#28161)
Problem:    Typing "interrupt" at debug prompt may keep exception around,
            causing function calls to fail.
Solution:   Discard any exception at the toplevel. (closes vim/vim#9532)

069613c9e8

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-04-03 10:43:03 +08:00
zeertzjq
30b94ae494
Merge pull request #28153 from zeertzjq/vim-9.0.0581
vim-patch:9.{0.0581,1.0254}
2024-04-03 06:15:31 +08:00
zeertzjq
aeabd8e245 vim-patch:9.1.0254: [security]: Heap buffer overflow when calling complete_add() in 'cfu'
Problem:  [security]: Heap buffer overflow when calling complete_add()
          in the first call of 'completefunc'
Solution: Call check_cursor() after calling 'completefunc' (zeertzjq)

closes: vim/vim#14391

0a419e07a7
2024-04-03 05:55:50 +08:00
zeertzjq
a941207523 vim-patch:9.0.0581: adding a character for incsearch fails at end of line
Problem:    Adding a character for incsearch fails at end of line.
Solution:   Only check cursor line number.

d4566c14e7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-04-03 05:55:50 +08:00
Fred Sundvik
b400b947f3 fix: prevent child processes from inheriting ui channel file descriptors 2024-04-02 22:15:34 +03:00
bfredl
fa74f75710 refactor(tests): allow to extend the new base set of attrs
We start at 100 so we can make the base set larger if needed. (It might need to
grow/shrink as a result of adopting the new default color scheme as the
default for tests)

Usage best illustrataded by example.

Improving the workflow for making new tests with `screen:snapshot_util()` will
be a follow up.
2024-04-02 20:28:27 +02:00
Lewis Russell
d9235efa76 refactor(lsp): move workspace folder logic into the client
- Changed `reuse_client` to check workspace folders in addition to
  root_dir.
2024-04-02 16:47:17 +01:00
dundargoc
ffe3002568 test: silence expected errors
This will remove unrelated errors in .nvimlog at the end of test output.
2024-04-02 17:07:44 +02:00
Christian Clason
6cfca21bac feat(treesitter): add @injection.filename
Problem: Injecting languages for file redirects (e.g., in bash) is not
possible.

Solution: Add `@injection.filename` capture that is piped through
`vim.filetype.match({ filename = node_text })`; the resulting filetype
(if not `nil`) is then resolved as a language (either directly or
through the list maintained via `vim.treesitter.language.register()`).

Note: `@injection.filename` is a non-standard capture introduced by
Helix; having two editors implement it makes it likely to be upstreamed.
2024-04-02 11:13:16 +02:00
Will Hopkins
b3f9da9524
refactor: informative error msg for 'noautocmd' (#28147)
Problem: Attempting to set 'noautocmd' for an existing window throws an error
that just says "Invalid key: 'noautocmd'" which is not very helpful.
Solution: Explain that 'noautocmd' can't be used with existing windows.
2024-04-02 12:48:21 +08:00
Christian Clason
feaab21c71 vim-patch:cc7597c1edf4
runtime(yaml): improve syntax highlighting for YAML

- Recognize block scalar style to avoid unexpected highlighting by `yamlFlowString` (fix vim/vim#11517)
- Improve performance of `yamlFlowMappingKey` by allowing execution by the NFA engine (fix vim/vim#10730)
  - It was intentionally disabled before patterns were optimized by `s:SimplifyToAssumeAllPrintable`.
- Fix detection of flow style mapping indicators (fix vim/vim#8234).
- Enable highlighting of explicit mapping value indicators and node properties in flow style.
- Add syntax highlighting tests

closes: vim/vim#14354

cc7597c1ed

Co-authored-by: itchyny <itchyny@cybozu.co.jp>
2024-04-01 15:52:26 +02:00
zeertzjq
4a6b4b00cb
vim-patch:9.1.0251: Filetype test fails (#28142)
Problem:  Filetype test fails.
Solution: Move detection by name before detection by extension.
          Improve TextChanged test and remove wrong test and fix
          a typo in a comment (zeertzjq).

closes: vim/vim#14373

8eb7523802

The changes to filetype.vim are N/A since Nvim always prefers filename
matches to extension matches.
2024-04-01 21:49:44 +08:00
zeertzjq
381806729d
vim-patch:9.0.1643: filetype detection fails if file name ends in many '~' (#28141)
Problem:    Filetype detection fails if file name ends in many '~'.
Solution:   Strip multiple '~' at the same time. (closes vim/vim#12553)

c12e4eecbb

In Nvim this already works as Lua filetype detection isn't subject to
such a small recursion limit as autocommands, but it still makes sense
to avoid unnecessary recursion.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-04-01 18:43:30 +08:00
Christian Clason
2e97ae2664 vim-patch:9.1.0250: filetype: ldscripts cannot be recognized
Problem:  filetype: ldscripts cannot be recognized
Solution: Detect '*/ldscripts/*' as ld
          (Wu, Zhenyu)

closes: vim/vim#14371

4c7098b00a

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
000431820e vim-patch:9.1.0249: filetype: rock_manifest and config.ld files are not recognized
Problem:  filetype: rock_manifest and config.ld files are not recognized
Solution: Detect 'rock_manifest' and 'config.ld' as lua
          (Wu, Zhenyu)

closes: vim/vim#14370

a917bd58bd

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
19ee281809 vim-patch:9.1.0248: filetype: yarn lock files are not recognized
Problem:  filetype: yarn lock files are not recognized
Solution: Detect 'yarn.lock' files as yaml
          (Wu, Zhenyu)

closes: vim/vim#14369

3b497aa247

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
de1a54dfe1 vim-patch:9.1.0247: filetype: bundle config files are not recognized
Problem:  filetype: bundle config files are not recognized
Solution: Detect '*/.bundle/config' as yaml
          (Wu, Zhenyu)

closes: vim/vim#14368

3f6fa93b3b

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
09869c3745 vim-patch:9.1.0246: filetype: fontconfig files are not recognized
Problem:  filetype: fontconfig files are not recognized
Solution: detect 'fonts.conf' as xml
          (Wu, Zhenyu)

closes: vim/vim#14367

a2c27b01dc

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
fa863c17b2 vim-patch:9.1.0245: filetype: zsh theme, history and zunit files are not recognized
Problem:  filetype: zsh theme, history and zunit files are not
          recognized.
Solution: Detect '.zsh_history', '*.zsh-theme' and '*.zunit' as zsh
          (Wu, Zhenyu)

closes: vim/vim#14366

a55a22a1a3

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
239101e32a vim-patch:9.1.0244: filetype: bash history files are not recognized
Problem:  filetype: bash history files are not recognized
Solution: detect .bash-history and .bash_history files as bash
          (Wu, Zhenyu)

closes: vim/vim#14365

84ce55001a

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
1a0b27965c vim-patch:9.1.0243: filetype: netrw history file is not recognized
Problem:  filetype: netrw history file is not recognized
Solution: Detect .netrwhist as vim files (Wu, Zhenyu)

closes: vim/vim#14364

abbb4a4f70

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
5cdbb22c34 vim-patch:9.1.0242: filetype: octave history files are not recognized
Problem:  filetype: octave history files are not recognized
Solution: Detect octave/history files as octave
          (Wu, Zhenyu)

closes: vim/vim#14363

be71ac694f

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
afc7a5611e vim-patch:9.1.0241: filetype: mysql history files are not recognized
Problem:  filetype: mysql history files are not recognized
Solution: Detect .mysql_history as mysql
          (Wu, Zhenyu)

closes: vim/vim#14362

6b285c8cfd

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
a978e83158 vim-patch:9.1.0240: filetype: some python tools config files are not recognized
Problem:  filetype: some python tools config files are not recognized
Solution: Detect config files for setuptools, pudb, coverage as dosini
          (Wu, Zhenyu)

closes: vim/vim#14361

665220a17b

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
acac56360f vim-patch:9.1.0239: filetype: gnuplot history files are not recognised
Problem:  filetype: gnuplot history files are not recognised
Solution: detect .gnuplot_history files as gnuplot
          (Wu, Zhenyu)

closes: vim/vim#14360

8e47eb31cc

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
ce69056e95 vim-patch:9.1.0238: filetype: jupyterlab and sublime config are not recognized
Problem:  filetype: jupyterlab and sublime config are not recognized
Solution: Detect jupyterlab and sublime config files as json
          (Wu, Zhenyu)

closes: vim/vim#14359

75c607dff7

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
f29ba3c46c vim-patch:9.1.0237: filetype: mplstyle files are not recognized
Problem:  filetype: mplstyle files are not recognized
Solution: Detect '*.mplstyle' files as yaml (Wu, Zhenyu)

closes: vim/vim#14358

0fd560d46a

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
2e0233d003 vim-patch:9.1.0236: filetype: texlua files are not recognized
Problem:  filetype: texlua files are not recognized
Solution: Add '*.tlu' pattern for texlua files (Wu, Zhenyu)

Reference: https://github.com/TeX-Live/texdoc/tree/master/script

closes: vim/vim#14357

a75f4791b1

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
96d77b2051 vim-patch:9.1.0235: filetype: supertux files are not recognized
Problem:  filetype: supertux files are not recognized
Solution: Supertux uses lisp to store hotkeys in config and game stage information,
          so add a pattern for supertux files.
          (Wu, Zhenyu)

Reference: https://github.com/SuperTux/supertux/wiki/S-Expression

closes: vim/vim#14356

4ff83b904e

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
Christian Clason
c24dcb1bea vim-patch:9.1.0234: filetype: support for Intel HEX files is lacking
Problem:  filetype: support for Intel HEX files is lacking
Solution: Add more file extensions that are typical for Intel HEX files
          (Wu, Zhenyu)

Reference: https://en.wikipedia.org/wiki/Intel_HEX

closes: vim/vim#14355

e523dd9803

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-01 12:01:47 +02:00
zeertzjq
b8858dddbf
Merge pull request #28080 from echasnovski/intro-buf-change
fix(intro): link showing intro to state at start
2024-04-01 08:02:42 +08:00
Christian Clason
6b9a808d13 vim-patch:18d730d7b572
runtime(compilers): ensure compiler! sets global options (vim/vim#14336)

Previously some options were only set locally by
&l:makeprg/errorformat

This suffices for :compiler (without a trailing bang)
but falls short for :compiler! that sets &g:makeprg/errorformat as
well

Also apply kind suggestions by @dkearns and @lifepillar

18d730d7b5

omit context.vim (vim9script only)

Co-authored-by: Enno <Konfekt@users.noreply.github.com>
2024-04-01 00:48:30 +02:00
zeertzjq
1570cfb638
test(core/job_spec): skip exit test if "sleep" command missing (#28137) 2024-04-01 06:48:14 +08:00
zeertzjq
c4221df7b5
vim-patch:9.1.0232: Conceal test fails when rightleft feature is disabled (#28134)
Problem:  Conceal test fails when rightleft feature is disabled.
Solution: Skip test if rightleft feature is missing (Julio B).

closes: vim/vim#14342

5df961a1bc

Co-authored-by: Julio B <julio.bacel@gmail.com>
2024-04-01 06:12:47 +08:00
zeertzjq
b08667d4f0
vim-patch:9.1.0231: Filetype may be undetected when SwapExists sets ft in other buf (#28136)
Problem:  Filetype may be undetected when a SwapExists autocommand sets
          filetype in another buffer.
Solution: Make filetype detection state buffer-specific.  Also fix a
          similar problem for 'modified' (zeertzjq).

closes: vim/vim#14344

5bf6c2117f
2024-04-01 06:12:11 +08:00
zeertzjq
e005b8d2eb
vim-patch:9.1.0230: TextChanged autocommand not triggered under some circumstances (#28135)
Problem:  TextChanged autocommand not triggered under some circumstances
          (Sergey Vlasov)
Solution: Trigger TextChanged when TextChangedI has not been triggered

fixes: vim/vim#14332
closes: vim/vim#14339

8603270293

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-04-01 05:39:52 +08:00
Christian Clason
9b9dab622a vim-patch:807fff135d52
runtime(pamconf): add support for Debian specific @includes

fixes: vim/vim#14335

807fff135d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-03-31 23:05:38 +02:00
Christian Clason
20dd60f13c vim-patch:cbb92b5ceb6a
runtime(sshconfig,sshdconfig): update syntax (vim/vim#14351)

* fix case insensitivity of Host and Hostname keys
* improve regexps
* add keywords

cbb92b5ceb

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2024-03-31 23:05:20 +02:00
Marcin Szamotulski
01691c5447
fix(lsp): abort callHierarchy on no result (#28102)
The `callHierarchy` function should warn the user when
`textDocument/prepareCallHierarchy` didn't resolve an entity and
return, rather than calling the `callHierarchy/{incoming,outgoing}Calls`
method with an empty object - which is encoded as an empty list (which
doesn't respect language server specification for the
`callHierarchy/incomingCalls` call).
2024-03-31 20:43:34 +02:00
zeertzjq
b25753381c
fix(api): set script context when using nvim_set_hl (#28123) 2024-03-31 20:21:47 +08:00