Commit Graph

9471 Commits

Author SHA1 Message Date
Justin M. Keyes
2f78ff816b fix(lsp): misleading logs in non-applicable filetypes #35749
Problem:
LSP logs show misleading "cannot start" messages when editing a filetype
NOT listed in the `config.filetypes` field.

    [ERROR][2025-09-13 18:55:56] …/runtime//lua/vim/lsp/log.lua:151
    "cannot start cssls due to config error: …/runtime//lua/vim/lsp.lua:423:
    cmd: expected expected function or table with executable command,
    got table: 0x0104701b18. Info: vscode-css-language-server is not executable"

Solution:
- `can_start`: check `config.filetypes` before checking the rest of the
  config.
2025-09-13 18:51:06 -07:00
zeertzjq
68f40386ed vim-patch:partial:450d591: runtime(doc): tweak documentation style (#35748)
closes: vim/vim#18284

450d59145e

Skip ft_hare.txt.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-13 23:33:06 +00:00
fredizzimo
8ae9a44d38 feat(ui): support grid=0 in nvim_input_mouse #32535
Problem:
Multigrid UIs have to find out which window to send the input by using
the Nvim focus rules, which are not fully documented.

Furthermore,`getmousepos()` has several problems when multigrid is
enabled, with the main one being that screenrow and screencol are window
relative instead of screen relative, due to the fact that the UI don't
send any absolute coordinates.

Solution:
Allow passing 0 as grid to `nvim_input_mouse`, with absolute
coordinates, which lets nvim determine the actual window to send the
mouse input to. This works as long as nvim is in charge of the window
positioning. If the UI repositions or resizes the windows, it can still
pass the grid it determines like before.
2025-09-13 14:57:04 -07:00
luukvbaal
c1648cf820 fix(ui): forward 'rulerformat' to msg_ruler event #35707
Problem:  A 'rulerformat' not part of the statusline is not emitted through
          msg_ruler events.
Solution: Build the message chunks to emit as a msg_ruler event.
2025-09-13 13:34:58 -07:00
Evgeni Chasnovski
a41703d107 feat(pack): confirm "Always" to install all plugins #35733
Problem: First clean start with config containing multiple
  `vim.pack.add()` calls requires to explicitly confirm each one.
  Although usually a rare occurrence, it still might be tedious.

Solution: Add a third choice during installation confirmation that
  approves current and all next installs within current session. It is
  reset after session restart.
2025-09-13 13:32:09 -07:00
Jaehwang Jung
9ce21c9cf5 vim-patch:9e100b8: runtime(netrw): only keep cursor position in tree listing mode
fixes: vim/vim#16255
closes: vim/vim#18275

9e100b8d14

Co-authored-by: Tom Benham <tom.benham13@gmail.com>
2025-09-13 13:23:36 +09:00
Jaehwang Jung
886fcad894 vim-patch:5f83674: runtime(netrw): Ensure netrw#fs#Dirname() always returns a trailing slash
closes: vim/vim#18199

5f836749fa

Co-authored-by: Miguel Barro <miguel.barro@live.com>
2025-09-13 13:23:14 +09:00
Jaehwang Jung
c318da73b4 vim-patch:5346688: runtime(netrw): fix :Explore command in terminal
There are really two issues solved here:

- The directory listing was not populating the new buffer when using
  the :Explore command. This was because the directory to open is
  determined by using expand("%:p") which includes '!/running/command' at
  the end of the string in terminal buffers.

- The :Explore command should replace the buffer, not split it. This
  because the Explore command will automatically split if the current
  buffer has been modified. According to the docs, all terminal buffers
  will have the modified flag set when a job is running.

fixes: vim/vim#9862
closes: vim/vim#18069

53466887f7

Co-authored-by: Jason Long <jasonlongball@gmail.com>
2025-09-13 13:22:47 +09:00
Jaehwang Jung
2997031732 vim-patch:6a6a44f: runtime(netrw): netrw#BrowseX() needs to distinguish local and remote file
fixes: vim/vim#17794

6a6a44ffb5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-13 13:22:08 +09:00
Jaehwang Jung
130c841287 vim-patch:c849b17: runtime(netrw): Use correct "=~#" for the netrw_sizestyle='H' option
Correct expression syntax to match case in if and if-else clauses.

related: vim/vim#8535
closes: vim/vim#17901

c849b17e19

Co-authored-by: veotos <veotos@users.noreply.github.com>
2025-09-13 13:22:08 +09:00
Jaehwang Jung
cad62f5ec6 vim-patch:0bda783: runtime(netrw): upstream snapshot v184
This change includes the following upstream commits:

- fix: remove black lines in directory listing
- fix: correctly create new file when using Lexplore
- refactor: remove print functionality

The main highlight is removing print functionality that was broken both
in neovim and vim.

closes: vim/vim#17847

0bda7830ac

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:19:40 +09:00
Jaehwang Jung
68c9577519 vim-patch:b3eaae2: runtime(netrw): restore blank line cleanup after file listing
Problem:  v182 refactoring removed blank line cleanup (g/^$/d) from
          s:LocalListing(), causing empty lines between directories
          and files.
Solution: Add the missing cleanup after append() in s:PerformListing()
          (uma-chan).

closes: vim/vim#17672

b3eaae21b9

Co-authored-by: uma-chan <127664533+i9wa4@users.noreply.github.com>
Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
8537133f82 vim-patch:ef92555: runtime(netrw): upstream snapshot of v182
relevant commits:
- refactor: cleanup netrw#BrowseX
- fix: correctly handle symlinks in treeview
- chore: add minimalrc for reproducing issues
- refactor: simplify s:NetrwInit with the 'newer' assignment syntax
- refactor: remove balloon functionality
- Tune local file listing especially for Windows network drives
- interim fix for browse open with multiple windows

closes: vim/vim#17616

ef925556cb

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
b643e1f3d5 vim-patch:2249cc0: runtime(netrw): remove the fun from netrw :)
closes: vim/vim#17584

