aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* fix(lsp): fix handler signature, testsJustin M. Keyes2021-09-26
| | | | | | - not necessary on master: got lost in the vim.lsp.diagnostic => vim.diagnostic migration - fix tests which accidentally depended on previous session - ref #15504
* feat(lsp): allow root_dir to be nil (#15430)Mathias Fußenegger2021-09-26
| | | | | | | | According to the protocol definition `rootPath`, `rootUri` and `workspaceFolders` are allowed to be null. Some language servers utilize this to provide "single file" support. If all three are null, they don't attempt to index a directory but instead only provide capabilities for a single file.
* lsp(start_client): Allow passing custom workspaceFolders to the LSP (#15132)sim2021-09-26
| | | | | | | | | | | | | | Some language servers *cough*rust-analyzer*cough* need an empty/custom workspaceFolders for certain usecases. For example, rust-analyzer needs an empty workspaceFolders table for standalone file support (See https://github.com/rust-analyzer/rust-analyzer/pull/8955). This can also be useful for other languages that need to commonly open a certain directory (like flutter or lua), which would help prevent spinning up a new language server altogether. In case no workspaceFolders are passed, we fallback to what we had before.
* fix(lsp): check if buffer is valid in changetracking (#15505)Jose Alvarez2021-09-26
|
* fix(lsp): avoid ipairs on non-sequential tables (#15059)Michael Lingelbach2021-09-26
| | | | | | | | | | | | | | | | | | | | ipairs terminates on the first nil index when iterating over table keys: for i,k in ipairs( {[1] = 'test', [3] = 'test'} ) do print(i, k) end prints: 1 test Instead, use pairs which continues iterating over the entire table: for i,k in pairs( {[1] = 'test', [3] = 'test'} ) do print(i, k) end prints: 1 test 3 test
* feat(lsp): improve vim.lsp.util.apply_text_edits (#15561)hrsh7th2021-09-26
| | | | | | - Fix the cursor position after applying TextEdits - Support reversed range of TextEdit - Invoke nvim_buf_set_text one by one
* feat(lsp): improve logging (#15636)Michael Lingelbach2021-09-26
| | | | | | | | * Simplify rpc encode/decode messages to rpc.send/rcp.receive * Make missing handlers message throw a warning * Clean up formatting style in log * Move all non-RPC loop messages to trace instead of debug * Add format func option to log to allow newlines in per log entry
* fix(lsp): update lsp-handler signature in call_hierarchy (#15738)Mathias Fußenegger2021-09-26
| | | | | | | | This fixes the handler signature and also prevents n+1 requests firing if there are multiple clients. (The first `prepareCallHierarchy` handler is called once per client, each invocation used `buf_request` to make more requests using *all* clients)
* fix(lsp): adapt codelens resolve to handler signature change (#15578)Mathias Fußenegger2021-09-26
| | | Follow up to https://github.com/neovim/neovim/pull/15504
* fix(lsp): update workspace/applyEdit handler signature (#15573)Jose Alvarez2021-09-26
|
* feat(lsp)!: change handler signature #15504Michael Lingelbach2021-09-26
|
* backport: fix(lsp): resolve bufnr in buf_is_attached (#15523)Jose Alvarez2021-09-16
|
* backport: fix(lua): verify buffer in highlight.on_yank (#15482)notomo2021-09-16
| | | | | | Resolve an issue with deferred clearing of highlight failing if the buffer is deleted before the timeout by checking whether the buffer is valid first.
* backport: fix(lsp): Ensure human readable errors are printedMathias Fussenegger2021-09-16
| | | | | | | | | | `return err_message(tostring(err))` caused errors to be printed as `table: 0x123456789` instead of showing the error code and error message. This also removes some `if err` blocks that never got called because at the end of `handlers.lua` all the handlers are wrapped with logic that adds generic error handling.
* backport: fix(lsp): Ensure users get feedback on references/symbols errors ↵Mathias Fussenegger2021-09-16
| | | | | | | | | or empty results Relates to https://github.com/neovim/neovim/issues/15050 Users should get some indication if there was an error or an empty result.
* backport: fix(lsp): correctly check for windows in lsp logger (#14954)Oliver Marriott2021-09-16
|
* backport: fix(lsp): restore diagnostics extmarks that were moved to the last ↵Folke Lemaitre2021-09-16
| | | | edit line (#15023)
* fix(lsp): correctly parse LSP snippets #15579hrsh7th2021-09-14
| | | | Fixes #15522
* backport: fix(lsp): restore diagnostics extmarks on buffer changes (#15011)Folke Lemaitre2021-09-14
|
* backport: fix(lsp): prevent double <text> for cached plaintext markupFolke Lemaitre2021-09-14
|
* backport: fix(vim.opt): vimL map string values not trimmed (#14982)jadedpasta2021-09-14
| | | | | | | | | | Options formatted as a list of comma-separated key-value pairs may have values that contain leading and trailing whitespace characters. For example, the `listchars` option has a default value of `"tab:> ,trail:-,nbsp:+"`. When converting this value to a lua table, leading and trailing whitespace should not be trimmed. Co-authored-by: Robert Hrusecky <robert.hrusecky@utexas.edu>
* fix(vim.opt): Fix #14828 with empty values being incorrectly insertedTJ DeVries2021-06-29
|
* fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname styleTJ DeVries2021-06-29
|
* fix(vim.opt): Fix #14669 whichwrap now acts as expectedTJ DeVries2021-06-29
|
* fix(vim.opt): Add basic error handlingDavid Zhang2021-06-29
|
* fix(vim.opt): Get window options before setting.ckipp012021-06-29
| | | | | | | This closes #14677, but I also am a little unsure if there are times where this may not be correct. However, this just changes the behavior that even if `was_set` was false, we still get for `nvim_win_get_option`.
* fix(vim.opt): #14708 Now lets you put duplicate values in wildmodeTJ DeVries2021-06-29
|
* Fixed +1 -1 in util.lua (#14913)jimman20032021-06-26
| | | No point in adding and then subtracting I believe ;)
* fix(lsp): render the last line in stylize_markdownFolke Lemaitre2021-06-25
|
* style(lsp): make get_markdown_fences privateFolke Lemaitre2021-06-25
|
* Merge pull request #14904 from mfussenegger/nil-message-callbacksMichael Lingelbach2021-06-25
|\ | | | | fix(lsp): Handle nil message_callbacks
| * fix(lsp): Handle nil message_callbacksMathias Fussenegger2021-06-25
| | | | | | | | | | | | | | | | | | | | The `onexit` handler could set `message_callbacks` to `nil` within the luv event loop while the mainloop runs a function that tries to access `message_callbacks`. This adds some checks to prevent errors in that case. Fixes https://github.com/neovim/neovim/issues/14863
* | Merge pull request #14617 from folke/fancy_markdown_fences_supportMichael Lingelbach2021-06-25
|\ \ | | | | | | feat(lsp): use `g:markdown_fenced_languages` in `vim.lsp.util.stylized_markdown`
| * | feat(lsp): use markdown_fenced_languages in stylized_markdownFolke Lemaitre2021-06-25
| |/
* / fix(lsp): Set `dir` completion option for add_workspace_folderMathias Fussenegger2021-06-25
|/ | | | | Given that the input is pre-filled with a path, it should be possible to use dir completion.
* fix(lsp): do not convert vim.NIL to nil in listsAkin Sowemimo2021-06-24
|
* fix(lsp): handlers should focus quickfix listMichael Lingelbach2021-06-21
|
* fix(lsp): fix severity_limit logic in set_loclistSteven Arcangeli2021-06-19
|
* chore(lsp): removed deprecated floating preview methodsFolke Lemaitre2021-06-17
|
* fix(lsp): add bufnr to formatting requestsLukas Reineke2021-06-15
| | | | | | Add the buffer number to the `textDocument/formatting` request, so that it is passed to the handler. The built-in formatting handlers do not use the buffer number, but user overrides should have access to it.
* docs(lsp): Clarify opts for show_line_diagnostics()Shadman2021-06-15
|
* docs(lsp): annotate call_hierarchy function as privatecbarrete2021-06-14
|
* fix(lsp): fix on_detach in lsp.diagnostic Jaehwang Jerry Jung2021-06-14
| | | | | `lsp.diagnostic.get_all()` was returning diagnotics for `:bwipeout`-ed buffers because the diagnostic cache is not cleared. The first argument of on_detach callback is the string "detach", not the bufnr.
* fix(lsp): replace --- by a line in stylize_markdownFolke Lemaitre2021-06-15
|
* Merge pull request #14737 from rktjmp/lsp-guard-against-negative-linesMichael Lingelbach2021-06-14
|\ | | | | [RDY] fix(lsp): guard against negative diagnostic line numbers
| * fix(lsp): guard against negative diagnostic line numbersOliver Marriott2021-06-13
| |
* | fix(lsp): allow 'rounded' and 'solid' in floatsTimothée Sterle2021-06-14
| |
* | feat(lsp): Add codelens supportMathias Fussenegger2021-06-14
| |
* | Merge pull request #14765 from folke/lsp_plaintextMichael Lingelbach2021-06-12
|\ \ | |/ |/| fix(lsp): convert_input_to_markdown_lines: preserve plaintext
| * fix(lsp): convert_input_to_markdown_lines: preserve plaintextFolke Lemaitre2021-06-12
| |