aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:39:54 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:39:54 +0000
commit21cb7d04c387e4198ca8098a884c78b56ffcf4c2 (patch)
tree84fe5690df1551f0bb2bdfe1a13aacd29ebc1de7 /runtime/plugin
parentd9c904f85a23a496df4eb6be42aa43f007b22d50 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-colorcolchar.tar.gz
rneovim-colorcolchar.tar.bz2
rneovim-colorcolchar.zip
Merge remote-tracking branch 'upstream/master' into colorcolcharcolorcolchar
Diffstat (limited to 'runtime/plugin')
-rw-r--r--runtime/plugin/editorconfig.lua2
-rw-r--r--runtime/plugin/gzip.vim5
-rw-r--r--runtime/plugin/health.vim1
-rw-r--r--runtime/plugin/man.lua2
-rw-r--r--runtime/plugin/matchparen.vim26
-rw-r--r--runtime/plugin/netrwPlugin.vim2
-rw-r--r--runtime/plugin/nvim.lua19
-rw-r--r--runtime/plugin/osc52.lua36
-rw-r--r--runtime/plugin/rplugin.vim4
-rw-r--r--runtime/plugin/tarPlugin.vim1
-rw-r--r--runtime/plugin/tohtml.vim56
-rw-r--r--runtime/plugin/zipPlugin.vim6
12 files changed, 129 insertions, 31 deletions
diff --git a/runtime/plugin/editorconfig.lua b/runtime/plugin/editorconfig.lua
index 54cd0e828e..a96919e1fe 100644
--- a/runtime/plugin/editorconfig.lua
+++ b/runtime/plugin/editorconfig.lua
@@ -3,7 +3,7 @@ vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead', 'BufFilePost' }, {
group = group,
callback = function(args)
-- Buffer-local enable has higher priority
- local enable = vim.F.if_nil(vim.b.editorconfig, vim.F.if_nil(vim.g.editorconfig, true))
+ local enable = vim.F.if_nil(vim.b.editorconfig, vim.g.editorconfig, true)
if not enable then
return
end
diff --git a/runtime/plugin/gzip.vim b/runtime/plugin/gzip.vim
index 7214488579..c02bd99567 100644
--- a/runtime/plugin/gzip.vim
+++ b/runtime/plugin/gzip.vim
@@ -1,6 +1,7 @@
" Vim plugin for editing compressed files.
-" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Oct 30
+" Maintainer: The Vim Project <https://github.com/vim/vim>
+" Last Change: 2023 Aug 10
+" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Exit quickly when:
" - this plugin was already loaded
diff --git a/runtime/plugin/health.vim b/runtime/plugin/health.vim
deleted file mode 100644
index 66ae8fb239..0000000000
--- a/runtime/plugin/health.vim
+++ /dev/null
@@ -1 +0,0 @@
-autocmd CmdUndefined CheckHealth checkhealth
diff --git a/runtime/plugin/man.lua b/runtime/plugin/man.lua
index 4b1528b0cb..512b1f63e8 100644
--- a/runtime/plugin/man.lua
+++ b/runtime/plugin/man.lua
@@ -16,6 +16,7 @@ vim.api.nvim_create_user_command('Man', function(params)
end, {
bang = true,
bar = true,
+ range = true,
addr = 'other',
nargs = '*',
complete = function(...)
@@ -28,6 +29,7 @@ local augroup = vim.api.nvim_create_augroup('man', {})
vim.api.nvim_create_autocmd('BufReadCmd', {
group = augroup,
pattern = 'man://*',
+ nested = true,
callback = function(params)
require('man').read_page(vim.fn.matchstr(params.match, 'man://\\zs.*'))
end,
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 3982489b92..4235a0d39b 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -1,6 +1,7 @@
" Vim plugin for showing matching parens
-" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2022 Dec 01
+" Maintainer: The Vim Project <https://github.com/vim/vim>
+" Last Change: 2023 Oct 20
+" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -17,12 +18,15 @@ if !exists("g:matchparen_insert_timeout")
let g:matchparen_insert_timeout = 60
endif
+let s:has_matchaddpos = exists('*matchaddpos')
+
augroup matchparen
" Replace all matchparen autocommands
autocmd! CursorMoved,CursorMovedI,WinEnter,BufWinEnter,WinScrolled * call s:Highlight_Matching_Pair()
autocmd! WinLeave,BufLeave * call s:Remove_Matches()
if exists('##TextChanged')
autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
+ autocmd! TextChangedP * call s:Remove_Matches()
endif
augroup END
@@ -37,6 +41,9 @@ set cpo-=C
" The function that is invoked (very often) to define a ":match" highlighting
" for any matching paren.
func s:Highlight_Matching_Pair()
+ if !exists("w:matchparen_ids")
+ let w:matchparen_ids = []
+ endif
" Remove any previous match.
call s:Remove_Matches()
@@ -108,8 +115,9 @@ func s:Highlight_Matching_Pair()
" searchpairpos()'s skip argument.
" We match "escape" for special items, such as lispEscapeSpecial, and
" match "symbol" for lispBarSymbol.
- let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' .
- \ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|symbol\\|comment"''))'
+ let s_skip = 'synstack(".", col("."))'
+ \ . '->indexof({_, id -> synIDattr(id, "name") =~? '
+ \ . '"string\\|character\\|singlequote\\|escape\\|symbol\\|comment"}) >= 0'
" If executing the expression determines that the cursor is currently in
" one of the syntax types, then we want searchpairpos() to find the pair
" within those syntax types (i.e., not skip). Otherwise, the cursor is
@@ -183,11 +191,12 @@ func s:Highlight_Matching_Pair()
" If a match is found setup match highlighting.
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
- if exists('*matchaddpos')
- call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
+ if s:has_matchaddpos
+ call add(w:matchparen_ids, matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10))
else
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
+ call add(w:matchparen_ids, 3)
endif
let w:paren_hl_on = 1
endif
@@ -195,12 +204,13 @@ endfunction
func s:Remove_Matches()
if exists('w:paren_hl_on') && w:paren_hl_on
- silent! call matchdelete(3)
+ while !empty(w:matchparen_ids)
+ silent! call remove(w:matchparen_ids, 0)->matchdelete()
+ endwhile
let w:paren_hl_on = 0
endif
endfunc
-
" Define commands that will disable and enable the plugin.
command DoMatchParen call s:DoMatchParen()
command NoMatchParen call s:NoMatchParen()
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim
index d309f81484..a347781e6f 100644
--- a/runtime/plugin/netrwPlugin.vim
+++ b/runtime/plugin/netrwPlugin.vim
@@ -20,7 +20,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
-let g:loaded_netrwPlugin = "v171"
+let g:loaded_netrwPlugin = "v173"
let s:keepcpo = &cpo
set cpo&vim
"DechoRemOn
diff --git a/runtime/plugin/nvim.lua b/runtime/plugin/nvim.lua
index 815886f896..743d3044b6 100644
--- a/runtime/plugin/nvim.lua
+++ b/runtime/plugin/nvim.lua
@@ -1,7 +1,24 @@
vim.api.nvim_create_user_command('Inspect', function(cmd)
if cmd.bang then
- vim.pretty_print(vim.inspect_pos())
+ vim.print(vim.inspect_pos())
else
vim.show_pos()
end
end, { desc = 'Inspect highlights and extmarks at the cursor', bang = true })
+
+vim.api.nvim_create_user_command('InspectTree', function(cmd)
+ if cmd.mods ~= '' or cmd.count ~= 0 then
+ local count = cmd.count ~= 0 and cmd.count or ''
+ local new = cmd.mods ~= '' and 'new' or 'vnew'
+
+ vim.treesitter.inspect_tree({
+ command = ('%s %s%s'):format(cmd.mods, count, new),
+ })
+ else
+ vim.treesitter.inspect_tree()
+ end
+end, { desc = 'Inspect treesitter language tree for buffer', count = true })
+
+vim.api.nvim_create_user_command('EditQuery', function(cmd)
+ vim.treesitter.query.edit(cmd.fargs[1])
+end, { desc = 'Edit treesitter query', nargs = '?' })
diff --git a/runtime/plugin/osc52.lua b/runtime/plugin/osc52.lua
new file mode 100644
index 0000000000..374b70066f
--- /dev/null
+++ b/runtime/plugin/osc52.lua
@@ -0,0 +1,36 @@
+local tty = vim.iter(vim.api.nvim_list_uis()):any(function(ui)
+ return ui.chan == 1 and ui.stdout_tty
+end)
+
+if not tty or vim.g.clipboard ~= nil or vim.o.clipboard ~= '' or not os.getenv('SSH_TTY') then
+ return
+end
+
+require('vim.termcap').query('Ms', function(cap, seq)
+ assert(cap == 'Ms')
+
+ -- Check 'clipboard' and g:clipboard again to avoid a race condition
+ if vim.o.clipboard ~= '' or vim.g.clipboard ~= nil then
+ return
+ end
+
+ -- If the terminal reports a sequence other than OSC 52 for the Ms capability
+ -- then ignore it. We only support OSC 52 (for now)
+ if not seq:match('^\027%]52') then
+ return
+ end
+
+ local osc52 = require('vim.ui.clipboard.osc52')
+
+ vim.g.clipboard = {
+ name = 'OSC 52',
+ copy = {
+ ['+'] = osc52.copy('+'),
+ ['*'] = osc52.copy('*'),
+ },
+ paste = {
+ ['+'] = osc52.paste('+'),
+ ['*'] = osc52.paste('*'),
+ },
+ }
+end)
diff --git a/runtime/plugin/rplugin.vim b/runtime/plugin/rplugin.vim
index 52f4bd05bc..bb637fcb77 100644
--- a/runtime/plugin/rplugin.vim
+++ b/runtime/plugin/rplugin.vim
@@ -14,7 +14,9 @@ function! s:GetManifestPath() abort
let dest = stdpath('data')
if !empty(dest)
if !isdirectory(dest)
- call mkdir(dest, 'p', 0700)
+ if getftype(dest) != "link"
+ call mkdir(dest, 'p', 0700)
+ endif
endif
let manifest_base = dest
endif
diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim
index d55492a93e..384a3ed823 100644
--- a/runtime/plugin/tarPlugin.vim
+++ b/runtime/plugin/tarPlugin.vim
@@ -47,7 +47,6 @@ augroup tar
au BufReadCmd *.tar.zst call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tzs call tar#Browse(expand("<amatch>"))
augroup END
-com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>)
" ---------------------------------------------------------------------
" Restoration And Modelines: {{{1
diff --git a/runtime/plugin/tohtml.vim b/runtime/plugin/tohtml.vim
index 08df19b4f9..56eb2c15bf 100644
--- a/runtime/plugin/tohtml.vim
+++ b/runtime/plugin/tohtml.vim
@@ -1,6 +1,6 @@
" Vim plugin for converting a syntax highlighted file to HTML.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
-" Last Change: 2019 Nov 13
+" Last Change: 2023 Sep 07
"
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
" $VIMRUNTIME/syntax/2html.vim
@@ -8,11 +8,42 @@
if exists('g:loaded_2html_plugin')
finish
endif
-let g:loaded_2html_plugin = 'vim8.1_v2'
+let g:loaded_2html_plugin = 'vim9.0_v2'
"
" Changelog: {{{
-" 8.1_v2 (this version): - Fix Bitbucket issue #19: fix calculation of tab
+" 9.0_v2 (this version): - Warn if using deprecated g:use_xhtml option
+" - Change default g:html_use_input_for_pc to "none"
+" instead of "fallback". All modern browsers support
+" the "user-select: none" and "content:" CSS
+" properties so the older method relying on extra
+" markup and unspecified browser/app clipboard
+" handling is only needed in rare special cases.
+" - Fix SourceForge issue #33: generate diff filler
+" correctly when new lines have been added to or
+" removed from end of buffer.
+" - Fix SourceForge issue #32/Vim Github issue #8547:
+" use translated highlight ID for styling the
+" special-use group names (e.g. LineNr) used
+" directly by name in the 2html processing.
+" - Fix SourceForge issue #26, refactoring to use
+" :let-heredoc style string assignment and
+" additional fixes for ".." vs. "." style string
+" concatenation. Requires Vim v8.1.1354 or higher.
+" 9.0_v1 (Vim 9.0.1275): - Implement g:html_no_doc and g:html_no_modeline
+" for diff mode. Add tests.
+" (Vim 9.0.1122): NOTE: no version string update for this version!
+" - Bugfix for variable name in g:html_no_doc
+" (Vim 9.0.0819): NOTE: no version string update for this version!
+" - Add options g:html_no_doc, g:html_no_lines,
+" and g:html_no_modeline (partially included in Vim
+" runtime prior to version string update).
+" - Updates for new Vim9 string append style (i.e. use
+" ".." instead of "."). Requires Vim version
+" 8.1.1114 or higher.
+"
+" 8.1 updates: {{{
+" 8.1_v2 (Vim 8.1.2312): - Fix SourceForge issue #19: fix calculation of tab
" stop position to use in expanding a tab, when that
" tab occurs after a syntax match which in turn
" comes after previously expanded tabs.
@@ -20,17 +51,17 @@ let g:loaded_2html_plugin = 'vim8.1_v2'
" destination file to ignore FileType events;
" speeds up processing when the destination file
" already exists and HTML highlight takes too long.
-" - Fix Bitbucket issue #20: progress bar could not be
+" - Fix SourceForge issue #20: progress bar could not be
" seen when DiffDelete background color matched
" StatusLine background color. Added TOhtmlProgress
" highlight group for manual user override, but
" calculate it to be visible compared to StatusLine
" by default.
-" - Fix Bitbucket issue #1: Remove workaround for old
+" - Fix SourceForge issue #1: Remove workaround for old
" browsers which don't support 'ch' CSS unit, since
" all modern browsers, including IE>=9, support it.
-" - Fix Bitbucket issue #10: support termguicolors
-" - Fix Bitbucket issue #21: default to using
+" - Fix SourceForge issue #10: support termguicolors
+" - Fix SourceForge issue #21: default to using
" generated content instead of <input> tags for
" uncopyable text, so that text is correctly
" prevented from being copied in chrome. Use
@@ -41,13 +72,14 @@ let g:loaded_2html_plugin = 'vim8.1_v2'
" - Fix fallback sizing of <input> tags for browsers
" without "ch" support.
" - Fix cursor on unselectable diff filler text.
-" 8.1_v1 (Vim 8.1.0528): - Fix Bitbucket issue #6: Don't generate empty
+" 8.1_v1 (Vim 8.1.0528): - Fix SourceForge issue #6: Don't generate empty
" script tag.
-" - Fix Bitbucket issue #5: javascript should
+" - Fix SourceForge issue #5: javascript should
" declare variables with "var".
-" - Fix Bitbucket issue #13: errors thrown sourcing
+" - Fix SourceForge issue #13: errors thrown sourcing
" 2html.vim directly when plugins not loaded.
-" - Fix Bitbucket issue #16: support 'vartabstop'.
+" - Fix SourceForge issue #16: support 'vartabstop'.
+"}}}
"
" 7.4 updates: {{{
" 7.4_v2 (Vim 7.4.0899): Fix error raised when converting a diff containing
@@ -152,7 +184,7 @@ let g:loaded_2html_plugin = 'vim8.1_v2'
" TODO: {{{
" * Check the issue tracker:
-" https://bitbucket.org/fritzophrenic/vim-tohtml/issues?status=new&status=open
+" https://sourceforge.net/p/vim-tohtml/issues/search/?q=%21status%3Aclosed
" * Options for generating the CSS in external style sheets. New :TOcss
" command to convert the current color scheme into a (mostly) generic CSS
" stylesheet which can be re-used. Alternate stylesheet support? Good start
diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim
index edc52713a8..c3118a361d 100644
--- a/runtime/plugin/zipPlugin.vim
+++ b/runtime/plugin/zipPlugin.vim
@@ -1,6 +1,6 @@
" zipPlugin.vim: Handles browsing zipfiles
" PLUGIN PORTION
-" Date: Jan 07, 2020
+" Date: Dec 07, 2021
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1
@@ -20,14 +20,14 @@
if &cp || exists("g:loaded_zipPlugin")
finish
endif
-let g:loaded_zipPlugin = "v32"
+let g:loaded_zipPlugin = "v33"
let s:keepcpo = &cpo
set cpo&vim
" ---------------------------------------------------------------------
" Options: {{{1
if !exists("g:zipPlugin_ext")
- let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
+ let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
endif
" ---------------------------------------------------------------------