| Commit message (Collapse) | Author | Age |
|
|
|
| |
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
|
|
|
|
|
|
|
| |
vim.lsp.start_client() may fail (for example if the `cmd` is not
executable). It produces a nice error notification in this case. Passing
the `nil` value returned from an erroneous `vim.lsp.start_client()` call
into `vim.lsp.buf_attach_client()` causes a meaty param validate
exception message. Avoid this.
|
|
|
|
|
|
|
|
|
|
|
| |
Issuing a server request triggers `changetracking.flush` so as to
make sure we're not operating on a stale state. This immediately
triggers notification of any pending changes (as a result of debouncing)
to the server. However, this happens in addition to the notification
that is waiting on the debounce delay. Because we `nil`
`buf_state.pending_change` when it is called, the fix is to
also check that this is non-`nil` when it is called and exit if it is,
as this being `nil` would mean that it originates from a pending change
that has already been flushed out.
|
|
|
| |
set `tagfunc` to `vim.lsp.tagfunc` and `omnifunc` to `vim.lsp.omnifunc` if empty when attaching a server
|
|
|
| |
fixup for #19283
|
|
|
|
|
|
| |
Problem: Csv and tsv files are not recognized.
Solution: Add patterns fo csv and tsv files. (Leandro Lourenci,
closes vim/vim#10680)
https://github.com/vim/vim/commit/99af91e5820c78a196c9272cd8ce5aa5be7bf374
|
| |
|
|
|
| |
Signed-off-by: Raphael <glephunter@gmail.com>
|
|
|
|
|
|
| |
* revert to filetype.vim by setting `g:do_legacy_filetype`
* skip either filetype.lua or filetype.vim via `g:did_load_filetypes`
(Running both is no longer required and therefore no longer supported.)
|
|
|
|
| |
* reformat Lua runtime to make lint CI pass
* reduce max line length to 100
|
|
|
|
|
| |
For example on MacOS, /etc/hostname.file is symlinked to
/private/etc/hostname.file. We only care about the original file path though.
|
| |
|
|
|
|
|
|
| |
Problem: Missing change for filetype detection.
Solution: Include change to detect guile from shebang line.
https://github.com/vim/vim/commit/324478037923feef1eb8a771648e38ade9e5e05a
|
|
|
|
|
|
| |
Problem: A couple of filetype patterns do not have "*" before "/etc".
Solution: Add the star. (Jonas Strittmatter, closes vim/vim#10662)
https://github.com/vim/vim/commit/704988f0c3598c1b0cc47f3b46f1f1229312f2bc
|
| |
|
|
|
|
|
| |
Problem: Signature files not detected properly.
Solution: Add a function to better detect signature files. (Doug Kearns)
https://github.com/vim/vim/commit/cdbfc6dbab1d63aa56af316d6b13e37939e7f7a8
|
|
|
| |
These were not updated in #18895.
|
|
|
|
|
|
|
|
|
| |
This fixes the following bugs:
`${1:else_text}` -> format with if_text: "else_text"
`${1:-else_text}` -> format with if_text: "else_text"
`${1:}` in `format` (eg. empty else_text) -> error.
`${1:}` (eg. empty placeholder) -> error.
Thanks hrsh7th :)
|
|
|
|
|
| |
Problem: Not all Visual Basic files are recognized.
Solution: Change detection of *.cls files. (Doug Kearns)
https://github.com/vim/vim/commit/8b5901e2f9466eb6f38f5b251e871f609f65e252
|
|
|
|
|
| |
Problem: Hare files are not recognized.
Solution: Add a filetype pattern. (Hugo Osvaldo Barrera, closes vim/vim#10630)
https://github.com/vim/vim/commit/040674129f3382822eeb7b590380efa5228124a8
|
|
|
| |
Fix #18143
|
| |
|
|
|
|
|
|
|
| |
This is necessary in cases where filetype detection acts recursively.
For example, when matching files that end with .bak, the "root" of
the filename is matched again against the same buffer (e.g. a buffer
named "foo.c.bak" will be matched again with the filename "foo.c", using
the same underlying buffer).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#18895)
This enables vim.filetype.match to match based on a buffer (most
accurate) or simply a filename or file contents, which are less accurate
but may still be useful for some scenarios.
When matching based on a buffer, the buffer's name and contents are both
used to do full filetype matching. When using a filename, if the file
exists the file is loaded into a buffer and full filetype detection is
performed. If the file does not exist then filetype matching is only
performed against the filename itself. Content-based matching does the
equivalent of scripts.vim, and matches solely based on file contents
without any information from the name of the file itself (e.g. for
shebangs).
BREAKING CHANGE: use `vim.filetype.match({buf = bufnr})` instead
of `vim.filetype.match(name, bufnr)`
|
|
|
|
| |
This re-introduces the fix that the filetype.lua refactor inadvertently reverted.
The fix ensures that in the case when end_lnum is omitted, a string is always returned.
|
|
|
|
| |
Move some filetype detection functions to detect.lua,
sort patterns by detected filetype.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`nvim_get_option_value` and `nvim_set_option_value` better handle
unsetting local options. For instance, this is currently not possible:
vim.bo.tagfunc = nil
This does not work because 'tagfunc' is marked as "local to buffer" and
does not have a fallback global option. However, using :setlocal *does*
work as expected
:setlocal tagfunc=
`nvim_set_option_value` behaves more like :set and :setlocal (by
design), so using these as the underlying API functions beneath vim.bo
and vim.wo makes those two tables act more like :setlocal. Note that
vim.o *already* uses `nvim_set_option_value` under the hood, so that
vim.o behaves like :set.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Steps to reproduce:
1. setting `vim.highlight.on_yank`
```
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
pattern = { "*" },
callback = function()
vim.highlight.on_yank({ timeout = 200 })
end,
})
```
2. repeat typing `yeye` ...
3. causes the following error.
```
Error executing vim.schedule lua callback: vim/_editor.lua:0: handle 0x01e96970 is already closing
stack traceback:
[C]: in function 'close'
vim/_editor.lua: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
```
📝 Test result before fix:
[----------] Global test environment setup.
[----------] Running tests from test/functional/lua/highlight_spec.lua
[ RUN ] vim.highlight.on_yank does not show errors even if buffer is wiped before timeout: 15.07 ms OK
[ RUN ] vim.highlight.on_yank does not show errors even if executed between timeout and clearing highlight: 15.07 ms ERR
test/helpers.lua:73: Expected objects to be the same.
Passed in:
(string) 'Error executing vim.schedule lua callback: vim/_editor.lua:0: handle 0x02025260 is already closing
stack traceback:
[C]: in function 'close'
vim/_editor.lua: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>'
Expected:
(string) ''
|