aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* feat(treesitter): expand the APILewis Russell2023-02-26
|
* fix(lsp): fix some type annotations (#22397)Mathias Fußenegger2023-02-25
|
* Revert "feat(lsp): implement workspace/didChangeWatchedFiles (#21293)"Mathias Fussenegger2023-02-25
| | | | | | This reverts commit 5732aa706c639b3d775573d91d1139f24624629c. Causes editor to freeze in projects with many watcher registrations
* feat(lsp): implement workspace/didChangeWatchedFiles (#21293)Jon Huhn2023-02-25
|
* vim-patch:9.0.1351: Dhall files are not recognized (#22393)Christian Clason2023-02-24
| | | | | | | | Problem: Dhall files are not recognized. Solution: Add patterns for Dhall files. (Amaan Qureshi, closes vim/vim#12052) https://github.com/vim/vim/commit/def5521752abefe12db8cc3111a3b205ad1ac929 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* vim-patch:9.0.1350: CPON files are not recognized (#22392)Christian Clason2023-02-24
| | | | | | | | Problem: CPON files are not recognized. Solution: Add patterns for CPON files. (Amaan Qureshi, closes vim/vim#12053) https://github.com/vim/vim/commit/c2254764bcada43eea894eb5852a26d5ac5ca8b0 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* refactor(lsp): remove deprecated code (#22389)Raphael2023-02-24
|
* feat(treesitter)!: remove silent option from language.add()Lewis Russell2023-02-24
| | | Simply use `pcall` if you want to silence an error.
* vim-patch:8.2.2449: Vim9: flatten() always changes the list typezeertzjq2023-02-24
| | | | | | | | | Problem: Vim9: flatten() always changes the list type. Solution: Disallow using flatten() and add flattennew(). https://github.com/vim/vim/commit/3b690069730805a147d45d92eaca4dc838272d1d Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1348: Un-grammar files are not recognized (#22383)Amaan Qureshi2023-02-23
| | | | | | Problem: Un-grammar files are not recognized. Solution: Add patterns for Un-grammar files. (Amaan Qureshi, closes vim/vim#12034) https://github.com/vim/vim/commit/44e08c1cf83f5a50f8b21613551304a6651c1161
* fix(treesitter): fixup language invalidation (#22381)Lewis Russell2023-02-23
|
* feat(treesitter): upstream foldexpr from nvim-treesitterLewis Russell2023-02-23
|
* vim-patch:9.0.1346: Starlark files are not recognized (#22380)Christian Clason2023-02-23
| | | | | | | | Problem: Starlark files are not recognized. Solution: Add patterns for Starlark files. (Amaan Qureshi, closes vim/vim#12049) https://github.com/vim/vim/commit/ca06b30073de22dc120b532e90fbee2a10ef9772 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* perf(treesitter): smarter languagetree invalidationLewis Russell2023-02-23
| | | | | | | | | | | | | | Problem: Treesitter injections are slow because all injected trees are invalidated on every change. Solution: Implement smarter invalidation to avoid reparsing injected regions. - In on_bytes, try and update self._regions as best we can. This PR just offsets any regions after the change. - Add valid flags for each region in self._regions. - Call on_bytes recursively for all children. - We still need to run the query every time for the top level tree. I don't know how to avoid this. However, if the new injection ranges don't change, then we re-use the old trees and avoid reparsing children. This should result in roughly a 2-3x reduction in tree parsing when the comment injections are enabled.
* refactor(lsp): remove workaround for missing bit module (#22373)Mathias Fußenegger2023-02-23
|
* docs: fix more treesitter parsing errorsChristian Clason2023-02-23
|
* test(help): drop treesitter parse error to 0Christian Clason2023-02-23
| | | | | All parser errors have been fixed; make sure we don't introduce new ones.
* docs(treesitter): fix parse errorsChristian Clason2023-02-23
|
* feat(lua): make sure require'bit' always works, even with PUC lua 5.1bfredl2023-02-22
|
* Merge #21428 docs: naming conventions, guidelinesJustin M. Keyes2023-02-22
|\
| * docs: naming conventions, guidelinesJustin M. Keyes2023-02-22
| | | | | | | | close #21063
| * docs: mention getmousepos() for click execute function labelLuuk van Baal2023-02-22
| | | | | | | | | | close #18741 close #11312
| * docs: vim_diff.txtJustin M. Keyes2023-02-22
| |
* | refactor(treesitter): Add vim.treesitter.get_node() (#22360)Gregory Anders2023-02-22
|/ | | | | | | | | | | | This function replaces both vim.treesitter.get_node_at_pos() and vim.treesitter.get_node_at_cursor(). These two functions are similar enough that they don't need separate interfaces. Even worse, get_node_at_pos() returns a TSNode while get_node_at_cursor() returns a string, so the two functions behave slightly differently. vim.treesitter.get_node() combines these two into a more streamlined interface. With no arguments, it returns the node under the cursor in the current buffer. Optionally, it can accept a buffer number or a position to get the node at a given position in a given buffer.
* vim-patch:9.0.1337: yuck files are not recognized (#22358)Christian Clason2023-02-22
| | | | | | | | | Problem: Yuck files are not recognized. Solution: Add a filetype pattern for yuck files. (Amaan Qureshi, closes vim/vim#12033) https://github.com/vim/vim/commit/cfce5cf542db20c7beba5b4211c0ae3305a64a43 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* feat(treesitter): add filetype -> lang APILewis Russell2023-02-21
| | | | | | | | | | | | | | | | | | Problem: vim.treesitter does not know how to map a specific filetype to a parser. This creates problems since in a few places (including in vim.treesitter itself), the filetype is incorrectly used in place of lang. Solution: Add an API to enable this: - Add vim.treesitter.language.add() as a replacement for vim.treesitter.language.require_language(). - Optional arguments are now passed via an opts table. - Also takes a filetype (or list of filetypes) so we can keep track of what filetypes are associated with which langs. - Deprecated vim.treesitter.language.require_language(). - Add vim.treesitter.language.get_lang() which returns the associated lang for a given filetype. - Add vim.treesitter.language.register() to associate filetypes to a lang without loading the parser.
* docs: fix typos (#22353)zeertzjq2023-02-22
|
* vim-patch:partial:938ae280c79b (#22356)zeertzjq2023-02-21
| | | | | | | | | | | | Update runtime files. https://github.com/vim/vim/commit/938ae280c79b8cdb0fca60336ec4c090ecd8bb5a Partially skip autocmd.txt: needs patch 8.2.5011. Partially skip builtin.txt: needs patch 9.0.0411. Partially skip eval.txt: needs patch 8.2.3783. Cherry-pick :map-meta-keys from patch 9.0.1276. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(man): add type annotationsLewis Russell2023-02-21
|
* fix(lsp): wrong format of bufnr and client order in error message (#22336)Jason Hansen2023-02-21
|
* refactor(main.c): remove unreachable use_builtin_ui conditions (#22338)zeertzjq2023-02-20
| | | When use_builtin_ui is true, Nvim will exit before line 385 is reached.
* docs: fix typos (#21961)dundargoc2023-02-20
| | | Co-authored-by: Ben Morgan <cassava@iexu.de>
* vim-patch:9.0.1319: PRQL files are not recognized (#22319)Christian Clason2023-02-19
| | | | | | | | | Problem: PRQL files are not recognized. Solution: Add a filetype pattern for PRQL files. (Matthias Queitsch, closes vim/vim#12018) https://github.com/vim/vim/commit/9de960ace0f017fcfeaf64a2f6492f0f88b11fdb Co-authored-by: Matthias Queitsch <matthias.queitsch@mailbox.org>
* fix(lsp): check if the buffer is a directory before w! it (#22289)Eduard Baturin2023-02-18
|
* docs: remove mentions of 'balloonexpr' #22049Jonas Strittmatter2023-02-16
| | | 'balloonexpr' option was removed in Nvim.
* feat: $NVIM_APPNAME #22128Ghjuvan Lacambre2023-02-16
| | | | | | | | | | | | | | | | | | | | This commit implements the ability to control all of the XDG paths Neovim should use. This is done by setting an environment variable named NVIM_APPNAME. For example, setting $NVIM_APPNAME makes Neovim look for its configuration directory in $XDG_CONFIG_HOME/$NVIM_APPNAME instead of $XDG_CONFIG_HOME/nvim. If NVIM_APPNAME is not set or is an empty string, "nvim" will be used as default. The usecase for this feature is to enable an easy way to switch from configuration to configuration. One might argue that the various $XDG environment variables can already be used for this usecase. However, setting $XDG environment variables also affects tools spawned by Neovim. For example, while setting $XDG_CONFIG_HOME will enable Neovim to use a different configuration directory, it will also prevent Git from finding its "default" configuration. Closes https://github.com/neovim/neovim/issues/21691
* dist: use valid application id in nvim.appdata.xml #22046blt__2023-02-15
| | | | | | | | | | | | | | According to [AppStream spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic), the <id> element should contain a reverse-DNS scheme: {tld}.{vendor}.{product} Since the flathub requires that, the flatpak build replaces `<id>nvim</id>` with `<id>io.neovim.nvim</id>`. That results in ID mismatch between flatpak version and version from distribution's repositories. Because of that, software stores are displaying two different neovims, instead of one neovim with options to download it either from flatpak or from distribution's repos. We can use the `<provides><id>nvim</id></provides>`, for everyone who was expecting the id to be `nvim`.
* fix(treesitter): make params optionalLewis Russell2023-02-15
|
* feat(treesitter)!: remove g:ts_highlight_lua (#22257)Christian Clason2023-02-15
| | | | | | | | | | | | | | | | This variable was only meant for easy testing during the development cycle for treesitter highlighting while Lua was the only parser useable for daily driving. Now that we have a good vimdoc parser, this approach simply doesn't scale and should be removed sooner rather than later. Instead of setting this variable, people for now should add the autocommand directly to their config: ```lua vim.api.nvim_create_autocmd('FileType', { pattern = 'lua', -- or { 'lua', 'help' } callback = function() vim.treesitter.start() end, }) ``` (or put `vim.treesitter.start()` in an `ftplugin`).
* Merge #22214 move init_default_autocmds to luaJustin M. Keyes2023-02-14
|\
| * refactor: move init_default_autocmds to luaglacambre2023-02-11
| | | | | | | | | | | | | | | | | | The original motivation for this change came from developping https://github.com/neovim/neovim/pull/22159, which will require adding more autocommand creation to Neovim's startup sequence. This change requires lightly editing a test that expected no autocommand to have been created from lua.
* | feat(filetype): fall back to file extension when matching from hashbang (#22140)Jonas Strittmatter2023-02-13
| | | | | | | | | | | | If nothing matched in match_from_hashbang, also check the file extension table. For a hashbang like '#!/bin/env foo', this will set the filetype to 'fooscript' assuming the filetype for the 'foo' extension is 'fooscript' in the extension table.
* | Merge pull request #22191 from lewis6991/feat/playground_impLewis Russell2023-02-13
|\ \ | | | | | | feat(treesitter): playground improvements
| * | fix(treesitter): don't trample parsers when filetype!=langLewis Russell2023-02-10
| | | | | | | | | | | | | | | This allows vim.treesitter.show_tree() to work on buffers where the filetype does not match the parser language name e.g, bash/sh.
| * | feat(treesitter): playground improvementsLewis Russell2023-02-10
| |/ | | | | | | | | | | - Render node ranges as virtual text - Set filettype=query. The virtual text is to avoid parsing errors. - Make sure highlights text is always in view.
* | fix(filetype): make vim.filetype.match() work with contents only (#22181)Jonas Strittmatter2023-02-11
| | | | | | Co-authored-by: Gregory Anders <greg@gpanders.com>
* | vim-patch:9.0.1300: 'statusline' only supports one "%=" item (#22218)zeertzjq2023-02-11
| | | | | | | | | | | | | | | | | | Problem: 'statusline' only supports one "%=" item. Solution: Add support for multiple "%=" items. (TJ DeVries, Yegappan Lakshmanan, closes vim/vim#11970, closes vim/vim#11965) https://github.com/vim/vim/commit/3ec78f973fdaec2cea8e036ed38037b2fe40670b Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | fix(rpc)!: preseve files when stdio channel is closed (#22137)zeertzjq2023-02-11
| | | | | | | | BREAKING CHANGE: Unsaved changes are now preserved rather than discarded when stdio channel is closed.
* | docs: reword news.txt to ensure a consistent style (#22215)Sizhe Zhao2023-02-11
|/
* Merge pull request #22186 from clason/maintainChristian Clason2023-02-09
|\ | | | | | | * docs(maintain): add note on updating `luvref.txt` * docs(luvref): update version info