aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
| * | feat(extmarks,ts,spell): full support for spellingThomas Vigouroux2022-09-06
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added 'spell' option to extmarks: Extmarks with this set will have the region spellchecked. - Added 'noplainbuffer' option to 'spelloptions': This is used to tell Neovim not to spellcheck the buffer. The old behaviour was to spell check the whole buffer unless :syntax was set. - Added spelling support to the treesitter highlighter: @spell captures in highlights.scm are used to define regions which should be spell checked. - Added support for navigating spell errors for extmarks: Works for both ephemeral and static extmarks - Added '_on_spell_nav' callback for decoration providers: Since ephemeral callbacks are only drawn for the visible screen, providers must implement this callback to instruct Neovim which regions in the buffer need can be spell checked. The callback takes a start position and an end position. Note: this callback is subject to change hence the _ prefix. - Added spell captures for built-in support languages Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
| * feat(treesitter): add vim.treesitter.start(), enable for LuaChristian Clason2022-09-06
| | | | | | | | | | | | | | | | | | | | * Add vim.treesitter.start() for starting treesitter highlighting via ftplugin or autocommand (can be extended later for fold, indent, matchpairs, ...) * Add vim.treesitter.stop() for manually stopping treesitter highlighting * Enable treesitter highlighting for Lua if `vim.g.ts_highlight_lua = true` is set in `init.lua`
| * vim-patch:9.0.0349: filetype of *.sil files not well detected (#20050)Jonas Strittmatter2022-09-02
| | | | | | | | | | Problem: Filetype of *.sil files not well detected. Solution: Inspect the file contents to guess the filetype. https://github.com/vim/vim/commit/be807d582499acbe314ead3891481cba6ca136df
| * Vim 9.0.{0314,0319}: some filetypes are not recognized (#20005)Christian Clason2022-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | * vim-patch:9.0.0314: VDM files are not recognized Problem: VDM files are not recognized. Solution: Add patterns for VDM files. (Alessandro Pezzoni, closes vim/vim#11004) https://github.com/vim/vim/commit/bf26941f40923d331169a4ecb7341608f5d1ca38 * vim-patch:9.0.0319: Godot shader files are not recognized Problem: Godot shader files are not recognized. Solution: Add patterns for "gdshader". (Maxim Kim, closes vim/vim#11006) https://github.com/vim/vim/commit/d5c8f11905abc1bdf3b8864dbc40187855ed9374
| * fix(docs): update lsp.rpc.start docs to match return value changes (#20003)Mathias Fußenegger2022-08-30
| | | | | | Follow up to https://github.com/neovim/neovim/pull/19916
| * fix(lsp): clean the diagnostic cache when buffer delete (#19449)Raphael2022-08-29
| | | | | | Co-authored-by: Gregory Anders <greg@gpanders.com>
| * feat(lsp): add tcp supportMathias Fussenegger2022-08-28
| |
| * refactor(lsp): extract rpc client from rpc.startMathias Fussenegger2022-08-28
| | | | | | | | Makes the previously inner functions re-usable for a TCP client
| * refactor(lsp): encapsulate rpc uv handleMathias Fussenegger2022-08-28
| | | | | | | | | | To prepare for different transports like TCP where the handle won't have a kill method.
| * refactor(lsp): factor out read_loop functionMathias Fussenegger2022-08-28
| |
| * fix(treesitter): make it get_captures_at_positionbfredl2022-08-26
| |
| * feat(treesitter): upstream get_hl_groups_at_position()Quentin Rasmont2022-08-26
| | | | | | | | Util from the nvim-treesitter project.
| * feat(treesitter)!: use @foo.bar style highlight groupsbfredl2022-08-26
| | | | | | | | | | | | | | | | | | | | | | | | This removes the support for defining links via vim.treesitter.highlighter.hl_map (never documented, but plugins did anyway), or the uppercase-only `@FooGroup.Bar` to `FooGroup` rule. The fallback is now strictly `@foo.bar.lang` to `@foo.bar` to `@foo`, and casing is irrelevant (as it already was outside of treesitter) For compatibility, define default links to builting syntax groups as defined by pre-existing color schemes
| * feat(treesitter): clarify similar 'get_node_range' functionsQuentin Rasmont2022-08-25
| | | | | | | | | | | | | | | | | | The private 'get_node_range' function from the languagetree module has been renamed and remains private as it serve a purpose that is only relevant inside the languagetree module. The 'get_node_range' upstreamed from nvim-treesitter in the treesitter module has been made public as it is in itself a utlity function.
| * feat(treesitter): upstream node_contains()Quentin Rasmont2022-08-25
| | | | | | | | Util from the nvim-treesitter project.
| * feat(treesitter): add ability to retreive a tree/node given a rangeQuentin Rasmont2022-08-25
| |
| * feat(treesitter): add opts.concat to query.get_text_nodeQuentin Rasmont2022-08-25
| | | | | | | | | | | | | | As part of the upstream of utility functions from nvim-treesitter, this option when set to false allows to return a table (downstream behavior). Effectively making the switch from the downstream to the upstream function much easier.
| * feat(treesitter): upstream is_parent()Quentin Rasmont2022-08-25
| | | | | | | | | | Util from the nvim-treesitter project. Renamed is_parent to is_ancestor for clarity.
| * Merge pull request #19496 from vigoux/ts_internal_langThomas Vigouroux2022-08-24
| |\ | | | | | | feat(treesitter): allow customizing language symbol name
| | * feat(treesitter): allow customizing language symbol nameThomas Vigouroux2022-08-22
| | |
| * | fix(inspect): escape identifiers that are lua keywords (#19898)Simon Wachter2022-08-23
| |/ | | | | A lua keyword is not a valid table identifier
* | feat(usermarks) fix bugs with usermarks runtimeJosh Rahm2022-08-22
| |
* | feat(usermarks): add runtime files for usermarksJosh Rahm2022-08-21
|/
* fix(filetype): only check first 100 and last line of buffer (#19819)Christian Clason2022-08-19
| | | | | | | | fix(filetype): only pass first 100 and last lines to contents check sufficient for current content checks and avoids performance issues for buffers with a large number of lines fixes #19817
* docs(lsp): remove lsp.buf_request from docs (#19738)Mathias Fußenegger2022-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This starts a soft phase-out of `buf_request`. `buf_request` is quite error prone: - Positional `params` depend on the client because of the `offset_encoding`. Currently if there is one client using UTF-8 offset encoding and another using UTF-16, the positions in the request are wrong for one of the clients. To solve this the params would need to be created per client instead of once for all of them. - `handler` is called *per* client but many users of it assume it is only called once. This can lead to a "select n + 1" kind of problem, where the handler makes another call to `buf_request`, multiplying the amount of requests. (There are in fact still some places where this happens in core) Or it leads to erratic behavior if called multiple times (E.g. the quicklist list flickering & being overwritten) (See hover or references implementation) `buf_request_all` returns an aggregate of the responses which is more sensible as it avoids this problem. For off-spec extensions it also has the problem that it sends requests to clients which cannot handle a given request. Given that `buf_request` is in use by a lot of plugins this starts a soft-phase out. Planned Steps: - Remove from docs - Provide an alternative, either `buf_request_all`, maybe with extensions (params being a function), or an entirely new method. - Mark as deprecated in 0.9 - Remove in 0.10 To note: - `buf_request_all` currently isn't ideal either because it suffers from the `params` problem as well. - This implies that the `vim.lsp.with` pattern will die, because the global handlers as they are don't fit a multi-client model, as most of the time an aggregate is needed.
* docs(lsp): rename on-list-handler to lsp-on-list-handler (#19813)Jonas Strittmatter2022-08-17
| | | | This makes it easier to find documentation about the on-list-handler when starting the search term with "lsp".
* docs(lua): clarify vim.keymap.set() opts (#19761)Antoine Cotten2022-08-14
|
* vim-patch:9.0.0197: astro files are not detected (#19755)Christian Clason2022-08-13
| | | | | Problem: Astro files are not detected. Solution: Add a pattern to match Astro files. (Emilia Zapata, closes vim/vim#10904) https://github.com/vim/vim/commit/6a76e84f555da6d9ee57db80143e1e5eb85535ff
* vim-patch:9.0.0195: metafun files are not recogized (#19746)Christian Clason2022-08-13
| | | | | Problem: Metafun files are not recogized. Solution: Add filetype detection patterns. https://github.com/vim/vim/commit/9032b9ceb6073288d75386dbcbd9d1982fa24080
* fix(lsp): fix nil value error in get_group (#19735)Mathias Fußenegger2022-08-12
| | | | | | | | `server_capabilities` can be nil until the server is initialized. Reproduced with: vim.lsp.stop_client(vim.lsp.start_client { cmd = { vim.v.progpath, '-es', '-u', 'NONE', '--headless' }; })
* fix(lsp): handle nil client in onexit callback (#19722)Mathias Fußenegger2022-08-11
| | | Follow up to https://github.com/neovim/neovim/pull/19658
* fix(lsp): avoid pipe leaks if lsp cmd isn't executable (#19717)Mathias Fußenegger2022-08-11
| | | The `onexit` handler isn't called if `uv.spawn` doesn't return a handle.
* fix(lsp): fix some type annotations in lsp.rpc (#19714)Mathias Fußenegger2022-08-11
|
* vim-patch:9.0.0182: quarto files are not recognized (#19702)Jonas Strittmatter2022-08-10
| | | | | | Problem: Quarto files are not recognized. Solution: Recognize quarto files by the extension. (Jonas Strittmatter, closes vim/vim#10880) https://github.com/vim/vim/commit/3a9687fb2749cb3da6e3bbf60cb9eaa81f7889ae
* fix(lsp): handle multiple clients with incremental sync (#19658)Mathias Fußenegger2022-08-09
| | | | | | | | | | | | | | | The change tracking used a single lines/lines_tmp table to track changes to a buffer. If multiple clients using incremental sync are connected to a buffer, they both made changes to the same lines table. That resulted in an inconsistent state. This commit changes the didChange handling to group clients by synchronization scheme and offset encoding. This avoids computing the diff multiple times for clients using the same scheme and resolves the lines/lines_tmp conflicts. Fixes https://github.com/neovim/neovim/issues/19325
* vim-patch:partial: 48c3f4e0bff7 (#19684)Christian Clason2022-08-09
| | | | | | | | vim-patch:partial:48c3f4e0bff7 Update runtime files https://github.com/vim/vim/commit/48c3f4e0bff7efd289a7001b68c777b6f89a7057 partially skip `options.txt` (needs 9.0.0138)
* docs(lua): add Lua 5.1 reference manual (#19663)dundargoc2022-08-08
| | | | | | | | based on http://www.vim.org/scripts/script.php?script_id=1291 reformatted to match Nvim documentation style; removed irrelevant sections Co-authored-by: dundargoc <gocundar@gmail.com> Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* feat(lsp): set formatexpr by default (#19677)Mathias Fußenegger2022-08-08
| | | Follow up to https://github.com/neovim/neovim/pull/19003
* fix(lsp): set end_col in formatexpr (#19676)Mathias Fußenegger2022-08-08
| | | | The last line was excluded from formatting via formatexpr because the character in the params was set to 0 instead of the end of line.
* feat(lsp): disable exit_timeout by default (#19672)Mathias Fußenegger2022-08-08
| | | | | | | | | | | | | | | | | The lsp client used to wait up to 500ms for a language server to shutdown before sending a TERM signal. The intention behind the 500ms grace period was to ensure the language server exits to prevent stale processes, but it has the side-effect that it can interrupt language-servers which are too slow to shutdown within 500ms. Language servers tend to write out index files or project files on shutdown, and being interrupted during this process can cause corruption of those files. This changes the default to not wait at all, at the risk of leaving stale processes around if the language server isn't well behaved. An alternative would be to wait indefinitely, but that can cause neovim to take several seconds to exit.
* fix(lsp): avoid ^M character in hover window on Windows (#19640)Cai.MY2022-08-05
|
* fix(lsp): prevent unexpected position jumps (#19370)rhcher2022-08-03
|
* docs: fix typos (#19588)dundargoc2022-08-03
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: notomo <notomo.motono@gmail.com>
* test: improve mapping tests and docs (#19619)zeertzjq2022-08-02
|
* fix(lsp): send didOpen if name changes on write (#19583)Mathias Fußenegger2022-08-01
| | | | | | | | | `:saveas newName` changes the name of an existing buffer. Due to the buffer re-use it skips the lsp attach phase and immediately sends a `didSave` notification to the server. Servers get confused about this, because they expect a `didOpen` notification first. Closes https://github.com/neovim/neovim/issues/18688
* feat(api): add replace_keycodes to nvim_set_keymap (#19598)ii142022-08-01
|
* Use Strings instead of Tables in vim.filetype.matchregex Doc (#19604)LaurenceWarne2022-08-01
| | | docs: use strings instead of tables in vim.filetype.matchregex doc
* docs: fix typos (#19024)dundargoc2022-07-31
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Valery Viktorovsky <viktorovsky@gmail.com>
* docs(lsp): use direct link to formattingOptions in format docs (#19558)Mathias Fußenegger2022-07-28
| | | | Also changes `@see` to `See` to avoid the break to a dedicated "See also" block in the generated vimdoc
* feat(lsp): add range option to code_action; deprecate range_code_action (#19551)Mathias Fußenegger2022-07-28
| | | | | | | | | | | | | | | `code_action` gained extra functions (`filter` and `apply`) which `range_code_action` didn't have. To close this gap, this adds a `range` option to `code_action` and deprecates `range_code_action`. The option defaults to the current selection if in visual mode. This allows users to setup a mapping like `vim.keymap.set({'v', 'n'}, '<a-CR>', vim.lsp.buf.code_action)` `range_code_action` used to use the `<` and `>` markers to get the _last_ selection which required using a `<Esc><Cmd>lua vim.lsp.buf.range_code_action()<CR>` (note the `<ESC>`) mapping.