1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-27 04:05:11 +01:00
Commit graph

498 commits

Author SHA1 Message Date
Aliaksei Budavei
368ef5a48c
patch 9.1.0935: SpotBugs compiler can be improved
Problem:  SpotBugs compiler can be improved
Solution: runtime(compiler): Improve defaults and error handling for
          SpotBugs; update test_compiler.vim (Aliaksei Budavei)

runtime(compiler): Improve defaults and error handling for SpotBugs

* Keep "spotbugs#DefaultPreCompilerTestAction()" defined but
  do not assign its Funcref to the "PreCompilerTestAction"
  key of "g:spotbugs_properties": there are no default and
  there can only be introduced arbitrary "*sourceDirPath"
  entries; therefore, this assignment is confusing at best,
  given that the function's implementation delegates to
  whatever "PreCompilerAction" is.

* Allow for the possibility of relative source pathnames
  passed as arguments to Vim for the Javac default actions,
  and the necessity to have them properly reconciled when
  the current working directory is changed.

* Do not expect users to remember or know that new source
  files ‘must be’ ":argadd"'d to be then known to the Javac
  default actions; so collect the names of Java-file buffers
  and Java-file Vim arguments; and let users providing the
  "@sources" file-lists in the "g:javac_makeprg_params"
  variable update these file-lists themselves.

* Strive to not leave behind a fire-once Syntax ":autocmd"
  for a Java buffer whenever an arbitrary pre-compile action
  errors out.

* Only attempt to run a post-compiler action in the absence
  of failures for a pre-compiler action.  Note that warnings
  and failures are treated alike (?!) by the Javac compiler,
  so when previews are tried out with "--enable-preview",
  remember about passing "-Xlint:-preview" too to also let
  SpotBugs have a go.

* Properly group conditional operators when testing for key
  entries in a user-defined variable.

* Also test whether "javaExternal" is defined when choosing
  an implementation for source-file parsing.

* Two commands are provided to toggle actions for buffer-local
  autocommands:
  - SpotBugsRemoveBufferAutocmd;
  - SpotBugsDefineBufferAutocmd.

For example, try this from "~/.vim/after/ftplugin/java.vim":
------------------------------------------------------------
if exists(':SpotBugsDefineBufferAutocmd') == 2
	SpotBugsDefineBufferAutocmd BufWritePost SigUSR1
endif
------------------------------------------------------------

And ":doautocmd java_spotbugs User" can be manually used at will.

closes: 

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:38:47 +01:00
Christian Brabandt
5c42c77315
runtime(netrw): do not pollute search history with symlinks
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-12 19:13:08 +01:00
Luca Saccarola
b66cac1a8e
runtime(typst): add definition lists to formatlistpat, update maintainer
closes: 

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-09 20:31:04 +01:00
Christian Brabandt
92b36663f8
runtime(netrw): only check first arg of netrw_browsex_viewer for being executable
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-08 09:52:37 +01:00
Konfekt
eda923e9c9
runtime(netrw): do not detach when launching external programs in gvim
On Debian 12 when detaching the program wouldn't launch at all

closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-04 20:12:44 +01:00
Konfekt
65311c6f47
runtime(compiler): include spotbugs Java linter
closes: 

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-28 21:06:09 +01:00
Christian Brabandt
7e501f4d99
runtime(gzip): load undofile if there exists one
fixes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-26 15:10:33 +01:00
GuyBrush
d7745acbd8
runtime(netrw): Fixing powershell execution issues on Windows
closes: 

Signed-off-by: GuyBrush <miguel.barro@live.com>
2024-11-23 14:13:10 +01:00
Christian Brabandt
cacfccf803
runtime(netrw): update netrw's decompress logic
Detect a few more default archive types, correctly handle file
extensions with digits in it.

fixes: 
closes: 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-23 13:28:01 +01:00
Wu, Zhenyu
e2c27ca8ef
patch 9.1.0876: filetype: openCL files are not recognized
Problem:  filetype: openCL files are not recognized
Solution: detect '*.cl' files as opencl or lisp filetype,
          include a opencl syntax and filetype plugin (Wu, Zhenyu)

