| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
Co-authored-by: Dustin S. <dstackmasta27@gmail.com>
Co-authored-by: Ferenc Fejes <fejes@inf.elte.hu>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
Co-authored-by: brianhuster <phambinhanctb2004@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem: setting `loclist = true` makes `on_list` being ignored. This
was not a problem before, but with `vim.lsp.buf.document_symbol` using
`loclist = true` as default it is needed to explicitly pass `loclist =
false` in order to use custom `on_list`.
Solution: prefer `on_list` over `loclist` and document the latter as
taking effect only in the default handler.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Not able to open document symbols for different buffers
Solution: Use the location list as default.
To switch back to previous behavior (qflist):
vim.lsp.buf.document_symbol({ loclist = false })
Fixes: #31832
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
**Problem:** The `context` parameter for `references()` is just typed as
a table, which is unhelpful.
**Solution:** Properly type it as an `lsp.ReferenceContext`!
|
|
|
|
|
|
|
|
| |
Problem:
LSP spec uses the term "position encoding" where we say "offset encoding".
Solution:
- Rename it everywhere except `vim.lsp.Client.offset_encoding` (which would be breaking).
- Mention "position encoding" in the documentation for `vim.lsp.Client.offset_encoding`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecated:
- `client.request()` -> `client:request()`
- `client.request_sync()` -> `client:request_sync()`
- `client.notify()` -> `client:notify()`
- `client.cancel_request()` -> `client:cancel_request()`
- `client.stop()` -> `client:stop()`
- `client.is_stopped()` `client:is_stopped()`
- `client.supports_method()` -> `client:supports_method()`
- `client.on_attach()` -> `client:on_attach()`
Fixed docgen to link class fields to the full function doc.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Capability register logic is spread across 3 files.
Solution:
- Consolidate (and simplify) logic into the client.
- Teach client.supports_method about resolve methods
|
|
|
|
|
|
|
|
|
|
| |
**Problem:** Despite the LSP providing the option for language servers
to specify a range with a hover response (for highlighting), Neovim does
not give the option to highlight this range.
**Solution:** Add an option to `buf.hover()` which causes this range to
be highlighted.
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
|
|
|
|
|
| |
Signatures can be cycled using `<C-s>` when the user enters the floating
window.
|
|
|
|
|
|
|
|
|
|
| |
- Partition the handlers in vim.lsp.handlers as:
- client to server response handlers (RCS)
- server to client request handlers (RSC)
- server to client notification handlers (NSC)
Note use string indexes instead of protocol.methods for improved
typing in LuaLS (tip: use hover on RCS, RSC or NSC).
|
|
|
|
|
|
|
| |
Problem: vim.lsp.buf.hover() displays "No information available" when client_id
is not 1.
Solution: use vim.tbl_isempty(tbl) instead of #tbl==0
|
|
|
|
| |
Deprecate `vim.lsp.handlers.hover` and `vim.lsp.handlers['textDocument/hover']`
|
|
|
|
| |
Use `vim.lsp.completion.trigger()` instead'
|
| |
|
|
|
|
|
|
|
|
| |
Only ever display a dialogue box once.
Switch from vim.fn.inpulist to vim.ui.select
refactor(lsp): merge call and type hierarchy functions
|
|
|
|
| |
Regression from #30902
|
|
|
|
|
| |
Follow up to https://github.com/neovim/neovim/pull/30877
Fixes https://github.com/neovim/neovim/issues/30926
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`lsp.buf_request` send the same params to all servers and many
calls to this pass PositionalParams which depends on the clients
offset_encoding. This can result with incorrect params being sent
to a server.
Solution:
`lsp.buf_request` `params` argument can now be passed as a function
which takes the client as the first argument. This is used in
lsp/buf.lua to construct correct params for each client request.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Relates to:
- https://github.com/neovim/neovim/issues/30034
- https://github.com/neovim/neovim/issues/17712
- https://github.com/neovim/neovim/issues/16363
Closes:
- https://github.com/neovim/neovim/issues/26936 (but only provides bufnr
and method)
- https://github.com/neovim/neovim/issues/22318
Might fix: https://github.com/neovim/neovim/issues/30737
|
|
|
|
|
|
|
| |
Relates to:
- https://github.com/neovim/neovim/issues/17712
- https://github.com/neovim/neovim/issues/30034
|
|
|
|
|
| |
- Also fix `vim.validate()` for PUC Lua when showing errors for values
that aren't string or number.
|
|\ |
|
| | |
|
|/
|
|
|
|
|
| |
Problem:
If there are multiple LSP clients, it's not clear which actions are provided by which servers. #30710
Solution:
Show the server name next to each action (only if there are multiple clients).
|
| |
|
|
|
|
|
| |
Ensure that the function `pick_call_hierarchy_item` correctly handles
the case where `call_hierarchy_items` is nil or an empty table. This
prevents potential errors when the function is called with no items.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: When preparing the parameters for a code actions LSP request,
the code set `context.diagnostics` when processing the first LSP client,
and then reused those `context.diagnostics` for subsequent LSP clients.
This meant that the second and next LSP clients got diagnostics that
did not originate from them, and they did not get the diagnostics that
they sent.
Solution: Avoid setting `context.diagnostics` (which is referenced by
all clients). Instead, set `params.context.diagnostics` directly, which
is specific to a single client.
Fixes #30001
Caused by #29501
|
|
|
|
|
|
|
| |
`buf.code_action` always included diagnostics on a given line from all
clients. Servers should only receive diagnostics they published, and in
the exact same format they sent it.
Should fix https://github.com/neovim/neovim/issues/29500
|
|
|
|
|
|
|
|
|
|
| |
While this relies on a proposed LSP 3.18 feature, it's fully backwards
compatible, so IMO there's no harm in adding this already.
Looks like some servers already support for this e.g.
- gopls: https://go-review.googlesource.com/c/tools/+/510235
- clangd: https://github.com/llvm/llvm-project/pull/80180
Fixes #27293
|
|
|
|
|
|
|
| |
Problem:
`vim.region()` is redundant with `getregionpos()`.
Solution:
Deprecate `vim.region()`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes https://github.com/neovim/neovim/issues/28484.
Closes https://github.com/neovim/neovim/issues/28719.
Co-authored-by: Chris <crwebb85@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Jake B <16889000+jakethedev@users.noreply.github.com>
Co-authored-by: Jonathan Raines <jonathan.s.raines@gmail.com>
Co-authored-by: Yi Ming <ofseed@foxmail.com>
Co-authored-by: Zane Dufour <zane@znd4.me>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
|
|
|
|
| |
See https://github.com/neovim/neovim/pull/28483#discussion_r1583344120
|
|
|
|
| |
Both methods had pretty much the same documentation and shared the
implementation.
|
|
|
|
| |
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
|
|
|
|
|
| |
- Changed `reuse_client` to check workspace folders in addition to
root_dir.
|
|
|
|
|
|
|
|
| |
The `callHierarchy` function should warn the user when
`textDocument/prepareCallHierarchy` didn't resolve an entity and
return, rather than calling the `callHierarchy/{incoming,outgoing}Calls`
method with an empty object - which is encoded as an empty list (which
doesn't respect language server specification for the
`callHierarchy/incomingCalls` call).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added `@inlinedoc` so single use Lua types can be inlined into the
functions docs. E.g.
```lua
--- @class myopts
--- @inlinedoc
---
--- Documentation for some field
--- @field somefield integer
--- @param opts myOpts
function foo(opts)
end
```
Will be rendered as
```
foo(opts)
Parameters:
- {opts} (table) Object with the fields:
- somefield (integer) Documentation
for some field
```
- Marked many classes with with `@nodoc` or `(private)`.
We can eventually introduce these when we want to.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The documentation flow (`gen_vimdoc.py`) has several issues:
- it's not very versatile
- depends on doxygen
- doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C.
- The intermediate XML files and filters makes it too much like a rube goldberg machine.
Solution:
Re-implement the flow using Lua, LPEG and treesitter.
- `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic.
- `lua2dox.lua` is gone!
- No more XML files.
- Doxygen is now longer used and instead we now use:
- LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`).
- LPEG for C parsing (see `scripts/cdoc_parser.lua`)
- Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`).
- Treesitter for Markdown parsing (see `scripts/text_utils.lua`).
- The generated `runtime/doc/*.mpack` files have been removed.
- `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly.
- Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
|