2249cc0a47

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
7b2a42e962 vim-patch:7e47c1e: runtime(netrw): remove g:netrw_quiet and reindent to 4 spaces
closes: vim/vim#17539

7e47c1e735

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
4644e69bdc vim-patch:f5e3b5c: runtime(netrw): refactor netrw#ErrorMsg -> netrw#msg#Notify
closes: vim/vim#17526

f5e3b5c04f

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
1e2b75abb7 vim-patch:600cd88: runtime(netrw): remove comment separators
closes: vim/vim#17514

600cd88cdf

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
db423ccf27 vim-patch:1319009: runtime(netrw): get rid of s:Strlen() and use strdisplaywidth()
closes: vim/vim#17498

1319009d59

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
2a3d985ce4 vim-patch:09a62e6: runtime(netrw): cleanup Decho related comments
closes: vim/vim#17465

09a62e6f64

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
be4c05a485 vim-patch:d1a975a: runtime(netrw): upstream snapshot of v181
closes: vim/vim#17461

d1a975ae64

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
4d8b2be77e vim-patch:839fd94: runtime(netrw): remove deprecated functions
closes: vim/vim#17124

839fd94265

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
fb9457c23b vim-patch:d623773: runtime(netrw): upstream snapshot of v180
relevant commits:
- fix(gvim): don't set previous jump
- don't overwrite copy, copydir, mkdir and move command options
- fix: correctly name deprecate function
- refactor: remove s:NetrwBufRemover
- refactor: s:NetrwDelete -> netrw#fs#Remove
- defaults!: remove g:netrw_use_errorwindow

fixes: vim/vim#17114
closes: vim/vim#17123

d62377386c

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:19 +09:00
Jaehwang Jung
02a33a449e vim-patch:29d596c: runtime(netrw): upstream snapshot of v179
closes: vim/vim#16787

29d596c80a

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
a6412b3d53 vim-patch:da53af5: runtime(netrw): correctly handle shellslash variable
closes: vim/vim#16758

da53af57a7

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
192839a328 vim-patch:5b97947: runtime(netrw): runtime(netrw): upstream snapshot of v178
relevant commits:
- refactor: netrw#own#Deprecate -> netrw#msg#Deprecate
- refactor: netrw#own#PathJoin -> netrw#fs#PathJoin
- fix: typos
- refactor: netrw#own#Open -> netrw#os#Open
- deprecate!: netrw#WinPath
- refactor: netrw#WinPath -> netrw#fs module
- refactor: s:ShellEscape -> netrw#os module
- refactor: s:NetrwExe -> netrw#os module
- refactor: s:NetrwGlob -> netrw#fs module
- refactor: s:NetrwGetcwd -> netrw#fs module
- refactor: s:NetrwFullPath -> netrw#fs module
- refactor: s:ComposePath -> netrw#fs module

closes: vim/vim#16718

5b97947bbd

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
66c81010fd vim-patch:ee1a24b: runtime(netrw): fix s:NetrwHome() regression
If $MYVIMDIR is unset netrw creates a directory called '$MYVIMDIR' in
the current directory

fixes: vim/vim#16609

ee1a24b21d

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
dcb5e7c88f vim-patch:73d8222: runtime(netrw): upstream snapshot of v177
relevant commits:
- defaults!: use 'suffixes' for 'g:netrw_sort_sequence'
- refactor: remove associated buffer when deliting a file
- refactor: s:NetrwLocalRm
- refactor: s:NetrwDelete
- refactor: s:NetrwLocalRmFile
- feat: use vim.notify on neovim
- fix: prefer v:lua instead of luaeval for vim.deprecate
- chore: remove old batteries

