Problem: Cannot handle binary data.
Solution: Add the Blob type. (Yasuhiro Matsumoto, closesvim/vim#3638)
6e5ea8d2a9
Nvim-specific Blob conversions are implemented in future commits.
Refactor write_blob() to use a FileDescriptor, as f_writefile() was
refactored to use one (does not apply to read_blob()).
Use var_check_lock() in f_add() for Blobs from v8.1.0897.
Add a modeline to test_blob.vim and fix some doc typos.
Include if_perl.txt's VIM::Blob() documentation. Interestingly, this
function already worked before this port, as it just returns a Blob
string literal, not an actual Blob object.
N/A patches for version.c:
vim-patch:8.1.0741: viminfo with Blob is not tested
Problem: Viminfo with Blob is not tested.
Solution: Extend the viminfo test. Fix reading a blob. Fixed storing a
special variable value.
8c8b8bb56c
vim-patch:8.1.1022: may use NULL pointer when out of memory
Problem: May use NULL pointer when out of memory. (Coverity)
Solution: Check for blob_alloc() returning NULL.
e142a9467a
This generalizes diagnostic handling outside of just the scope of LSP.
LSP clients are now a specific case of a diagnostic producer, but the
diagnostic subsystem is decoupled from the LSP subsystem (or will be,
eventually).
More discussion at [1].
[1]: https://github.com/neovim/neovim/pull/15585
* Simplify rpc encode/decode messages to rpc.send/rcp.receive
* Make missing handlers message throw a warning
* Clean up formatting style in log
* Move all non-RPC loop messages to trace instead of debug
* Add format func option to log to allow newlines in per log entry
Problem: Cannot use octal numbers in scriptversion 4.
Solution: Add the "0o" notation. (Ken Takata, closesvim/vim#5304)
c17e66c5c0
:scriptversion is N/A.
Cherry-pick latest str2nr() doc changes from v8.1.2035.
Cherry-pick various mentions of the 0o prefix from:
- v8.2.2324
- 2346a63784
- 11e3c5ba82
- 82be4849ee
Patch used ascii_isbdigit() by mistake, which was fixed in v8.2.2309.
Make STR2NR_OOCT work the same as STR2NR_OCT when forcing.
In Vim, STR2NR_FORCE | STR2NR_OOCT isn't handled, and doesn't actually
force anything. Rather than abort(), make it work as STR2NR_OCT.
This means STR2NR_FORCE | STR2NR_OCT works the same as
STR2NR_FORCE | STR2NR_OOCT and STR2NR_FORCE | STR2NR_OCT | STR2NR_OOCT.
Problem: Recognizing octal numbers is confusing.
Solution: Introduce scriptversion 4: do not use octal and allow for single
quote inside numbers.
60a8de28d1
:scriptversion is N/A.
Cherry-pick Test_readfile_binary() from v8.1.0742.
Note that this patch was missing vim_str2nr() changes, and so fails the
tests; this was fixed in v8.1.2036.
Problem: Cannot enforce a Vim script style.
Solution: Add the :scriptversion command. (closesvim/vim#3857)
558ca4ae55
:scriptversion is N/A, but ":let ..=" is relevant.
N/A patches for version.c
vim-patch:8.1.1188: not all Vim variables require the v: prefix
Problem: Not all Vim variables require the v: prefix.
Solution: When scriptversion is 3 all Vim variables can only be used with
the v: prefix. (Ken Takata, closesvim/vim#4274)
d2e716e6df
vim-patch:8.1.1190: has('vimscript-3') does not work
Problem: has('vimscript-3') does not work.
Solution: Add "vimscript-3" to the list of features.
93a4879c20
vim-patch:8.1.2038: has('vimscript-4') is always 0
Problem: has('vimscript-4') is always 0.
Solution: Add "vimscript-4" to the feature table. (Naruhiko Nishino,
closesvim/vim#4941)
af91438338
Problem: 'showbreak' cannot be set for one window.
Solution: Make 'showbreak' global-local.
ee85702c10
Change in oneleft() is N/A as the relevant condition was removed
(has_mbyte is always true for Nvim, so the condition was always false;
see commit 73dc9e9).
Use wp over curwin for curs_columns().
Required for v8.2.2903 (otherwise test fails as it'll leave the global
option set).
N/A patches for version.c:
vim-patch:8.1.2283: missed on use of p_sbr
Problem: Missed on use of p_sbr.
Solution: Add missing p_sbr change.
91e22eb6e0
Already ported in commit 43a874a.
Problem: ":z!" is not supported.
Solution: Make ":z!" work and add tests. (Dominique Pellé, closesvim/vim#8836)
Use display height instead of current window height.
7f2dd1e90c
Problem: Cannot disable modeline for an individual file.
Solution: Recognize "nomodeline" in a modeline. (Hu Jialun, closesvim/vim#8798)
9dcd349ca8
Cherry-pick missing modeline for test_modeline.vim (heh) from v8.2.1432.
Analogous to nodejs's `on('data', …)` interface, here on_key is the "add
listener" interface.
ref 3ccdbc570d#12536
BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
In particular:
- jobwait: omitting {timeout} arg is the same as -1.
- sockconnect: omitting {opts} arg is the same as {}.
- jobsend: obsoleted by chansend; don't mention it in job_control.txt.
- menu_get: add to |functions| table.
[skip ci]
Previously, the handler signature was:
function(err, method, params, client_id, bufnr, config)
In order to better support external plugins that wish to extend the
protocol, there is other information which would be advantageous to
forward to the client, such as the original params of the request that
generated the callback.
In order to do this, we would need to break symmetry of the handlers, to
add an additional "params" as the 7th argument.
Instead, this PR changes the signature of the handlers to:
function(err, result, ctx, config)
where ctx (the context) includes params, client_id, and bufnr. This also leaves
flexibility for future use-cases.
BREAKING_CHANGE: changes the signature of the built-in client handlers, requiring
updating handler calls
I mistakenly suggested maxlines=&cmdwinheight, forgetting that it is
calculated from topline, not cursor. maxlines=1 makes the most sense in
cmdwin.
ref #15401622a36b1f1
Add a new default autocommand to limit syntax highlighting
synchronization in the command window. This refactors the nvim_terminal
autocommand out of main() and into a new init_default_autocmds()
function, which is now part of the startup process and can be further
extended with more default autocommands down the road.
ref #6289#6399
Problem:
jobwait() returns early if the job was stopped, but the job might have
pending callbacks on its event queue which are required to complete its
teardown. State such as term->closed might not be updated yet (by the
pending callbacks), so codepaths such as :bdelete think the job is still
running.
Solution:
Always flush the job's event queue before returning from jobwait().
ref #15349
* fix(tutor): adjust over-80ch lines and corresponding expect file
* fix(tutor): standardise indentation and formatting, add nowrap modeline
- unifies the formatting/layout, which was a bit inconsistent,
- adds a nowrap modeline
Since the tutor uses a lot of conceals, which are included in the character
count when calculating line wrapping, lines were breaking at what looked like
odd spots, which gives a poor first impression and lowered readability.
I have adjusted some lines to be over 80ch in the source, but once they're
rendered out with conceals, they're actually under 80, so even with nowrap we
don't visually extend past 80.
fix#15088
Copy the behavior of 'undodir' and create the last specified directory
in the 'backupdir' option if it doesn't exist.
Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir'
by default. Note that 'undodir' always behaves as though it has the
trailing slashes, regardless of whether or not they are present. They
are added to the default option value to minimize surprise.
The '.' value in 'backupdir' is kept because the default behavior for
backups is solely to have a backup if the save of the main file to disk
fails. As soon as that save is completed the backup file is removed, so
generally there is no need to put them in a central location.
Co-authored by: murphy66 <murphy66@gmail.com>
Resolve an issue with deferred clearing of highlight failing if the
buffer is deleted before the timeout by checking whether the
buffer is valid first.
-range=-1 requires the current file to have at least <count> lines, whereas -addr=other doesn't.
-addr=other also sets <count> to -1 by default when it is not specified, though this feature seems undocumented.
Problem:
"set filetype=man" assumes the user wants :Man features, this does extra
stuff like renaming the buffer as "man://".
Solution:
- old entrypoint was ":set filetype=man", but this is too presumptuous #15487
- make the entrypoints more explicit:
1. when the ":Man" command is run
2. when a "man://" buffer is opened
- remove the tricky b:man_sect checks in ftplugin/man.vim and syntax/man.vim
- MANPAGER is supported via ":Man!", as documented.
fixes#15487
Declaration, type-definition, and implementation capabilities were
previously disabled if the client received table output from the server
capabilities. The workDoneProgress capability is sent for many servers
for all supported capabilities as part of this table. Default to setting
capability to table instead of false.
The official developer documentation in in :h dev-lua-doc specifies to
use "--@" for special/magic tokens. However, this format is not
consistent with EmmyLua notation (used by some Lua language servers) nor
with the C version of the magic docstring tokens which use three comment
characters.
Further, the code base is currently split between usage of "--@",
"---@", and "--- @". In an effort to remain consistent, change all Lua
magic tokens to use "---@" and update the developer documentation
accordingly.
* feat(api): add lua C bindings for xdiff
* chore: opt.hunk_lines -> opt.result_type
opt.on_hunk now takes precedence over opt.result_type
* chore: fix indents
Fix indents
* chore: change how priv is managed
Assign priv NULL and unconditionally apply XFREE_CLEAR to it when
finished.
According to the protocol definition `rootPath`, `rootUri` and
`workspaceFolders` are allowed to be null.
Some language servers utilize this to provide "single file" support.
If all three are null, they don't attempt to index a directory but
instead only provide capabilities for a single file.
Problem: More functions can be used as methods.
Solution: Make a few more functions usable as a method.
64b4d73524
Note that the old-style version of Test_byteidx() was already translated
to a Lua test in 069_multibyte_formatting_spec.lua. Keep both versions,
using Test_byteidx() to mainly test the method call syntax for byteidx()
and byteidxcomp().
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
073e4b92e6
test_popup.vim already has the changes from this patch (they're N/A
anyway).
Problem: More functions can be used as methods.
Solution: Make float functions usable as a method.
93cf85f9ef
Fix atan2() doc typo (patch referred to it as atan()).
Adjust Test_fmod() method test to expect "str2float('nan')".
Problem: Only some assert functions can be used as a method.
Solution: Allow using most assert functions as a method.
24278d2407
Port tests to assert_spec.lua.
Problem: Cannot use a lambda as a method.
Solution: Implement ->{lambda}(). (closesvim/vim#4768)
22a0c0c4ec
Add an additional lua_funcname argument to call_func_rettv() to maintain
support for v:lua.
A memory leak was introduced with this patch that was fixed in
v8.1.2107.
Problem: More functions can be used as a method.
Solution: Add append(), appendbufline(), assert_equal(), etc.
Also add the :eval command.
25e42231d3
:eval is already ported.
Problem: All builtin functions are global.
Solution: Add the method call operator ->. Implemented for a limited number
of functions.
ac92e25a33
- Note that to *exactly* port hunk @@ -7376,18 +7444,19 from
handle_subscript(), we need the :scriptversion patches (I have an open
PR for those, but this patch works fine without them anyway).
- Port call_internal_func() from v7.4.2058.
- Adjust some error messages in tests, as they rely on the Blob patches.
- Add a modeline to test_method.vim.
Ignore the global_functions and base_method tables and prefer the
current GPerf implementation. Instead, add an extra base_arg field to
VimLFuncDef that holds the number of the argument to use as the base
(1-indexed, so that 0 may be used to refer to functions that cannot be
used as methods).
This also means we support using any argument as a base from the get-go,
rather than just the first (Vim includes this ability in future patches,
however).
To mark a function as usable as a method, use the "base" key as
described in eval.lua.
Problem: Cannot use 'formatlistpat' for breakindent.
Solution: Use a negative list indent. (Maxim Kim, closesvim/vim#8594)
f674b358fc
Port get_showbreak_value() from patch v8.1.2281
to avoid breaking changes when porting older patches.
Problem: 'breakindent' does not work well for bulleted and numbered lists.
Solution: Add the "list" entry to 'breakindentopt'. (Christian Brabandt,
closesvim/vim#8564, closesvim/vim#1661)
4a0b85ad01
This changes the behavior of the hl_cache to the old one.
- when the capture exists as a hlgroup -> use it
- when hl_map contains a mapping -> use it
- else do nothing (before: map capture to non-existing capture)
Before also captures `@foo.bar` would intend to use the hlgroup `foo.bar`
which results in a confusing error since hlgroups can't contain dots.
Problem: win_gettype() does not recognize a quickfix window.
Solution: Add "quickfix" and "loclist". (Yegappan Lakshmanan, closesvim/vim#8676)
28d8421bfb
Problem: Location list only has the start position.
Solution: Make it possible to add an end position. (Shane-XB-Qian,
closesvim/vim#8393)
6864efa596
N/A patches for version.c:
vim-patch:8.2.3002: Vim doesn't abort on a fatal Tcl error
Problem: Vim doesn't abort on a fatal Tcl error.
Solution: Change emsg() to iemsg(). (Dominique Pellé, closesvim/vim#8383)
affd0bc626
vim-patch:8.2.3030: Coverity reports a memory leak
Problem: Coverity reports a memory leak.
Solution: Fix the leak and a few typos. (Dominique Pellé, closesvim/vim#8418)
cb54bc6562
Patch v8.2.3022 is mostly N/A but cannot be included here
because of new feature check for "has()".
vim-patch:8.2.3032: build problems with MSVC, other crypt issues with libsodium
Problem: Build problems with MSVC, other crypt issues with libsodium.
Solution: Adjust MSVC makefile. Disable swap file only when 'key' is set.
Adjust error message used when key is wrong. Fix Coverity issues.
(Christian Brabandt, closesvim/vim#8420, closesvim/vim#8411)
226b28b961
vim-patch:8.2.3044: Amiga MorphOS and AROS: process ID is not valid
Problem: Amiga MorphOS and AROS: process ID is not valid.
Solution: Use FindTask to return something which is unique to all processes.
(Ola Söder, closesvim/vim#8444)
3a62b14077
vim-patch:8.2.3046: Amiga MorphOS: Term mode is set using DOS packets
Problem: Amiga MorphOS: Term mode is set using DOS packets.
Solution: Use the same way of setting term mdoe on all next gen Amiga-like
systems. (Ola Söder, closesvim/vim#8445)
b420ac9d20
Problem: Using getchar() in Vim9 script is problematic.
Solution: Add getcharstr(). (closesvim/vim#8343)
3a7503c34c
Cherry-pick Test_getchar() changes from patch v8.1.2304
to sync with upstream.
Port f_getcharstr() to src/nvim/eval/funcs.c, not src/nvim/getchar.c.
Patch v8.1.2042 is not ported yet.
Add a new function to redraw diagnostics from the current diagnostic
cache, without receiving a "publishDiagnostics" message from the server.
This is already being done in two places in the Lua stdlib, so this
function unifies that functionality in addition to providing it to third
party plugins.
An example use case for this could be a command or key-binding for
toggling diagnostics virtual text. The virtual text configuration option
can be toggled using `vim.lsp.with` followed by
`vim.lsp.diagnostic.redraw()` to immediately redraw the diagnostics
with the updated setting.
Remove syncolor.vim in favor of defining the default highlight groups
directly in `init_highlight`. This approach provides a number of
advantages:
1. The highlights are always defined, regardless of whether or not the
syntax regex engine is enabled.
2. Redundant sourcing of syntax files is eliminated (syncolor.vim was
often sourced multiple times based on how the user's colorscheme file
was written).
3. The syntax highlighting regex engine and the highlight groups
themselves are more fully decoupled.
4. Removal of the confusing `:syntax on` / `:syntax enable` dichotomy
(they now both do the same thing).
This approach also correctly solves a number of bugs related to
highlighting (#15176, #12573, #15205).
The handlers for textDocument/references, textDocument/documentSymbol,
and workspace/symbol open their results in the quickfix list by default
and are not configurable. They are also incompatible with `vim.lsp.with`
as they do not accept a configuration parameter.
Add a `config` parameter to the handler for these three messages which
allows them to be configured with `vim.lsp.with`. Additionally, add a
new configuration option 'loclist' that, when true, causes these
handlers to open their results in the location list rather than the
quickfix list.
Some language servers *cough*rust-analyzer*cough* need an empty/custom
workspaceFolders for certain usecases. For example, rust-analyzer
needs an empty workspaceFolders table for standalone file support
(See https://github.com/rust-analyzer/rust-analyzer/pull/8955).
This can also be useful for other languages that need to commonly
open a certain directory (like flutter or lua), which would help
prevent spinning up a new language server altogether.
In case no workspaceFolders are passed, we fallback to what we had
before.
Passing `nil` is equivalent to passing 0, i.e. it simply uses the
current buffer number.
This fixes a bug when vim.lsp.diagnostic.disable() is called without
arguments.
Add two new methods to allow diagnostics to be disabled (and re-enabled)
in the current buffer. When diagnostics are disabled they are simply not
displayed to the user, but they are still sent by the server and
processed by the client.
Disabling diagnostics can be helpful in a number of scenarios. For
example, if one is working on a buffer with an overwhelming amount of
diagnostic warnings it can be helpful to simply disable diagnostics
without disabling the LSP client entirely. This also allows users more
flexibility on when and how they may want diagnostic information to be
displayed. For example, some users may not want to display diagnostic
information until after the buffer is first written.
An empty table was previously always treated as a list, which means that
while merging tables, whenever an empty table was encountered it would
always truncate any table on the left.
`vim.tbl_deep_extend("force", { b = { a = 1 } }, { b = {} })`
Before: `{ b = {} }`
After: `{ b = { a = 1 } }`
This fixes an issue (#12573) where colorscheme files are sourced twice
upon startup. This occurs when the startup script calls `:colorscheme`,
which sets the `g:colors_name` global variable. When syntax highlighting
is enabled in `syn_maybe_enable()` the `syntax.vim` script is sourced
which in turn sources `synload.vim`. This script checks to see if
`g:colors_name` is set and, if so, runs
exe "colors " . colors_name
This is done to ensure that highlight groups are defined before enabling
the syntax highlighting engine.
Instead, source syncolors.vim before the startup scripts which sets up
default highlights and only load the full syntax engine after
the startup scripts or when the user runs `:syntax on`. Add a guard
variable `did_syncolor` to prevent syncolor.vim from being sourced
twice and remove the line mentioned above from synload.vim so that
the colorscheme file is not re-sourced when the syntax engine is loaded.
the `textDocument/rangeFormatting` nad `textDocument/formatting` did not
pass bufnr to apply_text_edits, meaning edits were applied to
the user's currently active buffer. This could result in text being
applied to the wrong buffer.
Some programs behave differently when they detect that stdin is being
piped. This can be problematic when these programs are used with the job
control API where stdin is attached, but not typically used. It is
possible to run the job using a PTY which circumvents this problem, but
that includes a lot of overhead when simply closing the stdin pipe would
suffice.
To enable this behavior, add a new parameter to the jobstart options
dict called "stdin" with two valid values: "pipe" (the default)
implements the existing behavior of opening a channel for stdin and
"null" which disconnects stdin (or, if you prefer, connects it to
/dev/null). This is extensible so that other modes can be added in the
future.
ipairs terminates on the first nil index when iterating over table keys:
for i,k in ipairs( {[1] = 'test', [3] = 'test'} ) do
print(i, k)
end
prints:
1 test
Instead, use pairs which continues iterating over the entire table:
for i,k in pairs( {[1] = 'test', [3] = 'test'} ) do
print(i, k)
end
prints:
1 test
3 test
`return err_message(tostring(err))` caused errors to be printed as
`table: 0x123456789` instead of showing the error code and error
message.
This also removes some `if err` blocks that never got called because at
the end of `handlers.lua` all the handlers are wrapped with logic that
adds generic error handling.
RFC 8089, which defines the file URI scheme, also allows URIs without a
hostname, i.e. of the form file:/path/to/file. These are returned by
some language servers and accepted by other LSP implementations, such as
VSCode's, so it is reasonable for us to accept them as well.
Adds indentation that matches the number prefix to ensure diagnostic
messages spawning multiple lines align.
Before:
Diagnostics:
1. • Variable not in scope: red :: t0 -> t
• Perhaps you meant one of these:
‘rem’ (imported from Prelude), ‘read’ (imported from Prelude),
‘pred’ (imported from Prelude)
2. • Variable not in scope: repeDoubleColon :: [Char] -> t0
• Perhaps you meant ‘replaceDoubleColon’ (line 32)
After:
Diagnostics:
1. • Variable not in scope: red :: t0 -> t
• Perhaps you meant one of these:
‘rem’ (imported from Prelude), ‘read’ (imported from Prelude),
‘pred’ (imported from Prelude)
2. • Variable not in scope: repeDoubleColon :: [Char] -> t0
• Perhaps you meant ‘replaceDoubleColon’ (line 32)
Problem: JSONC files are not recognized.
Solution: Recognize .jsonc files. (Izhak Jakov, closesvim/vim#8500)
acbb4b5720
N/A patches for version.c:
vim-patch:8.2.3081: cannot catch errors in a channel command
Problem: Cannot catch errors in a channel command.
Solution: Instead of skipping the error make it silent. (closesvim/vim#8477)
11a632d60b
vim-patch:8.2.3082: a channel command "echoerr" does not show anything
Problem: A channel command "echoerr" does not show anything.
Solution: Do not use silent errors when using an "echoerr" command.
(closesvim/vim#8494)
b836f631db
vim-patch:8.2.3094: Test_popup_atcursor_pos() fails without the conceal feature
Problem: Test_popup_atcursor_pos() fails without the conceal feature.
Solution: Add a check for the conceal feature. (Dominique Pellé,
closesvim/vim#8505)
c60e959cba
vim-patch:8.2.3098: popup window test is flaky on MS-Windows with GUI
Problem: Popup window test is flaky on MS-Windows with GUI.
Solution: Skip the check in this situation.
999db2346b
Options formatted as a list of comma-separated key-value pairs may have
values that contain leading and trailing whitespace characters. For
example, the `listchars` option has a default value of
`"tab:> ,trail:-,nbsp:+"`. When converting this value to a lua table,
leading and trailing whitespace should not be trimmed.
Co-authored-by: Robert Hrusecky <robert.hrusecky@utexas.edu>
Ensure that
* Shell uses UTF8 input/output mode
* Stderr output is captured, in UTF8
* Program exit codes are correctly captured
Update functional test harness and add tests
for :make command.
Closes#13713
Block copy and paste from system-clipboard currently breaks formatting.
This fixes it.
The bug occurs because system-clipboard doesn't contain information
about what mode the copy was made.
Simple solution to this is we keep a cache of copy we last made along
with mode information. If system-clipboard returns the cache we apply
the mode information that we know about that cache.
This closes#14677, but I also am a little unsure if there are times
where this may not be correct. However, this just changes the behavior
that even if `was_set` was false, we still get for
`nvim_win_get_option`.
* Add buffer information to tabline_update
Most terminal implementations of the tabline display buffer and tab
information. Many neovim-qt users disable GuiTabline because it lacks
functionality provided in the terminal implementation.
The tabline_update event should include buffer information too, so client GUIs
can display rich useful tabs.
The `onexit` handler could set `message_callbacks` to `nil` within the
luv event loop while the mainloop runs a function that tries to access
`message_callbacks`.
This adds some checks to prevent errors in that case.
Fixes https://github.com/neovim/neovim/issues/14863
Add :eval and :checkhealth (:eval was also missing upstream).
Fix :perlfile typo, add abbreviations for :perl, :perlfile and :perldo.
Remove :scriptversion; it hasn't been ported yet (#14611).
[skip ci]
Add the buffer number to the `textDocument/formatting` request, so
that it is passed to the handler.
The built-in formatting handlers do not use the buffer number, but user
overrides should have access to it.
`lsp.diagnostic.get_all()` was returning diagnotics for `:bwipeout`-ed
buffers because the diagnostic cache is not cleared. The first argument
of on_detach callback is the string "detach", not the bufnr.
Problem: Cannot use "z=" when 'spell' is off.
Solution: Make "z=" work even when 'spell' is off. (Christian Brabandt,
Gary Johnson, closesvim/vim#6227)
152e79e94b
Problem: Spell suggestions insufficiently tested.
Solution: Add spell suggestion tests. (Dominique Pelle, closesvim/vim#5398)
e9a8d1f9ad
Requires latest en.utf-8.spl from
https://ftp.nluug.nl/pub/vim/runtime/spell/.
Include the following patch because patch v8.2.0946 was merged:
vim-patch:8.2.0948: spell test fails
Problem: Spell test fails.
Solution: Adjust expected text of the prompt.
d281b7c227
Currently, for large number of diagnostics, the delay in populating
loclist may be sufficient for a user to switch to another window,
resulting in the loclist being populated on the wrong window.
In the documentation for `vim.lsp.util.open_floating_preview`
the opts table keys were prefixed with `--` instead of `---`,
preventing capture by docgen.
This pr allows the user to specify whether `lsp.utils.open_floating_preview`
is focusable via the `opts` parameter. Defaults to true.
It can be configured by setting the focusable key inside opts parameter:
```lua
vim.lsp.util.open_floating_preview(contents, syntax, {focusable = false})
```
Problem: Cannot paste a block without adding padding.
Solution: Add "zp" and "zP" which paste without adding padding. (Christian
Brabandt, closesvim/vim#8289)
2fa9384ca1
Cherry-pick Test_normal_z_error() from patch v8.2.0369.
Install the icon of the application in the hicolor XDG icon theme;
this way it can be properly loaded by XDG menus in the currently set
XDG icon theme, without looking in the legacy pixmaps location.
handlers passed to `lsp_buf_request` weren't called if the server
responded with an error that looks like this:
"decoded", {
error = {
code = -32601,
message = "No delegateCommandHandler for foo"
},
id = 5,
jsonrpc = "2.0"
}
An example where that happens is both eclipse.jdt.ls and the
haskell-language-server when invoking a command that doesn't exist:
:lua vim.lsp.buf_request(
0,
'workspace/executeCommand',
{ command = 'foo' },
function(err, _, res)
print(vim.inspect(err), vim.inspect(res))
end
)
Problem: Problem restoring 'packpath' in session.
Solution: Let "skiprtp" also apply to 'packpath'.
d23b714d8b
Port Test_mksession_skiprtp() to lua functional test.
Problem: Problems when restoring 'runtimepath' from a session file.
Solution: Add the "skiprtp" item in 'sessionoptions'.
635bd60804
Allow "terminal" value for sessionoptions even if it's no-opt
because patch v8.0.1592 is not ported yet.
Omit vim9 test, Test_mksession_skiprtp().
fix: fancy_floating_markdown: syn region must include keepend to make sure syntax regions are applied correctly. Fixes#14594
feat: fancy_floating_markdown: handle <pre></pre> code blocks as a markdown code block with plaintext
fix: possible nil check for markdown code blocks till end of buffer
refactor: only one check is needed to see if stripped[h.finish +1] is valid
fix(lsp): dont't set doc ownsyntax, since it breaks contained syntaxes. Set regions for the markdown blocks intsead
fix: apply markdown formatting for code blocks without a language
fix: use markdownCodeBlock when no language was set in a code block
Unfortunately, there are some subtle bugs in the smarter tagstack changes,
so we'll revert them for now and try to come up with a better approach.
One of the added tests, adds current position to jumplist before jumping,
is valuable though and changed to still work after reverting the other two
commits.
Closes#14571
Problem: 'quickfixtextfunc' does not get window ID of location list.
Solution: Add "winid" to the dict argument. (Yegappan Lakshmanan,
closesvim/vim#6222)
7ba5a7eff3
Problem: It is not possible to customize the quickfix window contents.
Solution: Add 'quickfixtextfunc'. (Yegappan Lakshmanan, closesvim/vim#5465)
858ba06d5f
Patch 8.2.2524 added the support for the fields 'foldopen', 'foldclose'
and 'foldsep' to the 'fillchars' option in Vim:
http://ftp.vim.org/pub/vim/patches/8.2/8.2.2524
Update the credits in intro.txt based on Vim credits.