mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
Compare commits
1 Commits
master
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2290350177 |
2
.github/workflows/backport.yml
vendored
2
.github/workflows/backport.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
- name: Create failed backport label
|
||||
if: ${{ steps.backport.outputs.was_successful == 'false' }}
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
|
2
.github/workflows/labeler_issue.yml
vendored
2
.github/workflows/labeler_issue.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check issue title
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const title = context.payload.issue.title;
|
||||
|
2
.github/workflows/labeler_pr.yml
vendored
2
.github/workflows/labeler_pr.yml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- if: startsWith(github.base_ref, 'release')
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
|
4
.github/workflows/response.yml
vendored
4
.github/workflows/response.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/close_unresponsive.js')
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/remove_response_label.js')
|
||||
|
2
.github/workflows/reviewers_add.yml
vendored
2
.github/workflows/reviewers_add.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: 'Request reviewers'
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/reviewers_add.js')
|
||||
|
2
.github/workflows/reviewers_remove.yml
vendored
2
.github/workflows/reviewers_remove.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: 'Remove reviewers'
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/reviewers_remove.js')
|
||||
|
@@ -2,8 +2,7 @@
|
||||
" Description: Perform Ada specific completion & tagging.
|
||||
" Language: Ada (2005)
|
||||
" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||
" Taylor Venable <taylor@metasyntax.net>
|
||||
" Neil Bird <neil@fnxweb.com>
|
||||
" $Author: krischik $
|
||||
@@ -20,10 +19,6 @@
|
||||
" autoload
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" 08.07.2007 TV fix default compiler problems.
|
||||
" 05.09.2025 do not globally set 'ignorecase'/'smartcase' option
|
||||
" set undo_ftplugin
|
||||
" mark as unmaintained
|
||||
" use buffer-local abbreviation
|
||||
" Help Page: ft-ada-plugin
|
||||
"------------------------------------------------------------------------------
|
||||
" Provides mapping overrides for tag jumping that figure out the current
|
||||
@@ -53,8 +48,8 @@ setlocal complete=.,w,b,u,t,i
|
||||
|
||||
" Section: case {{{1
|
||||
"
|
||||
" setlocal nosmartcase
|
||||
" setlocal ignorecase
|
||||
setlocal nosmartcase
|
||||
setlocal ignorecase
|
||||
|
||||
" Section: formatoptions {{{1
|
||||
"
|
||||
@@ -120,6 +115,7 @@ if !exists ("b:match_words") &&
|
||||
\ s:notend . '\<record\>:\<end\>\s\+\<record\>'
|
||||
endif
|
||||
|
||||
|
||||
" Section: Compiler {{{1
|
||||
"
|
||||
if ! exists("g:ada_default_compiler")
|
||||
@@ -152,10 +148,10 @@ endif
|
||||
" Section: Abbrev {{{1
|
||||
"
|
||||
if exists("g:ada_abbrev")
|
||||
iabbrev <buffer> ret return
|
||||
iabbrev <buffer> proc procedure
|
||||
iabbrev <buffer> pack package
|
||||
iabbrev <buffer> func function
|
||||
iabbrev ret return
|
||||
iabbrev proc procedure
|
||||
iabbrev pack package
|
||||
iabbrev func function
|
||||
endif
|
||||
|
||||
" Section: Commands, Mapping, Menus {{{1
|
||||
@@ -194,12 +190,6 @@ if !exists(':AdaTagFile')
|
||||
\ ':AdaTypes',
|
||||
\'call ada#Switch_Syntax_Option (''standard_types'')')
|
||||
endif
|
||||
"
|
||||
" Section: b:undo_ftplugin {{{1
|
||||
let b:undo_ftplugin = "setl fo< comments< tw< commentstring< complete< "
|
||||
\ . "| setl completefunc< omnifunc< ts< sts< sw< fdm< fde< fdi< "
|
||||
\ . "| setl fdm< fde< fdi< fdn< "
|
||||
\ . "| unlet! b:match_words "
|
||||
|
||||
" 1}}}
|
||||
" Reset cpoptions
|
||||
|
@@ -4,7 +4,6 @@
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Last Change: 2021 Jan 19
|
||||
" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
|
||||
" 2025 Sep 05 by Vim Project, disable setting global ignorecase
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -58,7 +57,7 @@ if exists("loaded_matchit")
|
||||
" \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"'
|
||||
endif
|
||||
|
||||
" setlocal ignorecase
|
||||
setlocal ignorecase
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
@@ -368,16 +368,35 @@ local function trigger_event(p, event_name, kind)
|
||||
api.nvim_exec_autocmds(event_name, { pattern = p.path, data = data })
|
||||
end
|
||||
|
||||
--- @param action string
|
||||
--- @param title string
|
||||
--- @return fun(kind: 'begin'|'report'|'end', percent: integer, fmt: string, ...:any): nil
|
||||
local function new_progress_report(action)
|
||||
local progress = { kind = 'progress', title = 'vim.pack' }
|
||||
local function new_progress_report(title)
|
||||
-- TODO(echasnovski): currently print directly in command line because
|
||||
-- there is no robust built-in way of showing progress:
|
||||
-- - `vim.ui.progress()` is planned and is a good candidate to use here.
|
||||
-- - Use `'$/progress'` implementation in 'vim.pack._lsp' if there is
|
||||
-- a working built-in '$/progress' handler. Something like this:
|
||||
-- ```lua
|
||||
-- local progress_token_count = 0
|
||||
-- function M.new_progress_report(title)
|
||||
-- progress_token_count = progress_token_count + 1
|
||||
-- return vim.schedule_wrap(function(kind, msg, percent)
|
||||
-- local value = { kind = kind, message = msg, percentage = percent }
|
||||
-- dispatchers.notification(
|
||||
-- '$/progress',
|
||||
-- { token = progress_token_count, value = value }
|
||||
-- )
|
||||
-- end
|
||||
-- end
|
||||
-- ```
|
||||
-- Any of these choices is better as users can tweak how progress is shown.
|
||||
|
||||
return vim.schedule_wrap(function(kind, percent, fmt, ...)
|
||||
progress.status = kind == 'end' and 'success' or 'running'
|
||||
progress.percent = percent
|
||||
local msg = ('%s %s'):format(action, fmt:format(...))
|
||||
progress.id = api.nvim_echo({ { msg } }, kind ~= 'report', progress)
|
||||
local progress = kind == 'end' and 'done' or ('%3d%%'):format(percent)
|
||||
local details = (' %s %s'):format(title, fmt:format(...))
|
||||
local chunks = { { 'vim.pack', 'ModeMsg' }, { ': ' }, { progress, 'WarningMsg' }, { details } }
|
||||
-- TODO: need to add support for progress-messages api
|
||||
api.nvim_echo(chunks, true, {})
|
||||
-- Force redraw to show installation progress during startup
|
||||
vim.cmd.redraw({ bang = true })
|
||||
end)
|
||||
@@ -389,9 +408,9 @@ local copcall = package.loaded.jit and pcall or require('coxpcall').pcall
|
||||
--- Execute function in parallel for each non-errored plugin in the list
|
||||
--- @param plug_list vim.pack.Plug[]
|
||||
--- @param f async fun(p: vim.pack.Plug)
|
||||
--- @param progress_action string
|
||||
local function run_list(plug_list, f, progress_action)
|
||||
local report_progress = new_progress_report(progress_action)
|
||||
--- @param progress_title string
|
||||
local function run_list(plug_list, f, progress_title)
|
||||
local report_progress = new_progress_report(progress_title)
|
||||
|
||||
-- Construct array of functions to execute in parallel
|
||||
local n_finished = 0
|
||||
|
@@ -3,7 +3,6 @@
|
||||
" Maintainer: Claudio Fleiner (claudio@fleiner.com)
|
||||
" Last Change: 2022 Jun 12
|
||||
" 2025 Sep 2 by Vim project: fix a few syntax issues #18192
|
||||
" 2025 Sep 5 by Vim project: introduce m4Disabled region #18200
|
||||
|
||||
" This file will highlight user function calls if they use only
|
||||
" capital letters and have at least one argument (i.e. the '('
|
||||
@@ -25,7 +24,7 @@ endif
|
||||
" – Quotes are nestable;
|
||||
" – The delimiters can be redefined with changequote(); here we only handle
|
||||
" the default pair: ` ... ';
|
||||
" – Quoted text in M4 is rescanned, not treated as a literal string.
|
||||
" – Quoted text in M4 is rescanned, not treated as a literal string;
|
||||
" Therefore the region is marked transparent so contained items retain
|
||||
" their normal highlighting.
|
||||
syn region m4Quoted
|
||||
@@ -35,20 +34,11 @@ syn region m4Quoted
|
||||
\ contains=@m4Top
|
||||
\ transparent
|
||||
|
||||
" Comments in M4:
|
||||
" – According to the Open Group Base Specification, comments start with
|
||||
" a <number-sign> (#) and end at <newline>, unless redefined with changecom().
|
||||
" We only handle the default here.
|
||||
" – Comments in M4 are not like in most languages: they do not remove the text,
|
||||
" they simply prevent any macros from being expanded, while the text remains
|
||||
" in the output. This region therefore disables any other matches.
|
||||
" – Comments themselves are disabled when quoted.
|
||||
syn region m4Disabled start=+#+ end=+$+ containedin=ALLBUT,m4Quoted
|
||||
|
||||
" define the m4 syntax
|
||||
syn match m4Variable contained "\$\d\+"
|
||||
syn match m4Special contained "$[@*#]"
|
||||
syn match m4Comment "\<\(m4_\)\=dnl\>.*" contains=SpellErrors
|
||||
syn match m4Comment "#.*" contains=SpellErrors
|
||||
syn match m4Constants "\<\(m4_\)\=__file__"
|
||||
syn match m4Constants "\<\(m4_\)\=__line__"
|
||||
syn keyword m4Constants divnum sysval m4_divnum m4_sysval
|
||||
|
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2025 Sep 05
|
||||
" Last Change: 2025 Aug 23
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
" Rob B
|
||||
@@ -218,24 +218,21 @@ syn region pythonRawBytes
|
||||
|
||||
" F-string replacement fields
|
||||
"
|
||||
" - Matched parentheses, brackets and braces are skipped
|
||||
" - A bare = (followed by optional whitespace) enables debugging
|
||||
" - A bare ! prefixes a conversion field (followed by optional whitespace)
|
||||
" - Matched parentheses, brackets and braces are ignored
|
||||
" - A bare # is ignored to end of line
|
||||
" - A bare = (surrounded by optional whitespace) enables debugging
|
||||
" - A bare ! prefixes a conversion field
|
||||
" - A bare : begins a format specification
|
||||
" - Matched braces inside a format specification are skipped
|
||||
" - Matched braces inside a format specification are ignored
|
||||
"
|
||||
syn region pythonFStringField
|
||||
\ matchgroup=pythonFStringDelimiter
|
||||
\ start=/{/
|
||||
\ end=/\%(=\s*\)\=\%(!\a\s*\)\=\%(:\%({\_[^}]*}\|[^{}]*\)\+\)\=}/
|
||||
\ skip=/([^)]*)\|\[[^]]*]\|{[^}]*}\|#.*$/
|
||||
\ end=/\%(\s*=\s*\)\=\%(!\a\)\=\%(:\%({[^}]*}\|[^}]*\)\+\)\=}/
|
||||
\ contained
|
||||
\ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonType,pythonDoctest,pythonDoctestValue,@Spell
|
||||
syn match pythonFStringFieldSkip /(\_[^()]*)\|\[\_[^][]*]\|{\_[^{}]*}/
|
||||
\ contained
|
||||
\ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonType,pythonDoctest,pythonDoctestValue,@Spell
|
||||
|
||||
" Doubled braces are not replacement fields
|
||||
syn match pythonFStringSkip /{{/ transparent contained contains=NONE
|
||||
" Doubled braces and Unicode escapes are not replacement fields
|
||||
syn match pythonFStringSkip /{{\|\\N{/ transparent contained contains=NONE
|
||||
|
||||
syn match pythonEscape +\\[abfnrtv'"\\]+ contained
|
||||
syn match pythonEscape "\\\o\{1,3}" contained
|
||||
|
@@ -46,7 +46,7 @@ static const char *e_invalwindow = N_("E957: Invalid window number");
|
||||
/// Add match to the match list of window "wp".
|
||||
/// If "pat" is not NULL the pattern will be highlighted with the group "grp"
|
||||
/// with priority "prio".
|
||||
/// If "pos_list" is not NULL the list of positions defines the highlights.
|
||||
/// If "pos_list" is not NULL the list of posisions defines the highlights.
|
||||
/// Optionally, a desired ID "id" can be specified (greater than or equal to 1).
|
||||
/// If no particular ID is desired, -1 must be specified for "id".
|
||||
///
|
||||
@@ -214,7 +214,6 @@ static int match_add(win_T *wp, const char *const grp, const char *const pat, in
|
||||
return id;
|
||||
|
||||
fail:
|
||||
vim_regfree(regprog);
|
||||
xfree(m->mit_pattern);
|
||||
xfree(m->mit_pos_array);
|
||||
xfree(m);
|
||||
|
@@ -243,55 +243,32 @@ local function find_in_log(log, event, kind, repo_name, version)
|
||||
return res
|
||||
end
|
||||
|
||||
local function track_nvim_echo()
|
||||
exec_lua(function()
|
||||
_G.echo_log = {}
|
||||
local nvim_echo_orig = vim.api.nvim_echo
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.api.nvim_echo = function(...)
|
||||
table.insert(_G.echo_log, vim.deepcopy({ ... }))
|
||||
return nvim_echo_orig(...)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function validate_progress_report(action, step_names)
|
||||
-- NOTE: Assume that `nvim_echo` mocked log has only progress report messages
|
||||
local echo_log = exec_lua('return _G.echo_log') ---@type table[]
|
||||
local function validate_progress_report(title, step_names)
|
||||
-- NOTE: Assumes that message history contains only progress report messages
|
||||
local messages = vim.split(n.exec_capture('messages'), '\n')
|
||||
local n_steps = #step_names
|
||||
eq(n_steps + 2, #echo_log)
|
||||
eq(n_steps + 2, #messages)
|
||||
|
||||
local progress = { kind = 'progress', title = 'vim.pack', status = 'running', percent = 0 }
|
||||
local init_step = { { { ('%s (0/%d)'):format(action, n_steps) } }, true, progress }
|
||||
eq(init_step, echo_log[1])
|
||||
local init_msg = ('vim.pack: 0%% %s (0/%d)'):format(title, n_steps)
|
||||
eq(init_msg, messages[1])
|
||||
|
||||
local steps_seen = {} --- @type table<string,boolean>
|
||||
for i = 1, n_steps do
|
||||
local echo_args = echo_log[i + 1]
|
||||
|
||||
local percent = math.floor(100 * i / n_steps)
|
||||
local msg = ('vim.pack: %3d%% %s (%d/%d)'):format(percent, title, i, n_steps)
|
||||
-- NOTE: There is no guaranteed order (as it is async), so check that some
|
||||
-- expected step name is used in the message
|
||||
local msg = ('%s (%d/%d)'):format(action, i, n_steps)
|
||||
-- expected step name is used
|
||||
local pattern = '^' .. vim.pesc(msg) .. ' %- (%S+)$'
|
||||
local step = echo_args[1][1][1]:match(pattern) ---@type string
|
||||
local step = messages[i + 1]:match(pattern)
|
||||
eq(true, vim.tbl_contains(step_names, step))
|
||||
steps_seen[step] = true
|
||||
|
||||
-- Should not add intermediate progress report to history
|
||||
eq(echo_args[2], false)
|
||||
|
||||
-- Should update a single message by its id (computed after first call)
|
||||
progress.id = progress.id or echo_args[3].id ---@type integer
|
||||
progress.percent = math.floor(100 * i / n_steps)
|
||||
eq(echo_args[3], progress)
|
||||
end
|
||||
|
||||
-- Should report all steps
|
||||
eq(n_steps, vim.tbl_count(steps_seen))
|
||||
|
||||
progress.percent, progress.status = 100, 'success'
|
||||
local final_step = { { { ('%s (%d/%d)'):format(action, n_steps, n_steps) } }, true, progress }
|
||||
eq(final_step, echo_log[n_steps + 2])
|
||||
local final_msg = ('vim.pack: done %s (%d/%d)'):format(title, n_steps, n_steps)
|
||||
eq(final_msg, messages[n_steps + 2])
|
||||
end
|
||||
|
||||
local function is_jit()
|
||||
@@ -454,7 +431,6 @@ describe('vim.pack', function()
|
||||
end)
|
||||
|
||||
it('shows progress report during installation', function()
|
||||
track_nvim_echo()
|
||||
exec_lua(function()
|
||||
vim.pack.add({ repos_src.basic, repos_src.defbranch })
|
||||
end)
|
||||
@@ -1104,7 +1080,6 @@ describe('vim.pack', function()
|
||||
end)
|
||||
|
||||
it('shows progress report', function()
|
||||
track_nvim_echo()
|
||||
exec_lua(function()
|
||||
vim.pack.add({ repos_src.fetch, repos_src.defbranch })
|
||||
vim.pack.update()
|
||||
@@ -1112,7 +1087,7 @@ describe('vim.pack', function()
|
||||
|
||||
-- During initial download
|
||||
validate_progress_report('Downloading updates', { 'fetch', 'defbranch' })
|
||||
exec_lua('_G.echo_log = {}')
|
||||
n.exec('messages clear')
|
||||
|
||||
-- During application (only for plugins that have updates)
|
||||
n.exec('write')
|
||||
@@ -1120,7 +1095,6 @@ describe('vim.pack', function()
|
||||
|
||||
-- During force update
|
||||
n.clear()
|
||||
track_nvim_echo()
|
||||
repo_write_file('fetch', 'lua/fetch.lua', 'return "fetch new 3"')
|
||||
git_add_commit('Commit to be added 3', 'fetch')
|
||||
|
||||
|
Reference in New Issue
Block a user