summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/uri.lua
AgeCommit message (Collapse)AuthorFiles
2026-03-13refactor: rename _ensure_integer => _assert_integerJustin M. Keyes1
2026-03-12refactor: integer functions, optimize asserts #34112Lewis Russell1
refactor(lua): add integer coercion helpers Add vim._tointeger() and vim._ensure_integer(), including optional base support, and switch integer-only tonumber()/assert call sites in the Lua runtime to use them. This also cleans up related integer parsing in LSP, health, loader, URI, tohtml, and Treesitter code. supported by AI
2025-01-27fix: resolve all remaining LuaLS diagnosticsLewis Russell1
2024-12-11fix(uri): uri_encode encodes brackets incorrectly for RFC2732 #31284Jonny Kong1
**Problem:** The brackets in the RFC2732 regular expression are currently unescaped, causing them to be misinterpreted as special characters denoting character groups rather than as literal characters. **Solution:** Escape the brackets. Fix #31270
2024-02-28fix(lua): remove uri fragment from file paths (#27647)Ilia Choly1
Problem: Some LSP servers return `textDocument/documentLink` responses containing file URIs with line/column numbers in the fragment. `vim.uri_to_fname` returns invalid file names for these URIs. Solution: Remove the URI fragment from file URIs.
2024-02-27feat(docs): replace lua2dox.luaLewis Russell1
Problem: The documentation flow (`gen_vimdoc.py`) has several issues: - it's not very versatile - depends on doxygen - doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C. - The intermediate XML files and filters makes it too much like a rube goldberg machine. Solution: Re-implement the flow using Lua, LPEG and treesitter. - `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic. - `lua2dox.lua` is gone! - No more XML files. - Doxygen is now longer used and instead we now use: - LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`). - LPEG for C parsing (see `scripts/cdoc_parser.lua`) - Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`). - Treesitter for Markdown parsing (see `scripts/text_utils.lua`). - The generated `runtime/doc/*.mpack` files have been removed. - `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly. - Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
2024-02-06docs: small fixes (#27213)dundargoc1
Co-authored-by: Matthieu Coudron <886074+teto@users.noreply.github.com>
2023-09-23docs: fix type warningsMaria José Solano1
2023-08-01fix(loader): cache path ambiguity #24491Tyler Miller1
Problem: cache paths are derived by replacing each reserved/filesystem- path-sensitive char with a `%` char in the original path. With this method, two different files at two different paths (each containing `%` chars) can erroneously resolve to the very same cache path in certain edge-cases. Solution: derive cache paths by url-encoding the original (path) instead using `vim.uri_encode()` with `"rfc2396"`. Increment `Loader.VERSION` to denote this change.
2023-07-18docs(lua): more improvements (#24387)Lewis Russell1
* docs(lua): teach lua2dox how to table * docs(lua): teach gen_vimdoc.py about local functions No more need to mark local functions with @private * docs(lua): mention @nodoc and @meta in dev-lua-doc * fixup! Co-authored-by: Justin M. Keyes <justinkz@gmail.com> --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2023-07-10fix(lint): lint warnings #24226Raphael1
2023-04-13refactor: remove modelines from Lua filesGregory Anders1
Now that we have builtin EditorConfig support and a formatting check in CI, these are not necessary.
2023-03-04docs(uri): number → integer (#22515)Jaehwang Jung1
2022-05-09chore: format runtime with styluaChristian Clason1
2021-12-26fix(uri): change scheme pattern to not include the comma character (#16797)Dmytro Meleshko1
2021-11-18fix(uri): use valid EmmyLua annotations (#16359)Mathias Fußenegger1
See: - https://emmylua.github.io/annotations/param.html - https://emmylua.github.io/annotations/return.html
2021-10-15fix: correctly capture uri scheme on windows (#16027)Michael Lingelbach1
closes https://github.com/neovim/neovim/issues/15261 * normalize uri path to forward slashes on windows * use a capture group on windows that avoids mistaking drive letters as uri scheme
2021-08-22docs: make Lua docstrings consistent #15255Gregory Anders1
The official developer documentation in in :h dev-lua-doc specifies to use "--@" for special/magic tokens. However, this format is not consistent with EmmyLua notation (used by some Lua language servers) nor with the C version of the magic docstring tokens which use three comment characters. Further, the code base is currently split between usage of "--@", "---@", and "--- @". In an effort to remain consistent, change all Lua magic tokens to use "---@" and update the developer documentation accordingly.
2021-07-10feat(vim.uri): Allow URI schemes other than file: without authorityTom Payne1
2021-07-10fix(lsp): accept file URIs without a hostnameAlessandro Pezzoni1
RFC 8089, which defines the file URI scheme, also allows URIs without a hostname, i.e. of the form file:/path/to/file. These are returned by some language servers and accepted by other LSP implementations, such as VSCode's, so it is reasonable for us to accept them as well.
2020-09-14doc: Add docs for uri functions (#12887)TJ DeVries1
2020-05-22Change uri_to_fname to not convert non-file URIs (#12351)Mathias Fußenegger1
* Change uri_to_fname to not convert non-file URIs A URI with a scheme other than file doesn't have a local file path. * fixup! Change uri_to_fname to not convert non-file URIs * fixup! fixup! Change uri_to_fname to not convert non-file URIs
2020-05-04LSP: Avoid URI-to-fname conversion for non-file URIs #12243Mathias Fußenegger1
Fixes https://github.com/neovim/neovim/issues/12210
2020-03-30vim.uri: fix uri_to_fname (#12059)Hirokazu Hata1
fix: #12056 If the colon of the drive letter of windows is URI encoded, it doesn't match the expected pattern, so decode it first.
2019-11-20Add vim.uri_to_bufnrAshkan Kiani1
2019-11-13lua LSP client: initial implementation (#11336)Ashkan Kiani1
Mainly configuration and RPC infrastructure can be considered "done". Specific requests and their callbacks will be improved later (and also served by plugins). There are also some TODO:s for the client itself, like incremental updates. Co-authored by at-tjdevries and at-h-michael, with many review/suggestion contributions.