| Commit message (Collapse) | Author | Age |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
This makes it easier to find documentation about the on-list-handler
when starting the search term with "lsp".
|
| | |
|
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
Problem: Metafun files are not recogized.
Solution: Add filetype detection patterns.
https://github.com/vim/vim/commit/9032b9ceb6073288d75386dbcbd9d1982fa24080
|
| |
| |
| |
| |
| |
| |
| |
| | |
`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' };
})
|
| |
| |
| | |
Follow up to https://github.com/neovim/neovim/pull/19658
|
| |
| |
| | |
The `onexit` handler isn't called if `uv.spawn` doesn't return a handle.
|
| | |
|
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
Update runtime files
https://github.com/vim/vim/commit/48c3f4e0bff7efd289a7001b68c777b6f89a7057
partially skip `options.txt` (needs 9.0.0138)
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| | |
Follow up to https://github.com/neovim/neovim/pull/19003
|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: notomo <notomo.motono@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
`: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
|
| |
|
|
|
| |
docs: use strings instead of tables in vim.filetype.matchregex doc
|
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Valery Viktorovsky <viktorovsky@gmail.com>
|
|
|
|
| |
Also changes `@see` to `See` to avoid the break to a dedicated "See
also" block in the generated vimdoc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
|
|
|
|
| |
Without some form of feedback a user cannot easily tell if the server is
still computing the result (which can take a while in large projects),
or whether the server couldn't compute the rename result.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Neovim implements `workspace/configuration`
It should set the capability accordingly.
From https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#clientCapabilities:
/**
* The client supports `workspace/configuration` requests.
*
* @since 3.6.0
*/
configuration?: boolean;
|
|
|
|
|
| |
Problem: Sway config files are recognized as i3config.
Solution: Recognize swayconfig separately. (James Eapen, closes vim/vim#10672)
https://github.com/vim/vim/commit/7abd1c6d8e777bde1700633bafc1a40be9e9c1aa
|
|
|
|
|
|
|
| |
(#19547)
Problem: Pattern for detecting bitbake files is not sufficient.
Solution: Adjust the pattern. (Gregory Anders, closes vim/vim#10743)
https://github.com/vim/vim/commit/30e212dac1d29536883c36918a465a38d81d6413
|
|
|
|
|
|
| |
Problem: Using "terraform" filetype for .tfvars file is bad.
Solution: use "terraform-vars", so that different completion and other
mechanisms can be used. (Radek Simko, closes vim/vim#10755)
https://github.com/vim/vim/commit/15b87b6610bfce0c6296bbbad019c944f88a74ca
|
|
|
|
|
|
| |
Problem: Too many files recognized as bsdl.
Solution: Use pattern "*.bsd" instead of "*bsd". (Martin Tournoij,
closes vim/vim#10783)
https://github.com/vim/vim/commit/1b67f07f7626b87d9ce3e16815970988983a2ddc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lists (#19213)
Currently LSP allows only using loclist or quickfix list window. I
normally prefer to review all quickfix items without opening quickfix
window. This fix allows passing `on_list` option which allows full
control what to do with list.
Here is example how to use it with quick fix list:
```lua
local function on_list(options)
vim.fn.setqflist({}, ' ', options)
vim.api.nvim_command('cfirst')
end
local bufopts = { noremap=true, silent=true, buffer=bufnr }
vim.keymap.set('n', '<leader>ad', function() vim.lsp.buf.declaration{on_list=on_list} end, bufopts)
vim.keymap.set('n', '<leader>d', function() vim.lsp.buf.definition{on_list=on_list} end, bufopts)
vim.keymap.set('n', '<leader>ai', function() vim.lsp.buf.implementation{on_list=on_list} end, bufopts)
vim.keymap.set('n', '<leader>at', function() vim.lsp.buf.type_definition{on_list=on_list} end, bufopts)
vim.keymap.set('n', '<leader>af', function() vim.lsp.buf.references(nil, {on_list=on_list}) end, bufopts)
```
If you prefer loclist do something like this:
```lua
local function on_list(options)
vim.fn.setloclist(0, {}, ' ', options)
vim.api.nvim_command('lopen')
end
```
close #19182
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Problem
Quotes are special in doxygen, and should be escaped. *Sometimes* they
cause doc generation issues. Like in #17785
* Solution
Replace double quotes with single quotes
|
|
|
|
| |
regression from PR #19283: custom close autocommands for the preview window were
not cleaned up after the window was closed.
|
|
|
| |
`:lua vim.ls<tab>` would list `lsp` twice.
|
|
|
|
|
|
|
| |
* refactor(lsp): use autocmd api
* refactor(lsp): inline BufWritePost and VimLeavePre callbacks
|
| |
|
|
|
|
|
|
|
|
| |
vim-patch:9.0.0055: bitbake files are not detected
Problem: Bitbake files are not detected.
Solution: Add bitbake filetype detection by file name and contents. (Gregory
Anders, closes vim/vim#10697)
https://github.com/vim/vim/commit/fa49eb482729a5fe7da9c9a5ed8d14f68afa55c7
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Since right-click can now show a popup menu, we can provide messaging to
guide users who expect 'mouse' to be disabled by default. So 'mouse' can
now be enabled by default.
Solution:
Do it.
Closes #15521
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
When the node mentioned in a predicate is not required for the query
then predicates putting restrictions on that node shouldn't run.
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/2600
|
|
|
| |
Fixes #19326
|