aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
* | doc: Add missing parameter end_pos for range_formatting (#13481)Olivier Roques2020-12-09
| |
* | feat: Allow incremental sync & lsp flags (#13371)TJ DeVries2020-12-08
| |
* | fix(treesitter): incorrect method name callSteven Sojka2020-12-04
|/
* lsp: Change diagnosticg.get_all to return {bufnr: Diagnostic[]} (#13310)Mathias Fußenegger2020-12-03
| | | Allows users to associate the diagnostics with the right bufnr.
* lsp: Make open_floating_preview buffers ephemeral (#13437)runiq2020-12-03
| | | Fixes #13429.
* lsp: Fix "unsupported_method" error when the buffer does not have an LSP ↵eightpigs2020-12-03
| | | | Server (#13175)
* lsp: Reduce memory usage for buffering the message from LSP.Yuki Ito2020-11-29
|
* use if_nil variable replace vim.F.if_nilRaphael2020-11-26
|
* Lsp: fix vim.F.ifnil to vim.F.if_nil (#13384)Raphael2020-11-25
|
* LSP: Feature/add workspace folders (#12638)Michael Lingelbach2020-11-25
| | | | | | | | | | | * First implementation of workspace folders * Add completion for current directory * Add tracking of workspace folders * Add workspace folder listing * Add checks on adding/removing workspaces * Add appropriate initialization options * Add documentation * Make workspaceFolders available wherever client is
* Merge pull request #13357 from vigoux/luahl-priorityBjörn Linse2020-11-25
|\ | | | | feat(luahl): add priority mechanism
| * feat(luahl): add priority mechanismThomas Vigouroux2020-11-25
| | | | | | | | | | Base priority is 0x1000, in order to stay kinda backward compatible. Also set tree-sitter default highlight to 100 (middle-ish value)
* | languagetree: call changedtree callback per treeThomas Vigouroux2020-11-24
| | | | | | | | Also fix a typo
* | fix(treesitter): allow ranges in set_included_rangesThomas Vigouroux2020-11-23
|/
* feat(treesitter): add language treeSteven Sojka2020-11-23
| | | | | | | | | | | | | Implement the LanguageTree structure to enable language injection. This is done be removing the old Parser metatable and replacing by the new structure, with the same API (almost). Some noticeable differences : - `parser:parse()` now returns a table of trees - There is no incremental parsing for child (injected) languages Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
* lsp: Expose all diagnostics (#13285)Mathias Fußenegger2020-11-14
| | | | | | | | | | | | | | | * lsp: Remove duplicate `diagnostics` fallback in diagnostic.display * lsp: Expose all diagnostics Before the changes in #12655 it was possible to retrieve all diagnostics via `vim.lsp.util.diagnostics_by_buf`. This adds a `diagnostic.get_all()` to enable users to retrieve all diagnostics. Use cases for that could include loading all diagnostics into the quickfix list, or to build an enhanced goto_next that can move across buffers.
* doc: fixup sign information (#13281)TJ DeVries2020-11-13
| | | Thanks to @sunzoje for finding the outdated documentation.
* lsp: vim.lsp.diagnostic (#12655)TJ DeVries2020-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Breaking Changes: - Deprecated all `vim.lsp.util.{*diagnostics*}()` functions. - Instead, all functions must be found in vim.lsp.diagnostic - For now, they issue a warning ONCE per neovim session. In a "little while" we will remove them completely. - `vim.lsp.callbacks` has moved to `vim.lsp.handlers`. - For a "little while" we will just redirect `vim.lsp.callbacks` to `vim.lsp.handlers`. However, we will remove this at some point, so it is recommended that you change all of your references to `callbacks` into `handlers`. - This also means that for functions like |vim.lsp.start_client()| and similar, keyword style arguments have moved from "callbacks" to "handlers". Once again, these are currently being forward, but will cease to be forwarded in a "little while". - Changed the highlight groups for LspDiagnostic highlight as they were inconsistently named. - For more information, see |lsp-highlight-diagnostics| - Changed the sign group names as well, to be consistent with |lsp-highlight-diagnostics| General Enhancements: - Rewrote much of the getting started help document for lsp. It also provides a much nicer configuration strategy, so as to not recommend globally overwriting builtin neovim mappings. LSP Enhancements: - Introduced the concept of |lsp-handlers| which will allow much better customization for users without having to copy & paste entire files / functions / etc. Diagnostic Enhancements: - "goto next diagnostic" |vim.lsp.diagnostic.goto_next()| - "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()| - For each of the gotos, auto open diagnostics is available as a configuration option - Configurable diagnostic handling: - See |vim.lsp.diagnostic.on_publish_diagnostics()| - Delay display until after insert mode - Configure signs - Configure virtual text - Configure underline - Set the location list with the buffers diagnostics. - See |vim.lsp.diagnostic.set_loclist()| - Better performance for getting counts and line diagnostics - They are now cached on save, to enhance lookups. - Particularly useful for checking in statusline, etc. - Actual testing :) - See ./test/functional/plugin/lsp/diagnostic_spec.lua - Added `guisp` for underline highlighting NOTE: "a little while" means enough time to feel like most plugins and plugin authors have had a chance to refactor their code to use the updated calls. Then we will remove them completely. There is no need to keep them, because we don't have any released version of neovim that exposes these APIs. I'm trying to be nice to people following HEAD :) Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
* tree-sitter: Put base languages first in queriesStephan Seitz2020-11-08
| | | | | | | | This reverts the handling of base languages to the old way how nvim-treesitter handled them. When a language extends a base language it usually wants to be able to overwrite queries. Related: https://github.com/nvim-treesitter/nvim-treesitter/issues/633
* lsp: fix formatting_sync with multiple clients (#13233)francisco souza2020-11-07
| | | | | | | | buf_request_sync returns a table indexed by the client id, so when starting a second client on a separate buffer, result[1] will be nil. Closes #13232. Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
* treesitter: separate tree and parserThomas Vigouroux2020-11-04
| | | | While this might sound silly, it is needed for further improvements.
* Merge pull request #13178 from steelsojka/fix-empty-main-query-fileThomas Vigouroux2020-11-02
|\ | | | | fix(treesitter): account for no main query file
| * fix(treesitter): account for no main query fileSteven Sojka2020-10-28
| |
* | lsp: remove vim.NIL from processing (#13174)TJ DeVries2020-11-02
| | | | | | | | | | * lsp: remove vim.NIL from processing * lsp: remove instances of vim.NIL
* | lsp: complete support for `CodeActionKind`s to capabilities (#13180)Jesse2020-11-01
| | | | | | | | | | We support applying all kinds in the spec equivalently and some servers (including dartls) won't send code actions if support for the relevant kinds is not explicitly stated in the client capabilities. Therefore, this PR makes that support explicit. Also, as we support all CodeActionKinds, we should also mark the server as supporting code actions when it specifies code action kinds. This is also done in this PR.
* | Merge pull request #13192 from bfredl/nodeidBjörn Linse2020-11-01
|\ \ | | | | | | ] treesitter: add node:id()
| * | treesitter: add node:id()Björn Linse2020-11-01
| |/
* / lsp: Remove snippet lies (#13183)TJ DeVries2020-10-30
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | We don't actually support snippets in core in the way that users would truly expect. So, by default, we will not say that builtin-lsp has `snippetSupport`. To re-enable, users can do the following: First, get a capabilities dictionary with `local capabilities = vim.lsp.protocol.make_client_capabilities()` Then override `capabilities.textDocument.completion.completionItem.snippetSupport = true` and then pass those capabilties to the setup function. ``` nvim_lsp.server_name.setup { ..., capabilities = capabilities, ..., } ``` See https://github.com/neovim/neovim/issues/12795
* lsp: Fix case where active_signature == vim.NIL (#13114)Michael Lingelbach2020-10-27
|
* Merge pull request #13154 from fsouza/fix-callback-logicMatthieu Coudron2020-10-25
|\ | | | | [RDY] lsp: fix fallback for callback in method_unsupported
| * lsp: fix fallback for callback in method_unsupportedfrancisco souza2020-10-25
| | | | | | | | Missed this #12764. My bad :((
* | lsp: Store diagnostics for unloaded buffers (#13102)Mathias Fußenegger2020-10-25
|/ | | | | | | | | | | | | | | | | | | | | | To avoid loading buffers https://github.com/neovim/neovim/pull/12440 changed the logic to not process diagnostics for unloaded buffers. This is problematic for language servers where compile errors or build errors are reported via diagnostics. These errors may prevent the language server from providing all functions and it is difficult for users to debug it without having access to the errors. For example, with eclipse.jdt.ls there may be a problem with gradle (the build tool for java), it results in a diagnostics like this: org.gradle.toolingapi/build.gradle|1 col 1| Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.8.1-bin.zip'. This would be invisible to users unless the user happens to open the right file. In this case the user would actually never see the error, because the language server isn't attached to the build configuration files. This changes the behaviour to at least store the diagnostics. The other operations which are more expensive are still skipped.
* lsp: only send buf requests to servers that support the request (#12764)francisco souza2020-10-25
| | | | | | | | | | | | | Refactors how required capabilities are detected and validated, and make sure requests are only sent to clients that support it (and only fail if no clients support the provided method). The validation happens at the buf_request level, because we assume that if someone is sending the request directly through the client, they know what they're doing. Also, let unknown methods go through. This is extracted from #12518 and closes #12755. Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
* lsp: Fix "client has shut down" errors during initializing (#13103)Mathias Fußenegger2020-10-22
| | | | | | | | | | Language servers can already send log messages to the client while the server is still being initialized. This currently leads to "client has shut down" messages which are confusing to the user as the server is properly starting. To fix this this changes the `get_client_by_id` method to also return a client if it is still initializing.
* Merge pull request #13043 from tkuneck/fix-min-float-win-sizeJan Edmund Lazo2020-10-17
|\ | | | | [RDY] Opts.wrap_at is sometimes a bool, ensure it falls back to a valid num…
| * Opts.wrap_at is sometimes a bool, ensure it falls back to a valid number in ↵Tony Kuneck2020-10-04
| | | | | | | | the call to math.min
* | Merge pull request #12053 from tjdevries/tjdevries/nicer_validateTJ DeVries2020-10-17
|\ \ | | | | | | vim.validate(): include stacktrace in message
| * | test/vim.validate(): assert normalized stacktraceJustin M. Keyes2020-10-05
| | | | | | | | | | | | | | | | | | | | | - The previous commit lost information in the tests. Instead, add some more "normalization" substitutions in pcall_err(), so that the general shape of the stacktrace is included in the asserted text. - Eliminate contains(), it is redundant with matches()
| * | vim.validate(): include stacktrace in messageTJ DeVries2020-10-05
| |/
* | treesitter: allow multiple highlighters per bufferThomas Vigouroux2020-10-12
| |
* | treesitter: allow custom parser for highlighterThomas Vigouroux2020-10-12
| | | | | | | | | | | | | | | | | | | | | | Also allow to get parser ranges. This will be useful for language injection, allowing us to tweak the parser's ranges on the fly. Update runtime/lua/vim/treesitter.lua Co-authored-by: Paul Burlumi <paul@burlumi.com>
* | treesitter: runtime queriesThomas Vigouroux2020-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | Runtime queries just work like ftplugins, that is: - Queries in the `after` directory are sourced _after_ the "base" query - Otherwise, the last define query takes precedence. Queries can be found in the `queries` directory. Update runtime/lua/vim/treesitter/query.lua Co-authored-by: Paul Burlumi <paul@burlumi.com>
* | api: multiple decoration providers at onceBjörn Linse2020-10-10
|/
* LSP: Fix separator width on hover (fixes #13006, #12998) (#13007)Christian Clason2020-09-30
| | | | * fix insert_separator conditional * only draw separator over wrapped width
* treesitter: add string parser (#13008)Thomas Vigouroux2020-09-30
|
* lsp: Add vim.lsp.buf.range_code_action() (#12962)notomo2020-09-24
| | | | | Allows to execute code_action for a given range. :'<,'>lua vim.lsp.buf.range_code_action()
* lsp: Handle ContentModified the same way as RequestCancelled (#12803)Rasmus Ishøy Michelsen2020-09-22
| | | | | * Added the ContentModified error to be hidden from users, like RequestCancelled * Fixed tests (and ill-formed lua code) * Simplified if-expression
* lsp: remove popup No signature available. (#12915)Raphael2020-09-18
| | | | | | | | | | | | * lsp: remove popup No signature available. If no signatures. we shouldn't popup No signature available ..It will make noise when use ` api.nvim_command("autocmd CompleteDone <buffer> lua vim.lsp.buf.signature_help()")` * fix ci test failed remove whitespace * print message when no signature help * Add comment
* lsp: fix failed switch window error (#12900)Raphael2020-09-14
| | | | | * fix failed switch window error * checks if window already exists
* doc: Add docs for uri functions (#12887)TJ DeVries2020-09-14
|