| Commit message (Collapse) | Author | Age |
| |
|
|
|
| |
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
|
|
|
|
|
|
| |
(#24074)
disabling before enabling throws an error otherwise, because bufstate[bufnr]
doesn't exist
|
| |
|
|
|
|
| |
M.enable already clears bufstate[bufnr] and the namespace,
the duplicate callbacks cause an error (indexing bufstate[bufnr] fails)
|
|
|
|
|
|
|
|
|
|
|
| |
Add automatic refresh and a public interface on top of #23736
* add on_reload, on_detach handlers in `enable()` buf_attach, and
LspDetach autocommand in case of manual detach
* unify `__buffers` and `hint_cache_by_buf`
* use callback bufnr in `on_lines` callback, bufstate: remove __index override
* move user-facing functions into vim.lsp.buf, unify enable/disable/toggle
Closes #18086
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- nvim requires rpc responses in reverse order. https://github.com/neovim/neovim/issues/19932
- NVIM_APPNAME: UIs normally should NOT set this.
ref #23520
fix #24050
fix #23660
fix #23353
fix #23337
fix #22213
fix #19161
fix #18088
fix #20693
|
|
|
|
|
|
|
|
|
| |
Co-authored by: zeertzjq <zeertzjq@outlook.com>
Co-authored by: Steven Todd McIntyre II <114119064+stmii@users.noreply.github.com>
Co-authored by: nobe4 <nobe4@users.noreply.github.com>
- docs: mention --luadev-mod to run with lua runtime files
When changing a lua file in the ./runtime folder, a new contributor
might expect changes to be applied to the built Neovim binary.
|
|
|
|
|
| |
Problem: Treesitter highlighting base priority cannot be customized.
Solution: Use `vim.highlight.priorities.treesitter` instead of hard-coded value.
|
|
|
|
|
|
|
| |
Problem: Current implementation of "remove trailing /" doesn't
account for the case of literal '/' as path.
Solution: Remove trailing / only if it preceded by something else.
Co-authored by: notomo <notomo.motono@gmail.com>
|
|
|
|
|
|
|
| |
Previously, filtering code actions with the "only" option failed
if the code action kind contained special Lua pattern chars such as "-"
(e.g. the ocaml language server supports a "type-annotate" code action).
Solution: use string comparison instead of string.find
|
|
|
| |
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
|
|
|
| |
Co-authored-by: Rohit Sukumaran <rohit.sukumaran@kredx.com>
|
|
|
|
|
|
| |
Fixes a `Invalid buffer id: 123` race when the buffer gets deleted before
the callback triggered.
Alternative to https://github.com/neovim/neovim/pull/23981
|
|
|
|
|
| |
Close #18907
Close #20314
Close #23749
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
tostring(vim.version()) returns "table: 0x…".
Solution:
Modify vim.version() to return a string prerelease instead of a boolean.
Fix #23863
|
| |
| |
| |
| |
| |
| | |
- vim.version() returns a Version object.
Makes it printable and removes the need of workarounds when passing it
to other vim.version methods.
|
|/ |
|
| |
|
|
|
|
| |
- Use tostring() as that's what print() uses internally.
- Do not append trailing new line.
|
|
|
| |
initial support; public API left for a follow-up PR
|
| |
|
|
|
|
| |
A table passed to `vim.iter` can be a class instance with a `__call`
implementation for the iterator protocol.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Filetype name t32 is a bit obscure.
Solution: Rename t32 to trace32. (Christoph Sax, closes vim/vim#12512)
https://github.com/vim/vim/commit/740df76c90ee2c421ab7852b7ff2835aa0af782a
Co-authored-by: Christoph Sax <christoph.sax@mailbox.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LspProgressUpdate (#23958)
`client.messages` could grow unbounded because the default handler only
added new messages, never removing them.
A user either had to consume the messages by calling
`vim.lsp.util.get_progress_messages` or by manually removing them from
`client.messages.progress`. If they didn't do that, using LSP
effectively leaked memory.
To fix this, this deprecates the `messages` property and instead adds a
`progress` ring buffer that only keeps at most 50 messages. In addition
it deprecates `vim.lsp.util.get_progress_messages` in favour of a new
`vim.lsp.status()` and also promotes the `LspProgressUpdate` user
autocmd to a regular autocmd to allow users to pattern match on the
progress kind.
Also closes https://github.com/neovim/neovim/pull/20327
|
|
|
|
|
|
|
|
| |
Problem: Nix files are not recognized from the hashbang line.
Solution: Add a hashbang check. (issue vim/vim#12507)
https://github.com/vim/vim/commit/19548c6a742d954ecd0b50b0680c37cc6ced7473
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
| |
Problem: Trace32 files are not recognized.
Solution: Add patterns for the t32 filetype. (Christoph Sax, closes vim/vim#12505)
https://github.com/vim/vim/commit/7fbcee6f928356f1c205a4dfa67c1d542f743b92
Co-authored-by: Christoph Sax <christoph.sax@mailbox.org>
|
|
|
| |
https://en.wikipedia.org/wiki/Circular_buffer
|
|
|
|
|
|
|
|
| |
Problem: URL shortcut files are not recognized.
Solution: Add a pattern for URL shortcut files. (closes vim/vim#12474)
https://github.com/vim/vim/commit/cdb7b4c50826df254d2e5ba8abd211e49b7a9784
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
feat(lua): add vim.system()
Problem:
Handling system commands in Lua is tedious and error-prone:
- vim.fn.jobstart() is vimscript and comes with all limitations attached to typval.
- vim.loop.spawn is too low level
Solution:
Add vim.system().
Partly inspired by Python's subprocess module
Does not expose any libuv objects.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
checkhealth can be noisy, but we don't want to omit info.
Solution:
Fold OK results by default, if 'foldenable' is enabled.
Resolves #22796
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
"playground" is new jargon that overlaps with existing concepts:
"dev" (`:help dev`) and "view" (also "scratch" `:help scratch-buffer`) .
Solution:
We should consistently use "dev" as the namespace for where "developer
tools" live. For purposes of a "throwaway sandbox object", we can use
the name "view".
- Rename `TSPlayground` => `TSView`
- Rename `playground.lua` => `dev.lua`
|
|
|
|
|
|
|
|
|
| |
vim.version.range() couldn't parse them correctly.
For example, vim.version.range('<0.9.0'):has('0.9.0') returned `true`.
fix: range:has() accepts vim.version()
So that it's possible to compare a range with:
vim.version.range(spec):has(vim.version())
|
|
|
|
| |
The Nvim client does not yet support multiple offset encodings for
clients in the same buffer. Until it does, stick to utf-16 by default.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PROBLEM:
Whenever any text edits are applied to the buffer, the `marks` part of those
lines will be lost. This is mostly problematic for code formatters that format
the whole buffer like `prettier`, `luafmt`, ...
When doing atomic changes inside a vim doc, vim keeps track of those changes and
can update the positions of marks accordingly, but in this case we have a whole
doc that changed. There's no simple way to update the positions of all marks
from the previous document state to the new document state.
SOLUTION:
* save marks right before `nvim_buf_set_lines` is called inside `apply_text_edits`
* check if any marks were lost after doing `nvim_buf_set_lines`
* restore those marks to the previous positions
TEST CASE:
* have a formatter enabled
* open any file
* create a couple of marks
* indent the whole file to the right
* save the file
Before this change: all marks will be removed.
After this change: they will be preserved.
Fixes #14307
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
comments (#23896)
Problem: Filetype detection fails for *.conf file without comments.
(Dmitrii Tcyganok)
Solution: Use "conf" filetype as a fallback for an empty .conf file.
(closes vim/vim#12487, closes vim/vim#12483)
https://github.com/vim/vim/commit/664fd12aa27a3c6bd19cfa474c4630d6c03fcc61
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
If the server sends the positionEncoding capability in its
initialization response, automatically set the client's offset_encoding
to use the value provided.
|