| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
| |
Many filetypes from filetype.vim set buffer-local variables, meaning
vim.filetype.match cannot be used without side effects. Instead of
setting these buffer-local variables in the filetype detection functions
themselves, have vim.filetype.match return an optional function value
that, when called, sets these variables. This allows vim.filetype.match
to work without side effects.
|
| |
|
|
|
|
| |
(#18814)
|
|
|
| |
Fixes https://github.com/neovim/neovim/issues/18860
|
|
|
|
|
| |
This call alone is responible of 40 000 000 out of 80 000 000
individual alloc/free calls in the test suite.
|
| |
|
|
|
|
|
| |
Problem: No good filetype for conf files similar to dosini.
Solution: Add the confini filetype. (closes vim/vim#10510)
https://github.com/vim/vim/commit/635f48010dcf6d97f3a65b4785e1726ad386d3eb
|
|
|
|
|
|
|
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Dan Sully <dan+github@sully.org>
Co-authored-by: saher <msaher.shair@gmail.com>
Co-authored-by: Stephan Seitz <stephan.seitz@fau.de>
Co-authored-by: Benedikt Müller <d12bb@posteo.de>
Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
|
| |
|
|
|
|
|
|
|
| |
Most LSP servers require the notification to correctly load the
settings and for those who don't it doesn't cause any harm.
So far this is done in lspconfig, but with the addition of vim.lsp.start
it should be part of core.
|
|
|
|
|
|
|
|
|
|
|
|
| |
A alternative/subset of https://github.com/neovim/neovim/pull/18506 that should be forward compatible with a potential project system.
Configuration of LSP clients (without lspconfig) now looks like this:
vim.lsp.start({
name = 'my-server-name',
cmd = {'name-of-language-server-executable'},
root_dir = vim.fs.dirname(vim.fs.find({'setup.py', 'pyproject.toml'}, { upward = true })[1]),
})
|
|
|
| |
fixes injections for string parsers after https://github.com/neovim/neovim/commit/eab4d03a3264b2afaf803ed839fa25bc4e7acedd
|
|
|
|
|
| |
When yanking another range while previous yank is still highlighted, the
pending timer could clear the highlight almost immediately (especially
when using larger `timeout`, i.e. 2000)
|
|
|
|
|
|
|
|
| |
Fix a bug in lsp.buf.rename() where the range returned by the server in
textDocument/prepareRename was interpreted as a byte range directly,
instead of taking the negotiated offset encoding into account. This
caused the placeholder value in vim.ui.input to be incorrect in some
cases, for example when non-ascii characters are used earlier on the
same line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
https://github.com/neovim/neovim/pull/18720#issuecomment-1142614996
The vim.health module is detected as a healthcheck, which produces spurious errors:
vim: require("vim.health").check()
========================================================================
- ERROR: Failed to run healthcheck for "vim" plugin. Exception:
function health#check, line 20
Vim(eval):E5108: Error executing lua [string "luaeval()"]:1: attempt to call field 'check' (a nil value)
stack traceback:
[string "luaeval()"]:1: in main chunk
Solution:
Skip vim.health when discovering healthchecks.
|
| |
|
|
|
|
|
| |
This is a pure Lua implementation of the Vim findfile() and finddir()
functions without the special syntax.
|
|
|
|
|
| |
This function is modeled after the path.dir() function from Penlight and
the luafilesystem module.
|
| |
|
| |
|
|
|
|
|
| |
vim.fs.parents() is a Lua iterator that returns the next parent
directory of the given file or directory on each iteration.
|
|
|
|
|
|
|
|
|
| |
- Complete function:
There was lots of unnecessary C code for the complete function, therefore
moving it to Lua and use all the plumbing we have in place to retrieve the
results.
- Moving the module:
It's important we keep nvim lua modules name spaced, avoids conflict with
plugins, luarocks, etc.
|
|\
| |
| | |
feat(filetype): add more filetype patterns to Lua
|
| | |
|
|/
|
|
|
|
|
|
| |
Currently the `title`, `message` and `percentage` is stored for a
progress, but there is also an optional `cancellable` that comes in with
both the `WorkDoneProgressBegin` and also `WorkDoneProgressReport`. This
change also stores that value so that a plugin can access it when they
do a lookup in `client.messages`.
|
|
|
|
|
|
|
|
|
| |
Previously the `offset!` directive populated the metadata in such a way
that the new range could be attributed to a specific capture. #14046
made it so the directive simply stored just the new range in the
metadata and information about what capture the range is based from is
lost.
This change reverts that whilst also correcting the docs.
|
|
|
| |
Same as https://github.com/neovim/neovim/pull/18458 but for rename
|
|
|
|
|
| |
Problem: Hoon and Moonscript files are not recognized.
Solution: Add filetype patterns. (Goc Dundar, closes vim/vim#10478)
https://github.com/vim/vim/commit/bf82df0dd48a26404b92a596498b6892c9572c53
|
|
|
|
|
|
| |
The client state is cleaned up both in client.stop() as well as in the
client.on_exit() handler. Technically, the client has not actually
stopped until the on_exit handler is called, so we should just do this
cleanup there and remove it from client.stop().
|
|
|
|
|
| |
This makes the common use case easier.
If one really needs access to all clients, they can create a filter
function which manually calls `get_active_clients`.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Detaching the process seems to have unintended side effects on Windows,
so only do it by default on non-Windows platforms.
Ref: https://github.com/neovim/nvim-lspconfig/issues/1907
Closes https://github.com/neovim/nvim-lspconfig/pull/1913
|
| |
|
| |
|
|
|
|
| |
Fix vim.lsp.buf.(range_)code_action() to only send diagnostics belonging
to the current buffer and not to other files in the workspace.
|
|\
| |
| | |
treesitter: small improvements of languagetree.lua
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Allow get_active_clients() to filter on client name, id, or buffer. This
(soft) deprecates lsp.buf_get_clients().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current approach of using `on_attach` callbacks for configuring
buffers for LSP is suboptimal:
1. It does not use the standard Nvim interface for driving and hooking
into events (i.e. autocommands)
2. There is no way for "third parties" (e.g. plugins) to hook into the
event. This means that *all* buffer configuration must go into the
user-supplied on_attach callback. This also makes it impossible for
these configurations to be modular, since it all must happen in the
same place.
3. There is currently no way to do something when a client detaches from
a buffer (there is no `on_detach` callback).
The solution is to use the traditional method of event handling in Nvim:
autocommands. When a LSP client is attached to a buffer, fire a
`LspAttach`. Likewise, when a client detaches from a buffer fire a
`LspDetach` event.
This enables plugins to easily add LSP-specific configuration to buffers
as well as enabling users to make their own configurations more modular
(e.g. by creating multiple LspAttach autocommands that each do
something unique).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
vim.lsp: require("vim.lsp.health").check()
========================================================================
- ERROR: Failed to run healthcheck for "vim.lsp" plugin. Exception:
function health#check, line 20
Vim(eval):E5108: Error executing lua ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: attempt to index a nil value
stack traceback:
...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: in function 'check'
[string "luaeval()"]:1: in main chunk
Solution:
Check for nil.
fix #18602
|
| | |
|
|\ \
| | |
| | | |
perf(_editor): no need to stop inside vim.defer_fn
|
| | |
| | |
| | |
| | |
| | |
| | | |
uv_run:
1. remove timer handle from heap
2. will start again if repeat is not 0
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Implement filtering of actions based on the kind when passing the 'only'
parameter to code_action(). Action kinds are hierachical with a '.' as
the separator, and the filter thus allows, for example, both 'quickfix'
and 'quickfix.foo' when requestiong only 'quickfix'.
Fix https://github.com/neovim/neovim/pull/18221#issuecomment-1110179121
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
See: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/4f2884e16db35f2962d9b64312917c81be5cb54b
- Move session persistent data to $XDG_STATE_HOME Change 'directory',
'backupdir', 'undodir', 'viewdir' and 'shadafile' default location to
$XDG_STATE_HOME/nvim.
- Move logs to $XDG_STATE_HOME, too.
- Add stdpath('log') support.
Fixes: #14805
|