aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
* treesitter: unknown predicates always match #12173Thomas Vigouroux2020-04-30
|
* Merge pull request #12204 from archseer/lsp-user-dataMatthieu Coudron2020-04-30
|\ | | | | lsp/completion: Expose completion_item under completed_items.user_data + vim-patch:8.2.0084
| * 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: use vim.tbl_isempty to check sign (#12190)Hirokazu Hata2020-04-28
|/ | | | | ref: #12164 fix #12201 sign_getdefined() returns a list, {} if the sign is not defined.
* 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.
* lsp: callback for references now opens qf (#12171)Thore Weilbier2020-04-23
| | | | | | | | 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
* lsp: do not assert even if the code does not exist in ErrorCodes (#11981)Hirokazu Hata2020-04-21
| | | | | | | | 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
* lsp: textDocument/definition can return Location or Location[] (#12014)Khangal2020-04-21
| | | | | * https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition Co-authored-by: Khangal Jargalsaikhan <khangal.j@irbis.sg>
* 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.
* | lua: allow deepcopy of functions (#12136)Tristan Konolige2020-04-19
| |
* | 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: fix breakage when severity isn't specified (#12027)Ghjuvan Lacambre2020-04-18
| | | | | | | | | | | | 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: escape backslashes in queriesThomas Vigouroux2020-04-18
| | | | | | | | | | | | | | | | Treesitter changed their decoders and apparently thus causing this change. This decoder change happened on ee9a3c0ebb218990cf391ed987be7f2448c54a73.
* | 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
* | vim.uri: fix uri_to_fname (#12059)Hirokazu Hata2020-03-30
| | | | | | | | | | 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.
* | 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: make showMessage and logMessage callbacks different (#11942)Hirokazu Hata2020-03-02
| | | | | | | | 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.
* | lua: add vim.tbl_len() #11889Hirokazu Hata2020-03-01
| |
* | lsp: add 'textDocument/documentSymbol’ callbackHirokazu Hata2020-03-01
| | | | | | | | Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
* | lsp: add bufnr to callback function argumentsHirokazu Hata2020-02-28
| | | | | | | | | | 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.
* | 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|
* | Merge pull request #11880 from bfredl/tree-sitter-regexBjörn Linse2020-02-27
|\ \ | | | | | | add regex support in treesitter queries
| * | lua: add regex support, and `@match` support in treesitter queriesBjörn Linse2020-02-26
| | |
| * | treesitter: redraw on changed queryBjörn Linse2020-02-26
| |/
* | 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
* lua: move test helper function, map and filter, to vim.shared moduleHirokazu Hata2020-02-18
|
* lsp/rpc.lua: fix `env` application functionJustin M. Keyes2020-02-16
| | | | Env vars must be merged with the current env.
* LSP: fix validate_client_configJustin M. Keyes2020-02-16
| | | | | - `cmd_env` is a table not a function. - tests: Set $NVIM_LOG_FILE for fake LSP server.
* lua: if second argument is vim.empty_dict(), vim.tbl_extend uses ↵Hirokazu Hata2020-02-14
| | | | empty_dict() instead of {}
* lua: vim.deepcopy uses empty_dict() instead of {} for empty_dict()Hirokazu Hata2020-02-13
| | | | fix: https://github.com/neovim/nvim-lsp/issues/94
* LSP: rename validate_command to _cmd_parts #11847Matthieu Coudron2020-02-11
| | | and now only accepts a list of strings (instead of string or list).