closes: vim/vim#16638

73d8222b31

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
98e51d2e0d vim-patch:6d6ec2e: runtime(netrw): correct wrong version check
The version check introduced with commit edd4ac3e8 has a logic error.
Also it should only trigger when trying to use the netrw plugin and not
always.

fixes: vim/vim#16541

6d6ec2ee05

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
90018d2b36 vim-patch:ec961b0: runtime(netrw): upstream snapshot of v176
relevant commits:
- deprecate!: netrw#Launch, netrw#Open and gx mappings
- refactor: move some utility functions in a private file
- feat: add function to deprecate features
- refactor!: remove NetrwClean command and function
- refactor: use appropriate directories to store temporary files
- refactor: better way to call vim.ui.open
- refactor(Open): prefer lua wrapper function instead of cmdline
- refactor!: drop vim 7 checks
- refactor: use vim.ui.open when using neovim
- refactor: remove s:CheckIfKde
- refactor: balloon functionality
- refactor!: remove netrw#Access function

closes: vim/vim#16519

ec961b05dc

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
bf7d20bb1d vim-patch:2328a39: runtime(netrw): do not double escape Vim special characters
This double escaping was likely introduced because it was the only way
to make :Open work with hashes/percent signs despite shellescape(..., 1)
supposedly taking care of it, but then breaks the gx mapping
on MSYS2 as reported at [0]

Since special characters in the URL following :Open can be escaped,
whereas gx simply breaks and is more common, no longer double escape

[0]: https://github.com/vim/vim/issues/16252

fixes: vim/vim#16252
closes: vim/vim#16265

