aboutsummaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* ci(release)!: remove backwards compatible releasesdundargoc2025-01-28
| | | | | | | Remove `nvim-linux64.tar.gz` and `nvim.appimage` as maintaining these is too much work. Also fix directory names to be consistent.
* fix: resolve all remaining LuaLS diagnosticsLewis Russell2025-01-27
|
* ci(release): add linux-arm64 appimage and tarballChristian Clason2025-01-27
| | | | | | | Problem: No releases for ARM Linux. Solution: Provide appimages and tarballs for `linux-arm64`. Rename x86 releases to `linux-x86_64` for consistency.
* build(bump_deps): abort if archive doesn't existdundargoc2025-01-27
| | | | Also use git tag archive over commit sha if possible.
* refactor: simplify bump_deps.luadundargoc2025-01-18
| | | | Simplify usage and remove redundant flags and code.
* fix(options): better handling of empty valuesLewis Russell2025-01-13
| | | | | | | | | | | | | | | Problem: Whether an option is allowed to be empty isn't well defined and isn't properly checked. Solution: - For non-list string options, explicitly check the option value if it is empty. - Annotate non-list string options that can accept an empty value. - Adjust command completion to ignore the empty value. - Render values in Lua meta files
* docs: misc #31867Justin M. Keyes2025-01-09
|
* docs: misc #31822Justin M. Keyes2025-01-03
| | | | | * docs: drop "lua-" prefix from most treesitter tags * docs: move mouse section from tui.txt to gui.txt * docs: misc
* docs(api): return type of nvim_get_keymap() #31708Shihua Zeng2024-12-24
|
* docs(annotations): added `---@generic` supportColin Kennedy2024-12-13
|
* refactor(lsp/rpc): move transport logic to separate moduleLewis Russell2024-12-12
|
* feat(lsp): add vim.lsp.config and vim.lsp.enableLewis Russell2024-12-10
| | | | | | | | | | | | | | | | | | | | Design goals/requirements: - Default configuration of a server can be distributed across multiple sources. - And via RTP discovery. - Default configuration can be specified for all servers. - Configuration _can_ be project specific. Solution: - Two new API's: - `vim.lsp.config(name, cfg)`: - Used to define default configurations for servers of name. - Can be used like a table or called as a function. - Use `vim.lsp.confg('*', cfg)` to specify default config for all servers. - `vim.lsp.enable(name)` - Used to enable servers of name. Uses configuration defined via `vim.lsp.config()`.
* docs: do not escape Lua keywords #31467Gregory Anders2024-12-06
|
* docs: graduate intro.txt to "flow layout" #31462Justin M. Keyes2024-12-05
| | | - move credits and backers to credits.txt
* docs: graduate gui.txt to "flow layout"Justin M. Keyes2024-12-05
|
* feat(lsp): support `textDocument/foldingRange` (#31311)Yi Ming2024-11-29
| | | | | | | | | | | | | | | | | | | * refactor(shared): extract `vim._list_insert` and `vim._list_remove` * feat(lsp): add `vim.lsp.foldexpr()` * docs(lsp): add a todo for state management * feat(lsp): add `vim.lsp.folding_range.foldclose()` * feat(lsp): schedule `foldclose()` if the buffer is not up-to-date * feat(lsp): add `vim.lsp.foldtext()` * feat(lsp): support multiple folding range providers * refactor(lsp): expose all folding related functions under `vim.lsp.*` * perf(lsp): add `lsp.MultiHandler` for do `foldupdate()` only once
* feat(keysets): teach Union and LuaRefOfLewis Russell2024-11-25
|
* feat(lsp): deprecate non-method client functionsLewis Russell2024-11-20
| | | | | | | | | | | | | | Deprecated: - `client.request()` -> `client:request()` - `client.request_sync()` -> `client:request_sync()` - `client.notify()` -> `client:notify()` - `client.cancel_request()` -> `client:cancel_request()` - `client.stop()` -> `client:stop()` - `client.is_stopped()` `client:is_stopped()` - `client.supports_method()` -> `client:supports_method()` - `client.on_attach()` -> `client:on_attach()` Fixed docgen to link class fields to the full function doc.
* refactor(options): remove `.indir`, redesign option scopes #31066Famiu Haque2024-11-16
| | | | | | | | | | | | | | | | | | | | | | Problem: The way option scopes currently work is inflexible and does not allow for nested option scopes or easily finding the value of an option at any arbitrary scope without having to do long handwritten switch-case statements like in `get_varp()`. `.indir` is also confusing and redundant since option indices for each scope can be autogenerated. Solution: Expand option scopes in such a way that an option can support any amount of scopes using a set of scope flags, similarly to how it's already done for option types. Also make options contain information about its index at each scope it supports. This allows for massively simplifying `get_varp()` and `get_varp_scope()` in the future by just using a struct for options at each scope. This would be done by creating a table that stores the offset of an option's variable at a scope by using the option's index at that scope as a key. This PR also autogenerates enums for option indices at each scope to remove the need for `.indir` entirely, and also to allow easily iterating over options all options that support any scope. Ref: #29314
* feat(options)!: disallow setting hidden options #28400Famiu Haque2024-11-04
| | | | | | | | | | | | | | | | | Problem: There are three different ways of marking an option as hidden, `enable_if = false`, `hidden = true` and `immutable = true`. These also have different behaviors. Options hidden with `enable_if = false` can't have their value fetched using Vim script or the API, but options hidden with `hidden = true` or `immutable = true` can. On the other hand, options with `hidden = true` do not error when trying to set their value, but options with `immutable = true` do. Solution: Remove `enable_if = false`, remove the `hidden` property for options, and use `immutable = true` to mark an option as hidden instead. Also make hidden option variable pointers always point to the default value, which allows fetching the value of every hidden option using Vim script and the API. This does also mean that trying to set a hidden option will now give an error instead of just being ignored.
* feat(lsp)!: remove client-server handlers from vim.lsp.handlersLewis Russell2024-11-01
| | | | | | | | | | - Partition the handlers in vim.lsp.handlers as: - client to server response handlers (RCS) - server to client request handlers (RSC) - server to client notification handlers (NSC) Note use string indexes instead of protocol.methods for improved typing in LuaLS (tip: use hover on RCS, RSC or NSC).
* fix(lsp.protocal): improve typing of constantsLewis Russell2024-10-24
|
* docs: miscdundargoc2024-10-23
| | | | | | | Co-authored-by: David Pedersen <limero@me.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Leo Schlosser <Leo.Schlosser@Student.HTW-Berlin.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* docs(options): remove description for hidden options #30903Famiu Haque2024-10-22
| | | | | | | | | Problem: Hidden options are documented despite being no-ops. Solution: Remove docs for hidden options. Move tags for options that we plan to restore, to ":help nvim-missing". Move tags for permanently removed options, to ":help nvim-removed".
* vim-patch:9.1.0797: testing of options can be further improved (#30893)zeertzjq2024-10-22
| | | | | | | | | | | Problem: testing of options can be further improved Solution: split the generated option test into test_options_all.vim, add more test cases, save and restore values, fix use-after-free closes: vim/vim#15894 https://github.com/vim/vim/commit/6eca04e9f1d446dc509ba51e32da56fa413fe2f0 Co-authored-by: Milly <milly.ca@gmail.com>
* feat(vim.validate): improve fast form and deprecate spec formLewis Russell2024-10-21
| | | | | | | | | | | | | | Problem: `vim.validate()` takes two forms when it only needs one. Solution: - Teach the fast form all the features of the spec form. - Deprecate the spec form. - General optimizations for both forms. - Add a `message` argument which can be used alongside or in place of the `optional` argument.
* refactor: rename vim.highlight => vim.hlJustin M. Keyes2024-10-21
| | | | | | | | | | | | Problem: - `vim.highlight` module does not follow `:help dev-name-common`, which documents the name for "highlight" as "hl". - Shorter names are usually preferred. Solution: Rename `vim.highlight` to `vim.hl`. This is not a breaking change until 2.0 (or maybe never).
* vim-patch: make gen_opt_test.vim work with Nvim (#30850)zeertzjq2024-10-18
| | | | | | | Problem: Insufficient test coverage for validation of option values. Solution: Port Vim's gen_opt_test.vim and make it work with Nvim. vim-patch:9.1.0760: tests: no error reported, if gen_opt_test.vim fails vim-patch:9.1.0791: tests: errors in gen_opt_test.vim are not shown
* fix(gen_help_html): first tag in h2 is broken #30720Justin M. Keyes2024-10-08
| | | | | | | | | | | | | | | Problem: In h2 headings, the first tag points to an invalid anchor. This used to work but regressed a few months ago, possibly related to ceea6898a8bdcb6c4cfe06b8dc4739c144e6b1f8. Solution: - Simplify the logic, don't try to be clever: - Always use to_heading_tag() for the h2 `id`. - Also: - Render tags as `<span>`, because `<code>` is unnecessary and doesn't look great in headings. - In the main h1, use "foo.txt" as the anchor `name` (rarely used), prefer the next found tag for the `href`.
* docs: generate params/returns in builtin.txt #30654Justin M. Keyes2024-10-07
|
* feat(docs): improve `@see` meta docstrings #30693Justin M. Keyes2024-10-06
|
* fix(docs): markdown instead of vimdoc in meta docstrings #30680Justin M. Keyes2024-10-06
| | | | | LuaLS/meta docstrings expect markdown, not vimdoc. This matters for lists, codeblocks, etc. Also, line length doesn't matter for docstrings.
* fix(docs): missing `@returns` desc in _meta/api.lua #30673Justin M. Keyes2024-10-05
|
* docs: more `@since` annotations #30660Justin M. Keyes2024-10-04
|
* docs: render `@since` versions, 0 means experimental #30649Justin M. Keyes2024-10-04
| | | | | | | | An implication of this current approach is that `NVIM_API_LEVEL` should be bumped when a new Lua function is added. TODO(future): add a lint check which requires `@since` on all new functions. ref #25416
* docs(treesitter): generate TSNode, TSTree docs #30643Riley Bruins2024-10-03
| | | | | | | | | | | | **Problem:** The documentation for `TSNode` and `TSTree` methods is incomplete from the LSP perspective. This is because they are written directly to the vimdoc, rather than in Lua and generated to vimdoc. **Solution:** Migrate the docs to Lua and generate them into the vimdoc. This requires breaking up the `treesitter/_meta.lua` file into a directory with a few different modules. This commit also makes the vimdoc generator slightly more robust with regard to sections that have multiple help tags (e.g. `*one* *two*`)
* docs: improve luacats support #30580James Trew2024-10-03
| | | | | | | Some composite/compound types even as basic as `(string|number)[]` are not currently supported by the luacats LPEG grammar used by gen_vimdoc. It would be parsed & rendered as just `string|number`. Changeset adds better support for these types.
* docs(gen_help_html.lua): h4 pseudo-heading layoutJustin M. Keyes2024-10-01
| | | | | | | | | | | | | | | Problem: The <br> hack in a0c64fe816f8 causes weird layout if a "h4 pseudo-heading" is not the only tag on the line. For example in the help text below, the "*'buflisted'*" tag was treated as h4 and followed by <br>, which is obviously wrong: *'buflisted'* *'bl'* *'nobuflisted'* *'nobl'* *E85* 'buflisted' 'bl' boolean (default on) Solution: Only treat a tag as "h4 pseudo-heading" if it is the only tag in the line. This is fragile, but in practice seems to get the right balance.
* docs(gen_help_html.lua): h4 pseudo-heading layout #30609Justin M. Keyes2024-10-01
| | | | | | | | | Problem: The right-aligned tag "pseudo-heading" layout mushes together with the left-aligned text. This is especially messy in a narrow viewport. Solution: Put a `<br>` on it. This is a hack until tree-sitter-vimdoc recognizes these pseudo-headings.
* docs: graduate editorconfig.txt to "flow layout"Justin M. Keyes2024-09-30
| | | | fix #25401
* fix(treesitter): suppress get_parser warnings via opts.errorRiley Bruins2024-09-28
|
* docs: render @see, @note items in _meta/api.lua #30494Justin M. Keyes2024-09-25
|
* refactor(api)!: rename Dictionary => DictJustin M. Keyes2024-09-23
| | | | | | | | | | | | | | In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not (in practice) a breaking change.
* docs: graduate tui.txt to "flow layout" #30413Justin M. Keyes2024-09-18
|
* docs(tui): rename term.txt, nvim_terminal_emulator.txt #30398Justin M. Keyes2024-09-18
| | | | | | | | | | | | Problem: It has long been a convention that references to the builtin terminal UI should mention "tui", not "term", in order to avoid ambiguity vs the builtin `:terminal` feature. The final step was to rename term.txt; let's that step. Solution: - rename term.txt => tui.txt - rename nvim_terminal_emulator.txt => terminal.txt - `gen_help_html.lua`: generate redirects for renamed pages.
* feat(treesitter): start moving get_parser to return nil #30313Riley Bruins2024-09-13
| | | | | | | | | | | | | | | | | | | **Problem:** `vim.treesitter.get_parser` will throw an error if no parser can be found. - This means the caller is responsible for wrapping it in a `pcall`, which is easy to forget - It also makes it slightly harder to potentially memoize `get_parser` in the future - It's a bit unintuitive since many other `get_*` style functions conventionally return `nil` if no object is found (e.g. `get_node`, `get_lang`, `query.get`, etc.) **Solution:** Return `nil` if no parser can be found or created - This requires a function signature change, and some new assertions in places where the parser will always (or should always) be found. - This commit starts by making this change internally, since it is breaking. Eventually it will be rolled out to the public API.
* fix(scripts): update bundled dependencies in bump_depsChristian Clason2024-09-11
|
* docs: misc #28970Justin M. Keyes2024-09-01
|
* fix(docs): wrong return value annotation for `nvim_buf_get_extmarks`JonnyKong2024-08-25
|
* docs(gen_help_html): wrap headings for narrow viewport #29903Rosen Stoyanov2024-08-20
| | | | | | | | Problem: The headings and help tags overlap when browsing the docs in neovim.io/doc/user/ from a mobile phone. Solution: Apply the correct CSS rules so that the headings and help tags wrap nicely below one another.