aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* docs: remove trailing spaces #24455ii142023-07-25
|
* fix(lsp): E403 if doc contains multiple codeblocks #24458Raphael2023-07-25
| | | | | | | | | | | | | | | | | Problem: Content that has codeblocks with different languages, results in multiple calls to: syntax include vim syntax/vim.vim which raises error: E403: syntax sync: line continuations pattern specified twice Before ba8f19ebb67ca27d746f4b1cd902ab3d807eace3, this was avoided by using pcall() to ignore the error. Solution: Restore the use of pcall() to ignore the error. We plan to replace this logic with a treesitter approach, so this is good enough for now. Fix #24431
* fix(lsp): replace @private with @nodoc for public client functions (#24415)Mathias Fußenegger2023-07-24
| | | | | | | | | * fix(lsp): replace @private with @nodoc for public client functions To prevent lua-ls warnings in plugins which use the functions. * fix(lsp): remove duplicate type annotations/class definitions These annotations became duplicate with https://github.com/neovim/neovim/pull/23750
* fix(lsp): announce publishDiagnostics.dataSupport (#24442)Bruce Weirdan2023-07-24
| | | | | | | | | | | Neovim already passed `data` element from published diagnostic to code action, but failed to announce it in client capabilities. Here is the test that shows that `data` element is returned by `vim.lsp.diagnostic.get_line_diagnostics()`: https://github.com/neovim/neovim/blob/f56c1848091bb64c63b5bc25ec74bcbd2f52bdde/test/functional/plugin/lsp/diagnostic_spec.lua#L103-L115 and then `get_line_diagnostics()` is used to construct the context for code action request: https://github.com/neovim/neovim/blob/f56c1848091bb64c63b5bc25ec74bcbd2f52bdde/runtime/lua/vim/lsp/buf.lua#L742
* fix(lsp): send empty "added" list when removing workspace folder #24440Mitchell Hanberg2023-07-24
| | | | | | | | | | | | | | | | | | When adding `workspace/didChangeWorkspaceFolders` support to my [language server](https://github.com/elixir-tools/next-ls), I noticed that when neovim removes a workspace, it sends an empty table (which is serialized to an empty JSON array) for the value in the `added` field. This does not follow the spec; the `added` table should just be empty. The following error led me to this discovery. Note the payload includes `"added" => [[]]`: ``` 22:46:48.476 [error] LSP Exited. Last message received: handle_notification %{"jsonrpc" => "2.0", "method" => "workspace/didChangeWorkspaceFolders", "params" => %{"event" => %{"added" => [[]], "removed" => [%{"name" => "/Users/mitchell/src/gen_lsp", "uri" => "file:///Users/mitchell/src/gen_lsp"}]}}} ** (MatchError) no match of right hand side value: {:error, %{"params" => %{"event" => %{"added" => [error: "expected a map"]}}}} (gen_lsp 0.4.0) lib/gen_lsp.ex:265: anonymous fn/4 in GenLSP.loop/3 (gen_lsp 0.4.0) lib/gen_lsp.ex:292: GenLSP.attempt/3 (stdlib 5.0.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3 ```
* fix(lsp): noisy warning about offset_encodings #24441Keith Smiley2023-07-24
| | | | | In the case you hit this warning in a buffer (like with C++ and clangd), this message potentially fires over and over again making it difficult to use the editor at all.
* fix(gx): move to to _init_default_mappings #24420marshmallow2023-07-24
| | | | | | | | Problem: netrw may conflict with the Nvim default "gx" mapping. Solution: Initialize keymapping earlier by moving it to vim._init_default_mappings(). That also avoids needing to check maparg().
* fix(treesitter): stop() should treat 0 as current buffer #24450Micah Halter2023-07-24
|
* docs(vim_diff): fixed inconsistent autocmds behavior #24453ii142023-07-24
|
* fix(treesitter): update markdown parser and queries (#24429)Christian Clason2023-07-22
|
* refactor(lsp): use LspNotify for inlay_hint (#24411)Chris AtLee2023-07-22
|
* fix(api/options): validate buf and winLewis Russell2023-07-22
| | | Fixes #24398
* docs(lua): add missing word in docs for vim.empty_dict (#24401)Gnik2023-07-22
|
* Merge #24392 from mrshmllow/gx_winJustin M. Keyes2023-07-21
|\ | | | | fix(ui.open): some URLs fail on Windows
| * fix(ui.open): some URLs fail on Windowsmarshmallow2023-07-21
| | | | | | | | | | | | | | | | | | | | | | | | Problem: On Windows, `explorer.exe` fails to open some URLs, for example: :lua vim.ui.open('https://devdocs.io/#q=lua%20lua_call') https://github.com/neovim/neovim/pull/23401#issuecomment-1641015704 Solution: Use rundll32 instead.
* | docs(lsp): clean up LSP event documentation #24413Chris AtLee2023-07-21
|/ | | Alphabetize LSP events, and make formatting consistent.
* docs: also change "vimL" and "viml" to "Vimscript" (#24414)zeertzjq2023-07-21
|
* feat(lsp): implement textDocument/diagnostic (#24128)Chris AtLee2023-07-20
|
* docs(lua): clarify fs.find() documentation #24394futsuuu2023-07-19
|
* feat(lsp): handle multiple clients in omnifunc (#24381)Mathias Fußenegger2023-07-19
| | | | | Also fixes https://github.com/neovim/neovim/issues/24369 by adding an extra `vim.schedule` to ensure the `vim.fn.complete` call happens outside of a luv callback
* docs(lua): more improvements (#24387)Lewis Russell2023-07-18
| | | | | | | | | | | | | | | | | * docs(lua): teach lua2dox how to table * docs(lua): teach gen_vimdoc.py about local functions No more need to mark local functions with @private * docs(lua): mention @nodoc and @meta in dev-lua-doc * fixup! Co-authored-by: Justin M. Keyes <justinkz@gmail.com> --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* refactor(lua2dox): overhaul (#24386)Lewis Russell2023-07-18
|
* fix(fs.lua): normalize slash truncation (#23753)Mike2023-07-18
| | | Preserve last slash in windows' root drive directories
* Merge pull request #24363 from lewis6991/docs/luatypesLewis Russell2023-07-17
|\ | | | | docs(lua): move some function docs to lua files
| * fix: doc errorsLewis Russell2023-07-17
| |
| * fix: luacheckLewis Russell2023-07-17
| |
| * docs(lua): change *lua-foo* -> *vim.foo*Lewis Russell2023-07-17
| |
| * docs(lua): move function docs to lua filesLewis Russell2023-07-17
| |
| * docs: handle whitespace in emmycommentsLewis Russell2023-07-17
| |
| * docs(lua): do not render self argsLewis Russell2023-07-17
| |
| * refactor: rename _meta.lua to _options.luaLewis Russell2023-07-17
| |
* | feat(lsp)!: rename vim.lsp.get_active_clients to get_clients (#24113)Mathias Fußenegger2023-07-17
| |
* | feat(options)!: remove compatible behaviours for vim 5.0 and earlierLewis Russell2023-07-17
| |
* | fix(clipboard): ignore exit caused by signal #23378Kai Ting2023-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If clipboard job exits by signal, the exit code is >=128: https://github.com/neovim/neovim/commit/939d9053bdf2f56286640c581eb4e2ff5a856540 xclip 0.13 often exits with code 143, which spams unhelpful messages: clipboard: error invoking xclip: Waiting for selection requests, Control-C to quit Waiting for selection request number 1 Solution: Don't show a warning if the clipboard tool exit code is >=128. Fixes: #7054
* | docs(term.txt): reorder paragraphs about TUI input (#24367)zeertzjq2023-07-16
| | | | | | | | Make |tui-modifyOtherKeys| and |tui-csiu| tags appear at a better place. Also adapt the |<Tab>| help update from https://github.com/vim/vim/commit/dad4473f02e1fec86d43a2fc094536a4b27d3b25
* | fix(lsp): markdown code fence should allow space before info string #24364Mike2023-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Bash language server returns "hover" markdown content that starts with a code fence and info string of `man` preceded by whitespace, which Nvim does not render properly. See https://github.com/bash-lsp/bash-language-server/blob/0ee73c53cebdc18311d4a4ad9367185ea4d98a03/server/src/server.ts#L821C15-L821C15 ```typescript function getMarkdownContent(documentation: string, language?: string): LSP.MarkupContent { return { value: language ? // eslint-disable-next-line prefer-template ['``` ' + language, documentation, '```'].join('\n') : documentation, kind: LSP.MarkupKind.Markdown, } } ``` For example, ``` ``` man NAME git - the stupid content tracker ``` ``` If I remove the white space, then it is properly formatted. ``` ```man instead of ``` man ``` Per CommonMark Spec https://spec.commonmark.org/0.30/#info-string whitespace is allowed before and after the `info string` which identifies the language in a codeblock. > The line with the opening code fence may optionally contain some text > following the code fence; this is trimmed of leading and trailing > spaces or tabs and called the [info > string](https://spec.commonmark.org/0.30/#info-string). If the [info > string](https://spec.commonmark.org/0.30/#info-string) comes after > a backtick fence, it may not contain any backtick characters. (The > reason for this restriction is that otherwise some inline code would > be incorrectly interpreted as the beginning of a fenced code block.) Solution: Adjust stylize_markdown() to allow whitespace before codeblock info.
* | feat(api)!: change return type of nvim_win_text_height to Dict (#24365)zeertzjq2023-07-16
|/
* feat(lsp): map K to hover by default #24331Mathias Fußenegger2023-07-14
| | | Related: https://github.com/neovim/neovim/issues/24252
* fix(lsp): remove unknown LSP protocol property (#24345)Techatrix2023-07-14
| | | 'hierarchicalWorkspaceSymbolSupport' is not part of the LSP Specification
* fix(runtime): respect 'rtp' order for all runtime files (#24335)zeertzjq2023-07-14
|
* docs(lua): adds links to related keymap functions to keymap.set (#24337)Mathias Fußenegger2023-07-13
| | | Might help with discovery, given that there is no `keymap.get()`
* perf(rtp): reduce rtp scans (#24191)Lewis Russell2023-07-13
| | | | | | | | | | | * perf(rtp): reduce rtp scans Problem: Scanning the filesystem is expensive and particularly affects startuptime. Solution: Reduce the amount of redundant directory scans by relying less on glob patterns and handle vim and lua sourcing lower down.
* test(extmarks): add test for virt_text_win_col with cpo+=n (#24328)zeertzjq2023-07-13
|
* feat(lsp): add method filter to get_active_clients (#24319)Mathias Fußenegger2023-07-12
|
* fix(tutor): don't use concealed text in expected lines #24316Sean Dewar2023-07-11
|
* feat(api): add nvim_win_text_height (#24236)zeertzjq2023-07-11
| | | | It uses the same code as "scroll_delta" of "win_viewport" UI event to calculate text height, but is more flexible.
* vim-patch:9.0.1673: cannot produce a status 418 or 503 message (#24287)Gregory Anders2023-07-10
| | | | | | | | Problem: Cannot produce a status 418 or 503 message. Solution: Add err_teapot(). https://github.com/vim/vim/commit/80adaa8ae8398403ca4e9797219ea9a501fc76a5 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(lint): lint warnings #24226Raphael2023-07-10
|
* fix(defaults): visual star (*) on text with "?"Justin M. Keyes2023-07-08
| | | | regression from 6318edadc32acce3ed41a6995a5faa5395b5f562
* fix(docs): match DocSearch style with site themeJustin M. Keyes2023-07-08
| | | | ref https://github.com/neovim/neovim.github.io/commit/2b4f9e47809c16743f7d31d0dc1f1e3c2f313a56