closes: 

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 21:03:09 +01:00
Wu, Zhenyu
bc32bbddcf
patch 9.1.0866: filetype: LLVM IR files are not recognized
Problem:  filetype: LLVM IR files are not recognized
Solution: detect '*.ll' files either as lifelines or llvm filetype
          (Wu, Zhenyu)

closes: 

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 22:55:36 +01:00
Konfekt
460799d885
runtime(netrw): small fixes to netrw#BrowseX
- do not enter dir in Netrw on opening
- double quotes after start cause error on Windows

See @chrisbra 's comments at
[0]

[0]: ff82e7a9db (diff-39baf27d8f62071617bbef12f874cce31c0ebd02ec99e7b119474ca870c636a3R5279)

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 21:42:27 +01:00
D. Ben Knoble
8e013b1421
runtime(racket): update Racket runtime files
This brings the included Racket runtime files to commit c41bc5a (indent
for[*]/lists with accumulator clause correctly, 2024-11-12) of
https://github.com/benknoble/vim-racket.

Note that not all files from that repository are included.

closes: 

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-13 19:45:38 +01:00
GuyBrush
13a6605ddf
patch 9.1.0859: several problems with the GLVS plugin
Problem:  several problems with the GLVS plugin
Solution: fix issues, add regression tests, require at least Vim 9.1
          (GuyBrush)

closes: 

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-12 20:23:41 +01:00
Lennart00
129a8446d2
runtime(tar): Update tar.vim to support permissions
These changes enable tar.vim to keep permissions of files that were
edited intact instead of replacing them with the default permissions.

The major change for this is switching from "tar -OPxf", which reads out
the contents of the selected file from an tar archive to stdout to
"tar -pPxf" which extracts the selected file to the current directory
with permissions intact

This requirs the temporary directory to be created earlier.

closes: 

Signed-off-by: Lennart00 <73488709+Lennart00@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 22:39:30 +01:00
Doug Kearns
7724d621f2
runtime(vim): Fix indent after :silent! function
See 35699f1749 (commitcomment-148816912)

closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-10 20:36:28 +01:00
Christian Brabandt
5b63b236a0
runtime(netrw): directory symlink not resolved in tree view
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-10 20:22:34 +01:00
Tom Benham
64a536d4fa
runtime(netrw): fix several bugs in netrw tree listing
fixes: 
fixes: 
fixes: 
closes: 

Signed-off-by: Tom Benham <tom.benham13@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 21:31:49 +01:00
Christian Brabandt
a063b22b3b
runtime(netrw): prevent polluting the search history
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 14:31:09 +01:00
Yegappan Lakshmanan
a54816b884
patch 9.1.0836: The vimtutor can be improved
Problem:  the vimtutor can be improved
Solution: port and include the interactive vimtutor plugin from Neovim
          (by Felipe Morales) (Yegappan Lakshmanan)

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-11-03 11:01:10 +01:00
Yinzuo Jiang
d181bafd0b
runtime(typst): synchronize updates from the upstream typst.vim
2 commits included from the upstream:

- 2a4a0e0662
- 50e89f4811

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 16:35:46 +01:00
Tom Benham
4d618006ec
runtime(netrw): fix E874 when browsing remote directory which contains ~ character
closes: 

Signed-off-by: Tom Benham <tom.benham13@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 10:47:23 +01:00
Christian Brabandt
8b0fa7a565
runtime(netrw): make :Launch/Open autoloadable
fixes: 
closes: 

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 09:21:23 +01:00
Christian Brabandt
9f32069b8c
runtime(netrw): fix regression with x mapping on Cygwin
related: 

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-30 18:37:06 +01:00
Christian Brabandt
aa2ce6f580
runtime(netrw): fix filetype detection for remote files
fixes: 

while at it, remove the Decho comments in the s:NetrwOptionsRestore()
function

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-30 18:27:03 +01:00
Konfekt
3d7e567ea7
runtime(netrw): simplify gx file handling
It did not work very well, at least on Debian 12, and I am not sure Git
Bash and WSL, for example, were taken care of as maintenance stalled.

