aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* feat(lsp): sort codelens if multiple item per line (#18951)rhcher2022-06-13
|
* feat(filetype): remove side effects from vim.filetype.match (#18894)Gregory Anders2022-06-09
| | | | | | | | Many filetypes from filetype.vim set buffer-local variables, meaning vim.filetype.match cannot be used without side effects. Instead of setting these buffer-local variables in the filetype detection functions themselves, have vim.filetype.match return an optional function value that, when called, sets these variables. This allows vim.filetype.match to work without side effects.
* fix(diagnostic): check for negative column value (#18868)mohsen2022-06-08
|
* refactor(runtime): port remaining patterns from filetype.vim to filetype.lua ↵Jonas Strittmatter2022-06-06
| | | | (#18814)
* fix(lsp): fix multi client handling in code action (#18869)Mathias Fußenegger2022-06-05
| | | Fixes https://github.com/neovim/neovim/issues/18860
* perf(tests): don't invoke nvim_get_all_options_info until neededbfredl2022-06-05
| | | | | This call alone is responible of 40 000 000 out of 80 000 000 individual alloc/free calls in the test suite.
* fix(lsp): set buflisted before switching to buffer (#18854)zeertzjq2022-06-04
|
* vim-patch:8.2.5054: no good filetype for conf files similar to dosini (#18851)Christian Clason2022-06-04
| | | | | Problem: No good filetype for conf files similar to dosini. Solution: Add the confini filetype. (closes vim/vim#10510) https://github.com/vim/vim/commit/635f48010dcf6d97f3a65b4785e1726ad386d3eb
* docs: fix typos (#18269)dundargoc2022-06-04
| | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Dan Sully <dan+github@sully.org> Co-authored-by: saher <msaher.shair@gmail.com> Co-authored-by: Stephan Seitz <stephan.seitz@fau.de> Co-authored-by: Benedikt Müller <d12bb@posteo.de> Co-authored-by: Andrey Mishchenko <mishchea@gmail.com> Co-authored-by: Famiu Haque <famiuhaque@protonmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com>
* fix(filetype): fix typo in starsetf function (#18856)Gregory Anders2022-06-03
|
* feat(lsp): send didChangeConfiguration after init (#18847)Mathias Fußenegger2022-06-03
| | | | | | | Most LSP servers require the notification to correctly load the settings and for those who don't it doesn't cause any harm. So far this is done in lspconfig, but with the addition of vim.lsp.start it should be part of core.
* feat(lsp): add a start function (#18631)Mathias Fußenegger2022-06-03
| | | | | | | | | | | | A alternative/subset of https://github.com/neovim/neovim/pull/18506 that should be forward compatible with a potential project system. Configuration of LSP clients (without lspconfig) now looks like this: vim.lsp.start({ name = 'my-server-name', cmd = {'name-of-language-server-executable'}, root_dir = vim.fs.dirname(vim.fs.find({'setup.py', 'pyproject.toml'}, { upward = true })[1]), })
* fix(treesitter): correct region for string parser (#18794)Christian Clason2022-06-02
| | | fixes injections for string parsers after https://github.com/neovim/neovim/commit/eab4d03a3264b2afaf803ed839fa25bc4e7acedd
* fix(lua): stop pending highlight.on_yank timer, if any (#18824)Wsevolod2022-06-02
| | | | | When yanking another range while previous yank is still highlighted, the pending timer could clear the highlight almost immediately (especially when using larger `timeout`, i.e. 2000)
* fix(lsp): adjust offset encoding in lsp.buf.rename() (#18829)Fredrik Ekre2022-06-01
| | | | | | | | Fix a bug in lsp.buf.rename() where the range returned by the server in textDocument/prepareRename was interpreted as a byte range directly, instead of taking the negotiated offset encoding into account. This caused the placeholder value in vim.ui.input to be incorrect in some cases, for example when non-ascii characters are used earlier on the same line.
* fix(checkhealth): skip vim.health #18816Javier Lopez2022-06-01
| | | | | | | | | | | | | | | | | | Problem: https://github.com/neovim/neovim/pull/18720#issuecomment-1142614996 The vim.health module is detected as a healthcheck, which produces spurious errors: vim: require("vim.health").check() ======================================================================== - ERROR: Failed to run healthcheck for "vim" plugin. Exception: function health#check, line 20 Vim(eval):E5108: Error executing lua [string "luaeval()"]:1: attempt to call field 'check' (a nil value) stack traceback: [string "luaeval()"]:1: in main chunk Solution: Skip vim.health when discovering healthchecks.
* feat(fs): add vim.fs.normalize()Gregory Anders2022-05-31
|
* feat(fs): add vim.fs.find()Gregory Anders2022-05-31
| | | | | This is a pure Lua implementation of the Vim findfile() and finddir() functions without the special syntax.
* feat(fs): add vim.fs.dir()Gregory Anders2022-05-31
| | | | | This function is modeled after the path.dir() function from Penlight and the luafilesystem module.
* feat(fs): add vim.fs.basename()Gregory Anders2022-05-31
|
* feat(fs): add vim.fs.dirname()Gregory Anders2022-05-31
|
* 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