aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/options.lua
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'upstream/master' into mix_20240309HEADrahmJosh Rahm2025-02-05
|\
| * vim-patch:9.1.1022: linematch option value not completedzeertzjq2025-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: linematch option value not completed (after v9.1.1009) Solution: Update diffoption completion values related: vim/vim#9661 closes: vim/vim#16437 https://github.com/vim/vim/commit/9162e636b31dcac57876cbdec15a683cedd9760e Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.1.1009: diff feature can be improvedzeertzjq2025-02-04
| | | | | | | | | | | | | | | | | | | | | | | | Problem: diff feature can be improved Solution: include the linematch diff alignment algorithm (Jonathon) closes: vim/vim#9661 https://github.com/vim/vim/commit/7c7a4e6d1ad50d5b25b42aa2d5a33a8d04a4cc8a Co-authored-by: Jonathon <jonathonwhite@protonmail.com>
| * vim-patch:9.1.1056: Vim doesn't highlight to be inserted text when ↵zeertzjq2025-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | completing (#32251) Problem: Vim doesn't highlight to be inserted text when completing Solution: Add support for the "preinsert" 'completeopt' value (glepnir) Support automatically inserting the currently selected candidate word that does not belong to the latter part of the leader. fixes: vim/vim#3433 closes: vim/vim#16403 https://github.com/vim/vim/commit/edd4ac3e895ce16034c7e098f1d68e0155d97886 Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:9.1.1049: insert-completed items are always sortedzeertzjq2025-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: insert-completed items are always sorted, although the LSP spec[1] standard defines sortText in the returned completionitem list. This means that the server has sorted the results. When fuzzy is enabled, this will break the server's sorting results. Solution: disable sorting of candidates when "nosort" is set in 'completeopt' [1] https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem closes: vim/vim#16501 https://github.com/vim/vim/commit/f400a0cc41113eb75516bdd7f38aeaa15208ba2c Co-authored-by: glepnir <glephunter@gmail.com>
| * refactor(options): generic expand and did_set callbacks (#32011)Lewis Russell2025-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor(options): generic expand and did_set callbacks Problem: Many options have similar callbacks to check the values are valid. Solution: Generalize these callbacks into a single function that reads the option table. * refactor: gen_options.lua refactor: gen_options.lua - inline get_cond * refactor(options): use a simpler format for the common default
| * 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
| * feat(treesitter): async parsingRiley Bruins2025-01-12
| | | | | | | | | | | | | | | | | | | | | | | | **Problem:** Parsing can be slow for large files, and it is a blocking operation which can be disruptive and annoying. **Solution:** Provide a function for asynchronous parsing, which accepts a callback to be run after parsing completes. Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: Luuk van Baal <luukvbaal@gmail.com> Co-authored-by: VanaIgr <vanaigranov@gmail.com>
| * docs: miscdundargoc2025-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Axel <axelhjq@gmail.com> Co-authored-by: Colin Kennedy <colinvfx@gmail.com> Co-authored-by: Daiki Noda <sys9kdr@users.noreply.github.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Jean-Jacq du Plessis <1030058+jj-du-plessis@users.noreply.github.com> Co-authored-by: Juan Giordana <juangiordana@gmail.com> Co-authored-by: Lincoln Wallace <locnnil0@gmail.com> Co-authored-by: Matti Hellström <hellstrom@scm.com> Co-authored-by: Steven Locorotondo <steven.locorotondo@justeattakeaway.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: ifish <fishioon@live.com>
| * feat(terminal)!: cursor shape and blink (#31562)Gregory Anders2024-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a terminal application running inside the terminal emulator sets the cursor shape or blink status of the cursor, update the cursor in the parent terminal to match. This removes the "virtual cursor" that has been in use by the terminal emulator since the beginning. The original rationale for using the virtual cursor was to avoid having to support additional UI methods to change the cursor color for other (non-TUI) UIs, instead relying on the TermCursor and TermCursorNC highlight groups. The TermCursor highlight group is now used in the default 'guicursor' value, which has a new entry for Terminal mode. However, the TermCursorNC highlight group is no longer supported: since terminal windows now use the real cursor, when the window is not focused there is no cursor displayed in the window at all, so there is nothing to highlight. Users can still use the StatusLineTermNC highlight group to differentiate non-focused terminal windows. BREAKING CHANGE: The TermCursorNC highlight group is no longer supported.
| * vim-patch:ed89206: runtime(doc): add a note about inclusive motions and ↵zeertzjq2024-12-15
| | | | | | | | | | | | | | | | | | | | exclusive selection related: vim/vim#16202 https://github.com/vim/vim/commit/ed89206efe404a94e8424ccfe03c978fd93470f1 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * 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()`.
| * vim-patch:9.1.0911: Variable name for 'messagesopt' doesn't match short namezeertzjq2024-12-08
| | | | | | | | | | | | | | | | | | | | Problem: Variable name for 'messagesopt' doesn't match short name (after v9.1.0908) Solution: Change p_meo to p_mopt. Add more details to docs. closes: vim/vim#16182 https://github.com/vim/vim/commit/8cc43daee1f485c9abf1de3c638cce7835b9f861
| * vim-patch:9.1.0910: 'messagesopt' does not check max wait timezeertzjq2024-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'messagesopt' does not check max wait time (after v9.1.0908) Solution: Check for max wait value (Shougo Matsushita) closes: vim/vim#16183 https://github.com/vim/vim/commit/d9e9f89e0ffd6e7ce5e2a7f8f1ace5471e37c210 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
| * vim-patch:9.1.0908: not possible to configure :messages (#31492)zeertzjq2024-12-07
| | | | | | | | | | | | | | | | | | | | | | Problem: not possible to configure :messages Solution: add the 'messagesopt' option (Shougo Matsushita) closes: vim/vim#16068 https://github.com/vim/vim/commit/51d4d84d6a7159c6ce9e04b36f8edc105ca3794b Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: h_east <h.east.727@gmail.com>
| * vim-patch:768728b: runtime(doc): Update documentation for "noselect" in ↵dundargoc2024-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | 'completeopt' In particular, make the distinction and interaction between "noinsert" and "noselect" clearer as it was very confusing before. closes: vim/vim#16148 https://github.com/vim/vim/commit/768728b48751c5e937409d12d98bfa1fb4c37266 Co-authored-by: dundargoc <gocdundar@gmail.com>
| * vim-patch:9.1.0890: %! item not allowed for 'rulerformat' (#31369)zeertzjq2024-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: %! item not allowed for 'rulerformat' (yatinlala) Solution: also allow to use %! for rulerformat option (Yegappan Lakshmanan) fixes: vim/vim#16091 closes: vim/vim#16118 https://github.com/vim/vim/commit/ac023e8baae65584537aa3c11494dad6f71770af Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:9.1.0883: message history cleanup is missing some tests (#31331)zeertzjq2024-11-24
| | | | | | | | | | | | | | | | | | | | | | | | Problem: message history cleanup is missing some tests Solution: Add tests, refactor common code into did_set_msghistory() (Shougo Matsushita) closes: vim/vim#16078 https://github.com/vim/vim/commit/9f860a14c308f7a9a27a6850d36790615717a710 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Milly <milly.ca@gmail.com>
| * refactor(options): autogenerate valid values and flag enums for options (#31089)Famiu Haque2024-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Option metadata like list of valid values for an option and option flags are not listed in the `options.lua` file and are instead manually defined in C, which means option metadata is split between several places. Solution: Put metadata such as list of valid values for an option and option flags in `options.lua`, and autogenerate the corresponding C variables and enums. Supersedes #28659 Co-authored-by: glepnir <glephunter@gmail.com>
| * refactor(options): impl default 'titlestring' by format flags #30843zshuzh2024-11-20
| | | | | | | | | | | | | | Problem: Unnecessary C impl of default 'titlestring'. Solutin: Define it using format flags.
* | Merge remote-tracking branch 'upstream/master' into mix_20240309Josh Rahm2024-11-25
|\|
| * 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
| * vim-patch:9.1.0864: message history is fixed to 200 (#31215)zeertzjq2024-11-15
| | | | | | | | | | | | | | | | | | | | | | | | Problem: message history is fixed to 200 Solution: Add the 'msghistory' option, increase the default value to 500 (Shougo Matsushita) closes: vim/vim#16048 https://github.com/vim/vim/commit/4bd9b2b2467e696061104a029000e9824c6c609e Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Milly <milly.ca@gmail.com>
| * refactor(options): remove fileformat macrosFamiu Haque2024-11-05
| |
| * 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.
| * vim-patch:9.1.0831: 'findexpr' can't be used as lambad or Funcref (#31058)zeertzjq2024-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'findexpr' can't be used for lambads (Justin Keyes) Solution: Replace the findexpr option with the findfunc option (Yegappan Lakshmanan) related: vim/vim#15905 closes: vim/vim#15976 https://github.com/vim/vim/commit/a13f3a4f5de9c150f70298850e34747838904995 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * docs(options): shell-powershell #30969Kai Moschcau2024-10-29
| | | | | | | | | | | | | | `-NonInteractive` at least somewhat hints to pwsh/powershell, that shell sessions created from :! are not interactive, though even that is not foolproof, because powershell is weird. `$PSStyle.OutputRendering='plaintext'` causes pwsh/powershell to omit ANSI escape sequences in its output.
| * vim-patch:9.1.0821: 'findexpr' completion doesn't set v:fname to cmdline ↵zeertzjq2024-10-29
| | | | | | | | | | | | | | | | | | | | | | argument Problem: 'findexpr' completion doesn't set v:fname to cmdline argument. Solution: Set v:fname to the cmdline argument as-is (zeertzjq). closes: vim/vim#15934 https://github.com/vim/vim/commit/20e045f78148c0ef0143c33ffe686fee72d29376
| * vim-patch:9.1.0811: :find expansion does not consider 'findexpr'zeertzjq2024-10-29
| | | | | | | | | | | | | | | | | | | | | | | | Problem: :find expansion does not consider 'findexpr' Solution: Support expanding :find command argument using 'findexpr' (Yegappan Lakshmanan) closes: vim/vim#15929 https://github.com/vim/vim/commit/2f6efaccfd5c4e7df1f54ed0f41f329abbe05f60 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:9.1.0810: cannot easily adjust the |:find| commandzeertzjq2024-10-29
| | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot easily adjust the |:find| command Solution: Add support for the 'findexpr' option (Yegappan Lakshmanan) closes: vim/vim#15901 closes: vim/vim#15905 https://github.com/vim/vim/commit/aeb1c97db5b9de4f4903e7f288f2aa5ad6c49440 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * refactor(options): always allocate option values (#30917)Famiu Haque2024-10-27
| | | | | | | | | | | | | | Instead of keeping `P_ALLOCED` and `P_DEF_ALLOCED` flags to check if an option value is allocated, always allocate option values to simplify the logic. Ref: #25672
| * refactor(options)!: use OptVal for option defaults #26691Famiu Haque2024-10-25
| | | | | | | | | | | | | | | | | | Problem: We use `void *` for option default values, which is confusing and can cause problems with type-correctness. It also doesn't accomodate for multitype options. On top of that, it also leads to default boolean option values not behaving correctly on big endian systems. Solution: Use `OptVal` for option default values. BREAKING CHANGE: - `:set {option}<` removes the local value for all global-local options instead of just string global-local options. - `:setlocal {option}<` copies the global value to the local value for number and boolean global-local options instead of removing the local value.
| * vim-patch:9.1.0803: tests: no error check when setting global 'isk'zeertzjq2024-10-24
| | | | | | | | | | | | | | | | | | | | | | Problem: tests: no error check when setting global 'isk' Solution: also parse and check global 'isk' value (Milly) closes: vim/vim#15915 https://github.com/vim/vim/commit/5e7a6a4a106923e45c67dae6810e4c9753f88025 Co-authored-by: Milly <milly.ca@gmail.com>
| * feat(terminal)!: make 'belloff' and 'visualbell' apply to terminal bell (#30859)zeertzjq2024-10-20
| | | | | | | | | | | | | | vim-patch:8.2.4744: a terminal window can't use the bell vim-patch:8.2.4745: using wrong flag for using bell in the terminal BREAKING CHANGE: Bells from :terminal are now silent by default, unless 'belloff' option doesn't contain "term" or "all".
| * vim-patch:6c2fc37: runtime(help): Update help syntaxzeertzjq2024-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makaes the following changes to the vim help syntax: - fix excessive URL detection in help, because `file:{filename}` in doc/options.txt is determined to be a URL. - update highlighting N for :resize in help - split Italian-specific syntax into separate help script - highlight `Note` in parentheses in help - update 'titlestring' behaviour in documentation for invalid '%' format closes: vim/vim#15883 https://github.com/vim/vim/commit/6c2fc377bfbfb6f1a46b1061413cd21116b596ed Co-authored-by: Milly <milly.ca@gmail.com>
| * vim-patch:5bcfb5a: runtime(doc): add some docs for file-watcher programszeertzjq2024-10-15
| | | | | | | | | | | | | | | | fixes: vim/vim#15733 https://github.com/vim/vim/commit/5bcfb5a30cfd8e8574061bdd82a192f47aae09b5 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:7b5e52d: runtime(doc): add preview flag to statusline examplezeertzjq2024-10-15
| | | | | | | | | | | | | | | | | | | | | | | | Problem: The standard statusline example is missing the preview flag "%w" Solution: Add the preview flag "%w" closes: vim/vim#15874 https://github.com/vim/vim/commit/7b5e52d16fb457c90cc44340a6190712aab7e03b Co-authored-by: saher <msaher.shair@gmail.com>
* | Merge remote-tracking branch 'upstream/master' into mix_20240309Josh Rahm2024-11-19
|\|
| * docs: dev-arch, focusable windows #30510Justin M. Keyes2024-10-07
| | | | | | | | - 'statuscolumn' is no longer experimental - add tags for popular searches on neovim.io
| * vim-patch:9.1.0762: 'cedit', 'termwinkey' and 'wildchar' may not be parsed ↵zeertzjq2024-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correctly (#30704) Problem: 'cedit', 'termwinkey' and 'wildchar' may not be parsed correctly Solution: improve string_to_key() function in option.c (Milly) - Problem: `^@` raises an error. Solution: Store as `<Nul>`. - Problem: `<t_xx` does not raise an error. Solution: Raise an error if closing `>` is missing. - Problem: Single `<` or `^` raises an error. It is inconvenient for users. Solution: They are stored as a single character. closes: vim/vim#15811 https://github.com/vim/vim/commit/a9c6f90918d0012d1b8c8c5c1dccb77407f553fb Co-authored-by: Milly <milly.ca@gmail.com>
| * vim-patch:fd4e47e: runtime(doc): clarify the effect of 'startofline' option ↵zeertzjq2024-10-07
| | | | | | | | | | | | | | | | | | (#30701) fixes: vim/vim#15794 https://github.com/vim/vim/commit/fd4e47e06b77fa26cb38f057aba950449e1f47f6 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:ae62fe5: runtime(doc): 'filetype', 'syntax' and 'keymap' only ↵zeertzjq2024-10-03
| | | | | | | | | | | | | | | | | | allow alphanumeric + some characters (#30630) closes: vim/vim#15783 https://github.com/vim/vim/commit/ae62fe5c289e148b92b1d0bb912dcce7ebe14602 Co-authored-by: Milly <milly.ca@gmail.com>
| * vim-patch:9.1.0754: fixed order of items in insert-mode completion menu (#30619)glepnir2024-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: fixed order of items in insert-mode completion menu Solution: Introduce the 'completeitemalign' option with default value "abbr,kind,menu" (glepnir). Adding an new option `completeitemalign` abbr is `cia` to custom the complete-item order in popupmenu. closes: vim/vim#14006 closes: vim/vim#15760 https://github.com/vim/vim/commit/6a89c94a9eeee53481ced1a1260a177bffde4c0f
| * vim-patch:9.1.0752: can set 'cedit' to an invalid value (#30616)zeertzjq2024-10-01
| | | | | | | | | | | | | | | | | | | | | | Problem: can set cedit to an invalid value Solution: Check that the value is a valid key name (Milly) closes: vim/vim#15778 https://github.com/vim/vim/commit/25732435c56d762abb260499680939bd8882c708 Co-authored-by: Milly <milly.ca@gmail.com>
| * refactor!: rename 'jumpoptions' flag "unload" to "clean" (#30418)zeertzjq2024-09-19
| | | | | | Follow-up to #29347
| * fix: replace NVIM with Nvim in default titlestring (#30348)Gregory Anders2024-09-11
| |
| * vim-patch:9.1.0720: Wrong breakindentopt=list:-1 with multibyte or TABs (#30293)zeertzjq2024-09-07
| | | | | | | | | | | | | | | | | | | | Problem: Wrong breakindentopt=list:-1 with multibyte chars or TABs in text matched by 'formatlistpat' (John M Devin) Solution: Use the width of the match text (zeertzjq) fixes: vim/vim#15634 closes: vim/vim#15635 https://github.com/vim/vim/commit/61a6ac4d0066317131528f1b3ecc3b3a2599a75c
| * feat(mbyte): support extended grapheme clusters including more emojibfredl2024-08-30
| | | | | | | | | | | | | | | | | | Use the grapheme break algorithm from utf8proc to support grapheme clusters from recent unicode versions. Handle variant selector VS16 turning some codepoints into double-width emoji. This means we need to use ptr2cells rather than char2cells when possible.
| * feat(term): enable reflow by default (#21124)Christian Clason2024-08-10
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Contents of terminal buffer are not reflown when Nvim is resized. Solution: Enable reflow in libvterm by default. Now that libvterm is vendored, also fix "TUI rapid resize" test failures there. Note: Neovim's scrollback buffer does not support reflow (yet), so lines vanishing into the buffer due to a too small window will be restored without reflow.
| * vim-patch:9.1.0667: Some other options reset curswant unnecessarily when set ↵zeertzjq2024-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | (#30020) Problem: Some other options reset curswant unnecessarily when set. (Andrew Haust) Solution: Don't reset curswant when setting 'comments', 'commentstring' or 'define' (zeertzjq) fixes: vim/vim#15462 closes: vim/vim#15467 https://github.com/vim/vim/commit/b026a293b1e9d7a30f7717e256fe5f7f1dfa20d7