| Commit message (Collapse) | Author | Age |
... | |
|\
| |
| | |
Fix LSP multibyte indexing
|
| | |
|
| |
| |
| |
| | |
Takes the entire LSP position instead of line/col
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Old behavior is: foo(${placeholder: bar, ...)
with lots of random garbage you'd never want inserted.
New behavior is: foo(bar, baz)
(which maybe is good, maybe is bad [depends on user], but definitely better than it was).
-----
* Implement rudimentary snippet parsing
Add support for parsing and discarding snippet tokens from the completion items.
Fixes #11982
* Enable snippet support
* Functional tests for snippet parsing
Add simplified real-world snippet text examples to the completion items
test
* Add a test for nested snippet tokens
* Remove TODO comment
* Return the unmodified item if the format is plain text
* Add a plain text completion item
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* add preview_location
* add doc stub
* doc style; return bufnr&winnr of preview
* doc: function may return nil
Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
* doc: fixup
Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
|
|/ |
|
|
|
|
|
|
| |
If the LSP sends an end line that is larger than what nvim considers to be the
last line, you get an Index out of bounds error when fetching the line from
nvim, a change that was introduced in #12223. This change removes the strict
indexing and checks the return value from nvim_buf_get_lines.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add textDocument/codeAction
* Add callback for workspace/executeCommand
* Escape newlines in codeAction titles
* Return empty list in get_line_diagnostics if no buffer diagnostics
* Add stub documentation
* Validate context parameter in code_action
* Add support for edit in CodeAction responses
* Group diagnostics by line in vim.lsp.util.get_line_diagnostics()
* Advertise code action literal support
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make apply_text_edits non-ASCII safe
Use `vim.str_byteindex` to correct starting and ending positions for text edits if the line contains non-ASCII characters.
Fixes #12221
* text_edit may be applied to other buffers
* make sure the buffer is loaded
* add comments
* add test for non-ASCII edits
|
|
|
|
|
|
|
|
|
|
|
| |
* lsp: handle kinds not specified in protocol
fix: #12200
If the client set "symbolKind.valueSet",
the client must handle it properly even if it receives a value outside the specification.
* test: add lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} test case
* lsp: make lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} private
|
| |
|
| |
|
|\
| |
| | |
lsp: text_document.version may be vim.NIL not nil
|
| | |
|
|\ \
| | |
| | | |
lsp: fix lsp.util.symbols_to_items with DocumentSymbol has children
|
| |/
| |
| |
| |
| |
| |
| | |
fix: https://github.com/neovim/neovim/pull/11931#issuecomment-622422581
There was an error in the process of flattening the hierarchical structure.
So when DocumentSymbol has children, our client can't handle it correctly.
|
|/
|
|
| |
* support LocationLink in callbacks
* announce linkSupport in client capabilities
|
|\
| |
| | |
lsp/completion: Expose completion_item under completed_items.user_data + vim-patch:8.2.0084
|
| |
| |
| |
| |
| | |
By passing through completion_item it's now possible for snippet plugins
to add LSP snippet support.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit creates 4 new highlight groups:
- LspDiagnosticsErrorSign
- LspDiagnosticsWarningSign
- LspDiagnosticsInformationSign
- LspDiagnosticsHintSign
These highlight groups are linked to their corresponding LspDiagnostics
highlight groups by default.
This lets users choose a different color for their sign columns and
virtualtext diagnostics.
|
|/ |
|
|
|
| |
fix #12162
|
|
|
| |
Messed this up in ef0398fe88e6cc74f33fb20519997774168d7832
|
|
|
|
|
|
|
|
|
| |
According to the spec there is the possibility that when a
VersionedTextDocumentIdentifier is used in a TextEdit the value may be
null. Currently we don't check for this and always assume that it's set.
So currently if a TextEdit comes in for a rename for example with the
version null, it fails as we are comparing the bufnumber with nil.
https://microsoft.github.io/language-server-protocol/specification#versionedTextDocumentIdentifier
|
|
|
|
|
|
| |
The method with the name 'textDocument/peekDefinition' is not part of
the official language server protocol specification. Therefore no
language server can/will support this. Thereby all related code and
documentation as been removed.
|
|
|
|
|
|
|
|
|
| |
Expose `vim.lsp.buf.diagnostics_by_buf`
This makes it easier to customize the diagnostics behavior. For example
to defer the update they can override the
`textDocument/publishDiagnostics` callback to only call
`buf_diagnostics_save_positions` and then defer the other actions to a
autocmd event.
|
|
|
|
| |
When we save the buffer, the buffer is detached and attached again.
So the client also needs to remove the buffer version once.
|
|\
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/| |
LSP: Use buffer version instead of changedtick for edits
|
| | |
|
| |
| |
| |
| | |
Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
|
| |
| |
| |
| |
| | |
`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 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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
instead of the content of the file at this line.
ref https://github.com/neovim/nvim-lsp/issues/69
|