| Commit message (Collapse) | Author | Age |
|
|
|
| |
While this might sound silly, it is needed for further improvements.
|
|\
| |
| | |
fix(treesitter): account for no main query file
|
| | |
|
| |
| |
| |
| |
| | |
* lsp: remove vim.NIL from processing
* lsp: remove instances of vim.NIL
|
| |
| |
| |
| |
| | |
We support applying all kinds in the spec equivalently and some servers (including dartls) won't send code actions if support for the relevant kinds is not explicitly stated in the client capabilities. Therefore, this PR makes that support explicit.
Also, as we support all CodeActionKinds, we should also mark the server as supporting code actions when it specifies code action kinds. This is also done in this PR.
|
|\ \
| | |
| | | |
] treesitter: add node:id()
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't actually support snippets in core in the way that users would
truly expect. So, by default, we will not say that builtin-lsp has
`snippetSupport`.
To re-enable, users can do the following:
First, get a capabilities dictionary with
`local capabilities = vim.lsp.protocol.make_client_capabilities()`
Then override
`capabilities.textDocument.completion.completionItem.snippetSupport = true`
and then pass those capabilties to the setup function.
```
nvim_lsp.server_name.setup {
...,
capabilities = capabilities,
...,
}
```
See https://github.com/neovim/neovim/issues/12795
|
| |
|
|\
| |
| | |
[RDY] lsp: fix fallback for callback in method_unsupported
|
| |
| |
| |
| | |
Missed this #12764. My bad :((
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To avoid loading buffers https://github.com/neovim/neovim/pull/12440
changed the logic to not process diagnostics for unloaded buffers.
This is problematic for language servers where compile errors or build
errors are reported via diagnostics. These errors may prevent the
language server from providing all functions and it is difficult for
users to debug it without having access to the errors.
For example, with eclipse.jdt.ls there may be a problem with gradle (the
build tool for java), it results in a diagnostics like this:
org.gradle.toolingapi/build.gradle|1 col 1| Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.8.1-bin.zip'.
This would be invisible to users unless the user happens to open the
right file. In this case the user would actually never see the error,
because the language server isn't attached to the build configuration
files.
This changes the behaviour to at least store the diagnostics. The other
operations which are more expensive are still skipped.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactors how required capabilities are detected and validated, and make
sure requests are only sent to clients that support it (and only fail if
no clients support the provided method).
The validation happens at the buf_request level, because we assume that
if someone is sending the request directly through the client, they know
what they're doing. Also, let unknown methods go through.
This is extracted from #12518 and closes #12755.
Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
Language servers can already send log messages to the client while the
server is still being initialized.
This currently leads to "client has shut down" messages which are
confusing to the user as the server is properly starting.
To fix this this changes the `get_client_by_id` method to also return a
client if it is still initializing.
|
|\
| |
| | |
[RDY] Opts.wrap_at is sometimes a bool, ensure it falls back to a valid num…
|
| |
| |
| |
| | |
the call to math.min
|
|\ \
| | |
| | | |
vim.validate(): include stacktrace in message
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- The previous commit lost information in the tests. Instead, add some
more "normalization" substitutions in pcall_err(), so that the general
shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches()
|
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also allow to get parser ranges.
This will be useful for language injection, allowing us to tweak the
parser's ranges on the fly.
Update runtime/lua/vim/treesitter.lua
Co-authored-by: Paul Burlumi <paul@burlumi.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Runtime queries just work like ftplugins, that is:
- Queries in the `after` directory are sourced _after_ the "base" query
- Otherwise, the last define query takes precedence.
Queries can be found in the `queries` directory.
Update runtime/lua/vim/treesitter/query.lua
Co-authored-by: Paul Burlumi <paul@burlumi.com>
|
|/ |
|
|
|
|
| |
* fix insert_separator conditional
* only draw separator over wrapped width
|
| |
|
|
|
|
|
| |
Allows to execute code_action for a given range.
:'<,'>lua vim.lsp.buf.range_code_action()
|
|
|
|
|
| |
* Added the ContentModified error to be hidden from users, like RequestCancelled
* Fixed tests (and ill-formed lua code)
* Simplified if-expression
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lsp: remove popup No signature available.
If no signatures. we shouldn't popup No signature available ..It will make noise when use
` api.nvim_command("autocmd CompleteDone <buffer> lua vim.lsp.buf.signature_help()")`
* fix ci test failed remove whitespace
* print message when no signature help
* Add comment
|
|
|
|
|
| |
* fix failed switch window error
* checks if window already exists
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: tim apple <tim@tims-MacBook-Pro.local>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This will significantly reduce the parsing work
needed e.g. when rehighlighting after every keypress
in insert mode.
Also add safety check for tree-sitter trying to read
past the end of a line. This can happen after we sent
an incorrect buffer update.
|
| |
|
|\
| |
| | |
treesitter: check hl group exists before passing it in nvim_get_hl_id_by_name
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
treesitter: allow to list supported predicates
|
| | |
|
|/ |
|
|\ |
|
| |
| |
| |
| | |
Unless we look at the code every time, we will not know what the value is, so add the key name.
|
| |
| |
| |
| | |
Since "rpc.send.payload" outputs the log with almost the same contents, delete the output here.
|