aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
| * refactor(treesitter)!: remove deprecated show_tree funcnullchilly2023-03-11
| |
| * refactor(highlight)!: remove deprecated functionsnullchilly2023-03-11
| | | | | | | | vim.highlight.create/link
* | fix(treesitter): foldexpr (#22652)Lewis Russell2023-03-13
| | | | | | The ranges passed to foldinfo.remove_range were in the wrong order.
* | refactor!: rename vim.pretty_print => vim.printJustin M. Keyes2023-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The function name `vim.pretty_print`: 1. is verbose, which partially defeats its purpose as sugar 2. does not draw from existing precedent or any sort of convention (except external projects like penlight or python?), which reduces discoverability, and degrades signaling about best practices. Solution: - Rename to `vim.print`. - Change the behavior so that 1. strings are printed without quotes 2. each arg is printed on its own line 3. tables are indented with 2 instead of 4 spaces - Example: :lua ='a', 'b', 42, {a=3} a b 42 { a = 3 } Comparison of alternatives: - `vim.print`: - pro: consistent with Lua's `print()` - pro: aligns with potential `nvim_print` API function which will replace nvim_echo, nvim_notify, etc. - con: behaves differently than Lua's `print()`, slightly misleading? - `vim.echo`: - pro: `:echo` has similar "pretty print" behavior. - con: inconsistent with Lua idioms. - `vim.p`: - pro: very short, fits with `vim.o`, etc. - con: not as discoverable as "echo" - con: less opportunity for `local p = vim.p` because of potential shadowing.
* | fix(lsp): use line start/end for visual line selection (#22632)Mathias Fußenegger2023-03-12
| | | | | | Fixes https://github.com/neovim/neovim/issues/22629
* | Merge pull request #22613 from lewis6991/feat/tsqueryutilLewis Russell2023-03-11
|\ \
| * | refactor(treesitter): add Range type aliase for Range4|Range6Lewis Russell2023-03-11
| | |
| * | feat(treesitter)!: consolidate query util functionsLewis Russell2023-03-10
| | | | | | | | | | | | | | | | | | - And address more type errors. - Removed the `concat` option from `get_node_text` since it was applied inconsistently and made typing awkward.
* | | docs(lsp): more precise type annotations (#22621)Jaehwang Jung2023-03-11
| | |
* | | fix(lsp): send didClose on buffer rename (#22623)Mathias Fußenegger2023-03-11
| | | | | | | | | | | | | | | | | | | | | Subset of https://github.com/neovim/neovim/pull/22407 that was reverted in https://github.com/neovim/neovim/pull/22604 If a buffer is renamed sending `didClose` for the old buffer helps ensure the language server doesn't keep a stale document in memory.
* | | refactor(lsp): remove _resolve_capabilities_compat (#22628)Raphael2023-03-11
| |/ |/|
* | revert: "fix(lsp): use buffer scheme for files not stored on disk" (#22604)Mathias Fußenegger2023-03-11
| | | | | | | | | | | | | | | | | | | | | | Although using `buffer://` for unsaved file buffers fixes issues with language servers like eclipse.jdt.ls or ansible-language-server, it breaks completion and signature help for clangd. A regression is worse than a fix for something else, so this reverts commit 896d672736b32a8f4a4fa51844b44f266dcdcc6c. The spec change is also still in dicussion, see https://github.com/microsoft/language-server-protocol/pull/1679#discussion_r1130704886
* | feat!(treesitter): do not return changes from LanguageTree:parse() Lewis Russell2023-03-10
|/ | | | | | | | | Never return the changes an only notify them using the `on_changedtree` callback. It is not guaranteed for a plugin that it'll be the first one to call `tree:parse()` and thus get the changes. Closes #19915
* Merge pull request #22594 from lewis6991/perf/treefoldLewis Russell2023-03-10
|\
| * perf(treesitter): more efficient foldexprLewis Russell2023-03-10
| |
| * fix(treesitter): better lang handling of get_parser()Lewis Russell2023-03-10
| |
| * fix(treesitter): do not error on empty filetypeLewis Russell2023-03-10
| | | | | | | | Ignore instead
* | perf(lsp): better binary search mid calculation in semantic token (#22607)Null Chilly2023-03-10
|/ | | This commit replaces the usage of math.floor((lo + hi) / 2) with the faster and equivalent bit.rshift(lo + hi, 1) for calculating the midpoint in binary search.
* docs(lsp): type annotation for lsp.client (#22509)Jaehwang Jung2023-03-09
| | | | | | * Also fix newly found type mismatch. * Note that it generates new warnings about using @private client methods. A proper fix would be to revamp the lsp client documentation altogether.
* vim-patch:9.0.1393: Cairo files are not recognized (#22578)Amaan Qureshi2023-03-09
| | | | | | Problem: Cairo files are not recognized. Solution: Add a pattern for Cairo files. (Amaan Qureshi, closes vim/vim#12118) https://github.com/vim/vim/commit/ff226d49fed2d8fc668084324c7b0f00117c5e74
* refactor(treesitter): use byte ranges from treesitter (#22589)Lewis Russell2023-03-09
|
* feat(lsp): overwrite omnifunc/tagfunc set by ftplugin #22267Michal Liszcz2023-03-09
| | | | | | | | | | | | | | | | | Problem: Some built-in ftplugins set omnifunc/tagfunc/formatexpr which causes lsp.lua:set_defaults() to skip setup of defaults for those filetypes. For example the C++ ftplugin has: omnifunc=ccomplete#Complete Last set from /usr/share/nvim/runtime/ftplugin/c.vim line 30 so the changes done in #95c65a6b221fe6e1cf91e8322e7d7571dc511a71 will always be skipped for C++ files. Solution: Overwrite omnifunc/tagfunc/formatexpr options that were set by stock ftplugin. Fixes #21001
* fix(treesitter): is_in_node_range (#22582)Lewis Russell2023-03-08
| | | | TS ranges are end column exclusive, so fix is_in_node_range to account for that.
* vim-patch:9.0.1395: Odin files are not recognized (#22580)Amaan Qureshi2023-03-09
| | | | | | Problem: Odin files are not recognized. Solution: Add a pattern for Odin files. (Amaan Qureshi, closes vim/vim#12122) https://github.com/vim/vim/commit/638388b8ef37684e36a7f5d9286bab2d31c28f36
* vim-patch:9.0.1394: Unx Tal files are not recognized (#22579)Amaan Qureshi2023-03-09
| | | | | | Problem: Unx Tal files are not recognized. Solution: Add a pattern for Unx Tal files. (Amaan Qureshi, closes vim/vim#12117) https://github.com/vim/vim/commit/cde1f8714ed2c046aa770c46229e781380122bd7
* Revert "refactor(treesitter): delegate region calculation to treesitter" ↵Lewis Russell2023-03-08
| | | | | | | (#22575) Revert "refactor(treesitter): delegate region calculation to treesitter (#22553)" This reverts commit 276b647fdba07bf1762d8dd371c4b655b8a418df.
* refactor(treesitter): delegate region calculation to treesitter (#22553)Lewis Russell2023-03-08
|
* feat(treesitter): use upstream format for injection queriesLewis Russell2023-03-08
|
* fix(lsp): change LspTokenUpdate to use buffer instead of pattern (#22559)jdrouhard2023-03-07
|
* fix(man.lua): tests, namingJustin M. Keyes2023-03-07
|
* feat(man.lua): support spaces in manpage namesEriks Muhins2023-03-07
| | | | | | | | | | Problem: :Man command errors if given more than two arguments. Thus, it is impossible to open man pages that contain spaces in their names. Solution: Adjust :Man so that it tries variants with spaces and underscores, and uses the first found.
* docs(lsp): change type annotations from number → integer (#22510)Jaehwang Jung2023-03-07
|
* Merge pull request #13834 from bfredl/omniluabfredl2023-03-07
|\ | | | | omnifunc for builtin lua
| * feat(lua): omnifunc for builting lua interpreterBjörn Linse2023-03-06
| | | | | | | | | | | | | | also make implicit submodules "uri" and "_inspector" work with completion this is needed for `:lua=vim.uri_<tab>` wildmenu completion to work even before uri or _inspector functions are used.
* | feat(lsp)!: add rule-based sem token highlighting (#22022)swarn2023-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | feat(lsp)!: change semantic token highlighting Change the default highlights used, and add more highlights per token. Add an LspTokenUpdate event and a highlight_token function. :Inspect now shows any highlights applied by token highlighting rules, default or user-defined. BREAKING CHANGE: change the default highlight groups used by semantic token highlighting.
* | fix(vim.version): incorrect version.cmp()Justin M. Keyes2023-03-06
| | | | | | | | | | | | | | | | | | Problem: If major<major but minor>minor, cmp_version_core returns 1 Solution: - Fix logic in cmp_version_core - Delete most eq()/gt()/lt() tests, they are redundant.
* | refactor(vim.version): cleanupJustin M. Keyes2023-03-06
| | | | | | | | | | | | | | - version.cmp(): assert valid version - add test for loading vim.version (the other tests use shared.lua in the test runner) - reduce test scopes, reword test descriptions
* | feat(lua): add semver apiKelly Lin2023-03-06
| |
* | refactor(treesitter): simplify some range functionsLewis Russell2023-03-06
| |
* | docs: module-level docstrings (@defgroup) #22498Justin M. Keyes2023-03-05
|/ | | | | | | | | | | | Problem: gen_vimdoc.py / lua2dox.lua does not support @defgroup or \defgroup except for "api-foo" modules. Solution: Modify `gen_vimdoc.py` to look for section names based on `helptag_fmt`. TODO: - Support @module ? https://github.com/LuaLS/lua-language-server/wiki/Annotations#module
* fix(lsp): don't monitor files if workspace_folders is nil (#22531)Mathias Fußenegger2023-03-05
| | | | | | | | Fixes: Error SERVER_REQUEST_HANDLER_ERROR: "...di/dev/neovim/neovim/runtime/lua/vim/lsp/_watchfiles.lua :200: bad argument #1 to 'ipairs' (table expected, got nil)" Language servers can be started without root_dir or workspace_folders.
* feat(lsp): implement workspace/didChangeWatchedFiles (#22405)Jon Huhn2023-03-05
|
* docs(highlight): fix type annotations (#22272)Jaehwang Jung2023-03-04
|
* docs(lua): number → integer (#22517)Jaehwang Jung2023-03-04
|
* docs(diagnostic): number → integer (#22512)Jaehwang Jung2023-03-04
|
* docs(editorconfig): number → integer (#22514)Jaehwang Jung2023-03-04
|
* docs(inspect): number → integer (#22511)Jaehwang Jung2023-03-04
|
* docs(uri): number → integer (#22515)Jaehwang Jung2023-03-04
|
* docs(filetype): number → integer (#22516)Jaehwang Jung2023-03-04
|
* docs(treesitter): number → integer (#22513)Jaehwang Jung2023-03-04
|