Commit Graph

5896 Commits

Author SHA1 Message Date
Lewis Russell
d3d7d763f3 feat(builtin): improve types 2023-08-27 13:07:04 +01:00
Maria José Solano
b7d5b55f74
fix(types): add some return/parameter type annotations (#24867)
* fix(types): add some return/parameter type annotations

* fix(types): narrow stdpath parameter further
2023-08-27 09:41:32 +01:00
Maria José Solano
2bf3e82676 fix(treesitter): validate window before updating preview highlights 2023-08-27 09:40:26 +01:00
Sanchayan Maity
874b8172a6 build(deps): bump tree-sitter-python to v0.20.4 2023-08-27 10:03:24 +09:00
zhaozg
c4728a5c46 build(deps): bump luv to HEAD dcd1a1c 2023-08-27 10:02:43 +09:00
Evgeni Chasnovski
986bf7e78d
feat(highlight): add FloatFooter highlight group
Problem: No clear separation of floating title and footer highlighting.

Solution: Add new `FloatFooter` highlight group.
2023-08-26 19:37:43 +03:00
Evgeni Chasnovski
35570e4a11
feat(float): implement footer
Problem: Now way to show text at the bottom part of floating window
  border (a.k.a. "footer").

Solution: Allows `footer` and `footer_pos` config fields similar to
  `title` and `title_pos`.
2023-08-26 19:37:43 +03:00
Alisue
b641fc3874
docs(megpack_rpc): add news entry for msgpack-rpc client type 2023-08-26 19:15:36 +09:00
Alisue
b46e93c5fd
docs(msgpack_rpc): add "msgpack-rpc" client type 2023-08-26 19:14:07 +09:00
zeertzjq
b1cfb299df
docs: various clarifications (#24876) 2023-08-26 08:35:05 +08:00
Maria José Solano
5d8ab32f38
feat(treesitter): add a query editor (#24703) 2023-08-25 13:17:36 -05:00
Sean Dewar
0bd82b540e
refactor(termdebug): reindent some things
Mostly to make it more consistent and to match Vim more where applicable.
2023-08-25 11:24:52 +01:00
Sean Dewar
e3b385bed5
vim-patch:3d3a9152fa6d
runtime(termdebug): more termdebug fixes and improvements (vim/vim#12892)

- Fix and attempt to simplify :Frame/:Up/:Down documentation.

- Accept a count instead for :Up/:Down/+/-.

- Update the "Last Change" dates.

- Fix a missing :let (caused an error if gdb fails to start).

- Wipe the prompt buffer when ending prompt mode (if it exists and wasn't wiped
  by the user first). Avoids issues with stale prompt buffers (such as E95 when
  starting a new prompt mode session).

- Kill the gdb job if the prompt buffer is unloaded (similar to what's done for
  a terminal buffer). Fixes not being able to start a new termdebug session if
  the buffer was wiped by the user, for example.

3d3a9152fa
2023-08-25 11:05:18 +01:00
Sean Dewar
92ef2b2bcd
vim-patch:2ae7ffe0bc3c
runtime(termdebug): add frame related commands (vim/vim#12511)

implementing `:Frame`, `:Up` and `:Down'

2ae7ffe0bc

Use maparg() for saving K as it's since been ported (and supports Lua callbacks
and the other API fields).

Use the 3 argument variant of mapset(), as the single argument one isn't ported
yet (v8.2.4861).

Co-authored-by: Simon Sobisch <simonsobisch@web.de>
2023-08-25 11:05:18 +01:00
Sean Dewar
8aad4b8425
fix(termdebug): send SIGINT when interrupting prompt mode
Unlike Vim's job_stop(), Nvim's jobstop() does not take a signal argument, and
always sends SIGTERM/KILL.

:Stop and Ctrl-C in prompt mode is supposed to interrupt the program like in
terminal mode, not kill GDB.

Also, maybe libuv's kill() works on Windows? If so, the logic above could be
removed, but I don't have a Windows machine available to test that.

Also "set nomodified" when ending prompt mode, like Vim (avoids E37).
2023-08-25 11:04:41 +01:00
Sean Dewar
21477bdb27
vim-patch:a76f3221cdcf
runtime(termdebug): Fix various Termdebug issues (vim/vim#12875)

* Fix some Termdebug issues after vim/vim#12403
* Fix :Asm in Termdebug prompt mode
* Fix Termdebug s:DecodeMessage escaping logic

a76f3221cd

Adjust disassembly message forwarding for Nvim, as its callback can receive
many lines at once.

Currently, just forward each disassembly line individually to s:CommOutput();
it's possible to do this in batch instead, but this is simpler.

I suggested moving to a GDB MI-based approach for the disassemble stuff
upstream, which should simplify the logic a lot if implemented (and possibly
allow for getting rid of the `&"disassemble ...` special-casing).

Also, correct "(gdb)" to include a trailing space; the stray GDB prompts were
being ignored by s:CommOutput() anyway, so this had caused no ill effects.
2023-08-25 11:01:09 +01:00
Sean Dewar
c413b42c45
fix(termdebug): prompt mode breaks with &splitbelow set
Unlike Vim, termopen() doesn't split, so you can't use the modifier like that.
Remove the fragile :wincmd shenanigans.
2023-08-25 10:59:57 +01:00
Sean Dewar
af78060b18
fix(termdebug): trim suffixed "\r" in CommOutput
Vim splits lines on "\r", then trims any prefixed "\n".

But in Nvim, job output lines are split on "\n" (like readfile() in binary
mode), so trim any suffixed "\r" instead.

This gets rid of the trailing "^M" character in messages parsed from the jobs.
2023-08-25 10:59:56 +01:00
Sean Dewar
ec97128826
vim-patch:19968fc4ec2c
runtime(termdebug): re-indent lines (vim/vim#12857)

19968fc4ec

Co-authored-by: Shane-XB-Qian <shane.qian@foxmail.com>
2023-08-25 10:59:56 +01:00
Sean Dewar
464472b4f7
vim-patch:f6fb52b667ee
runtime(termdebug): refactor error printing (vim/vim#12856)

// vs not act like exception from vim or termdebug

f6fb52b667

Co-authored-by: Shane-XB-Qian <shane.qian@foxmail.com>
2023-08-25 10:59:56 +01:00
Sean Dewar
949dd14d8b
vim-patch:9f2962141514
Runtime(termdebug): Add support to view local and argument variables

closes: 12403

9f29621415

Rename the existing "s:running" (#16790) to "s:gdb_running" to not clash with
the "s:running" introduced in this patch (which instead relates to whether the
debugged program is currently running in gdb).

Keep the file `:retab`bed as before.

Co-authored-by: laburnumT <flo.striker@gmail.com>
2023-08-25 10:59:55 +01:00
Gregory Anders
af38b46a25 fix(filetype): return on_detect function when matching by file contents 2023-08-24 13:04:04 -05:00
Gregory Anders
020d1f626a fix(filetype): call on_detect before setting buffer filetype
The on_detect functions returned by filetype.lua set buffer local
variables which are often used by filetype plugins. For example, the
on_detect function for shell buffers sets variables such as b:is_bash or
b:is_sh, which are used by the sh ftplugin.

When called after setting the buffer's filetype, these variables cannot
be used by the ftplugin (because they are not yet defined). Instead,
call on_detect before setting the buffer filetype so that any buffer
variables set by on_detect can be used in the ftplugin.
2023-08-24 12:48:21 -05:00
Sean Dewar
daf7abbc42
docs(builtin): small fixes (#24861)
Also make gen_eval_files.lua render vimdoc helpExamples properly if the line
begins with the `>` marker.
2023-08-24 13:29:40 +01:00
Sean Dewar
53170579ce
Merge pull request #24702 from seandewar/vim-1688938dd5ac
vim-patch:1688938dd5ac,96d6c4aabed1,e8d6f03f6a61
2023-08-24 09:27:17 +01:00
Christian Clason
e2c10dea19 vim-patch:2f25e40b1f54
runtime: configure keywordpg for some file types (vim/vim#5566)

2f25e40b1f

Co-authored-by: Enno <Konfekt@users.noreply.github.com>
2023-08-24 11:33:06 +09:00
Christian Clason
327e3fab9e vim-patch:3fc7a7e44abd
runtime: Fix typos in various files

closes: vim/vim#12836

3fc7a7e44a

Co-authored-by: Viktor Szépe <viktor@szepe.net>
2023-08-24 11:33:06 +09:00
Christian Clason
1c961a9d62 vim-patch:e059fae10044
runtime(menu): define shortcut for File->Open Tab (vim/vim#12895)

Seems missing as noted by Antonio Giovanni Colombo. So add it and use
the 'T' as shortcut, which does not seem to be used in the File dialog.

Verified on Windows.

e059fae100

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Antonio Giovanni Colombo <azc100@gmail.com>
2023-08-24 11:33:06 +09:00
Christian Clason
1c709f5a61 vim-patch:6e93689bde73
runtime(bindzone): updated syntax file

- Add support for APL type in runtime/syntax/bindzone.vim
- all values between 0- 4294967295 are valid serials

closes: vim/vim#9743
closes: vim/vim#8382

6e93689bde

vim-patch:544b209a2d4b

runtime(scala): Link Scala highlighting groups using 'hi def link' in syntax script (vim/vim#9594)

They were linked using 'hi link' which made it impossible for color
schemes to override highlight groups.

544b209a2d

Co-authored-by: Oskar Stenman <oskar@cetex.se>
Co-authored-by: Job Noorman <job@noorman.info>
2023-08-24 11:33:06 +09:00
Christian Clason
660f9e6857 vim-patch:118f8e9da39e
runtime(cmake) Recognize add_compile_definitions in syntax script (vim/vim#10416)

118f8e9da3

Co-authored-by: MichaWiedenmann <mw-r1@gmx.de>
2023-08-24 11:33:06 +09:00
Christian Clason
9ab5fda99e vim-patch:cdd934439d08
runtime(crontab): add support for BSD specifics in syntax script (vim/vim#11196)

* OpenBSD supports the use of `~` as alias for "random valid value"
* FreeBSD supports `@every_{minute,second}`

See:

* https://man.openbsd.org/crontab.5
* https://www.freebsd.org/cgi/man.cgi?query=crontab&sektion=5

cdd934439d

Co-authored-by: Moviuro <moviuro@users.noreply.github.com>
2023-08-24 11:33:06 +09:00
Christian Clason
4ca8b90b14 vim-patch:b0d584d97ab6
runtime(go): Update Go syntax file with 1.21 builtins (vim/vim#12876)

* Update Go syntax file with 1.21 builtins

b0d584d97a

Co-authored-by: José-Paul D <fixed.combinator@gmail.com>
2023-08-24 11:33:06 +09:00
Christian Clason
0b7e1730bc vim-patch:e34b51e95fd0
runtime(solidity): add new ftplugin (vim/vim#12877)

Set undo_{ftplugin,indent}

closes vim/vim#11240

e34b51e95f

Co-authored-by: dkearns <dougkearns@gmail.com>
Co-authored-by: cothi <jiungdev@gmail.com>
2023-08-24 11:33:06 +09:00
Christian Clason
810428c4d5 vim-patch:c6d533b0ad56
runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (vim/vim#12884)

- add missing defaults
- add missing control structures (incl. parallelism)
- add missing scope declarations
- whitespace edits (remove extra tabs)

c6d533b0ad

Co-authored-by: Karim Belabas <Karim.belabas@math.u-bordeaux.fr>
2023-08-24 11:33:06 +09:00
Amaan Qureshi
c6ec7fa8d7 feat(treesitter): add 'injection.self' and 'injection.parent'
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2023-08-24 09:05:44 +09:00
Sean Dewar
23cc36bd99
vim-patch:e8d6f03f6a61
runtime: Remove Brams name from a few more runtime files (vim/vim#12780)

syntax/model.vim: minor wording improvement

e8d6f03f6a

Use the updated "Last Change" date for all.

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl>
2023-08-23 20:36:16 +01:00
Sean Dewar
947e6d9346
vim-patch:96d6c4aabed1
runtime: Remove Brams email in indent/README.txt

96d6c4aabe

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-23 20:31:08 +01:00
Sean Dewar
a5565499c8
vim-patch:1688938dd5ac
runtime: Add a few more remarks about Bram and new runtime files

1688938dd5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-23 20:31:07 +01:00
Lewis Russell
dc45fb4655 fix(editorconfig): only warn once on errors 2023-08-23 14:45:02 +01:00
zeertzjq
08fa71fd27
vim-patch:9.0.1773: cannot distinguish Forth and Fortran *.f files (#24841)
Problem:  cannot distinguish Forth and Fortran *.f files
Solution: Add Filetype detection Code

Also add *.4th as a Forth filetype

closes: vim/vim#12251

19a3bc3add

Don't remove filetype files from Vim patches:
- filetype.vim, script.vim, ft.vim usually contain useful changes
- script.vim and ft.vim don't even have their paths spelled correctly

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-23 19:32:11 +08:00
Lewis Russell
21152f7905 fix(types): add more annotations to eval.lua 2023-08-23 12:16:04 +01:00
zeertzjq
0ba27bb51d vim-patch:9.0.1710: scrolloff options work slightly different
Problem: sidescrolloff and scrolloff options work slightly
         different than other global-local options
Solution: Make it behave consistent for all global-local options

It was noticed, that sidescrolloff and scrolloff options behave
differently in comparison to other global-local window options like
'listchars'

So make those two behave like other global-local options. Also add some
extra documentation for a few special local-window options.

Add a few tests to make sure all global-local window options behave
similar

closes: vim/vim#12956
closes: vim/vim#12643

4a8eb6e7a9

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-23 18:24:14 +08:00
zeertzjq
09910d5b35 vim-patch:9.0.0837: append() reports failure when not appending anything
Problem:    append() reports failure when not appending anything.
Solution:   Only report failure when appending something. (closes vim/vim#11498)

cd9c8d400c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-22 18:56:43 +08:00
Christian Clason
b75659c8fb vim-patch:690963924956
runtime(dosini): save and restore cpo value in syntax script

Commit dd0ad2598898c2b4641c4acd5b70b6184fa698ed  introduced
line-continuation. However, to make sure this does not cause an error
when Vim is run in compatible mode, we need to set compatibility mode
temporarily and reset it back when finished reading the file.

This fixes: https://groups.google.com/g/vim_use/c/9zccgo_RIqM/m/xlUmhBktBgAJ

6909639249

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-21 22:34:48 +09:00
Christian Clason
54ddf56589 vim-patch:6d626c41842e
runtime(sdc): Add underscore to sdc flags in syntax file (vim/vim#6201)

6d626c4184

Co-authored-by: Jordi Altayó <jordialtayo@gmail.com>
2023-08-21 20:32:28 +09:00
Christian Clason
e2d3c1260e vim-patch:a0fddaa2f4b7
Runtime(javascript): add new document properties to completion file

closes: vim/vim#6536

a0fddaa2f4

Co-authored-by: Jay Sitter <jay@diameterstudios.com>
2023-08-21 20:32:28 +09:00
Christian Clason
36404fea4a vim-patch:5e6e4042b1c9
runtime(haskell): Add single quote to `iskeyword` in ftplugin (vim/vim#8191)

The single quote `'` is a valid character in variable names, so it should be included in `iskeyword`; this, for instance, makes the <kbd>*</kbd> command behave predictably

5e6e4042b1

Co-authored-by: Enrico Maria De Angelis <enricomaria.dean6elis@gmail.com>
2023-08-21 20:32:28 +09:00
Christian Clason
5b78a5c72a vim-patch:309ded19543c
runtime(css): Update pseudo-classes in syntax script (vim/vim#11595)

309ded1954

Co-authored-by: Adrian Heine né Lang <mail@adrianheine.de>
2023-08-21 20:32:28 +09:00
Christian Clason
c9764bf331 vim-patch:9fa35b1c38b8
runtime(lua): fix lua indentation of non-lowercase "keywords" (vim/vim#11759)

9fa35b1c38

Co-authored-by: beardedsakimonkey <54521218+beardedsakimonkey@users.noreply.github.com>
2023-08-21 20:32:28 +09:00
Christian Clason
60037feb56 vim-patch:e71e9d9ad368
runtime(javascript): fix default link of javaScriptNumber in syntax file (vim/vim#11788)

cool unused matching

e71e9d9ad3

Co-authored-by: Meqa <106783764+Meqativ@users.noreply.github.com>
2023-08-21 20:32:28 +09:00