aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
...
* | feat(vim.ui): vim.ui.open, "gx" without netrwmarshmallow2023-07-04
|/ | | | | | Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com> Co-authored-by: ii14 <59243201+ii14@users.noreply.github.com>
* fix(lsp): revert change to buf.clear_references() #24238Raphael2023-07-04
| | | | | | | Problem: in #24046 the signature of buf.clear_references() changed, which indirectly breaks callers that were passing "ignored" args. Solution: because util.buf_clear_references() already defaulted to "current buffer", the change to buf.clear_references() isn't actually needed, so just revert it.
* perf(ui-ext): approximate scroll_delta when scrolling too much (#24234)zeertzjq2023-07-04
|
* Merge pull request #23891 from rickyz/grid_line_flagsbfredl2023-07-03
|\ | | | | fix(ui): propagate line flags on grid_line events
| * fix(ui): propagate line wrapping state on grid_line eventsRicky Zhou2023-06-05
| | | | | | | | | | | | This fixes the TUI's line-wrapping behavior, which was broken with the migration to the msgpack-based UI protocol (see https://github.com/neovim/neovim/issues/7369#issuecomment-1571812273).
* | perf(treesitter): cache fold query (#24222)Jaehwang Jung2023-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | perf(treesitter): cache vim.treesitter.query.get Problem: vim.treesitter.query.get searches and reads query files every time it's called, if user hasn't overridden the query. So this can incur slowdown when called frequently. This can happen when using treesitter foldexpr. For example, when using `:h :range!` in markdown file to format fenced codeblock, on_changedtree in _fold.lua is triggered many times despite that the tree doesn't have syntactic changes (might be a bug in LanguageTree). (Incidentally, the resulting fold is incorrect due to a bug in `:h range!`.) on_changedtree calls vim.treesitter.query.get for each tree changes. In addition, it may request folds queries for injected languages without fold queries, such as markdown_inline. Solution: * Cache the result of vim.treesitter.query.get. * If query file was not found, fail quickly at later calls.
* | build(deps): bump luv to 1.45.0-0 (#24228)Christian Clason2023-07-02
| | | | | | https://github.com/luvit/luv/releases/tag/1.45.0-0
* | fix(startup)!: "nvim -l" message does not end with newline #24215zeertzjq2023-07-01
| | | | | | Close #24180
* | Merge pull request #24219 from clason/ts-hoonChristian Clason2023-07-01
|\ \ | | | | | | feat(treesitter): add python, bash parser and queries
| * | feat(treesitter): add bash parser and queriesChristian Clason2023-07-01
| | |
| * | feat(treesitter): add python parser and queriesChristian Clason2023-07-01
| | |
* | | fix(lsp): lint warnings, default offset_encoding #24046Raphael2023-07-01
|/ / | | | | | | | | - fix lint / analysis warnings - locations_to_items(): get default offset_encoding from active client - character_offset(): get default offset_encoding from active client
* | feat(treesitter): bundle markdown parser and queries (#22481)Christian Clason2023-07-01
| | | | | | | | | | | | | | * bundle split Markdown parser from https://github.com/MDeiml/tree-sitter-markdown * add queries from https://github.com/nvim-treesitter/nvim-treesitter/tree/main * upstream `#trim!` and `#inject-language!` directives Co-authored-by: dundargoc <gocdundar@gmail.com>
* | fix(lsp): fix attempt to call non existent function (#24212)Sanchayan Maity2023-06-30
| | | | | | | | | | | | | | | | | | | | | | | | Commit 37079fc moved inlay_hint to vim.lsp() but in the process did missed converting a call to disable/enable which are now local. Fixes the below error when trying to toggle inlay hints. E5108: Error executing lua /usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:248: attempt to call field 'disable' (a nil value) stack traceback: /usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:248: in function 'toggle' /usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:310: in function 'inlay_hint' [string ":lua"]:1: in main chunk
* | Merge pull request #24147 from clason/fix/ftpluginzeertzjq2023-06-30
|\ \ | | | | | | fix(ftplugin): respect runtimepath ordering
| * | fix(ftplugin): respect runtimepath orderingChristian Clason2023-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: bundled `ftplugin/foo/*.vim` are sourced before user `ftplugin/foo.vim`. Solution: call `runtime!` once on all patterns to be sourced. Followup to #23801. Fixes #24003.
* | | feat(lsp): move inlay_hint() to vim.lsp (#24130)Mathias Fußenegger2023-06-30
| | | | | | | | | | | | | | | | | | Allows to keep more functions hidden and gives a path forward for further inlay_hint related functions - like applying textEdits. See https://github.com/neovim/neovim/pull/23984#pullrequestreview-1486624668
* | | docs(luaref): fix tags for constants (#24203)NAKAI Tsuyoshi2023-06-30
| | |
* | | feat(defaults): set g:netrw_use_errorwindow = 0 #24179Frede2023-06-29
| | | | | | | | | | | | | | | | | | | | | Problem: netrw uses a bespoke window to show messages. Solution: change the default so that netrw uses normal vim :echoerr
* | | fix(lsp): inlay_hint nil reference error #24202Chinmay Dalal2023-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: vim_lsp_inlayhint: Error executing lua: .../lsp/_inlay_hint.lua:249: attempt to index field 'applied' (a nil value) Solution: Assign {} to bufstates.applied in on_reload fixes #24172
* | | vim-patch:9.0.1671: Termdebug: error with more than 99 breakpoints (#24194)zeertzjq2023-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Termdebug: error with more than 99 breakpoints. Solution: Use a different sign for breakpoint 100 and over. (closes vim/vim#12589, closes vim/vim#12588) https://github.com/vim/vim/commit/e7d9ca2b3bf99b0b759be8952e02c77110a354c1 Co-authored-by: skywind3000 <skywind3000@163.com>
* | | fix(treesitter): handle empty region when logging (#24173)Jaehwang Jung2023-06-27
| | |
* | | fix(treesitter): make foldexpr work without highlighting (#24167)Jaehwang Jung2023-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Treesitter fold is not updated if treesitter hightlight is not active. More precisely, updating folds requires `LanguageTree:parse()`. Solution: Call `parse()` before computing folds and compute folds when lines are added/removed. This doesn't guarantee correctness of the folds, because some changes that don't add/remove line won't update the folds even if they should (e.g. adding pair of braces). But it is good enough for most cases, while not introducing big overhead. Also, if highlighting is active, it is likely that `TSHighlighter._on_buf` already ran `parse()` (or vice versa).
* | | fix(docs): ignore_invalid #24174Justin M. Keyes2023-06-27
| | | | | | | | | Regex bug in scripts/gen_help_html.lua:ignore_invalid()
* | | docs(diagnostic): return value of get() #24144NAKAI Tsuyoshi2023-06-27
| | |
* | | vim-patch:9.0.1668: PEM files are not recognized (#24169)ObserverOfTime2023-06-27
| | | | | | | | | | | | | | | | | | Problem: PEM files are not recognized. Solution: Add patterns to match PEM files. (closes vim/vim#12582) https://github.com/vim/vim/commit/0256d76a3392aef270b38d1cf7633008e45c2003
* | | vim-patch:9.0.1632: not all cabal config files are recognized (#24025)Jonas Strittmatter2023-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Not all cabal config files are recognized. Solution: Add a couple of patterns. (Marcin Szamotulski, closes vim/vim#12463) https://github.com/vim/vim/commit/166cd7b801ebe4aa042a9bbd6007d1951800aaa9 Also: - Do not expand Lua patterns in environment variables used in file patterns. - Test $XDG_CONFIG_HOME on Windows, as it can be used by Nvim (and the runner sets it). Co-authored-by: Marcin Szamotulski <coot@coot.me>
* | | fix(docs): vimdoc syntax errorsJustin M. Keyes2023-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare for https://github.com/neovim/tree-sitter-vimdoc/pull/108 which improves `{arg}` highlighting in many common cases: vim.foo({bar}) vim.foo( {bar}) nvim_foo({bar}) nvim_foo({bar},{baz}) nvim_foo({bar}, {baz}) foo[{buf}] The tradeoff is that things like `"[{"` are flagged as parse errors. We could avoid if we drop support for `foo[{buf}]`, but that is rather common (see `builtin.txt`).
* | | docs: fix misparsed headings (#24162)Christian Clason2023-06-26
| | | | | | | | | | | | | | | | | | Problem: vimdoc parser requires space between column heading and `~`. Solution: Add space to docs (and mention it). Also edit `luaref.txt` headings for consistency.
* | | fix(treesitter): update lua parser and queries (#24148)Christian Clason2023-06-26
| | |
* | | fix(docs): too much whitespace around <pre> blocks #24151Justin M. Keyes2023-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: In the generated docs HTML there is too much whitespace before/after `<pre>` blocks. - In the old layout (fixed-width), all text in `.old-help-para` is formatted as `white-space:pre`. - In the new layout, when `<pre>` is at the end of a `<div>`, the margins of both are redundant, causing too much space. Solution: - In the old layout, always remove `<pre>` margin. - In the new layout, disable `<pre>` margin if it is the last child.
* | | Merge #24116 from justinmk/docJustin M. Keyes2023-06-25
|\ \ \
| * | | docs: autocmds, miscJustin M. Keyes2023-06-25
| | | |
| * | | fix(docs): vimdoc syntax errorsJustin M. Keyes2023-06-25
| | | | | | | | | | | | | | | | gen_help_html: truncate parse-error sample text
* | | | vim-patch:9.0.1663: Termdebug on MS-Windows: some file names are not ↵zeertzjq2023-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recognized (#24145) Problem: Termdebug on MS-Windows: some file names are not recognized. Solution: Do not always change \t and \n. (Christian Brabandt, closes vim/vim#12565, closes vim/vim#12560, closes vim/vim#12550) https://github.com/vim/vim/commit/c9a4a8ab28da2b11856a3f08ccba2e91f46b85c3 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | | vim-patch:9.0.1661: BUCK files are not recognized (#24142)Christian Clason2023-06-24
| |/ / |/| | | | | | | | | | | | | | | | | | | | Problem: BUCK files are not recognized. Solution: Recognize BUCK files as "bzl". (Son Luong Ngoc, closes vim/vim#12564) https://github.com/vim/vim/commit/b46e0f3263acd99c61df06ee3c4d1f6e0b471bc3 Co-authored-by: Son Luong Ngoc <sluongng@gmail.com>
* | | vim-patch:9.0.1659: Termdebug: default highlight cleared if changing ↵zeertzjq2023-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | colorscheme (#24139) Problem: Termdebug: default highlight cleared when changing colorscheme. Solution: Use a ColorScheme autocommand. (Christian Brabandt, closes vim/vim#12566, closes vim/vim#12555) https://github.com/vim/vim/commit/279de0cd1f58ea520826a3dd1c5562a71157b23b Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | Merge pull request #24082 from smjonas/fix_24064Christian Clason2023-06-24
|\ \ \ | | | | | | | | fix(filetype): correctly detect bash-fc-{id} files as "sh" (vim-patch:9.0.1644)
| * | | fix(filetype): correctly detect bash-fc-{id} files as "sh"smjonas2023-06-23
| | | |
* | | | fix(lsp): error in reset_timer on second detach #24117Chinmay Dalal2023-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: On running `zig fmt` manually, the on_lines callback and the server both detach (for some reason), and both of them call `clear()`. This fixes it, otherwise the second one to detach has an error in `reset_timer` since the bufstate doesn't exist Solution: * exit early in clear if `bufstates[bufnr]` is nil * set bufstatte.enabled to true on reload instead of making bufstate nil
* | | | build(luarc.json): disable luadoc-miss-see-name #24108Raphael2023-06-23
| | | |
* | | | fix(lsp): reapplying already-applied hints #24114Chinmay Dalal2023-06-23
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Problem: The decoration provider clears the whole buffer then redraws all the hints every time the window was redrawn. This may lead to an infinite loop. Solution: Store the last applied version for a line and only clear and redraw the line if the buffer version has changed.
* | | feat(lsp): opt-in to dynamicRegistration for inlay hints (#24102)Mathias Fußenegger2023-06-22
| | | | | | | | | | | | | | | Since https://github.com/neovim/neovim/pull/23681 there is dynamic registration support. We should use that for new features unless there is a good reason to turn it off.
* | | vim-patch:9.0.1645: zserio files are not recognized (#24120)Christian Clason2023-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: zserio files are not recognized. Solution: Add a pattern for zserio files. (Dominique Pellé, closes vim/vim#12544) https://github.com/vim/vim/commit/2b994da57a0ac6ec0ec09fe3783f48ecd2bce610 Co-authored-by: =?UTF-8?q?Dominique=20Pell=C3=A9?= <dominique.pelle@gmail.com>
* | | feat(extmarks): support hl_mode "combine" for inline virt_text (#24099)zeertzjq2023-06-22
| | |
* | | feat(lsp): soft deprecate vim.lsp.for_each_buffer_client (#24104)Mathias Fußenegger2023-06-22
| | | | | | | | | | | | | | | | | | | | | There is no need for two ways to access all clients of a buffer. This doesn't add a `vim.deprecate` call yet, as the function is probably used a lot, but removes it from the documentation and annotates it with `@deprecated`
* | | fix(messages): use "Vimscript" instead of "VimL" #24111Justin M. Keyes2023-06-22
| | | | | | | | | | | | followup to #24109 fix #16150
* | | test: spellcheck :help (vimdoc) files #24109Justin M. Keyes2023-06-22
| | | | | | | | | | | | | | | | | | | | | Enforce consistent terminology (defined in `gen_help_html.lua:spell_dict`) for common misspellings. This does not spellcheck English in general (perhaps a future TODO, though it may be noisy).
* | | Merge #24087 from justinmk/docJustin M. Keyes2023-06-22
|\ \ \ | | | | | | | | docs: lsp, fix errors, gen_help_html features
| * | | fix(docs): vimdoc syntax errorsJustin M. Keyes2023-06-22
| | | | | | | | | | | | | | | | | | | | | | | | Since https://github.com/neovim/tree-sitter-vimdoc/pull/97 the many cases of *.foo cause parser errors. But even before that, these were erroneously highlighted as (argument), so fixing them is good.