aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* lsp: match textDocument/didChange eol behavior (#13792)Michael Lingelbach2021-01-25
| | | We should be consistent in sending the EOL character to servers(I think). Julia expects this to match on bufwrite, or it crashes when vim appends the newline during the write process.
* lsp: clear diagnostics on client shutdown (#13788)Michael Lingelbach2021-01-23
|
* fix(languagetree): use tree nodes instead of regions in containsSteven Sojka2021-01-20
|
* Merge pull request #13765 from jvgrootveld/ts-default-start-end-row-on-captureThomas Vigouroux2021-01-20
|\ | | | | treesitter: default start and end row when omitted
| * treesitter: Fix linter warning and add helper function to remove duplicated ↵“jvgrootveld”2021-01-18
| | | | | | | | | | | | | | logic This function returns the start and stop value if set else the node's range is used When the node's range is used, the stop is incremented by 1 to make the search inclusive
| * treesitter: default start and end row when omitted“jvgrootveld”2021-01-15
| | | | | | | | | | | | | | | | | | | | | | Add support for default start and end row when omitted in the query:iter_captures and query:iter_matches functions. When the start and end row values are omitted, the values of the given node is used. The end row value is incremented by 1 to include the node end row in the match. Updated tests and docs accordingly.
* | lsp: remove duplicate settings validation (#13789)Michael Lingelbach2021-01-18
| |
* | lsp: validate and document server settings (#13698)Michael Lingelbach2021-01-18
| | | | | | | | * update lua documentation * run docgen
* | LSP: Fix nil settings handling in workspace/configuration (#13708)Mathias Fußenegger2021-01-18
| | | | | | | | | | | | | | | | | | The `workspace/configuration` handler could fail with the following error if `config.settings` is nil: runtime/lua/vim/lsp/util.lua:1432: attempt to index local 'settings' (a nil value)" This ensures that `config.settings` is always initialized to an empty table.
* | LSP: Add in clientInfo to initalize_params. (#13757)Chris Kipp2021-01-18
| | | | | | | | | | | | | | | | | | | | | | | | * Add in clienInfo to initalize_params. Some servers (like Metals in my case) will actually pull this info from the initalize_params and display it in the logs. I know from the server perspective it helps at times to have this available to pull from to have more details about the client and version. You can see that this is part of the spec here: microsoft.github.io/language-server-protocol/specification#initialize
* | lsp: add client/registerCapability handler (#13780)Michael Lingelbach2021-01-18
|/ | | Until we support dynamicRegistration, we should handle the client/registerCapability in core. There are still some language servers that send this request despite dynamicRegistration not being registered client-side (we got an upstream fix for the node ones, but this depends on them bumping vscode-languageserver-node).
* fix(treesitter): use source() method on attachThomas Vigouroux2021-01-14
| | | | | Fixes an issue that tree-sitter always attached to the current buffer, instead of the provided buffer.
* logging: move to XDG_CACHE_HOME (#13739)Michael Lingelbach2021-01-13
| | | | | while there is some controversy, stdpath('cache') looks like a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
* lsp: fix on_attach signature documentation (#13723)Michael Lingelbach2021-01-12
| | | * trim trailing whitespace from docs
* lsp: Add severity_limit for other diagnostics features (#13528)TJ DeVries2021-01-12
| | | | | | | | | | | * lsp: Add severity_limit for other diagnostics * docs and tests * fix: lint * Add to other types * fix: lint
* fix(lsp): Allow subsequent text document edits to pass (#13534)TJ DeVries2021-01-11
| | | | | | | * fix: Allow subsequent text document edits to pass * fixup: cleaner code * add tests
* LSP: Add diagnostic tags to client capabilities (#13578)Timmy Xiao2021-01-05
| | | pyright (possibly others) does not send any hint diagnostics if we do not have tagSupport in PublishDiagnosticsClientCapabilities. This PR just adds them.
* treesitter: simplify query reading logicBjörn Linse2021-01-04
| | | | | | | | | | | | | | Only the plugin/package manager should "manage" after/. Consumers of nvim_get_runtime_file() should not need to special case it (if your plugin manager is broken then fix it instead). Don't use vim.fn.readfile(). Lua can already read files. It is even better at it than vim script. expose M.get_query_files(). Listing the queries is essential for user config debug, and let plugins do fun things with it. Abstraction-by-obscurity is not useful (plugins can just cargo cult copy the code anyway, better with public entry points).
* LSP: fix messageRequest to not return nested title (#13674)Michael Lingelbach2021-01-03
| | | | | * LSP: fix window/showMessageRequest to not return nested title * Add window/showMessageRequest handler to docs
* Merge pull request #13649 from mjlbach/move_from_nvim-lspconfigMatthieu Coudron2021-01-01
|\ | | | | LSP: Move workspace/configuration from nvim-lspconfig to core
| * LSP: Move workspace/configuration handler from nvim-lspconfig to coreMichael Lingelbach2021-01-01
| |
| * LSP: Add helper function from accessing language server settings from ↵Michael Lingelbach2021-01-01
| | | | | | | | nvim-lspconfig
* | LSP: progress callback should only update existing dict for reports (#13652)jdrouhard2021-01-01
|/ | | Change the update of the client.messages.progress table to overwrite only the percentage and message properties on $report, Previously we were overwriting the table which meant client.messages.progress[token].message.title was wiped on report.
* LSP: window/showMessageRequest (#13641)Michael Lingelbach2020-12-31
| | | Another 3.16 compatibility. Solves Vue crashing currently. Currently not handling the return result, but would allow opening web browser in this case.
* lsp: Disable capabilities not currently supported by language client ↵Michael Lingelbach2020-12-30
| | | | | handlers (#13638) Several language servers are incorrectly invoking handlers which are not yet implemented in core.
* LSP: implement window/workDoneProgress/create (#13640)Michael Lingelbach2020-12-30
|
* lsp: Use correct bufnr for documentHighlight handler (#13622)Adam P. Regasz-Rethy2020-12-29
|
* lsp: Fire LspDiagnosticsChanged before returning (#13483)Josh French2020-12-23
| | | Run hook even when transitioning from some diagnostics to no diagnostics
* lsp: Add <nomodeline> to doautocmd calls (#13576)Nils2020-12-21
| | | When using "au User LspDiagnosticsChanged redrawstatus!", modelines get processed again (see h: doautocmd). Fortunately this can be suppressed using the <nomodeline> flag. this replaces every doautocmd call, that issues a User command, with doautocmd <nomodeline>.
* lsp: add $/progress report (#13294)Matthieu Coudron2020-12-20
| | | | Heavily inspired by https://github.com/nvim-lua/lsp-status.nvim. listen to the LspProgressUpdate event to update your statusline.
* lsp: Fix text payload in didSave notification (#13363)Mathias Fußenegger2020-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the specification[1] the payload must look like this: interface DidSaveTextDocumentParams { /** * The document that was saved. */ textDocument: TextDocumentIdentifier; /** * Optional the content when saved. Depends on the includeText value * when the save notification was requested. */ text?: string; } `text` must be on the same level as `textDocument´. Where `TextDocumentIdentifier` is: interface TextDocumentIdentifier { /** * The text document's URI. */ uri: DocumentUri; } [1]: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave
* Merge pull request #13367 from nvim-treesitter/offset-lang-injectionBjörn Linse2020-12-16
|\ | | | | feat(treesitter): add offset predicate for language injection
| * feat(treesitter): add offset predicate for language injectionSteven Sojka2020-12-15
| | | | | | | | refactor(treesitter): add directives to queries
* | feat(buffer_updates): allow ignoring when previewingThomas Vigouroux2020-12-15
|/ | | | | Also adds a test that we actually subscribe to buffer events when in CMDPREVIEW.
* Fix lsp tests breaking from new LuaJIT versionMatthew Nibecker2020-12-13
| | | | | | | | | | | | | | | Apparently the new version of LuaJIT changed the consistency with which it sorted table dictionaries. IIRC lua sorts dictionary keys by memory address, so it would appear that the reasons tests were previously passing was because of a differentiation in the implementation of the lua runtime. Ensure that array fields in the lsp protocol tables are consistently created, by using ipair when generating arrays for completionItemKind and symbolItemKind. For CodeActionKind, the current implementation includes both the keys and the values in the array. This is incorrect. Ensure that only the values are included in the array and sort them for consistency.
* Merge pull request #13450 from nvim-treesitter/fix-unknown-language-parserThomas Vigouroux2020-12-10
|\ | | | | fix(treesitter): don't throw an error for missing injected langs
| * fix(treesitter): don't throw an error for missing injected langsSteven Sojka2020-12-04
| |
* | doc: Fix incorrect LSP diagnostic-related helptags (#13388)Kevin Fleming2020-12-09
| |
* | 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)