set_option_value() only called did_set_option() for string options,
whereas do_set_option_value() called it for all types.
This change makes set_option_value() call did_set_option() for all types
and thus makes it more consistent with do_set_option_value().
runtime(optwin): Fix for 'splitkeep' option (vim/vim#12974)
'spk' was used as a boolean, rather than a string option.
0b8b145bf8
Co-authored-by: xrandomname <141588647+xrandomname@users.noreply.github.com>
The class `lsp.Client` has a public member `server_capabilities`,
which is assumed to be non-nil once initialized, as documented in
`:help vim.lsp.client`. Due to the possibility that it may be nil
before initialization, `lsp.Client` was not having a proper lua type
annotations on the field `server_capabilities`.
Instead of having a nil `server_capabilities` until initialized in
the RPC response callback, we can have an initial value of empty table.
This CHANGES the behavior of the `server_capabilities` field in a way
that it is no longer `nil` until initialization. Note that, as
already documented, `server_capabilities` should never be nil when
it is once initialized and thus ready to be used in user configs.
This fixes the issue where the LspNotify handlers for inlay_hint /
diagnostics would end up refreshing all attached clients.
The handler would call util._refresh, which called
vim.lsp.buf_request, which calls the method on all attached clients.
Now util._refresh takes an optional client_id parameter, which is used
to specify a specific client to update.
This commit also fixes util._refresh's handling of the `only_visible`
flag. Previously if `only_visible` was false, two requests would be made
to the server: one for the visible region, and one for the entire file.
Co-authored-by: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com>
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
Problem: When double clicking a line starting with a #, the code assumes
there is a fold there and tries to close it, resulting in an error if
there isn't a fold.
Solution: Check foldlevel before performing "zc".
Problem: Wrong cursor position with virtual text before a whitespace
character and 'linebreak'.
Solution: Always set "col_adj" to "size - 1" and apply 'linebreak' after
adding the size of 'breakindent' and 'showbreak'.
closes: vim/vim#129566e55e85f92
N/A patches:
vim-patch:9.0.1826: keytrans() doesn't translate recorded key typed in a GUI
Problem: Rexx files may not be recognised
Solution: Add shebang detection and improve disambiguation of *.cls
files
closes: vim/vim#12951e06afb7860
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
runtime: cleanup :Sman command via the undo_ftplugin mechanism (vim/vim#12967)
Regards to @dkearns as noticed in
2ac708b5489d8ef7cc43
Co-authored-by: Enno <Konfekt@users.noreply.github.com>
Unfortunately the gc=false objects can refer to a dangling tree if the
gc=true tree was freed first. This reuses the same tree object as the
node itself is keeping alive via the uservalue of the node userdata.
(wrapped in a table due to lua 5.1 restrictions)
Problem: `push_tree`, every time its called for the same TSTree with
`do_copy=false` argument, creates a new userdata for it. Each userdata,
when garbage collected, frees the same TSTree C object.
Solution: Add flag to userdata, which indicates, should C object,
which userdata points to, be freed, when userdata is garbage collected.
Problem:
With treesitter fold, InsertLeave can be slow, because a single session
of insert mode may schedule multiple fold updates in on_bytes and
on_changedtree.
Solution:
Don't create duplicate autocmds.
Some more reasonable defaults for topline:
- if topline was replaced with another line, that now becomes topline
- if line was inserted just before topline, display it. This is more
similar to the previous API behavior.
Problem: 'linebreak' is incorrectly drawn after 'breakindent'.
Solution: Don't include 'breakindent' size when already after it.
closes: vim/vim#12937closes: vim/vim#129401d3e0e8f31
Problem: camel-case spelling has issues with digits
Solution: Improve the camCase spell checking by taking digits
and caps into account
Rewrite the conditions to check for word boundaries by taking into
account the presence of digits and all-caps sequences such as acronyms.
closes: vim/vim#12644closes: vim/vim#12933d08745040b
Co-authored-by: LemonBoy <thatlemon@gmail.com>