Commit Graph

28027 Commits

Author SHA1 Message Date
mathew
e38027ef69 feat(ui): completeopt support popup like vim 2023-12-16 18:59:59 +08:00
bfredl
7e7da962de
Merge pull request #26512 from famiu/refactor/options/type_flags
refactor(options): remove option type macros
2023-12-16 11:39:30 +01:00
dundargoc
7cae94e91e vim-patch:e06f2b498ccc
runtime(doc): fix typo in change.txt

e06f2b498c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-16 10:29:50 +01:00
Gregory Anders
f4f7e29469
refactor(defaults): always set options, even if value hasn't changed (#26595)
Comparing against the old value before setting matched the original
C implementation, but there is no reason to use this restriction. In
particular, this inhibits using OptionSet to determine when the option
was set. If users need to handle a case where the option _changed_, it
is easy to do so in an OptionSet autocommand using v:option_new and
v:option_old (and friends).
2023-12-15 16:35:55 -06:00
zeertzjq
0d26d192d8
vim-patch:9a775b4a2ae6 (#26588)
runtime(netrw): escape curdir in BrowseUpDir (vim/vim#13681)

 fixes vim/vim#13678

9a775b4a2a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-16 05:28:57 +08:00
Gregory Anders
224b2ec202
Merge pull request #26579 from gpanders/defer-set-tgc
refactor(defaults): defer setting 'termguicolors' until after VimEnter
2023-12-15 09:23:12 -06:00
dependabot[bot]
d82168e41c
ci: bump actions/upload-artifact from 3 to 4
Uploads are significantly faster, upwards of 90% improvement in worst case
scenarios.
2023-12-15 13:53:14 +01:00
dependabot[bot]
0463403030
ci: bump actions/download-artifact from 3 to 4
Notable changes:
- Downloads are significantly faster, upwards of 90% improvement in worst case
  scenarios.
- Artifacts can be downloaded from other workflow runs and repositories when
  supplied with a PAT.
2023-12-15 13:51:51 +01:00
Christian Clason
34f008e247 vim-patch:3afc9f2556fa
runtime(cmake): sync runtime files with upstream (vim/vim#13597)

3afc9f2556

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2023-12-15 10:30:13 +01:00
Christian Clason
65032e03e0 vim-patch:1c97b5c0c0b4
runtime(vim): Update syntax file, fix missing for highlight (vim/vim#13668)

Fix highlighting of :for command.  Link the vimFor syntax group to the
vimCommand highlight group.

Error introduced in commit f686921

1c97b5c0c0

Co-authored-by: dkearns <dougkearns@gmail.com>
2023-12-15 10:30:13 +01:00
Christian Clason
7e717805be vim-patch:b52e7ac7c61c
runtime(netrw): Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2` (vim/vim#13659)

* NetRW: Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2`
* NetRW: Fix wrong `w:netrw_bannercnt` setting

closes: vim/vim#13640

b52e7ac7c6

Co-authored-by: KSR-Yasuda <31273423+KSR-Yasuda@users.noreply.github.com>
2023-12-15 10:30:13 +01:00
Christian Clason
02e8582230 vim-patch:5a68cdf14915
runtime(sbt): do not set b:did_ftplugin before sourcing scala ftplugin(vim/vim#13657)

The `b:did_ftplugin` guard was set and prevented us from actually sourcing `ftplugin/scala.vim`. Since the latter script also sets the guard properly, we can simply remove the guard here.

5a68cdf149

Co-authored-by: Karl Yngve Lervåg <karl.yngve@lervag.net>
2023-12-15 10:30:13 +01:00
Christian Clason
745b74162c vim-patch:f6869212c9e1
runtime(vim): Update syntax file (vim/vim#13653)

Improve variable highlighting in :let, :unlet, :const and :for commands.

Match registers and local, global and terminal option variables.

f6869212c9

Co-authored-by: dkearns <dougkearns@gmail.com>
2023-12-15 10:30:13 +01:00
dundargoc
f31f260f0c build: rework --version generation
Having a dynamically generated string is more maintainable than having
multiple files.

Also add linker flags and any potential LTO flags to the --version
output.
2023-12-15 00:19:38 +01:00
zeertzjq
165e5ececc
vim-patch:17dca3cb97cd (#26584)
runtime(doc): grammar & typo fixes

closes: vim/vim#13654

17dca3cb97

Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2023-12-15 06:42:29 +08:00
zeertzjq
046efa106e
vim-patch:323dda1484d9 (#26583)
runtime(termdebug): add Tbreak command

closes: vim/vim#13656

323dda1484

Co-authored-by: iam28th <artyom28th@gmail.com>
2023-12-15 06:27:49 +08:00
Gregory Anders
b0e2643cb2 refactor(defaults): defer setting 'termguicolors' until after VimEnter
This ensures that any OptionSet autocommands will fire when the value is
changed.
2023-12-14 11:42:17 -06:00
Gregory Anders
ffeb31c2f9 fix(termcap): set 'nested' on TermResponse autocommand 2023-12-14 11:38:34 -06:00
Gregory Anders
ef38fdfdc6
refactor(diagnostic): use named namespaces (#26568)
Anonymous namespaces are more difficult to extend or hook into since
they do not appear in the output of nvim_get_namespaces(). Use named
namespaces instead.
2023-12-14 09:19:33 -06:00
Gregory Anders
ddcbc5c78a
docs: add comment for OSC 11 tmux passthrough (#26566) 2023-12-14 08:38:26 -06:00
dependabot[bot]
7db9992445
ci: bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)
2023-12-14 14:16:35 +01:00
Lewis Russell
97bea3163a feat(lsp): more annotations 2023-12-14 12:39:18 +00:00
Famiu Haque
3c2c022e5e
refactor(options): remove option type macros
Problem: We have `P_(BOOL|NUM|STRING)` macros to represent an option's type, which is redundant because `OptValType` can already do that. The current implementation of option type flags is also too limited to allow adding multitype options in the future.

Solution: Remove `P_(BOOL|NUM|STRING)` and replace it with a new `type_flags` attribute in `vimoption_T`. Also do some groundwork for adding multitype options in the future.

Side-effects: Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no longer gives an error.
2023-12-14 16:46:42 +06:00
Luuk van Baal
320e9c1c21 fix(extmark): only invalidate unpaired marks on deleted rows
Problem:  Unpaired marks are invalidated if its column is deleted,
          which may just be a "placeholder" column, e.g. for signs.
Solution: Only remove unpaired marks if its entire row is deleted.
2023-12-14 08:55:00 +00:00
zeertzjq
aa05133b0e
test(nvim_open_term): don't resize after creating terminal (#26570)
This makes the screen states consistently have no EOB lines.
2023-12-14 16:41:08 +08:00
Raphael
619407eb54
feat(nvim_open_term): convert LF => CRLF (#26384)
Problem:
Unlike termopen(), nvim_open_term() PTYs do not carriage-return the
cursor on newline ("\n") input.

    nvim --clean
    :let chan_id = nvim_open_term(1, {})
    :call chansend(chan_id, ["here", "are", "some", "lines"])

Actual behavior:

    here
        are
           some
               lines

Expected behaviour:

    here
    are
    some
    lines

Solution:
Add `force_crlf` option, and enable it by default.
2023-12-14 16:08:00 +08:00
Gregory Anders
36552adb39
ci: add gpanders as reviewer for defaults and tui labels (#26567) 2023-12-13 20:06:59 -06:00
zeertzjq
846714ca3e
fix(tui): don't use tui->params[] for 'termsync' (#26565)
Problem:  'termsync' overwrites the first parameter of a format string
           when UNIBI_OUT() encounters an overflow.
Solution: Don't use tui->params[] for 'termsync'.
2023-12-14 09:32:05 +08:00
Jaehwang Jung
5aa1ba3efe
fix(defaults): background detection in tmux (#26557)
Wrap the query with passthrough sequence
2023-12-14 06:16:21 +08:00
dundargoc
1d63a057a6 docs: fix links 2023-12-13 20:31:16 +01:00
dundargoc
7908dc0d15 docs: move vim-patch wiki page to runtime documentation 2023-12-13 18:31:05 +01:00
dundargoc
fbd0f6658f docs: add installation and build guides from wiki to repo 2023-12-13 17:53:36 +01:00
dundargoc
c8223007d0 docs: add code-overview from wiki to src/nvim/README.md 2023-12-13 17:52:35 +01:00
Gregory Anders
ad6c4c2e9d
Merge pull request #26555 from gpanders/diagnostic-sign-fixup
Diagnostic sign fixups
2023-12-13 10:38:16 -06:00
dundargoc
ef58ee48f4
docs: add wiki FAQ to the runtime documentation (#26539)
Problem: Wiki contents are not discoverable and hard to maintain.
Solution: Move FAQ to runtime docs.

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2023-12-13 17:31:39 +01:00
Gregory Anders
a3b3978474 feat(diagnostics): support numhl and linehl for diagnostic signs 2023-12-13 09:56:10 -06:00
Gregory Anders
39112c72dd docs(diagnostic): fix typo in example 2023-12-13 09:43:27 -06:00
Gregory Anders
29d5ff6ac4 fix(diagnostic): check for sign namespace instead of sign group 2023-12-13 09:30:13 -06:00
Raphael
8122470f83
refactor(diagnostic): set sign by using extmark (#26193)
after sign implementation refactor by using extmark, we can use
`nvim_buf_set_extmark` to set diagnostic sign instead use `sign_define`
2023-12-13 08:19:53 -06:00
Gregory Anders
e527842211
fix(termcap): only call callback for requested capabilities (#26546)
If multiple XTGETTCAP requests are active at once (for example, for
requesting the Ms capability and truecolor capabilities), then the
TermResponse autocommand may fire for capabilities that were not
requested. Instead, make sure that the provided callback is only called
for capabilities that were actually requested.
2023-12-13 08:14:30 -06:00
zeertzjq
d65c6a0baf
vim-patch:9.0.2159: screenpos() may crash with neg. column (#26542)
Problem:  screenpos() may crash with neg. column
Solution: validate and correct column

closes: vim/vim#13669

ec54af4e26
2023-12-13 06:17:50 +08:00
Will Hopkins
69ffbb76c2
feat(iter): add Iter.take (#26525) 2023-12-12 14:27:24 -06:00
Gregory Anders
1907abb4c2
fix(stream): do not close handle if it is already closing (#26537)
uv_close asserts that a handle is not already closing. We can guard
against this assertion failure by manually checking the handle's closing
status ourselves.
2023-12-12 13:19:46 -06:00
dundargoc
2c96f1c4f0 docs: move minimum reproduction template from wiki to repo
Instead of a markdown file, just use a lua file instead that users can
use directly.
2023-12-12 18:32:45 +01:00
dundargoc
5ad5f034ca docs: inline wiki page Deps.md into MAINTAIN.md 2023-12-12 18:21:33 +01:00
dundargoc
5ad3ed40ec docs: inline wiki page Refactoring.md into MAINTAIN.md 2023-12-12 18:19:26 +01:00
zeertzjq
b40170f7a3
fix(lua): memory leak when using invalid syntax with exists() (#26530) 2023-12-12 20:34:02 +08:00
Raphael
1d4a5cd185
feat(eval): exists() function supports checking v:lua functions (#26485)
Problem:  Vimscript function exists() can't check v:lua functions.
Solution: Add support for v:lua functions to exists().
2023-12-12 19:06:22 +08:00
bfredl
e69834744b
Merge pull request #26486 from glepnir/fix_linebyte
fix(eval): use no_ff instead of ffdos as condition
2023-12-12 11:57:56 +01:00
glepnir
d95e3a4c9c fix: use no_ff instead of ffdos as condition
Problem: line2byte behavior is changed after commit b051b13. It no
longer return `-1` on empty buffer.

Solution: use `nof_ff` instead of `!ff_dos` as condition. Then
compatible behavior of line2byte() is restored.
2023-12-12 13:49:04 +08:00