aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
* feat(fs): add vim.fs.parents()Gregory Anders2022-05-31
| | | | | vim.fs.parents() is a Lua iterator that returns the next parent directory of the given file or directory on each iteration.
* refactor(checkhealth)!: rename to vim.health, move logic to Lua #18720Javier Lopez2022-05-31
| | | | | | | | | - Complete function: There was lots of unnecessary C code for the complete function, therefore moving it to Lua and use all the plumbing we have in place to retrieve the results. - Moving the module: It's important we keep nvim lua modules name spaced, avoids conflict with plugins, luarocks, etc.
* Merge pull request #18219 from kessejones/filetype-luaGregory Anders2022-05-31
|\ | | | | feat(filetype): add more filetype patterns to Lua
| * feat(filetype): convert more patterns to filetype.luaChristian Clason2022-05-30
| |
* | fix(lsp): include cancellable in progress message table (#18809)Chris Kipp2022-05-31
|/ | | | | | | | Currently the `title`, `message` and `percentage` is stored for a progress, but there is also an optional `cancellable` that comes in with both the `WorkDoneProgressBegin` and also `WorkDoneProgressReport`. This change also stores that value so that a plugin can access it when they do a lookup in `client.messages`.
* fix(treesitter): offset directive associates range with capture (#18276)Lewis Russell2022-05-28
| | | | | | | | | Previously the `offset!` directive populated the metadata in such a way that the new range could be attributed to a specific capture. #14046 made it so the directive simply stored just the new range in the metadata and information about what capture the range is based from is lost. This change reverts that whilst also correcting the docs.
* feat(lsp): turn rename filter into a predicate (#18745)Mathias Fußenegger2022-05-26
| | | Same as https://github.com/neovim/neovim/pull/18458 but for rename
* vim-patch:8.2.5015: Hoon and Moonscript files are not recognized (#18747)dundargoc2022-05-25
| | | | | Problem: Hoon and Moonscript files are not recognized. Solution: Add filetype patterns. (Goc Dundar, closes vim/vim#10478) https://github.com/vim/vim/commit/bf82df0dd48a26404b92a596498b6892c9572c53
* refactor(lsp): remove redundant client cleanup (#18744)Gregory Anders2022-05-25
| | | | | | The client state is cleaned up both in client.stop() as well as in the client.on_exit() handler. Technically, the client has not actually stopped until the on_exit handler is called, so we should just do this cleanup there and remove it from client.stop().
* feat(lsp)!: turn format filter into predicate (#18458)Mathias Fußenegger2022-05-25
| | | | | This makes the common use case easier. If one really needs access to all clients, they can create a filter function which manually calls `get_active_clients`.
* fix(lsp): respect global syntax setting in open float preview (#15225)Elton Leander Pinto2022-05-25
|
* fix(filetype): correct vim.fn.did_filetype() handling (#18725)notomo2022-05-23
|
* fix(lsp): do not detach LSP servers on Windows #18703Gregory Anders2022-05-22
| | | | | | | Detaching the process seems to have unintended side effects on Windows, so only do it by default on non-Windows platforms. Ref: https://github.com/neovim/nvim-lspconfig/issues/1907 Closes https://github.com/neovim/nvim-lspconfig/pull/1913
* refactor(runtime): convert the remaining dist#ft functions to lua (#18623)Jonas Strittmatter2022-05-22
|
* refactor: add warnings for deprecated functions (#18662)dundargoc2022-05-21
|
* fix(lsp): only send diagnostics from current buffer in code_action() (#18639)Fredrik Ekre2022-05-20
| | | | Fix vim.lsp.buf.(range_)code_action() to only send diagnostics belonging to the current buffer and not to other files in the workspace.
* Merge pull request #18502 from drybalka/fix-languagetree-contains-descriptionChristian Clason2022-05-19
|\ | | | | treesitter: small improvements of languagetree.lua
| * refactor: simple logic in tree_contains()Denys2022-05-18
| |
| * docs: correct description of LanguageTree:contains()Denys2022-05-18
| |
* | feat(lsp): option to reuse_win for jump actions (#18577)Lewis Russell2022-05-18
| |
* | feat(lsp): add filter to vim.lsp.get_active_clients()Gregory Anders2022-05-18
| | | | | | | | | | Allow get_active_clients() to filter on client name, id, or buffer. This (soft) deprecates lsp.buf_get_clients().
* | feat(lsp): add LspAttach and LspDetach autocommandsGregory Anders2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current approach of using `on_attach` callbacks for configuring buffers for LSP is suboptimal: 1. It does not use the standard Nvim interface for driving and hooking into events (i.e. autocommands) 2. There is no way for "third parties" (e.g. plugins) to hook into the event. This means that *all* buffer configuration must go into the user-supplied on_attach callback. This also makes it impossible for these configurations to be modular, since it all must happen in the same place. 3. There is currently no way to do something when a client detaches from a buffer (there is no `on_detach` callback). The solution is to use the traditional method of event handling in Nvim: autocommands. When a LSP client is attached to a buffer, fire a `LspAttach`. Likewise, when a client detaches from a buffer fire a `LspDetach` event. This enables plugins to easily add LSP-specific configuration to buffers as well as enabling users to make their own configurations more modular (e.g. by creating multiple LspAttach autocommands that each do something unique).
* | fix(health): handle non-existent log file #18610Noval Maulana2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: vim.lsp: require("vim.lsp.health").check() ======================================================================== - ERROR: Failed to run healthcheck for "vim.lsp" plugin. Exception: function health#check, line 20 Vim(eval):E5108: Error executing lua ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: attempt to index a nil value stack traceback: ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: in function 'check' [string "luaeval()"]:1: in main chunk Solution: Check for nil. fix #18602
* | refactor(runtime): convert more dist#ft functions to lua (#18430)Jonas Strittmatter2022-05-17
| |
* | Merge pull request #18554 from kevinhwang91/perf-timerstartbfredl2022-05-17
|\ \ | | | | | | perf(_editor): no need to stop inside vim.defer_fn
| * | perf(_editor): no need to stop inside vim.defer_fnkevinhwang912022-05-13
| | | | | | | | | | | | | | | | | | uv_run: 1. remove timer handle from heap 2. will start again if repeat is not 0
* | | feat(lua): add traceback to vim.deprecate #18575ii142022-05-15
|/ /
* | fix(lsp): perform client side filtering of code actions (#18392)Fredrik Ekre2022-05-12
| | | | | | | | | | | | | | | | Implement filtering of actions based on the kind when passing the 'only' parameter to code_action(). Action kinds are hierachical with a '.' as the separator, and the filter thus allows, for example, both 'quickfix' and 'quickfix.foo' when requestiong only 'quickfix'. Fix https://github.com/neovim/neovim/pull/18221#issuecomment-1110179121
* | feat(defaults): session data in $XDG_STATE_HOME #15583Ivan2022-05-12
| | | | | | | | | | | | | | | | | | | | | | | | See: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/4f2884e16db35f2962d9b64312917c81be5cb54b - Move session persistent data to $XDG_STATE_HOME Change 'directory', 'backupdir', 'undodir', 'viewdir' and 'shadafile' default location to $XDG_STATE_HOME/nvim. - Move logs to $XDG_STATE_HOME, too. - Add stdpath('log') support. Fixes: #14805
* | feat(lua): vim.cmd() with kwargs acts like nvim_cmd() #18523Famiu Haque2022-05-12
| |
* | docs(api): improve shared lua functions docs (#17933)adrian52022-05-11
| |
* | Merge pull request #18487 from clason/styluaChristian Clason2022-05-11
|\ \ | | | | | | CI: format and lint runtime with Stylua
| * | chore: format runtime with styluaChristian Clason2022-05-09
| |/
* / docs(lsp): fix description of `only` in vim.lsp.buf.code_action() (#18492)Fredrik Ekre2022-05-09
|/
* fix(lsp): detach spawned LSP server processes (#18477)Gregory Anders2022-05-08
| | | | | | | | LSP servers should be daemonized (detached) so that they run in a separate process group from Neovim's. Among other things, this ensures the process does not inherit Neovim's TTY (#18475). Make this configurable so that clients can explicitly opt-out of detaching from Nvim.
* docs: change wrap_at type to number (#18456)Noval Maulana2022-05-07
|
* fix(lsp): skip clients without rename capability (#18449)Mathias Fußenegger2022-05-06
| | | | | Follow up to https://github.com/neovim/neovim/pull/18441 This way rename should "just work" in most cases without having to manually filter the client
* fix(lsp): fix rename capability checks and multi client support (#18441)Mathias Fußenegger2022-05-05
| | | | | | | | Adds filter and id options to filter the client to use for rename. Similar to the recently added `format` function. rename will use all matching clients one after another and can handle a mix of prepareRename/rename support. Also ensures the right `offset_encoding` is used for the `make_position_params` calls
* fix(lsp): make sure to always reset active codelens refreshes (#18331)William Boman2022-05-05
| | | | | | | | | | | This fixes issues where subsequent calls to vim.lsp.codelens.refresh() would have no effect due to the buffer not getting cleared from the active_refresh table. Examples of how such scenarios would occur are: - A textDocument/codeLens result yielded an error. - The 'textDocument/codeLens' handler was overriden in such a way that it no longer called vim.lsp.codelens.on_codelens().
* refactor(lua): replace hard-coded gsub with vim.pesc() (#18407)James McCoy2022-05-04
|
* fix(filetype): fixup scd filetype detection (#18403)Gregory Anders2022-05-03
|
* refactor(runtime): convert dist#ft functions to lua (#18247)Jonas Strittmatter2022-05-03
| | | Co-authored-by: Christian Clason <christian.clason@uni-due.de>
* feat(lsp): add logging level "OFF" (#18379)ii142022-05-03
|
* feat(lua): vim.deprecate() #18320dundargoc2022-05-03
| | | | | | This is primarily intended to act as documentation for the developer so they know exactly when and what to remove. This will help prevent the situation of deprecated code lingering for far too long as developers don't have to worry if a function is safe to remove.
* fix(lsp): add missing bufnr argument (#18382)Jose Alvarez2022-05-03
|
* vim-patch:8.2.4859: wget2 files are not recognized (#18385)Christian Clason2022-05-03
| | | | | Problem: wget2 files are not recognized. Solution: Add patterns to recognize wget2. (Doug Kearns) https://github.com/vim/vim/commit/3a974a89331182139e12386275f052a50c247ecb
* Merge pull request #18353 from jamessan/ft-match-fixJames McCoy2022-05-02
|\
| * fix(filetype.lua): escape expansion of ~ when used as a patternJames McCoy2022-05-02
| |
* | vim-patch:8.2.4855: robot files are not recognized (#18364)Christian Clason2022-05-02
|/ | | | | Problem: Robot files are not recognized. Solution: Add patterns for robot files. (Zoe Roux, closes vim/vim#10339) https://github.com/vim/vim/commit/2096a5f128029b1156a035a27c988995db240cea
* fix(shared): avoid indexing unindexable values in vim.tbl_get() (#18337)William Boman2022-05-01
|