aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* fix(docs): add missing properties to hl_info #30032Maria José Solano2024-08-16
|
* fix(loader): follow the style of the error message for built-in loadersfutsuuu2024-08-13
| | | | | start the error message with '\n\t' instead of '\n' surround the module name by single quotes
* fix(lua): ignore stdout and stderr for xdg-openAaron2024-08-12
| | | | Ref #19724 Fix #29932
* test(lsp): refactor and tidyLewis Russell2024-08-11
| | | | | | | - Merge all the top level 'LSP' describe blocks - Refactor text edit tests - Fix typing errors - Add linebreaks between tests
* feat(term): enable reflow by default (#21124)Christian Clason2024-08-10
| | | | | | | | | | | | Problem: Contents of terminal buffer are not reflown when Nvim is resized. Solution: Enable reflow in libvterm by default. Now that libvterm is vendored, also fix "TUI rapid resize" test failures there. Note: Neovim's scrollback buffer does not support reflow (yet), so lines vanishing into the buffer due to a too small window will be restored without reflow.
* vim-patch:0cc5dce: runtime(doc): clarify directory of Vim's executable vs CWDzeertzjq2024-08-09
| | | | | | | | | | According to :h win32-PATH, "the same directory as Vim" means the same directory as the Vim executable, not Vim's current directory. In patch 8.2.4860 these two concepts were mixed up. closes: vim/vim#15451 https://github.com/vim/vim/commit/0cc5dce5780d39fe621f6146d4fb862318918125
* fix(lsp): avoid reusing diagnostics from different servers in actions (#30002)Grzegorz Rozdzialik2024-08-07
| | | | | | | | | | | | | | | | Problem: When preparing the parameters for a code actions LSP request, the code set `context.diagnostics` when processing the first LSP client, and then reused those `context.diagnostics` for subsequent LSP clients. This meant that the second and next LSP clients got diagnostics that did not originate from them, and they did not get the diagnostics that they sent. Solution: Avoid setting `context.diagnostics` (which is referenced by all clients). Instead, set `params.context.diagnostics` directly, which is specific to a single client. Fixes #30001 Caused by #29501
* docs(treesitter): generate inline docs for `Range`sYi Ming2024-08-06
| | | | | | | | docs(treesitter): in-place parameter description docs(treesitter): remove internal type names docs(treesitter): add missing private annotation
* vim-patch:8.2.4838: checking for absolute path is not trivial (#29990)zeertzjq2024-08-06
| | | | | | | | | | Problem: Checking for absolute path is not trivial. Solution: Add isabsolutepath(). (closes vim/vim#10303) https://github.com/vim/vim/commit/dca1d40cd0f2af0755519e7028378bd3c8fefd31 vim-patch:8a3b805c6c9c Co-authored-by: LemonBoy <thatlemon@gmail.com>
* vim-patch:9.1.0465: missing filecopy() function (#29989)zeertzjq2024-08-06
| | | | | | | | | | | Problem: missing filecopy() function Solution: implement filecopy() Vim script function (Shougo Matsushita) closes: vim/vim#12346 https://github.com/vim/vim/commit/60c8743ab6c90e402e6ed49d27455ef7e5698abe Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* docs(filetype): consolidate comments in dev_vimpatch.txtChristian Clason2024-08-03
|
* docs(filetype): add note about prefering explicit lists over patternEvgeni Chasnovski2024-08-03
|
* refactor(filetype): use extension match instead of pattern if possibleEvgeni Chasnovski2024-08-03
| | | | | | | | | | | Problem: some patterns are used as a replacement for several explicit extension matches (like '%.[Ss][Yy][Ss]$', '%.php%d$', etc.). They usually correspond to Vim's "ignore case" regexes (like '*.sys\c') and "convenience" patterns to not define many of them (like '*.php\d'). As matching extension directly is faster and more explicit, it should be preferred. Solution: move all such patterns to direct extension match.
* refactor(filetype): use file name match instead of pattern if possibleEvgeni Chasnovski2024-08-03
| | | | | | | | | | | | | | Problem: some patterns are used as a replacement for one-two explicit file matches (like '^[mM]akefile$'). As matching file name directly is faster and more explicit, it should be preferred. Solution: move those patterns to direct file name match. NOTE: this is not strictly backwards compatible, because exact file name matching is done *before* pattern matching. If user has conflicting `vim.filetype.add()` call with high priority (like with `pattern='file$'` and `priority=100`), after this change it will be ignored (i.e. 'makefile' will match exactly). Judging by converted cases, it seems reasonable to prefer exact matches there.
* fix(lsp): redundant spaces in lsp log (#29970)Jaehwang Jung2024-08-03
|
* feat(lsp): announce codeLens resolveSupport (#29956)Mathias Fußenegger2024-08-03
| | | | | | | The codelens implementation can resolve command via `codeLens/resolve`. The spec added client capabilities for that: https://github.com/microsoft/language-server-protocol/pull/1979
* vim-patch:9.1.0655: filetype: goaccess config file not recognizedChristian Clason2024-08-03
| | | | | | | | | | | | | | | | | | | Problem: filetype: goaccess config file not recognized Solution: detect 'goaccess.conf' as goaccess filetype, also include a basic syntax and ftplugin (Adam Monsen) Add syntax highlighting for GoAccess configuration file. GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser. GoAccess home page: https://goaccess.io closes: vim/vim#15414 https://github.com/vim/vim/commit/0aa65b48fbe64e18a767b207802483026baecb5d Co-authored-by: Adam Monsen <haircut@gmail.com>
* vim-patch:9.0.0634: evaluating "expr" options has more overhead than neededzeertzjq2024-08-02
| | | | | | | | | | | | | | | | | | Problem: Evaluating "expr" options has more overhead than needed. Solution: Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr', "expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr', 'formatexpr', 'indentexpr' and 'charconvert'. https://github.com/vim/vim/commit/a4e0b9785e409e9e660171cea76dfcc5fdafad9b vim-patch:9.0.0635: build error and compiler warnings Problem: Build error and compiler warnings. Solution: Add missing change. Add type casts. https://github.com/vim/vim/commit/3292a229402c9892f5ab90645fbfe2b1db342f5b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* 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: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>
* 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
* 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: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>
* 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.
* 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: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>
* 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.
* vim-patch:9.1.0610: filetype: OpenGL Shading Language files are not detected ↵Gregory Anders2024-07-23
| | | | | | | | | | | | (#29831) Problem: filetype: OpenGL Shading Language files are not detected Solution: detect various file extensions as GLSL filetype, include indent and syntax script, do no longer recognize '*.comp' as Mason filetype (Gregory Anders) closes: vim/vim#15317 https://github.com/vim/vim/commit/e4b991ed36f96dd01c6d75e46a04fd1a99180e58
* vim-patch:9.1.0603: filetype: use correct extension for DraculaChristian Clason2024-07-19
| | | | | | | | | | | | | | Problem: pattern detection for Dracula language uses "*lvs" and "*lpe". as there is no dot, those are not treated as extensions which they should (judging by 'runtime/syntax/dracula.vim' and common sense). Solution: use "*.lvs" and "*.lpe" patterns (Evgeni Chasnovski) closes: vim/vim#15303 https://github.com/vim/vim/commit/5fb801a74faaf3ef1262c2988b8801500ca71646 Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
* vim-patch:9.1.0602: filetype: Prolog detection can be improvedzeertzjq2024-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Prolog detection can be improved Solution: update the prolog detection regex (igna_martinoli) related: vim/vim#10835 related: vim/vim#15206 closes: vim/vim#15253 https://github.com/vim/vim/commit/37853b7de31ef34153fe76aa2b740d517ed0e5d4 N/A patch: vim-patch:7347642: runtime(filetype): Fix Prolog file detection regex Problem: filetype: .pro file detection for Prolog is broken Solution: fixed the regex to only match on the tested cases (igna_martinoli) fixes: vim/vim#10835 closes: vim/vim#15206 https://github.com/vim/vim/commit/7347642633eb2de23a78c51a4388c9080440eec4 Co-authored-by: igna_martinoli <ignamartinoli@protonmail.com> Co-authored-by: clason <c.clason@uni-graz.at>
* vim-patch:eb6d733: runtime(doc): fix more inconsistencies in assert function ↵zeertzjq2024-07-19
| | | | | | | | | docs (#29796) related: https://github.com/vim/vim/pull/15280#issuecomment-2233771449 closes: vim/vim#15285 https://github.com/vim/vim/commit/eb6d733bef312a0634770e023e8a41f0347f1503
* perf(filetype): implement parent pattern pre-matching (#29660)Evgeni Chasnovski2024-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: calling `vim.filetype.match()` has performance bottleneck in that it has to match a lot of Lua patterns against several versions of input file name. This might be the problem if users need to call it synchronously a lot of times. Solution: add "parent pattern pre-matching" which can be used to quickly reject several potential pattern matches at (usually rare) cost of adding time for one extra Lua pattern match. "Parent pattern" is a manually added/tracked grouping of filetype patterns which should have two properties: - Match at least the same set of strings as its filetype patterns. But not too much more. - Be fast to match. For them to be effective, group should consist from at least three filetype patterns. Example: for a filetpye pattern ".*/etc/a2ps/.*%.cfg", both "/etc/" and "%.cfg" are good parent patterns (prefer the one which can group more filetype patterns). After this commit, `vim.filetype.match()` on most inputs runs ~3.4 times faster (while some inputs may see less impact if they match many parent patterns).
* vim-patch:9.1.0596: filetype: devscripts config files are not recognized ↵Christian Clason2024-07-18
| | | | | | | | | | | | | (#29773) Problem: filetype: Debian devscripts config files are not recognized Solution: detect devscripts.conf and .devscripts files as sh filetype (sourced by /bin/sh) closes: vim/vim#15227 https://github.com/vim/vim/commit/76c19028ffc8b00816df7bc48985c92f7bacbcfb Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* vim-patch:c1b3984: runtime(doc): minor updates. (#29778)zeertzjq2024-07-18
| | | | | | | closes: vim/vim#15280 https://github.com/vim/vim/commit/c1b3984a7b3cd6adcd1f43e558cb04fad1af3182 Co-authored-by: Shane Harper <shane@shaneharper.net>
* fix(lsp): inlay hints are rendered in the correct order (#29707)Amit Singh2024-07-17
| | | | | | | | | | | Problem: When there are multiple inlay hints present at the same position, they should be rendered in the order they are received in the response from LSP as per the LSP spec. Currently, this is not respected. Solution: Gather all hints for a given position, and then set it in a single extmark call instead of multiple set_extmark calls. This leads to fewer extmark calls and correct inlay hints being rendered.
* fix(treesitter): recognize aliased parsers in omnifunc, query linterRiley Bruins2024-07-17
| | | | | | | | | **Problem:** A query file for something like `html_tags` will not be given html node completion **Solution:** Check for parser aliases before offering completions Co-authored-by: Lewis Russell <me@lewisr.dev>
* vim-patch:9.1.0593: filetype: Asymptote files are not recognizedChristian Clason2024-07-17
| | | | | | | | | | | | | | Problem: filetype: Asymptote files are not recognized Solution: detect '*.asy' files as asy filetype, include ftplugin and syntax plugin (AvidSeeker). Reference: https://asymptote.sourceforge.io/ closes: vim/vim#15252 https://github.com/vim/vim/commit/3088ef094da721dac8c0363a6c9e14eaf9313929 Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
* vim-patch:9.1.0592: runtime: filetype: Mediawiki files are not recognizedChristian Clason2024-07-17
| | | | | | | | | | | | | Problem: filetype: Mediawiki files are not recognized Solution: detect "*.mw" and "*.wiki" as mediawiki filetype, include basic syntax and filetype plugins. (AvidSeeker) closes: vim/vim#15266 https://github.com/vim/vim/commit/b5844104ab1259e061e023ea6259e4eb002e7170 Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
* vim-patch:9.1.0591: filetype: *.wl files are not recognizedChristian Clason2024-07-17
| | | | | | | | | | | | Problem: filetype: *.wl files are not recognized Solution: Detect '*.wl' files as Mathematica package files (Jonas Dujava) closes: vim/vim#15269 https://github.com/vim/vim/commit/c6d7dc039342fbe1cf432c7f8e7e391063de210b Co-authored-by: Jonas Dujava <jonas.dujava@gmail.com>
* fix(lsp): don't show codelens for buffers that don't support it (#29690)Riley Bruins2024-07-16
|
* fix(snippet): modify base indentation when there's actually whitespace (#29670)Maria José Solano2024-07-16
|
* vim-patch:df62c62: runtime(doc): grammar fixes in options.txt (#29729)zeertzjq2024-07-15
| | | | | | | closes: vim/vim#15265 https://github.com/vim/vim/commit/df62c62177bd4dffce880b7a5711594865090953 Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>