aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* fix(lsp): don't send foreign diagnostics to servers in buf.code_action (#29501)Mathias Fußenegger2024-08-01
| | | | | | | `buf.code_action` always included diagnostics on a given line from all clients. Servers should only receive diagnostics they published, and in the exact same format they sent it. Should fix https://github.com/neovim/neovim/issues/29500
* fix(watch): exclude .git when using inotifywait (#29914)Manuel2024-08-01
| | | | | | inotifywait man page specifies: The file must be specified with a relative or absolute path according to whether a relative or absolute path is given for watched directories. So it would only work this way in case the path is relative (which at least for gopls it is not)
* vim-patch:30a8ad6: runtime(java): Document "g:java_space_errors" and ↵Christian Clason2024-08-01
| | | | | | | | | | "g:java_comment_strings" closes: vim/vim#15399 https://github.com/vim/vim/commit/30a8ad675d183c15c47b42e37199e98e2f924d69 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
* vim-patch:77b87c3: runtime(java): Cluster optional group definitions and ↵Christian Clason2024-08-01
| | | | | | | | | | | | their group links And keep non-optional group links at the end of the file. related: vim/vim#15399 https://github.com/vim/vim/commit/77b87c30d93dc2049a41c4ea5884f26612d7cd58 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
* vim-patch:9aabcef: runtime(java): Tidy up the syntax fileChristian Clason2024-08-01
| | | | | | | | | | | | | | | | | | | | | | - Prefix all global variables with "g:". - Add spaces around each variable assignment operator. - Remove extraneous whitespace characters. - Remove a spurious _serializable_ Java keyword (since v1.1, java.io.Serializable and java.io.Externalizable interfaces provide an API for object serialization; see vim-6-0j). - Normalise the syntax definition argument order by making _contained_ the first argument of each such definition. - Normalise the argument tabulation for highlighting group definitions. Reference: https://web.archive.org/web/20010821025330/java.sun.com/docs/books/jls/first_edition/html/1.1Update.html related: vim/vim#15399 https://github.com/vim/vim/commit/9aabcef1c8f61a7d4f2facf6a510ab6d4f2d52f3 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
* vim-patch:3749dff: runtime(java): Tidy up the documentation for "ft-java-syntax"Christian Clason2024-08-01
| | | | | | | | | | | | | | | | | | | | - Reword a few sentences and reformat a few paragraphs. - Supply absent capitalisation and punctuation. - Make listed highlighting groups and code stand out. - Prefix all Java-related global variables with "g:". - Add spaces around each variable assignment operator. - Acknowledge that some Javadoc variables are maintained in the HTML syntax file. Also, move the overridable _default_ HTML group links before the HTML syntax file inclusion in order to implement the documented diverged settings. related: vim/vim#15399 https://github.com/vim/vim/commit/3749dff093d8c3ba0cd34cebf42bd4d3d93afe26 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
* vim-patch:5b07213: runtime(doc): re-format tag example lines, mention ctags ↵zeertzjq2024-08-01
| | | | | | | --list-kinds (#29938) https://github.com/vim/vim/commit/5b07213c0b365f2a7fcdd10c7e7cd00aae3560a5 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:partial:f10911e: Update runtime files (#29936)zeertzjq2024-08-01
| | | | | | | https://github.com/vim/vim/commit/f10911e5db16f1fe6ab519c5d091ad0c1df0d063 Also cherry-pick E1142 and E1156 tags from Vim. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:d88ebcb: runtime(colors): update habamax scheme - tweak ↵Christian Clason2024-08-01
| | | | | | | | | | | | | | diff/search/todo colors - Make diff colors more accessible, Green for added, Red for deleted, Blue for Changed - Change Search to blue to be visible with Diff colors - Change Todo to bright magenta closes: vim/vim#15400 https://github.com/vim/vim/commit/d88ebcbd9ff6e67c2e1ff2abf95f1782aaeed9e4 Co-authored-by: Maxim Kim <habamax@gmail.com>
* vim-patch:fcc5346: runtime(colors): update included colorschemesChristian Clason2024-08-01
| | | | | | | | | | | | | | | | | | | - Add PmenuMatch and PmenuMatchSel to all colorschemes - Add contrast to habamax Type, String, Constant and PreProc - Change habamax PmenuSel to neutral gray to make PmenuMatchSel more visible - Change habamax Tabline and VertSplit - Make Conceal less visible for zellner, torte, shine, ron, peachpuff, pablo, morning, koehler, evening, delek, blue, darkblue, lunaperche, retrobox - Add Added/Changed/Removed highlights - Fix retrobox Terminal background - Other minor fixes and improvements closes: vim/vim#15267 https://github.com/vim/vim/commit/fcc53461d46ecbf128b5bae943f116dbe4e7ad51 Co-authored-by: Maxim Kim <habamax@gmail.com>
* vim-patch:5753d99: runtime(nohlsearch): add missing loaded_hlsearch guardChristian Clason2024-07-31
| | | | | | | | | related: vim/vim#15039 closes: vim/vim#15402 https://github.com/vim/vim/commit/5753d99ff667d0feeff6b582bb7df9aaedd9a2cb Co-authored-by: Maxim Kim <habamax@gmail.com>
* vim-patch:56e8ed6: runtime(kivy): Updated maintainer info for syntax scriptChristian Clason2024-07-31
| | | | | | | | closes: vim/vim#15405 https://github.com/vim/vim/commit/56e8ed61629cebf737f637d843b9f4a397fbcc72 Co-authored-by: Corey Prophitt <git@prophitt.me>
* fix(lsp): prevent desync due to empty buffer (#29904)Jaehwang Jung2024-07-31
| | | | | | | | | | | | | | | Problem: Some language servers (e.g., rust-analyzer, texlab) are desynced when the user deletes the entire contents of the buffer. This is due to the discrepancy between how nvim computes diff and how nvim treats empty buffer. * diff: If the buffer became empty, then the diff includes the last line's eol. * empty buffer: Even if the buffer is empty, nvim regards it as having a single empty line with eol. Solution: Add special case for diff computation when the buffer becomes empty so that it does not include the eol of the last line.
* feat(lsp): lsp.completion support set deprecated (#29882)glepnir2024-07-31
| | | | | | Problem: CompletionItem in lsp spec mentioned the deprecated attribute Solution: when item has deprecated attribute set hl_group to DiagnosticDeprecated in complete function
* fix(scrollbind): properly take filler/virtual lines into accountLewis Russell2024-07-31
| | | | | | | | | | | | | | | | | | Problem: `'scrollbind'` does not work properly if the window being scrolled automatically contains any filler/virtual lines (except for diff filler lines). This is because when the scrollbind check is done, the logic only considers changes to topline which are represented as line numbers. Solution: Write the logic for determine the scroll amount to take into account filler/virtual lines. Fixes #29751
* vim-patch:9.1.0645: regex: wrong match when searching multi-byte char ↵zeertzjq2024-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | case-insensitive Problem: regex: wrong match when searching multi-byte char case-insensitive (diffsetter) Solution: Apply proper case-folding for characters and search-string This patch does the following 4 things: 1) When the regexp engine compares two utf-8 codepoints case insensitive it may match an adjacent character, because it assumes it can step over as many bytes as the pattern contains. This however is not necessarily true because of case-folding, a multi-byte UTF-8 character can be considered equal to some single-byte value. Let's consider the pattern 'ſ' and the string 's'. When comparing and ignoring case, the single character 's' matches, and since it matches Vim will try to step over the match (by the amount of bytes of the pattern), assuming that since it matches, the length of both strings is the same. However in that case, it should only step over the single byte value 's' by 1 byte and try to start matching after it again. So for the backtracking engine we need to ensure: * we try to match the correct length for the pattern and the text * in case of a match, we step over it correctly There is one tricky thing for the backtracing engine. We also need to calculate correctly the number of bytes to compare the 2 different utf-8 strings s1 and s2. So we will count the number of characters in s1 that the byte len specified. Then we count the number of bytes to step over the same number of characters in string s2 and then we can correctly compare the 2 utf-8 strings. 2) A similar thing can happen for the NFA engine, when skipping to the next character to test for a match. We are skipping over the regstart pointer, however we do not consider the case that because of case-folding we may need to adjust the number of bytes to skip over. So this needs to be adjusted in find_match_text() as well. 3) A related issue turned out, when prog->match_text is actually empty. In that case we should try to find the next match and skip this condition. 4) When comparing characters using collections, we must also apply case folding to each character in the collection and not just to the current character from the search string. This doesn't apply to the NFA engine, because internally it converts collections to branches [abc] -> a\|b\|c fixes: vim/vim#14294 closes: vim/vim#14756 https://github.com/vim/vim/commit/22e8e12d9f5034e1984db0c567b281fda4de8dd7 N/A patches: vim-patch:9.0.1771: regex: combining chars in collections not handled vim-patch:9.0.1777: patch 9.0.1771 causes problems Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:e34d0e3: runtime(netrw): removing trailing slash when copying ↵Christian Clason2024-07-31
| | | | | | | | | | files in same directory closes: vim/vim#14756 https://github.com/vim/vim/commit/e34d0e37e397419636ae5d27d4b236b193efef07 Co-authored-by: Travis Shelton <tshelton.mail@gmail.com>
* vim-patch:e6471b4: runtime(cuda): source c and cpp ftpluginsChristian Clason2024-07-31
| | | | | | | | closes: vim/vim#15383 https://github.com/vim/vim/commit/e6471b415b6b56f89624e6e0a6b7a17502109d0c Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
* vim-patch:c4be066: runtime(zip): Opening a remote zipfile don't workChristian Clason2024-07-31
| | | | | | | | | | | | | | Problem: Opening a zipfile from HTTP gives an empty buffer. Solution: Ensure that the magic bytes check does not skip protocol processing. Also use readblob() and remove commented out lines. closes: vim/vim#15396 https://github.com/vim/vim/commit/c4be066817d560c870f67f1593630cfb5b39dfc8 Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
* vim-patch:df9f67e: runtime(html): update syntax script to sync by 250 ↵Christian Clason2024-07-31
| | | | | | | | | | minlines by default closes: vim/vim#14071 https://github.com/vim/vim/commit/df9f67e10d214e0124f2141f59593529801307a4 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:011f222: runtime(thrift): add ftplugin, indent and syntax scriptsChristian Clason2024-07-30
| | | | | | | | | | | | | | | | | | Problem: Apache Thrift files misses ftplugin, indent and syntax scripts Solution: - add ftplugin and indent scripts - add thrift indent test - port the syntax script from apache/thrift (Apache License 2) Reference: https://diwakergupta.github.io/thrift-missing-guide/#_language_reference closes: vim/vim#15387 https://github.com/vim/vim/commit/011f2223e5df68f45a382f6a9dff6eaf5ecac346 Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
* vim-patch:49cdd62: runtime(doc): list of new/changed features in version9.txtzeertzjq2024-07-30
| | | | | | | | closes: vim/vim#13753 https://github.com/vim/vim/commit/49cdd629a39d7e40e7349e65cb177e2442871a04 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(treesitter): highlight anonymous nodes in inspect_treeRiley Bruins2024-07-29
| | | | | | | | | | **Problem:** With anonymous nodes toggled in the inspect tree, only named nodes will be highlighted when moving the cursor in the source code buffer. **Solution:** Retrieve the anonymous node at the cursor (when toggled on in the inspect tree) and highlight them when appropriate, for better clarity/specificity.
* feat(treesitter): allow get_node to return anonymous nodesRiley Bruins2024-07-29
| | | | | Adds a new field `include_anonymous` to the `get_node` options to allow anonymous nodes to be returned.
* feat(treesitter): add node_for_range functionRiley Bruins2024-07-29
| | | | | | This is identical to `named_node_for_range` except that it includes anonymous nodes. This maintains consistency in the API because we already have `descendant_for_range` and `named_descendant_for_range`.
* vim-patch:9.1.0636: filetype: ziggy files are not recognizedChristian Clason2024-07-29
| | | | | | | | | | | | | | | | Problem: filetype: ziggy files are not recognized Solution: detect '*.ziggy' files as ziggy filetype, detect '*.ziggy-schema' files as ziggy-schema filetype (EliSauder) References: https://ziggy-lang.io/ fixes: vim/vim#15355 closes: vim/vim#15367 https://github.com/vim/vim/commit/f4572cee35a6c224985e71116e676ab711c09af3 Co-authored-by: EliSauder <24995216+EliSauder@users.noreply.github.com>
* vim-patch:9.1.0635: filetype: SuperHTML template files not recognizedChristian Clason2024-07-29
| | | | | | | | | | | | | | Problem: filetype: SuperHTML template files not recognized Solution: Update the filetype detection code to detect '*.shtml' either as HTML (Server Side Includes) or SuperHTML (template files) (EliSauder) related: vim/vim#15355 related: vim/vim#15367 https://github.com/vim/vim/commit/e57c9a19edc906a96ccb8821ae33fa6a8b20c3cd Co-authored-by: EliSauder <24995216+EliSauder@users.noreply.github.com>
* vim-patch:4c45425: runtime(debcopyright): Add support for Files-Included in ↵Christian Clason2024-07-29
| | | | | | | | | | | | | syntax script Full support (including for components) was finished with this commit: https://salsa.debian.org/debian/devscripts/-/commit/ee90dad7712a7db1e9541b405e065a08d29d62f8 closes: vim/vim#15374 https://github.com/vim/vim/commit/4c45425c10a94382a435239e8f63c6b1ca55d4e4 Co-authored-by: josch <josch@debian.org>
* vim-patch:partial:52e7cc2: runtime(doc): tweak documentation style a bit ↵zeertzjq2024-07-29
| | | | | | | | | (#29897) closes: vim/vim#15371 https://github.com/vim/vim/commit/52e7cc26d81c61fff1b2e3b32e8b9b04347be1d3 Co-authored-by: h-east <h.east.727@gmail.com>
* docs(treesitter): don't quote metadataChristian Clason2024-07-28
|
* fix(runtime): sync bundled treesitter queriesChristian Clason2024-07-28
|
* fix(lsp): revert text edit application order change (#29877)Mathias Fußenegger2024-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverts https://github.com/neovim/neovim/pull/29212 and adds a few additional test cases From the spec > All text edits ranges refer to positions in the document they are > computed on. They therefore move a document from state S1 to S2 without > describing any intermediate state. Text edits ranges must never overlap, > that means no part of the original document must be manipulated by more > than one edit. However, it is possible that multiple edits have the same > start position: multiple inserts, or any number of inserts followed by a > single remove or replace edit. If multiple inserts have the same > position, the order in the array defines the order in which the inserted > strings appear in the resulting text. The previous fix seems wrong. The important part: > If multiple inserts have the same position, the order in the array > defines the order in which the inserted strings appear in the > resulting text. Emphasis on _appear in the resulting text_ Which means that in: local edits1 = { make_edit(0, 3, 0, 3, { 'World' }), make_edit(0, 3, 0, 3, { 'Hello' }), } `World` must appear before `Hello` in the final text. That means the old logic was correct, and the fix was wrong.
* Merge pull request #29876 from glepnir/vim-patchzeertzjq2024-07-27
|\ | | | | vim-patch:9.1.{0618,0619,0629}: cannot mark deprecated attributes in completion menu
| * vim-patch:9.1.0629: Rename of pum hl_group is incompletezeertzjq2024-07-27
| | | | | | | | | | | | | | | | | | | | | | Problem: Rename of pum hl_group is incomplete in source. Solution: Also rename the test function. Rename to user_hlattr in code to avoid confusion with pum_extra. Add test with matched text highlighting (zeertzjq). closes: vim/vim#15348 https://github.com/vim/vim/commit/4100852e099133a0c9603e1087e5dc6d82001ce7
| * vim-patch:9.1.0618: cannot mark deprecated attributes in completion menuglepnir2024-07-27
| | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot mark deprecated attributes in completion menu Solution: add hl_group to the Dictionary of supported completion fields (glepnir) closes: vim/vim#15314 https://github.com/vim/vim/commit/508e7856ec4afc9d6038b14bb6893668268dccab Co-authored-by: glepnir <glephunter@gmail.com>
* | fix(version): return nil with empty stringMaria José Solano2024-07-27
| |
* | vim-patch:9.1.0616: filetype: Make syntax highlighting off for MS Makefiles ↵zeertzjq2024-07-27
|/ | | | | | | | | | | | | | | | | | | | | | | | (#29874) Problem: filetype: Make syntax highlighting off for MS Makefiles Solution: Try to detect MS Makefiles and adjust syntax rules to it. (Ken Takata) Highlighting of variable expansion in Microsoft Makefile can be broken. E.g.: https://github.com/vim/vim/blob/2979cfc2627d76a9c09cad46a1647dcd4aa73f5f/src/Make_mvc.mak#L1331 Don't use backslash as escape characters if `make_microsoft` is set. Also fix that `make_no_comments` was not considered if `make_microsoft` was set. Also add description for `make_microsoft` and `make_no_comments` to the documentation and include a very simple filetype test closes: vim/vim#15341 https://github.com/vim/vim/commit/eb4b903c9b238ebcc1d14cfcb207129b4931a33d Co-authored-by: Ken Takata <kentkt@csc.jp>
* vim-patch:a7295ae: runtime(autohotkey): include initial filetype pluginChristian Clason2024-07-27
| | | | | | | | closes: vim/vim#15345 https://github.com/vim/vim/commit/a7295ae7f5b956758f1c9c9a29d10c48661b29bc Co-authored-by: Peter Aronoff <peter@aronoff.org>
* vim-patch:4d68054: runtime(progress): Add single-line comment syntaxChristian Clason2024-07-26
| | | | | | | | | | | | | | | | Progress OpenEdge 11.6 added a new C-like single-line comment syntax; such comments begin with `//` and proceed to the end of the line. Add a new syntax group `ProgressLineComment` to implement highlighting for this syntax. Rename the existing group from `ProgressComment` to `ProgressBlockComment`, and introduce a cluster named `ProgressComment` to encapsulate both. closes: vim/vim#15339 https://github.com/vim/vim/commit/4d68054c1e49b937a1aa9567196b97b36fe99c27 Co-authored-by: Daniel Smith <daniel@rdnlsmith.com>
* vim-patch:d5cc8ee: runtime(progress): Update maintainer infoChristian Clason2024-07-26
| | | | | | | | | | | | | | | | | | | The Progress syntax file was last updated eight years ago, and the header information twelve years ago. Attempts to contact the last known maintainer at the email address listed in the file header (with the spam-prevention characters removed) produced a delivery failure notification stating that the address did not exist. I intend to submit some minor improvements to this file. Per [1], I will assume maintainership of it for the time being. related: vim/vim#15339 [1]: https://groups.google.com/g/vim_dev/c/I3pOKIOgM4A/m/pekGQB_lBwAJ https://github.com/vim/vim/commit/d5cc8ee0fa3e952492aed0c2f7e97586a0a87ab7 Co-authored-by: Daniel Smith <daniel@rdnlsmith.com>
* fix(runtime): set 'keywordprg' only once in vim ftpluginCarman Fu2024-07-26
|
* vim-patch:9.1.0612: filetype: deno.lock file not recognizedChristian Clason2024-07-25
| | | | | | | | | | | | | | | Problem: filetype: deno.lock file not recognized Solution: detect 'deno.lock' as json filetype (カワリミ人形) Reference: https://docs.deno.com/runtime/manual/basics/modules/integrity_checking/#caching-and-lock-files closes: vim/vim#15333 https://github.com/vim/vim/commit/df77c8ad3974e44df2e588de5f465072371cab69 Co-authored-by: カワリミ人形 <kawarimidoll+git@gmail.com>
* vim-patch:e73e5b8: runtime(java): Optionally highlight the :: token for ↵Christian Clason2024-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | method references This token will be highlighted, similar to the arrow of lambda expressions, whenever "g:java_highlight_functions" is defined. Also: - Improve the recognition of _switch-case_ labels (D-Cysteine). - Remove insignificant empty statements in syntax test files. closes: vim/vim#15322 References: https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.13 https://github.com/fleiner/vim/pull/1 https://github.com/vim/vim/commit/e73e5b889b52675a9ea58cf154235c7f25d107d5 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com> Co-authored-by: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com>
* vim-patch:2cad941: runtime(zip): Use delete() for deleting directoryChristian Clason2024-07-25
| | | | | | | | | | This is safer because we don't invoke the shell. closes: vim/vim#15335 https://github.com/vim/vim/commit/2cad941dc0cb57bca577160eb3a349de2e667bcd Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
* vim-patch:ddbb6fe: runtime(vim): Update base-syntax, improve :set ↵zeertzjq2024-07-25
| | | | | | | | | | | | | | | highlighting (#29850) - Match bang, "all" and "termcap" options, and trailing command separator "|". - Highlight set assignment operators. - Match multiline :set and multiline option values. - Mention the newer "0o" octal prefix at :help :set=. closes: vim/vim#15329 https://github.com/vim/vim/commit/ddbb6fe2d0344e93436c5602b7a06169f49a9b52 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* fix(health): fix pyenv root and python exepath detect issueAbao Zhang2024-07-24
| | | | | | | | | | | | | | | | | | Fix the following two issues: - pyenv root detection issue When `PYENV_ROOT` environment variable is not set, neovim will detect pyenv's root via `pyenv root` command, but which will be always fail because `vim.fn.system()` returns result with additional `\n`. Using `vim.system` instead prevents this problem. to trim it before check whether it is exists - python executable path detection issue Filter unrelated `python-config` in cases where multiple python versions are installed, e.g. `python-config`, `python3.10-config`, `python3.11-config` etc.
* fix(runtime): sync bundled treesitter queriesChristian Clason2024-07-24
|
* vim-patch:38ce71c: runtime(zip): correctly extract file from zip browserChristian Clason2024-07-24
| | | | | | | | | | | Problem: Enter 'x' in zip browser fail with E121 Solution: Fix typo in zip#Extract() closes: vim/vim#15321 https://github.com/vim/vim/commit/38ce71c1c323716cc4b130dbb3e8837a8b9a710b Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
* vim-patch:581d4a7: runtime(netrw): escape filename before trying to delete ↵Nikita Rudakov2024-07-24
| | | | | | | | | it (#29838) fixes: vim/vim#15330 https://github.com/vim/vim/commit/581d4a7b356395bcb8606c1717ded65d47d26c68 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9d57ea5: runtime(netrw): Fix endless recursion in netrw#Explore()Christian Clason2024-07-23
| | | | | | | | | | | | Problem: ':E /etc BOOM' give E132 error. Solution: Avoid recursion call with same arguments. fixes: vim/vim#5723 closes: vim/vim#15318 https://github.com/vim/vim/commit/9d57ea5cd3a23af02c72c0e86fe24b7bba57189a Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>