The whole logic was somewhat convoluted with some parts repeatedly invoking
failed commands.

The file handling was outdated, for example, nowadays Netscape is rarely
used, and also opinionated, for example mainly Microsoft Paint and Gimp for
Image files.

Instead, let's use (xdg-)open and similar commands on other systems
which respects the user's preferences.

closes: 

Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-27 22:16:49 +01:00
Luca Saccarola
421ed14b8a
runtime(typst): add folding to typst ftplugin
closes: 

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-21 22:01:10 +02:00
Luca Saccarola
a7d456191d
runtime(netrw): deprecate and remove netrwFileHandlers#Invoke()
closes: 

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-21 21:31:29 +02:00
h-east
a4205471ad
runtime(misc): Use consistent "Vim script" spelling
References: https://groups.google.com/g/vim_dev/c/3Z5yM8KER2w/m/wAqws0QSEAAJ

closes: 

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 19:16:42 +02:00
Aliaksei Budavei
85f054aa3f
runtime(java): Recognise the CommonMark form (///) of Javadoc comments
Complement "g:java_ignore_javadoc" with "g:java_ignore_html"
and "g:java_ignore_markdown" to allow selectively disabling
the recognition of HTML and CommonMark respectively.

(Note that this is not a preview feature.)

======================== LIMITATION ========================

According to the syntactical details of JEP 467:

> Any leading whitespace and the three initial / characters
> are removed from each line.
>
> The lines are shifted left, by removing leading whitespace
> characters, until the non-blank line with the least
> leading whitespace has no remaining leading whitespace.
>
> Additional leading whitespace and any trailing whitespace
> in each line is preserved, because it may be significant.

the following example:
------------------------------------------------------------
///    A summary sentence.
///     A list:
///      - Item A.
///     - Item B.
///
///     Some code span, starting here `
///      1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

should be interpreted as if it were written thus:
------------------------------------------------------------
///A summary sentence.
/// A list:
///  - Item A.
/// - Item B.
///
/// Some code span, starting here `
///  1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

Since automatic line rewriting will not be pursued, parts of
such comments having significant whitespace may be ‘wrongly’
highlighted.  For convenience, a &fex function is defined to
‘correct’ it: g:javaformat#RemoveCommonMarkdownWhitespace()
(:help ft-java-plugin).

References:
https://openjdk.org/jeps/467
https://spec.commonmark.org/0.31.2

closes: 

Co-authored-by: Tim Pope <code@tpope.net>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:40:04 +02:00
GuyBrush
c854efc6fe
runtime(glvs): fix a few issues
Fix errors on  that:
* led to use the wrong vim runtime directory name if using powershell or
  bash on windows.
* use a wrong pattern to detect the users runtime dir
* allow to use global variables to specify un-archive commands

closes: 

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 16:14:08 +02:00
Peter Aronoff
be551dacb8
runtime(netrw): remove extraneous closing bracket
fixes: 
closes: 

Signed-off-by: Peter Aronoff <peter@aronoff.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-22 11:29:40 +02:00
Christian Brabandt
e6b01cfe01
runtime(dist): do not output a message if executable is not found
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-20 22:26:56 +02:00
yasuda
c18a9d5835
runtime(netrw): using inefficient highlight pattern for 'mf'
Fixes E872 too many '(' in highlight pattern for `mf` selection

fixup for 
closes: 

Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 18:09:51 +02:00
Christian Brabandt
0f5effbd1f
runtime(netrw): delete confirmation not strict enough
fixes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 19:17:23 +02:00
GuyBrush
609599cc45
runtime(glvs): update GetLatestVimScripts plugin
GetLatestVimScripts builtin plugin required several fixes:
* Support for the new vimbal `.vmb` extension introduced in
  [patch 9.0.1797](f97f6bbf56):
  Vimball/Visual Basic filetype detection conflict
* Update the urls from the old `sourceforge.net` to `vim.org`.
  The download url was hardcoded and a new variable is introduced.
* Fix `curl` command line option to set a filename (`-O` uses the remote
  filename and `-o` specifies a filename).
* Replace windows' command to move files. `REN` can only rename files and
  the script actually moves them. My educated guess was that originally
  only renaming was necessary. When the script was modified to move
  files no change was required on linux because `mv` does both.
* Fix Autoinstall support to check `ftplugins` and `pack-plugins` too
  (`pack-plugins` did not exist when the plugin was created).

closes: 

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-08 19:54:43 +02:00
Gregory Anders
150b5078ac
runtime(hcl,terraform): Add runtime files for HCL and Terraform
closes: 

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-04 22:19:45 +02:00
yasuda
c75dad0177
runtime(netrw): Change line on mx if command output exists
closes: 

Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:06:32 +02:00
yasuda
38cfa2b662
runtime(netrw): Fix mf-selected entry highlighting
closes: 

Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 20:54:47 +02:00
Christian Brabandt
bc29ea6286
runtime(zip): simplify condition to detect MS-Windows
related: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-21 08:20:13 +02:00
Christian Brabandt
7790ea0c68
patch 9.1.0686: zip-plugin has problems with special characters
Problem:  zip-plugin has problems with special characters
          (user202729)
Solution: escape '*?[\' on Unix and handle those chars
          a bit differently on MS-Windows, add a test, check
          before overwriting files

runtime(zip): small fixes for zip plugin

This does the following:
- verify the unzip plugin is executable when loading the autoload plugin
- handle extracting file names with '[*?\' in its name correctly by
  escaping those characters for the unzip command (and handle those
  characters a bit differently on MS-Windows, since the quoting is different)
- verify, that the extract plugin is not overwriting a file (could cause
  a hang, because unzip asking for confirmation)
- add a test zip file which contains those special file names

fixes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-20 22:41:52 +02:00
Christian Brabandt
8e25d91cb7
runtime(dist): verify that executable is in $PATH
Otherwise, if the executable to be verified does not exist,
this would cause a false-positive in the 'IsSafeExecutable()' check,
because 'exepath(executable)' returns an empty string and
'fnamemodify('', ':p:h')' returns the current directory and as a result
the 'IsSafeExecutable()' returns false (for the wrong reason).

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-17 21:00:55 +02:00
Damien
1fbccc1e96
runtime(netrw): Drop committed trace lines
closes: 

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:01:24 +02:00
Damien
b4d1164425
runtime(netrw): Error popup not always used
Problem:  g:netrw_use_errorwindow=2 does not work
          without +balloon_eval.
Solution: Check for popup_atcursor().

related: 

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:00:45 +02:00
Damien
7c754110ff
runtime(netrw): ErrorMsg() may throw E121
Move variables declaration

related: 

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:00:10 +02:00
Christian Brabandt
e2d9b0d499
runtime(zip): zip plugin does not work with Vim 9.0
Problem:  zip plugin does not work with Vim 9.0
          because of :defer
Solution: raise minimum Vim version to Vim 9.1

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-07 08:13:32 +02:00
Christian Brabandt
afea6b9468
runtime(zip): use defer to restore old settings
Problem:  RestoreOpts() plugin called too often
Solution: use :defer to have the RestoreOpts() function
          called when the function returns automatically

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:50 +02:00
Christian Brabandt
8d52926857
runtime(zip): add a generic Message function
Problem:  the zip plugin duplicates a lot of code for displaying
          warnings/errors
Solution: refactor common code into a generic Mess() function

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:49 +02:00
Christian Brabandt
a336d8f21e
runtime(zip): increment base version of zip plugin
Problem:  the zip plugin version is still v33
Solution: increment the version to v34

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:49 +02:00
Christian Brabandt
e1044fb72e
runtime(zip): raise minimum Vim version to v9.0
Problem:  the zip plugin uses features of Vim 9.0, but
          checks for a Vim version >= 7.2
          (interpolated strings and readblob() function)
Solution: raise the minimum Vim version to v9.0

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:49 +02:00