summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua
AgeCommit message (Collapse)AuthorFiles
2023-03-09docs(lsp): type annotation for lsp.client (#22509)Jaehwang Jung1
* 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.
2023-03-09vim-patch:9.0.1393: Cairo files are not recognized (#22578)Amaan Qureshi1
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
2023-03-09refactor(treesitter): use byte ranges from treesitter (#22589)Lewis Russell4
2023-03-09feat(lsp): overwrite omnifunc/tagfunc set by ftplugin #22267Michal Liszcz1
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
2023-03-08fix(treesitter): is_in_node_range (#22582)Lewis Russell1
TS ranges are end column exclusive, so fix is_in_node_range to account for that.
2023-03-09vim-patch:9.0.1395: Odin files are not recognized (#22580)Amaan Qureshi1
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
2023-03-09vim-patch:9.0.1394: Unx Tal files are not recognized (#22579)Amaan Qureshi1
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
2023-03-08Revert "refactor(treesitter): delegate region calculation to treesitter" ↵Lewis Russell4
(#22575) Revert "refactor(treesitter): delegate region calculation to treesitter (#22553)" This reverts commit 276b647fdba07bf1762d8dd371c4b655b8a418df.
2023-03-08refactor(treesitter): delegate region calculation to treesitter (#22553)Lewis Russell4
2023-03-08feat(treesitter): use upstream format for injection queriesLewis Russell3
2023-03-07fix(lsp): change LspTokenUpdate to use buffer instead of pattern (#22559)jdrouhard1
2023-03-07fix(man.lua): tests, namingJustin M. Keyes1
2023-03-07feat(man.lua): support spaces in manpage namesEriks Muhins1
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.
2023-03-07docs(lsp): change type annotations from number → integer (#22510)Jaehwang Jung9
2023-03-07Merge pull request #13834 from bfredl/omniluabfredl1
omnifunc for builtin lua
2023-03-06feat(lua): omnifunc for builting lua interpreterBjörn Linse1
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.
2023-03-06feat(lsp)!: add rule-based sem token highlighting (#22022)swarn2
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.
2023-03-06fix(vim.version): incorrect version.cmp()Justin M. Keyes1
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.
2023-03-06refactor(vim.version): cleanupJustin M. Keyes2
- 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
2023-03-06feat(lua): add semver apiKelly Lin2
2023-03-06refactor(treesitter): simplify some range functionsLewis Russell2
2023-03-05docs: module-level docstrings (@defgroup) #22498Justin M. Keyes1
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
2023-03-05fix(lsp): don't monitor files if workspace_folders is nil (#22531)Mathias Fußenegger1
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.
2023-03-05feat(lsp): implement workspace/didChangeWatchedFiles (#22405)Jon Huhn5
2023-03-04docs(highlight): fix type annotations (#22272)Jaehwang Jung1
2023-03-04docs(lua): number → integer (#22517)Jaehwang Jung2
2023-03-04docs(diagnostic): number → integer (#22512)Jaehwang Jung1
2023-03-04docs(editorconfig): number → integer (#22514)Jaehwang Jung1
2023-03-04docs(inspect): number → integer (#22511)Jaehwang Jung1
2023-03-04docs(uri): number → integer (#22515)Jaehwang Jung1
2023-03-04docs(filetype): number → integer (#22516)Jaehwang Jung1
2023-03-04docs(treesitter): number → integer (#22513)Jaehwang Jung2
2023-03-03fix(treesitter): break early from loop when match is found (#22499)Gregory Anders1
Fixup to #22484.
2023-03-03docs: fix vim.treesitter tagsJustin M. Keyes3
Problem: Help tags like vim.treesitter.language.add() are confusing because `vim.treesitter.language` is (thankfully) not a user-facing module. Solution: Ignore the "fstem" when generating "treesitter" tags.
2023-03-03Merge pull request #22484 from gpanders/inspect-tree-fix-cursorChristian Clason2
fix(treesitter): maintain cursor position when toggling anonymous nodes
2023-03-03fix(treesitter): typos in _range.luaJaehwang Jung1
fix(treesitter): typos _range.lua
2023-03-03fix(treesitter): disallow empty filetypesLewis Russell2
Fixes #22473
2023-03-02vim-patch:9.0.1368: Bass files are not recognized (#22485)Amaan Qureshi1
Problem: Bass files are not recognized. Solution: Add patterns for Bass files. (Amaan Qureshi, closes vim/vim#12088) https://github.com/vim/vim/commit/4ed914b18a47192f79f342bea5e8f59e120d5260
2023-03-02refactor(treesitter): use string.format to create linesGregory Anders1
2023-03-02fix(treesitter): maintain cursor position when toggling anonymous nodesGregory Anders1
When toggling anonymous nodes in the :InspectTree window, keep the cursor fixed relative to the node within the tree. This prevents the cursor from jumping.
2023-03-02feat(treesitter): add :InspectTree command (#22477)Christian Clason1
2023-03-02refactor: rename show_tree => inspect_tree #22474Justin M. Keyes1
Problem: "show" is potentially a new verb that we can avoid (there is already "open" and "echo"). Even if we can't avoid it, the behavior of `show_tree` fits well in the "inspect" family of functions: a way for users to introspect/reflect on the state of Nvim. Existing "inspect" functions: vim.inspect() vim.inspect_pos() vim.treesitter.inspect_language() nvim__inspect_cell Solution: Rename `show_tree` to `inspect_tree`.
2023-03-01feat(vim.fs): pass path to find() predicate, lazy evaluate #22378Mike1
Problem: No easy way to find files under certain directories (ex: grab all files under `test/`) or exclude the content of certain paths (ex. `build/`, `.git/`) Solution: Pass the full `path` as an arg to the predicate.
2023-03-01fix(lsp): only fire LspDetach for attached buffers (#22468)Gregory Anders1
If the LSP server fails to start then the client never initializes and thus never calls its on_attach function and an LspAttach event is never fired. However, the on_exit function still fires a LspDetach event, so user autocommands that attempt to "clean up" in LspDetach may run into problems if they assume that the buffer was already attached. The solution is to only fire an LspDetach event if the buffer was already attached in the first place.
2023-03-01fix(lsp): use buffer scheme for files not stored on disk (#22407)Mathias Fußenegger2
Sending `didOpen` with a `file` scheme causes problems with some language servers because they expect the file to exist on disk. See https://github.com/microsoft/language-server-protocol/pull/1679
2023-03-01fix(lsp): callHierarchy methods also require the callHierarchyProvider (#22427)Jens Claes1
2023-02-28Merge pull request #22452 from folke/masterbfredl1
fix(inspect): always resolve full treesitter lang hl groups
2023-02-28perf(lsp): only redraw the windows containing LSP tokensbfredl1
redraw! redraws the entire screen instead of just the windows with the buffer which were actually changed. I considered trying to calculating the range for the delta but it looks tricky. Could a follow-up.
2023-02-28fix(inspect): alwasy resolve full treesitter lang hl groupsFolke Lemaitre1
2023-02-27docs(lsp): update cmd_env description (#22438)Mike1