| Commit message (Collapse) | Author | Age |
|\ |
|
| | |
|
| |
| |
| | |
docs(lsp): format arguments to start_client()
|
| |
| |
| |
| |
| |
| | |
`vim.lsp.buf.format()` silently did nothing if no servers supported
`textDocument/rangeFormatting` when formatting with a range.
Issue found by `@hwrd:matrix.org` in the Matrix chat.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Build is not reproducible, because generated source files (.c/.h/) are not
deterministic, mostly because Lua pairs() is unordered by design (for security).
https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671
https://www.lua.org/manual/5.1/manual.html#pdf-next
> The order in which the indices are enumerated is not specified [...]
>
>> The hardening of the VM deliberately randomizes string hashes. This in
>> turn randomizes the iteration order of tables with string keys.
Solution:
- Update the code generation scripts to be deterministic.
- That is only a partial solution: the exported function
(funcs_metadata.generated.h) and ui event
(ui_events_metadata.generated.h) metadata have some mpack'ed
tables, which are not serialized deterministically.
- As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can
inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0)
that preserves table order.
- Longer-term we should change the mpack'ed data structure so it no
longer uses tables keyed by strings.
Closes #20124
Co-Authored-By: dundargoc <gocdundar@gmail.com>
Co-Authored-By: Arnout Engelen <arnout@bzzt.net>
|
| |
| |
| |
| |
| |
| | |
Problem: Apache thrift files are not recognized.
Solution: Add a pattern for thrift files. (Amaan Qureshi, closes vim/vim#11859)
https://github.com/vim/vim/commit/f3da4c8427b1b12d7aaffa307ec085ca97ea9ad9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to the specification `workspace/applyEdit` must be called with
`ApplyWorkspaceEditParams`.
So far the client just returned, which could lead to a misleading error
on the server side because `workspace/applyEdit` must respond with a
`ApplyWorkspaceEditResult`.
This adds an assertion to clarify that the server is violating the
specification.
See https://github.com/neovim/neovim/issues/21925
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Cap'n Proto files are not recognized.
Solution: Add a pattern and the "capnp" filetype. (Amaan Qureshi,
closes vim/vim#11862)
https://github.com/vim/vim/commit/040e795e8da05ff38cc896528d4dcad100f0b584
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
- also unset b:ts_highlight on stop()
Fixes: #21836
|
| | |
|
| |
| |
| |
| | |
* refactor: remove all vimscript from nvim/health
* fixup: previous method broke if you had a folder named 'x-lua'
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Some Bazel files are not recognized.
Solution: Add an extra Bazel pattern. (Keith Smily, closes vim/vim#11807)
https://github.com/vim/vim/commit/3213952966896ffb1d8fa186bcf8c43359fca0f0
Co-authored-by: Keith Smiley <keithbsmiley@gmail.com>
|
| | |
|
| |
| |
| |
| |
| | |
This small changes just ensures that if you're using `convert_input_to_markdown_lines`
without `contents` you don't get a warning (when using something like neodev) that
there is an expected second param, since it can be nil.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: go checksum files are not recognized.
Solution: Add the name of go checksum files. (Amaan Qureshi, closes vim/vim#11803)
https://github.com/vim/vim/commit/043d7b2c84cda275354aa023b5769660ea70a168
Co-authored-by: Amaan Q <amaanq12@gmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Small, but I was getting warnings about my usage of
`vim.lsp.buf_notify(bufnr, method, {example = example})` since the docs
say that `params` must be a string, however this can really be anything
when it's passed to `rpc.notify` since we just end up calling
`vim.json.encode(payload)` on it. This fixes the docs in those two
places and regenerates them.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: smithy files are not recognized.
Solution: Add a pattern for Smithy files. (Chris Kipp, closes vim/vim#11804)
https://github.com/vim/vim/commit/f68cddabffcbc5b8fbfe9003182cb4b55ff8d72c
Co-authored-by: Chris Kipp <ckipp@pm.me>
|
| |
| |
| |
| | |
Problem: Smali files are not recognized.
Solution: Add a pattern for Smali files. (Amaan Qureshi, closes vim/vim#11801)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
No easy way to position a LSP hover window relative to mouse.
Solution:
Introduce another option to the `relative` key in `nvim_open_win()`.
With this PR it should be possible to override the handler and do something
similar to this https://github.com/neovim/neovim/pull/19481#issuecomment-1193248674
to have hover information displayed from the mouse.
Test case:
```lua
local util = require('vim.lsp.util')
local function make_position_param(window, offset_encoding)
window = window or 0
local buf = vim.api.nvim_win_get_buf(window)
local row, col
local mouse = vim.fn.getmousepos()
row = mouse.line
col = mouse.column
offset_encoding = offset_encoding or util._get_offset_encoding(buf)
row = row - 1
local line = vim.api.nvim_buf_get_lines(buf, row, row + 1, true)[1]
if not line then
return { line = 0, character = 0 }
end
if #line < col then
return { line = 0, character = 0 }
end
col = util._str_utfindex_enc(line, col, offset_encoding)
return { line = row, character = col }
end
local make_params = function(window, offset_encoding)
window = window or 0
local buf = vim.api.nvim_win_get_buf(window)
offset_encoding = offset_encoding or util._get_offset_encoding(buf)
return {
textDocument = util.make_text_document_params(buf),
position = make_position_param(window, offset_encoding),
}
end
local hover_timer = nil
vim.o.mousemoveevent = true
vim.keymap.set({ '', 'i' }, '<MouseMove>', function()
if hover_timer then
hover_timer:close()
end
hover_timer = vim.defer_fn(function()
hover_timer = nil
local params = make_params()
vim.lsp.buf_request(
0,
'textDocument/hover',
params,
vim.lsp.with(vim.lsp.handlers.hover, {
silent = true,
focusable = false,
relative = 'mouse',
})
)
end, 500)
return '<MouseMove>'
end, { expr = true })
```
|
| |
| |
| |
| |
| | |
For users using vim.lsp.start it can be useful to get an
overview of active client that is less verbose than a full `:lua
=vim.lsp.get_active_clients()`
|
| | |
|
| |
| |
| |
| |
| | |
(#21665)
Co-authored-by: maozhongzhou <maozhongzhou@wps.cn>
|
| | |
|
| |\
| | |
| | | |
Builtin EditorConfig support
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is intentionally _not_ copied from Vim because our syntax file
makes use of Lua to dynamically generate a list of valid EditorConfig
properties. This requires the builtin editorconfig module, which Vim
does not have.
|
| |/
| |
| | |
Fixes #21497
|
| |
| |
| |
| | |
This reverts a change introduced in
4ace9e7e417fe26c8b73ff1d6042e6e4f3df9ebf.
|
| |
| |
| |
| | |
(#21624)
|
| |
| |
| | |
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| | |
|
| |\
| | |
| | | |
fix(filetype): make .tex filetype detection match Vim
|
| | |
| | |
| | |
| | | |
Fixes Issue #21594.
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Currently once you retrieve the lenses you're pretty much stuck with
them as saving new lenses is additive.
Adding a dedicated method to reset lenses allows users to toggle lenses
on/off which can be useful for language servers where they are noisy or
expensive and you only want to see them temporary.
|
| | |
|
| |
| |
| | |
Fixes https://github.com/neovim/neovim/issues/21523
|
| |
| |
| |
| |
| | |
Fixes #21543
This should provide a better user experience when appending or prepending text to a word that has a semantic token extmark. More often than not, the appended/prepended text to the word will end up becoming part of the token anyway, so just use that extmark as the user types.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Not all postfix files are recognized.
Solution: Recognize main.cf.proto files. (closes vim/vim#11732)
https://github.com/vim/vim/commit/09ce0b8e1197c85dacf97e75b9b9ac18e0d192df
Co-authored-by: KodeToad <3880336+KodeToad@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: jq files are not recognized.
Solution: Add detection of Jq files. (David McDonald, closes vim/vim#11743)
https://github.com/vim/vim/commit/b9a1edfc5434f2a3ac50b1a178d3c85aa417b798
Co-authored-by: David McDonald <dgmcdona@uno.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: FHIR Shorthand files are not recognized.
Solution: Add a pattern to detect FSH files. (Matthew Gramigna,
closes vim/vim#11738)
https://github.com/vim/vim/commit/c9207d5d79310bd4628ce46d8db588fac17878a0
Co-authored-by: mgramigna <mgramigna@mitre.org>
|
| |\ |
|
| | |
| | |
| | |
| | | |
Added option depth to allow recursively searching a directory tree.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Some jsonc files are not recognized.
Solution: Add patterns for jsonc and move some from json to jsonc.
(closes vim/vim#11711)
https://github.com/vim/vim/commit/104b2ff4d0ec9248ba0b979aa3bbccb65fcad422
Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
|
| | | |
|
| | |
| | |
| | | |
Sort diagnostics by column number in quickfix list
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The BufWipeout autocmd is not 100% reliable and may leave stale entries
in the cache. This is sort of a hack/workaround to ensure
`vim.diagnostic.reset` calls don't fail if there are stale cache entries
but instead clears them
Fixes errors like
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: Invalid buffer id: 22
stack traceback:
[C]: in function 'nvim_exec_autocmds'
/usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: in function 'reset'
|