Commit Graph

28356 Commits

Author SHA1 Message Date
Junghyeon Park
96d0f4a2d7
docs(INSTALL.md): remove update-alternatives instructions (#27060)
There are various other ways people can mimic the old commands, and
plenty of people that have never heard of the old commands.
This increases the consistency of the whole document by restricting it
to the scope to installation of Nvim and its CLI commands.
2024-01-19 16:34:51 +08:00
zeertzjq
ba9f86a9ce
fix(inccommand): improve preview buffer number handling (#27087) 2024-01-19 11:04:01 +08:00
Lewis Russell
78b000c74d
Merge pull request #27079 from lewis6991/winline_rfc
refactor(drawline): more win_line() improvements
2024-01-18 16:33:00 +00:00
Lewis Russell
7be20acf25 refactor(drawline): get_rightmost_vcol() 2024-01-18 16:12:57 +00:00
Lewis Russell
1c54cadba5 refactor(drawline): add more consts 2024-01-18 16:12:54 +00:00
Lewis Russell
44f27c8f23 refactor(drawline): localise more variables in win_line() 2024-01-18 14:47:37 +00:00
Christian Clason
674f2513d4 fix(treesitter): validate language alias for injections
Problem: Parsed language annotations can be random garbage so
`nvim_get_runtime_file` throws an error.

Solution: Validate that `alias` is a valid language name before trying
to find a parser for it.
2024-01-18 15:46:08 +01:00
Lewis Russell
4706b9c2e9 refactor(drawline): more win_line() improvements
`win_line()` previously used a conspicuous `ptrdiff_t v` variable in many different
places for different reasons. The change encapsulates those uses and
introduces local variables in each with a reduced scope.

Also add `const` to some fields in winlinevars_T.
2024-01-18 14:33:05 +00:00
notomo
ab3a7fc3e3
docs(vim.iter): correct bool to boolean (#27018) 2024-01-18 07:01:57 -06:00
Justin M. Keyes
95cbedaa17
docs: various #25289
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com>
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
2024-01-18 00:14:48 -08:00
Christian Clason
11e8e14628 vim-patch:46d67d22b9ba
runtime(swayconfig): add focus_follows_mouse and smart_qaps syntax keywords

See:
0aceff7469/sway/sway.5.scd (L680)
`focus_follows_mouse yes|no|always`
0aceff7469/sway/sway.5.scd (L770)

closes: vim/vim#13797

46d67d22b9

Co-authored-by: James Eapen <james.eapen@vai.org>
2024-01-18 08:42:00 +01:00
Christian Clason
9b0b3cdc7a vim-patch:a39af0290496
runtime(i3config): remove always from `focus_follows_mouse`

The always option does not exist in i3, only sway.

From https://i3wm.org/docs/userguide.html:
`focus_follows_mouse yes|no`

Version number incremented by 2 because the last commit did not
increment the version.

a39af02904

Co-authored-by: James Eapen <james.eapen@vai.org>
2024-01-18 08:42:00 +01:00
Christian Clason
223a6afd8f vim-patch:6e5a6c9965f6
runtime(netrw): minor changes to fix move cmd on windows (vim/vim#13823)

6e5a6c9965

Co-authored-by: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com>
2024-01-18 08:42:00 +01:00
zeertzjq
06aebfa998
vim-patch:9.0.1437: test fails with different error number (#27074)
Problem:    Test fails with different error number.
Solution:   Adjust the expected error.

3cdd799951

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-01-18 12:17:51 +08:00
zeertzjq
5b31447811
fix(drawline): update prev_ptr after getting syntax attrs (#27072) 2024-01-18 07:27:00 +08:00
zeertzjq
8a07ca6c4b
vim-patch:9.1.0040: issue with prompt buffer and hidden buffer (#27071)
Problem:  Modifying a hidden buffer still interferes with prompt buffer
          mode changes.
Solution: Save and restore b_prompt_insert.
          (zeertzjq)

closes: vim/vim#13875

Modifying hidden buffer still interferes with prompt buffer mode changes

f267847017
2024-01-18 07:23:48 +08:00
zeertzjq
780dd88b68
vim-patch:9.1.0039: too vague errors for 'listchars'/'fillchars' (#27070)
Problem:  too vague errors for 'listchars'/'fillchars'
Solution: Include the field name in error message.
          (zeertzjq)

related: #27050
closes: vim/vim#13877

6a8d2e1634

Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
2024-01-18 07:14:12 +08:00
altermo
5aa14e1231
fix(lua): return after assert returns assert message (#27064) 2024-01-17 13:34:25 -06:00
Sean Dewar
f5d59340a6
vim-patch:9b03d3e75b42 (#27059)
Translate the Vim9 script Godot files to legacy.

`<scriptcmd>` is not ported yet, so replace it with `<Cmd>` and `<SID>`.
If it's ported, `<scriptcmd>call s:` can be used instead.

Includes changes from:

vim-patch:0daafaa7d99e (was partial, but is now pretty much fully ported)
vim-patch:9712ff1288f9

Co-authored-by: Maxim Kim <habamax@gmail.com>
2024-01-17 14:47:40 +00:00
Lewis Russell
e855a80c72
Merge pull request #27024 from lewis6991/test_followup
test: big cleanup followup + typing
2024-01-17 13:46:55 +00:00
Luuk van Baal
d88814ef68 fix(column): remove sign from line it was previously on with undo 2024-01-17 13:39:42 +00:00
Christian Clason
4615d46f93 build(deps): bump tree-sitter-vimdoc to v2.1.0
Add support for `(note)`.
2024-01-17 13:07:55 +01:00
Luuk van Baal
f871fee8b6 fix(column): pass kFalse when initializing "b_signcols.count"
Problem:  Wrong "clear" argument passed to buf_signcols_count_range
          when initializing "b_signcols.count" for the first time.
Solution: Pass kFalse so that the "nested" counter is not incorrectly
          decremented.
2024-01-17 10:17:11 +00:00
Lewis Russell
14b7ffcf89 feat: add __call typing for vim.inspect() 2024-01-17 10:11:32 +00:00
Lewis Russell
587490217e test: fix mkdir() 2024-01-17 10:10:17 +00:00
Lewis Russell
13b83a3ea2 test: move format_{string,luav} to a separate module 2024-01-17 10:10:17 +00:00
Lewis Russell
b92318d67c test: improve helpers.argss_to_cmd() 2024-01-17 10:10:17 +00:00
Lewis Russell
c9240daf73 test: fix helpers.relpath()
Missing 3rd argument to string.gsub()
2024-01-17 10:10:17 +00:00
Lewis Russell
d735567fda test: simplify helpers.sysname() 2024-01-17 10:10:17 +00:00
Lewis Russell
26835d8d9c test: add type annotations 2024-01-17 10:10:17 +00:00
Lewis Russell
5a16d08a63 test: remove unused functions
Removed:
  - `helpers.fixtbl()`
  - `helpers.fixtbl_rec()`
  - `helpers.updated()`
  - `helpers.hasenv()`
  - `helpers.is_arch()`
  - `helpers.isfile()`
2024-01-17 10:10:17 +00:00
Lewis Russell
96ad7e0a4a test: refactor Paths 2024-01-17 10:10:17 +00:00
Lewis Russell
b990a1f286 test: remove test.deprecated 2024-01-17 10:10:17 +00:00
Lewis Russell
b536e0ba37 test: big cleanup followup
Followup to 07a7c0ec
2024-01-17 10:10:17 +00:00
dundargoc
b3e5587b7f
docs: various fixes (#26929)
Co-authored-by: Patrick Bollinger <owner@pjbollinger.com>
Co-authored-by: vilo1839 <139687192+vilo1839@users.noreply.github.com>
2024-01-17 14:01:39 +08:00
zeertzjq
2fce95ec43
vim-patch:9.1.0033: Insert mode not stopped if closing prompt buffer modifies hidden buffer (#27051)
Problem:  Insert mode not stopped if an autocommand modifies a hidden
          buffer while closing a prompt buffer.
Solution: Don't set b_prompt_insert if stop_insert_mode is already set.
          (zeertzjq)

closes: vim/vim#13872

96958366ad
2024-01-17 08:18:52 +08:00
altermo
da541c0af1
vim-patch:9.1.0035: i_CTRL-] triggers InsertCharPre (#27049)
* vim-patch:9.1.0035: i_CTRL-] triggers InsertCharPre

Problem:  i_CTRL-] triggers InsertCharPre
Solution: Return if CTRL-] is received. InsertCharPre
          is supposed to be only used for chars to be inserted
          but i_CTRL-] triggers expansion and is not inserted
          into the buffer (altermo)

closes: vim/vim#13853
closes: vim/vim#13864

7d711fe209
2024-01-17 07:35:32 +08:00
Sean Dewar
aa5819f5a5
vim-patch:211211052d04 (#27048)
runtime(odin): include ftplugin, syntax and indent script (vim/vim#13867)

211211052d

Translate the files from Vim9 script to legacy Vim script. Notably:

- Prefer case-matching comparisons where needed.
- Save and restore `&cpo`.
- Make the functions script-local. (Pretty easy to use these in expr options now
  since Vim 9.0 anyways)

Add a note after the header for each file stating that they're manually
translated.

Co-authored-by: Maxim Kim <habamax@gmail.com>
2024-01-16 23:08:41 +00:00
Jongwook Choi
3973a5e405 refactor(lsp): deprecate vim.lsp.util.lookup_section
This function is used only in the `workspace/configuration` handler,
and does not warrant a public API because of its confusing return types.

The only caller `vim.lsp.handlers["workspace.configuration"]` is also
refactored to use `vim.tbl_get()` instead.
2024-01-16 20:14:17 +00:00
Lewis Russell
8f02ae82e2 test: use integers for API Buffer/Window/Tabpage EXT types 2024-01-16 19:11:49 +00:00
Sean Dewar
91dc04a5e1
vim-patch:9.1.0013: Modula2 filetype support lacking (#27020)
Problem:  Modula2 filetype support lacking
Solution: Improve the Modula-2 runtime support, add additional modula2
          dialects, add compiler plugin, update syntax highlighting,
          include syntax tests, update Makefiles (Doug Kearns)

closes: vim/vim#6796
closes: vim/vim#8115

68a8947069

- Luaify the detection script:

  - Split the `(*!m2foo*)` and `(*!m2foo+bar*)` detection into two Lua patterns,
    as Lua capture groups cannot be used with `?` and friends (as they only work
    on character classes).

  - Use `vim.api.nvim_buf_call()` (ew) to call `modula2#SetDialect()` to ensure
    `b:modula2` is set for the given bufnr.

- Skip the syntax screendump tests. (A shame as they test some of the detection
  from `(*!m2foo+bar*)` tags, but I tested this locally and it seems to work)

- Port the synmenu.vim changes from Vim9 script. (Also tested this locally)

- (And also add the missing comma for `b:browsefilter` from earlier.)

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-01-16 17:45:57 +00:00
bfredl
fd2ed024c1
Merge pull request #26938 from luukvbaal/relnum
fix(column): redraw 'statuscolumn' on wrapped lines with 'relativenumber'
2024-01-16 13:08:47 +01:00
Luuk van Baal
463cb28a22 docs(column): 'statuscolumn' redraw interaction with 'relativenumber' 2024-01-16 12:14:00 +01:00
Luuk van Baal
c6864b0d14 fix(column): redraw 'statuscolumn' on wrapped lines with 'relativenumber'
Problem:  The 'statuscolumn' is not redrawn on the wrapped part of a
          line when moving the cursor with 'relativenumber' set.
Solution: Redraw the 'statuscolumn' for the entire line height in the
          "col_rows" win_line() code path.
2024-01-16 12:13:36 +01:00
Lewis Russell
50284d07b6 fix(diagnostic): typing 2024-01-16 09:33:10 +00:00
Christian Clason
91ba9d0bf4 build(deps): bump tree-sitter to HEAD - 660481dbf 2024-01-16 09:58:02 +01:00
Christian Clason
3fef24aa01 vim-patch:ef79c5783782
runtime(fortran): update fortran syntax (vim/vim#13870)

Support most remaining features of Fortran 2018/2023
Small improvements to folding etc,
Code cleanup: use \? instead of mix of \= and \?

ef79c57837

Co-authored-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
2024-01-16 09:18:02 +01:00
Jongwook Choi
6a4c4fa198 ci: stale bot should close the issue with "not planned"
Problem: When the stable bot automatically closes an issue, the issue
will be marked as "closed as completed". It'd be better to mark the
as "closed as not planned".

Solution: Use `state_reason: "not_planned"` from the issues REST API.

References (REST API):
https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#update-an-issue
2024-01-16 08:59:43 +01:00
github-actions[bot]
70d47a1776
version.c: update (#27036)
Co-authored-by: marvim <marvim@users.noreply.github.com>
2024-01-16 14:33:10 +08:00
zeertzjq
92672a161c
docs(builtin): remove signatures of undocumented functions (#27039)
Having an empty signature causes an empty line in generated docs,  so
remove it.

Also change ">" to ">vim" in foreach() docs.
2024-01-16 12:07:35 +08:00