| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
- not necessary on master: got lost in the vim.lsp.diagnostic => vim.diagnostic migration
- fix tests which accidentally depended on previous session
- ref #15504
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
- Fix the cursor position after applying TextEdits
- Support reversed range of TextEdit
- Invoke nvim_buf_set_text one by one
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
This fixes the handler signature and also prevents n+1 requests firing
if there are multiple clients.
(The first `prepareCallHierarchy` handler is called once per client,
each invocation used `buf_request` to make more requests using *all*
clients)
|
|
|
| |
Follow up to https://github.com/neovim/neovim/pull/15504
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
|
|
|
|
|
|
|
|
| |
or empty results
Relates to https://github.com/neovim/neovim/issues/15050
Users should get some indication if there was an error or an empty
result.
|
| |
|
|
|
|
| |
edit line (#15023)
|
|
|
|
| |
Fixes #15522
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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`.
|
| |
|
|
|
| |
No point in adding and then subtracting I believe ;)
|
| |
|
| |
|
|\
| |
| | |
fix(lsp): Handle nil message_callbacks
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | | |
feat(lsp): use `g:markdown_fenced_languages` in `vim.lsp.util.stylized_markdown`
|
| |/ |
|
|/
|
|
|
| |
Given that the input is pre-filled with a path, it should be possible to
use dir completion.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
[RDY] fix(lsp): guard against negative diagnostic line numbers
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/| |
fix(lsp): convert_input_to_markdown_lines: preserve plaintext
|
| | |
|