| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
In contrast to other callbacks for LSP requests like
`textDocument/documentSymbols`, does the one for references not open the
quickfix window after the quickfix list was filled. This left the user
in a situation he don't know what or if something had happen.
Related to: neovim/neovim#12170
|
|
|
|
|
|
|
|
| |
There is ErrorCodes in the LSP specification, but in ResponseError.code
it is not used and the actual type is number.
Some language servers response original error cods and this is valid spec.
So we shouldn't assert even if the code does not exist in ErrorCodes.
ref: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#responseMessage
|
|
|
|
|
| |
* https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition
Co-authored-by: Khangal Jargalsaikhan <khangal.j@irbis.sg>
|
|\
| |
| | |
LSP/completion: add textEdit support
|
| | |
|
| |
| |
| |
| |
| | |
According to lsp specification, value of insertText should be ignored if
textEdit is provided.
|
| |
| |
| | |
This function is also useful for users to create their own `textDocument/signatureHelp` callback function.
|
| | |
|
| |
| |
| |
| |
| |
| | |
InsertCharPre to CursolMovedI (#11954)
In the case of InsertCharPre, it is inconvenient because the signature help is displayed
when backspaced in insert mode, so change it to CursolMovedI.
|
| |
| |
| |
| |
| |
| | |
Before this commit, the LSP client would throw errors when messages
without severity would be sent by the server. We make severity default
to `Error` as a kludge before proper heuristics to discover the severity
of a message are found.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Treesitter changed their decoders and apparently thus causing this
change.
This decoder change happened on
ee9a3c0ebb218990cf391ed987be7f2448c54a73.
|
| |
| |
| |
| |
| |
| |
| | |
Fix #12122
>Error executing vim.schedule lua callback: /usr/local/share/nvim/runtime/lua/vim/lsp/util.lua:560: Expected lua string
Some lsp server(e.g. https://github.com/bash-lsp/bash-language-server) not have kind in reference, reference["kind"] is nil
|
| |
| |
| |
| |
| | |
fix: #12056
If the colon of the drive letter of windows is URI encoded,
it doesn't match the expected pattern, so decode it first.
|
|\ \
| |/
|/| |
LSP: Use buffer version instead of changedtick for edits
|
| | |
|
| |
| |
| |
| | |
According to the LSP specification, showMessage is what is displayed and logMessage is what is stored.
Since these are different things, I devide the callback into those that match.
|
| | |
|
| |
| |
| |
| | |
Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
|
| |
| |
| |
| |
| | |
DocumentSymbol type doesn't have location field.
So when we'll add 'textDocument/documentSymbol’ handler, we can't decide which file have we jump to.
|
| |
| |
| |
| |
| | |
`locations_to_items` is for turning `Location[]` into items, not for
`Diagnostic[]`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changes the `textDocument/references' callback to annotate the
locations returned by the server with the content present at the
locations range.
The quickfix list then looks as follows:
cr8/insert_fake_data.py|17 col 32| from .misc import parse_table, parse_version
cr8/insert_fake_data.py|43 col 15| version = parse_version(r['rows'][0][0])
cr8/java_magic.py|8 col 22| from cr8.misc import parse_version
cr8/java_magic.py|30 col 19| version = parse_version(fst)
cr8/java_magic.py|33 col 16| return parse_version(version_str)
Instead of:
cr8/insert_fake_data.py|17 col 32|
cr8/insert_fake_data.py|43 col 15|
cr8/java_magic.py|8 col 22|
cr8/java_magic.py|30 col 19|
cr8/java_magic.py|33 col 16|
|
|\ \
| | |
| | | |
add regex support in treesitter queries
|
| | | |
|
| |/ |
|
| |
| |
| |
| |
| |
| | |
* Add signs for Lsp diagnostics
* defer sign definition until init.vim is loaded
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
haskell-ide-engine sends `hover` payloads as follows:
{
contents = {
kind = "markdown",
value = "\n```haskell\nfoo :: Either String (Integer, Text)\n```\n`foo` *local*"
},
range = {
end = {
character = 5,
line = 57
},
start = {
character = 2,
line = 57
}
}
}
`value` starts with `\n`. The logic in `convert_input_to_markdown_lines`
threw away the whole information.
|
| |
| |
| |
| |
| | |
* add support to show diagnostics count in statusline
* documentation
|
|/
|
|
|
|
|
|
| |
* implement documentHighlight
* fix bug
* document highlight groups
* use uppercase for help section title
* documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow duplicates so that in languages with overloaded functions it will
show all signatures.
E.g. instead of having a single (last one wins)
add(int index, String element)
It shows all signatures:
add(String e) : boolean
add(int index, String element) : void
|
| |
|
| |
|
|
|
|
|
|
|
| |
fix: #11826
Some lanuguage servers return complementary candidates whose prefixes do not match are also returned.
So we exclude completion candidates whose prefix does not match.
ex) Microsoft python-language-server, rust-analyzer
|
| |
|
|
|
|
| |
Env vars must be merged with the current env.
|
|
|
|
|
| |
- `cmd_env` is a table not a function.
- tests: Set $NVIM_LOG_FILE for fake LSP server.
|
|
|
|
| |
empty_dict() instead of {}
|
|
|
|
| |
fix: https://github.com/neovim/nvim-lsp/issues/94
|
|
|
| |
and now only accepts a list of strings (instead of string or list).
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the logic explained in the softtabstop help section for defining
the tabSize parameter in formatting requests. This means that:
- if softtabstop is 0, tabstop is used
- if softtabstop < 0, shiftwidth is used
- if softtabstop > 0, softtabstop is used
When inserting spaces instead of tabs, softtabstop is used in vim.
Therefor it would be more logical to use it when formatting instead
of the current tabstop.
|
| |
|
|
|
|
|
|
|
|
|
| |
Using `vim.lsp.buf.rename()` can result in receiving a TextEdit that
affects a file for which there is no active or loaded buffer.
In that case `api.nvim_buf_get_lines(...)` returned an empty result,
leading to an error.
Closes https://github.com/neovim/neovim/issues/11790
|
|
|
| |
InitializeParams.rootPath is deprecated now. But some language servers still use it.
|
| |
|
|
|
|
|
| |
instead of the content of the file at this line.
ref https://github.com/neovim/nvim-lsp/issues/69
|
|
|
|
|
|
|
|
|
| |
This makes it possible to restore the working directory of :terminal
buffers when reading those buffers from a session file.
Fixes #11288
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
Make the hover window position itself vertically wherever is the most
space available.
|
| |
|