2328a39a54

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-09-13 13:15:48 +09:00
zeertzjq
99d16af86a vim-patch:e8bbdb9: runtime(doc): Add :defe[r] shortname spec and tag (#35741)
closes: vim/vim#18281

e8bbdb90e4

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-13 01:39:53 +00:00
zeertzjq
c7a9404019 vim-patch:becf184: runtime(misc): removing saccarosium from maintainer list (#35740)
closes: vim/vim#17848

becf1844e0

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 01:18:18 +00:00
zeertzjq
a47ef74ff1 docs: add some missing items to vim_diff.txt (#35731) 2025-09-13 08:40:12 +08:00
zeertzjq
cf9b7a37cc vim-patch:9.1.1753: defaults: 'diffopt' option value can be improved (#35727)
Problem:  defaults: 'diffopt' option value can be improved
Solution: Update diffopt defaults to include "indent-heuristic" and
          "inline:char" (Yee Cheng Chin)

The default diff options have not been updated much despite new
functionality having been added to Vim.

- indent-heurstic: This has been enabled by default in Git since
  33de716387 in 2017. Given that Vim uses xdiff from Git, it makes sense
  to track the default configuration from Git.

- inline:char: This turns on character-wise inline highlighting which is
  generally much better than the default inline:simple. It has been
  implemented since vim/vim#16881 and we have not seen reports of any issues
  with it, and it has received good feedbacks.

closes: vim/vim#18255

976b365305

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-09-12 03:57:05 +00:00
zeertzjq
0f3fef9bab vim-patch:15070ee: runtime(python): Update syntax, fix pythonEllipsis pattern (#35724)
fixes: vim/vim#18263
closes: vim/vim#18264

15070eee2f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-12 00:17:04 +00:00
zeertzjq
c06f0970b0 vim-patch:a0f37db: runtime(doc): use a single pattern in :h 'incsearch' example (#35721)
related: https://github.com/vim/vim/pull/18262#issuecomment-3277008408
closes: vim/vim#18270

a0f37dbbf4
2025-09-11 23:08:02 +00:00
altermo
2e70f3522b docs: plugins.txt #35680
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-09-10 21:16:13 -07:00
zeertzjq
5377cd34a9 vim-patch:5a9ef93: runtime(doc): Update autocmd examples for command line autocompletion (#35713)
In Windows [/] should be escaped [\/]:

	autocmd CmdlineChanged [:\/\?] call wildtrigger()

This updated example works both in Linux and Windows.

closes: vim/vim#18262

5a9ef93b2c

Co-authored-by: Maxim Kim <habamax@gmail.com>
2025-09-11 08:02:47 +08:00
zeertzjq
c4ecb7256b vim-patch:b2c8848: runtime(doc): improve docs related to 'autocomplete'
Manual completion can still be used when 'autocomplete' is set, so
saying "active" is better than "enabled".

closes: vim/vim#18261

b2c8848055
2025-09-11 07:23:29 +08:00
zeertzjq
5a7586a109 vim-patch:9.1.1750: completion: preinserted text highlighed using ComplMatchIns
Problem:  completion: preinserted text highlighed using ComplMatchIns
Solution: Use highlighting group PreInsert and update the documentation
          (Girish Palya).

When "preinsert" is included in 'completeopt', only the PreInsert
highlight group should be applied, whether autocompletion is active or not.
Previously, ComplMatchIns was used when autocompletion was not enabled.

Related to https://github.com/vim/vim/pull/18213.

closes: vim/vim#18254

2525c56e42

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-11 07:23:28 +08:00
zeertzjq
9076fdc123 fix(runtime): add "Added", "Changed", "Removed" to "vim" colorscheme (#35704)
These were added to syncolor.vim in Vim patch 9.1.0016.
2025-09-11 06:55:43 +08:00
Jan Edmund Lazo
58ee249c2c vim-patch:9.0.0729: the rightleft and arabic features are disabled
Problem:    The rightleft and arabic features are disabled.
Solution:   Re-enable the features, some users want to use the functionality.

ae906c8b1b

bug-reports -> bug-report

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-09-09 23:45:44 -04:00
zeertzjq
739fc26d77 vim-patch:80981e1: runtime(doc): mention 'findfunc' at :h :find (#35697)
fixes: vim/vim#18250
related: vim/vim#18253

80981e1db9

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-10 07:02:53 +08:00
bfredl
b95aedeae4 Merge pull request #35536 from bfredl/skipahead
perf(highlight): allow decoration providers to skip ranges without data

fixes #35644
2025-09-09 20:53:31 +02:00
bfredl
5119c03be7 fix(treesitter): use subpriorities for tree ordering
This partially reverts 0b8a72b739,
that is unreverts 15e77a56b7

"priority" is an internal neovim concept which does not occur in shared
queries. Ideally a single priority space should eventually be enough
for our needs. But as we don't want to poke at the usages of
priorities right now in the wider ecosystem,
introduce the "subpriorities" so that treesitter code can distinguish
highlights of the same priorities with different tree nesting depth.

This mainly affects `injection.combined` as parent-tree nodes might appear
in the middle of child-tree nodes which otherwise is not possible.
2025-09-09 12:56:49 +02:00
bfredl
f9d2115a35 perf(highlight): allow decoration providers to skip ranges without data
Continuing the work of #31400

That PR allowed the provider to be invoked multiple times per line.
We want only to do that when there actually is more data later on the
line. Additionally, we want to skip over lines which contain no new
highlight items. The TS query cursor already tells us what the next
position with more data is, so there is no need to reinvoke the range
callback before that.

NB: this removes the double buffering introduced in #32619 which
is funtamentally incompatible with this (nvim core is supposed to keep
track of long ranges by itself, without requiring a callback reinvoke
blitz). Need to adjust the priorities some other way to fix the same issue.
2025-09-09 12:54:04 +02:00
zeertzjq
12868474db vim-patch:77cfc49: runtime(python): highlight ellipsis literals
The ellipsis literal (`...`) can be used in multiple contexts:

- Placeholders:     `class Foo: ...`
- Containers:       `Tuple[int, ...]`
- Assignments:      `x = ...`

This is a trickier pattern to match because we can't rely on keyword
boundaries, so we instead look for exactly three dots (`...`).

This does mean that we will match the `...` portion of `x...x`, which
isn't valid Python syntax, but I think that's an acceptable trade-off
that avoids making this pattern much more complex.

Reference:
- https://docs.python.org/3/library/constants.html#Ellipsis

closes: vim/vim#18107

77cfc49060

Co-authored-by: Jon Parise <jon@indelible.org>
2025-09-09 11:39:23 +08:00
zeertzjq
53e78bec7c vim-patch:6bb16d2: runtime(python): Update syntax file, fix f-string float highlighting
Fix matching of floats at the beginning of an f-string replacement
field, immediately after the opening brace.

The existing pattern, using `\zs`, cannot consume the already matched
`{` so use a lookbehind instead.

See comment: https://github.com/vim/vim/pull/17962#issuecomment-3201550443

closes: vim/vim#18220

6bb16d2cee

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-09 11:37:12 +08:00
zeertzjq
eb19206e03 vim-patch:9.1.1742: complete: preinsert does not work well with 'autocomplete' (#35692)
Problem:  complete: preinsert does not work well with preinsert
Solution: Make "preinsert" completeopt value work with autocompletion
          (Girish Palya)

This change extends Insert mode autocompletion so that 'preinsert' also
works when 'autocomplete' is enabled.

Try: `:set ac cot=preinsert`

See `:help 'cot'` for more details.

closes: vim/vim#18213

fa6fd41a94

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-09 03:35:41 +00:00
zeertzjq
c951fa9eeb Merge pull request #35690 from zeertzjq/vim-9.1.1738
vim-patch:9.1.{1738,1744},d7d6a6f
2025-09-09 09:14:43 +08:00