aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
* docs: small fixes (#23619)dundargoc2023-06-02
| | | | | | Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Gustavo Ferreira <gustavo.ferreira@imaginecurve.com> Co-authored-by: Kai Moschcau <mail@kmoschcau.de> Co-authored-by: Lampros <hauahx@gmail.com>
* fix(health): stop job properly on timeout (#23877)zeertzjq2023-06-02
|
* feat(lsp): include positionEncodings in default client capabilitiesGregory Anders2023-06-01
|
* feat(lsp): set client offset_encoding if server supports positionEncodingGregory Anders2023-06-01
| | | | | | If the server sends the positionEncoding capability in its initialization response, automatically set the client's offset_encoding to use the value provided.
* fix(lsp): add param assert in client_is_stopped (#23857)Raphael2023-06-01
|
* feat(lsp)!: promote LspRequest to a full autocmd and enrich with additional ↵jdrouhard2023-05-30
| | | | | | | | | | | | | | | | | | | | | data (#23694) BREAKING CHANGE: LspRequest is no longer a User autocmd but is now a first class citizen. LspRequest as a User autocmd had limited functionality. Namely, the only thing you could do was use the notification to do a lookup on all the clients' requests tables to figure out what changed. Promoting the autocmd to a full autocmd lets us set the buffer the request was initiated on (so people can set buffer-local autocmds for listening to these events). Additionally, when used from Lua, we can pass additional metadata about the request along with the notification, including the client ID, the request ID, and the actual request object stored on the client's requests table. Users can now listen for these events and act on them proactively instead of polling all of the requests tables and looking for changes.
* fix(lsp): fix dynamic registration of code actions (#23826)Folke Lemaitre2023-05-30
|
* vim-patch:9.0.1591: some "gomod" files are not recognized (#23820)Omar El Halabi2023-05-30
| | | | | | | Problem: Some "gomod" files are not recognized. Solution: Check for "go.mod" file name before checking out the contents. (Omar El Halabi, closes vim/vim#12462) https://github.com/vim/vim/commit/c9fbd2560f24180d2efa40028ed68427341d2d99
* vim-patch:9.0.1587: Corn config files are not recognized (#23807)Christian Clason2023-05-29
| | | | | | | | Problem: Corn config files are not recognized. Solution: Add a pattern for Corn config files. (Jake Stanger, closes vim/vim#12449) https://github.com/vim/vim/commit/05843e89601c03389a2d7978e7e16aec641a3dc4 Co-authored-by: Jake Stanger <mail@jstanger.dev>
* vim-patch:9.0.1584: not all meson files are recognized (#23797)Christian Clason2023-05-28
| | | | | | | | Problem: Not all meson files are recognized. Solution: Add "meson.options". (Liam Beguin, closes vim/vim#12444) https://github.com/vim/vim/commit/1ba0b9e36f36926a7675b31efeda7d3e495c9157 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(lsp): initial support for dynamic capabilities (#23681)Folke Lemaitre2023-05-28
| | | | | | | | | | | | - `client.dynamic_capabilities` is an object that tracks client register/unregister - `client.supports_method` will additionally check if a dynamic capability supports the method, taking document filters into account. But only if the client enabled `dynamicRegistration` for the capability - updated the default client capabilities to include dynamicRegistration for: - formatting - rangeFormatting - hover - codeAction - hover - rename
* fix: function was renamed (#23772)Matthieu Coudron2023-05-26
|
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* feat(fs): expose join_paths as `vim.fs.joinpath` (#23685)Christian Clason2023-05-20
| | | This is a small function but used a lot in some plugins.
* fix(lsp): don't register didChangeWatchedFiles when capability not set (#23689)Jon Huhn2023-05-20
| | | | | | | Some LSP servers (tailwindcss, rome) are known to request registration for `workspace/didChangeWatchedFiles` even when the corresponding client capability does not advertise support. This change adds an extra check in the `client/registerCapability` handler not to start a watch unless the client capability is set appropriately.
* vim-patch:9.0.1565: json lines files are not recognized (#23677)Christian Clason2023-05-19
| | | | | | | | Problem: Json lines files are not recognized. Solution: Add a pattern to detect "jsonl" files. (issue vim/vim#7520) https://github.com/vim/vim/commit/6fadbc1e8c1f4c5b03eb6a78aeb023ca2c2a9a7d Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(treesitter): allow foldexpr without highlights (#23672)Lewis Russell2023-05-18
| | | Ref nvim-treesitter/nvim-treesitter#4748
* feat(treesitter): improved logging (#23638)Lewis Russell2023-05-17
| | | | | | - Add bindings to Treesitter ts_parser_set_logger and ts_parser_logger - Add logfile with path STDPATH('log')/treesitter.c - Rework existing LanguageTree loggin to use logfile - Begin implementing log levels for vim.g.__ts_debug
* fix(treesitter): correctly calculate bytes for text sources (#23655)Lewis Russell2023-05-16
| | | Fixes #20419
* fix(treesitter): update c queriesChristian Clason2023-05-15
|
* docs: small fixesdundargoc2023-05-13
| | | | | | | | | Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: HiPhish <hiphish@posteo.de> Co-authored-by: Julio B <julio.bacel@gmail.com> Co-authored-by: T727 <74924917+T-727@users.noreply.github.com> Co-authored-by: camoz <camoz@users.noreply.github.com> Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
* vim-patch:9.0.1549: USD filetype is not recognized (#23608)Christian Clason2023-05-13
| | | | | | | | Problem: USD filetype is not recognized. Solution: Add patterns for USD filetype. (Colin Kennedy, closes vim/vim#12370) https://github.com/vim/vim/commit/b848ce6b7e27f24aff47a4d63933e0f96663acfe Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
* fix(treesitter): support subfiletypes in get_lang (#23605)Christian Clason2023-05-13
|
* refactor(lsp): mark server_ready function as deprecated (#23520)Raphael2023-05-13
|
* feat(treesitter): add support for setting query depthsLewis Russell2023-05-11
|
* vim-patch:9.0.1539: typst filetype is not recognized (#23578)Gaétan Lepage2023-05-11
| | | | | | Problem: Typst filetype is not recognized. Solution: Distinguish between sql and typst. (Gaetan Lepage, closes vim/vim#12363) https://github.com/vim/vim/commit/4ce1bda869e4ec0152d7dcbe1e491ceac5341d5e
* docs(lsp): fix `config.cmd` argument for `vim.lsp.start_client` (#23560)hituzi no sippo2023-05-09
|
* fix(lsp): fix relative patterns for `workspace/didChangeWatchedFiles` (#23548)Jon Huhn2023-05-09
|
* docs(lsp): fix type of `config.cmd` argument for `vim.lsp.start_client` (#23550)hituzi no sippo2023-05-09
|
* fix(man.lua): return support of all sectionsVadim A. Misbakh-Soloviov2023-05-07
| | | | | | | | | | | | Current behaviour of `:Man` is to only work with "number" sections. This is caused by wrong assumptions about man sections naming. Also, there was similar assumption about length of section dirs in `paths` variable. fixes #23485 Signed-off-by: Vadim Misbakh-Soloviov <git@mva.name>
* feat(lua): add hl priority opts on yank (#23509)marcoSven2023-05-06
| | | | | feat(lua): add hl priority opts on_yank Signed-off-by: marcoSven <me@marcosven.com>
* perf(lsp): load buffer contents once when processing semantic tokens ↵jdrouhard2023-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | responses (#23484) perf(lsp): load buffer contents once when processing semantic token responses Using _get_line_byte_from_position() for each token's boundaries was a pretty huge bottleneck, since that function would load individual buffer lines via nvim_buf_get_lines() (plus a lot of extra overhead). So each token caused two calls to nvim_buf_get_lines() (once for the start position, and once for the end position). For semantic tokens, we only attach to buffers that have already been loaded, so we can safely just get all the lines for the entire buffer at once, and lift the rest of the _get_line_byte_from_position() implementation directly while bypassing the part that loads the buffer line. While I was looking at get_lines (used by _get_line_byte_from_position), I noticed that we were checking for non-file URIs before we even looked to see if we already had the buffer loaded. Moving the buffer-loaded check to be the first thing done in get_lines() more than halved the average time spent transforming the token list into highlight ranges vs when it was still using _get_line_byte_from_position. I ended up improving that loop more by not using get_lines, but figured the performance improvement it provided was worth leaving in.
* fix(editorconfig): add missing root validation (#23462)Bogdan Grigoruță2023-05-03
|
* perf(treesitter): insert/remove items efficiently (#23443)Lewis Russell2023-05-02
|
* fix(treesitter): do not calc folds on unloaded buffersLewis Russell2023-05-02
| | | Fixes #23423
* fix(treesitter): foldexpr tweaksLewis Russell2023-05-01
| | | Some small general fixes found working on developing async parsing.
* vim-patch:9.0.1503: Luau files are not recognized (#23412)Christian Clason2023-05-01
| | | | | | | | Problem: Luau files are not recognized. Solution: Add a patter for Luau files. (Amaan Qureshi, closes vim/vim#12317) https://github.com/vim/vim/commit/2dcfe9ae1df61e1249520ed435dd8cf60e157103 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* perf(lsp): process semantic tokens response in a coroutine that yields every ↵jdrouhard2023-05-01
| | | | 5ms (#23375)
* fix(treesitter): redraw added/removed injections properly (#23287)Lewis Russell2023-04-30
| | | | | | When injections are added or removed make sure to: - invoke 'changedtree' callbacks for when new trees are added. - invoke 'changedtree' callbacks for when trees are invalidated - redraw regions when languagetree children are removed
* feat(treesitter): upstream query omnifunc from playground (#23394)Christian Clason2023-04-30
| | | and set by default in `ftplugin/query.lua`
* Merge pull request #23382 from gpanders/iter-benchmarkGregory Anders2023-04-29
|\ | | | | Add vim.iter benchmark to benchmark test suite
| * perf(iter): reduce number of table allocationsGregory Anders2023-04-28
| | | | | | | | | | | | | | | | Packing and unpacking return values impairs performance considerably. In an attempt to avoid creating tables as much as possible we can instead pass return values between functions (which does not require knowing the number of values a function might return). This makes the code more complex, but improves benchmark numbers non-trivially.
* | feat(treesitter): add query_linter from nvim-treesitter/playground (#22784)Stephan Seitz2023-04-29
|/ | | | Co-authored-by: clason <clason@users.noreply.github.com> Co-authored-by: lewis6991 <lewis6991@users.noreply.github.com>
* refactor(build): include lpeg as a librarybfredl2023-04-27
|
* Merge pull request #23303 from gpanders/more-vim-iterGregory Anders2023-04-25
|\ | | | | Create iter_spec and vim.iter module
| * refactor(iter): move helper functions under vim.iterGregory Anders2023-04-25
| | | | | | | | vim.iter is now both a function and a module (similar to vim.version).
* | feat(lua): vim.keycode (#22960)ii142023-04-25
|/ | | | | | Using nvim_replace_termcodes is too verbose, add vim.keycode for translating keycodes. Co-authored-by: ii14 <ii14@users.noreply.github.com>
* vim-patch:9.0.1478: filetypes for *.v files not detected properly (#23282)Christian Clason2023-04-23
| | | | | | | | | | | | * vim-patch:9.0.1478: filetypes for *.v files not detected properly Problem: Filetypes for *.v files not detected properly. Solution: Use the file contents to detect the filetype. (Turiiya, closes vim/vim#12281) https://github.com/vim/vim/commit/80406c26188219f3773b2e9c49160caeeb386ee2 Co-authored-by: Turiiya <34311583+tobealive@users.noreply.github.com> Co-authored-by: Jonas Strittmatter <40792180+smjonas@users.noreply.github.com>
* vim-patch:9.0.1475: busted configuration files are not recognized (#23266)zeertzjq2023-04-22
| | | | | | | Problem: Busted configuration files are not recognized. Solution: Recognize busted configuration files as Lua. (Craig MacEachern, closes vim/vim#12209) Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
* feat(lsp): enable workspace/didChangeWatchedFiles by default (#23190)Jon Huhn2023-04-22
|