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: #16140
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
On Debian 12 when detaching the program wouldn't launch at all
closes: #16168
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Detect a few more default archive types, correctly handle file
extensions with digits in it.
fixes: #16099closes: #16104
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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: #15825
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: LLVM IR files are not recognized
Solution: detect '*.ll' files either as lifelines or llvm filetype
(Wu, Zhenyu)
closes: #15824
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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: #16046
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: several problems with the GLVS plugin
Solution: fix issues, add regression tests, require at least Vim 9.1
(GuyBrush)
closes: #16036
Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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: #7379
Signed-off-by: Lennart00 <73488709+Lennart00@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: the vimtutor can be improved
Solution: port and include the interactive vimtutor plugin from Neovim
(by Felipe Morales) (Yegappan Lakshmanan)
closes: #6414
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
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>
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: #15721
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>
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/467https://spec.commonmark.org/0.31.2closes: #15740
Co-authored-by: Tim Pope <code@tpope.net>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Fix errors on #15640 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: #15722
Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Fixes E872 too many '(' in highlight pattern for `mf` selection
fixup for #15551closes: #15700
Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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: #15640
Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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: #15505closes: #15519
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
Problem: g:netrw_use_errorwindow=2 does not work
without +balloon_eval.
Solution: Check for popup_atcursor().
related: #15501
Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
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>
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>
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>