diff options
author | Famiu Haque <famiuhaque@proton.me> | 2024-11-04 19:00:12 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-04 05:00:12 -0800 |
commit | a27419f3fc540f66567f4559a796cd6758f1bb1f (patch) | |
tree | ff8d1f00c01bb391facba5d239a58eb5aa07eb44 /runtime/lua/vim/_meta/options.lua | |
parent | 04d178053fee7be92c8a7634a1acfe373c758638 (diff) | |
download | rneovim-a27419f3fc540f66567f4559a796cd6758f1bb1f.tar.gz rneovim-a27419f3fc540f66567f4559a796cd6758f1bb1f.tar.bz2 rneovim-a27419f3fc540f66567f4559a796cd6758f1bb1f.zip |
feat(options)!: disallow setting hidden options #28400
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.
Diffstat (limited to 'runtime/lua/vim/_meta/options.lua')
-rw-r--r-- | runtime/lua/vim/_meta/options.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index f9886957a7..45ab14a774 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1106,7 +1106,7 @@ vim.bo.cot = vim.bo.completeopt vim.go.completeopt = vim.o.completeopt vim.go.cot = vim.go.completeopt ---- only for MS-Windows +--- only modifiable in MS-Windows --- When this option is set it overrules 'shellslash' for completion: --- - When this option is set to "slash", a forward slash is used for path --- completion in insert mode. This is useful when editing HTML tag, or @@ -5547,7 +5547,7 @@ vim.o.srr = vim.o.shellredir vim.go.shellredir = vim.o.shellredir vim.go.srr = vim.go.shellredir ---- only for MS-Windows +--- only modifiable in MS-Windows --- When set, a forward slash is used when expanding file names. This is --- useful when a Unix-like shell is used instead of cmd.exe. Backward --- slashes can still be typed, but they are changed to forward slashes by @@ -5564,7 +5564,7 @@ vim.go.srr = vim.go.shellredir --- Also see 'completeslash'. --- --- @type boolean -vim.o.shellslash = false +vim.o.shellslash = true vim.o.ssl = vim.o.shellslash vim.go.shellslash = vim.o.shellslash vim.go.ssl = vim.go.shellslash |