aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
Commit message (Collapse)AuthorAge
...
| * lsp/completion: Expose completion_item under completed_items.user_data.Blaž Hrastnik2020-04-29
| | | | | | | | | | By passing through completion_item it's now possible for snippet plugins to add LSP snippet support.
* | LSP: enable using different highlighting rules for LSP signs (#12176)Ghjuvan Lacambre2020-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | LSP: support tagstack #12096Yen32020-04-28
|/
* LSP: don't redefine LspDiagnostics signs #12164jakbyte2020-04-26
| | | fix #12162
* LSP: Fix show_line_diagnostics #12186Mathias Fußenegger2020-04-26
| | | Messed this up in ef0398fe88e6cc74f33fb20519997774168d7832
* LSP: Add a check for null version in VersionedTextDocumentIdentifier (#12185)Chris Kipp2020-04-26
| | | | | | | | | 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
* LSP: remove obsolete "peek definition" code #12178Thore Weilbier2020-04-25
| | | | | | 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.
* LSP: Expose diagnostics grouped by bufnr (#11932)Mathias Fußenegger2020-04-25
| | | | | | | | | 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.
* lsp: remove buffer version on buffer_detach (#12029)Hirokazu Hata2020-04-25
| | | | When we save the buffer, the buffer is detached and attached again. So the client also needs to remove the buffer version once.
* Merge pull request #11989 from Weypare/textEditMatthieu Coudron2020-04-20
|\ | | | | LSP/completion: add textEdit support
| * LSP/completion: Add completion text helper functionAndrey Avramenko2020-04-20
| |
| * LSP/completion: add textEdit supportAndrey Avramenko2020-03-06
| | | | | | | | | | According to lsp specification, value of insertText should be ignored if textEdit is provided.
* | lsp: export convert_signature_help_to_markdown_lines (#11950)Hirokazu Hata2020-04-19
| | | | | | This function is also useful for users to create their own `textDocument/signatureHelp` callback function.
* | lsp: replace the event that closes the signature help preview window from ↵Hirokazu Hata2020-04-18
| | | | | | | | | | | | 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.
* | lsp: provide a default for missing reference kind (#12127)George Zhao2020-04-16
| | | | | | | | | | | | | | 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
* | Merge pull request #11927 from Jesse-Bakker/lsp-buf-versionBjörn Linse2020-03-16
|\ \ | |/ |/| LSP: Use buffer version instead of changedtick for edits
| * Use buffer version instead of changedtick for editsJesse Bakker2020-02-27
| |
* | lsp: add 'textDocument/documentSymbol’ callbackHirokazu Hata2020-03-01
| | | | | | | | Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
* | LSP: Remove diagnostic message handling in locations_to_itemsMathias Fussenegger2020-02-27
| | | | | | | | | | `locations_to_items` is for turning `Location[]` into items, not for `Diagnostic[]`
* | LSP/references: Add context to locations returned by serverMathias Fussenegger2020-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (#11668)Alvaro Muñoz2020-02-27
| | | | | | | | | | | | * Add signs for Lsp diagnostics * defer sign definition until init.vim is loaded
* | LSP/hover: Do not throw away contents if first line is empty (#11939)Mathias Fußenegger2020-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (#11641)Alvaro Muñoz2020-02-26
| | | | | | | | | | * add support to show diagnostics count in statusline * documentation
* | LSP: implement documentHighlight (#11638)Alvaro Muñoz2020-02-26
|/ | | | | | | | * implement documentHighlight * fix bug * document highlight groups * use uppercase for help section title * documentation
* lsp/completion: show duplicates in completion popup #11920Mathias Fußenegger2020-02-21
| | | | | | | | | | | | | 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
* lsp: make functions private and use filter functionHirokazu Hata2020-02-19
|
* lsp: respect the sort order if there is sortTextHirokazu Hata2020-02-19
|
* lsp: fix textDocument/completion handlingHirokazu Hata2020-02-19
| | | | | | | 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
* lsp: Support text edit on inactive buffer (#11843)Mathias Fußenegger2020-02-10
| | | | | | | | | 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
* LSP: show diagnostic in qf/loclist #11777Matthieu Coudron2020-01-28
| | | | | instead of the content of the file at this line. ref https://github.com/neovim/nvim-lsp/issues/69
* LSP: highlight groups test, docJustin M. Keyes2020-01-08
|
* LSP: differentiate diagnostic underline by severityAlvaro Muñoz2020-01-08
|
* LSP: place hover window by vertical space #11657Ville Hakulinen2020-01-03
| | | | Make the hover window position itself vertically wherever is the most space available.
* LSP: Improve the display of the default hover callback. (#11576)Ashkan Kiani2019-12-20
| | | Strips the code blocks from markdown and does syntax highlighting.
* LSP: fix omnifunc findstart (#11522)Mike Hartington2019-12-20
|
* LSP: Add jump when calling gotodef (#11521)Jakub Łuczyński2019-12-07
|
* lsp: allow the user to config LspDiagnosticError etc by standard meansBjörn Linse2019-11-28
|
* LSP: Move default buf callbacks to vim.lsp.callbacks (#11452)Ashkan Kiani2019-11-26
| | | | | | | - In the process, refactored focusable_preview to a util function. - Add text for locations_to_items of the current line. - Improve location callback to handle multiple return values by using set_qflist. - Remove update_tagstack and leave note for future travelers.
* Add support for textDocument/references.Ashkan Kiani2019-11-24
| | | | | | Add set_qflist and set_loclist. - Also add locations_to_items, which calculates byte offsets for character positions in files and avoids unnecessary operations.
* UI tweaks.Ashkan Kiani2019-11-23
| | | | | | - Hide diagnostics on client exit - Stop insert on popup focus. - Hide popup on insertchar (for signature_help)
* Improve the character_offset code.Ashkan Kiani2019-11-22
|
* Improve performance of util.set_lines + bugfixAshkan Kiani2019-11-22
| | | | | Also permit character_offset for col past the end of line (useful in range formatting).
* Fix encoding translation in other places.Ashkan Kiani2019-11-21
|
* Fix position params for encoding.Ashkan Kiani2019-11-21
|
* Fix hovers staying on bufhiddenAshkan Kiani2019-11-21
|
* UpdatesAshkan Kiani2019-11-21
| | | | | | | | - Use correct implementation of text_edits. - Send indent options to rangeFormatting and formatting. - Remove references to vim bindings and filetype from lsp.txt - Add more examples to docs. - Add before_init to allow changing initialize_params.
* Remove resolve_bufnr/lualintAshkan Kiani2019-11-20
|
* Add full text_edit implementation.Ashkan Kiani2019-11-20
| | | | | | | | - Implements textDocument/formatting, textDocument/rangeFormatting, workspace/applyEdit. TODO: - still has edge cases around replacement probably. Only tested with inserts on the same position.
* Extend list_extend to take start/finish.Ashkan Kiani2019-11-20
|
* Fix rename support.Ashkan Kiani2019-11-20
|