Phelipe Teles
8b9bf3e3b9
fix: vim.opt_local:append ignoring global option value ( #21382 )
...
Closes https://github.com/neovim/neovim/issues/18225
2022-12-12 15:14:50 +00:00
Folke Lemaitre
8c2226fc30
fix(lua): properly configure luacheck and remove local vim = ...
lines ( #20551 )
2022-10-09 12:40:56 +02:00
Lewis Russell
038c711539
refactor(vim.opt): de-nest code
2022-09-09 12:38:15 +01:00
Lewis Russell
9272d20ea4
refactor(vim.opt): use local function syntax
2022-09-09 12:38:15 +01:00
Lewis Russell
ad972990ad
refactor(vim.opt): optimize append/prepend/remove
2022-09-09 12:38:15 +01:00
Lewis Russell
b364bc2c34
refactor(vim.opt): dry up and tidy
2022-09-09 12:38:10 +01:00
Lewis Russell
925a811990
refactor(vim.opt): remove value_mutator()
2022-09-09 09:54:54 +01:00
Lewis Russell
7533ceec13
refactor(vim.opt): unify vim.bo/wo building
2022-09-09 09:54:53 +01:00
Lewis Russell
164752b380
refactor(vim.opt): remove make_meta_accessor()
2022-09-08 17:24:17 +01:00
Lewis Russell
514a1679dc
refactor(vim.opt): simplify get_option_metatype
2022-09-08 15:44:00 +01:00
Lewis Russell
b8de5ada80
refactor(vim.opt): replace _setup with lazy table
2022-09-08 15:42:17 +01:00
Lewis Russell
f21e2a51ba
refactor(vim.opt): remove enums
2022-09-08 15:32:26 +01:00
Lewis Russell
bc88691dbd
refactor(vim.opt): remove del arg
2022-09-08 15:32:26 +01:00
ii14
4dc4cf3467
fix(options): mark winhighlight
as list style ( #19477 )
...
Also add missing fcs, lcs and winhighlight to list of key-value options for `vim.opt`.
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-09-07 17:59:27 +02:00
Christian Clason
aa4f9c5341
refactor(lua): reformat with stylua 0.14.0 ( #19264 )
...
* reformat Lua runtime to make lint CI pass
* reduce max line length to 100
2022-07-07 18:27:18 +02:00
Gregory Anders
87a68b6a3a
refactor: use nvim_{get,set}_option_value for vim.{b,w}o
...
`nvim_get_option_value` and `nvim_set_option_value` better handle
unsetting local options. For instance, this is currently not possible:
vim.bo.tagfunc = nil
This does not work because 'tagfunc' is marked as "local to buffer" and
does not have a fallback global option. However, using :setlocal *does*
work as expected
:setlocal tagfunc=
`nvim_set_option_value` behaves more like :set and :setlocal (by
design), so using these as the underlying API functions beneath vim.bo
and vim.wo makes those two tables act more like :setlocal. Note that
vim.o *already* uses `nvim_set_option_value` under the hood, so that
vim.o behaves like :set.
2022-06-20 09:16:21 -06:00
bfredl
545dc82c1b
perf(tests): don't invoke nvim_get_all_options_info until needed
...
This call alone is responible of 40 000 000 out of 80 000 000
individual alloc/free calls in the test suite.
2022-06-05 00:11:57 +02:00
Christian Clason
aefdc6783c
chore: format runtime with stylua
2022-05-09 16:31:55 +02:00
dundargoc
24f9463dd0
refactor: remove unused runtime lua functions ( #16535 )
2021-12-05 19:11:20 +01:00
Gregory Anders
71ac00ccb5
feat(api): add nvim_get_option_value
2021-12-04 14:04:23 -07:00
dundargoc
caa6992a10
chore: fix typos ( #16361 )
...
Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: István Donkó <istvan.donko@gmail.com>
Co-authored-by: Julian Berman <Julian@GrayVines.com>
Co-authored-by: bryant <bryant@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com>
Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com>
Co-authored-by: Jesse Wertheim <jaawerth@gmail.com>
Co-authored-by: dm1try <me@dmitry.it>
Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: István Donkó <istvan.donko@gmail.com>
Co-authored-by: Julian Berman <Julian@GrayVines.com>
Co-authored-by: bryant <bryant@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com>
Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com>
Co-authored-by: Jesse Wertheim <jaawerth@gmail.com>
Co-authored-by: dm1try <me@dmitry.it>
Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
2021-11-27 11:10:48 -05:00
jadedpasta
490615612e
fix(vim.opt): vimL map string values not trimmed ( #14982 )
...
Options formatted as a list of comma-separated key-value pairs may have
values that contain leading and trailing whitespace characters. For
example, the `listchars` option has a default value of
`"tab:> ,trail:-,nbsp:+"`. When converting this value to a lua table,
leading and trailing whitespace should not be trimmed.
Co-authored-by: Robert Hrusecky <robert.hrusecky@utexas.edu>
2021-07-04 00:14:39 -07:00
TJ DeVries
19b7cef0a7
fix(vim.opt): Fix #14828 with empty values being incorrectly inserted
2021-06-29 09:18:59 -04:00
TJ DeVries
6ecec87c09
fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname style
2021-06-29 08:42:07 -04:00
TJ DeVries
9119ea1bec
fix(vim.opt): Fix #14669 whichwrap now acts as expected
2021-06-29 08:42:07 -04:00
David Zhang
b02e64c4df
fix(vim.opt): Add basic error handling
2021-06-29 08:42:07 -04:00
ckipp01
e6175f6389
fix(vim.opt): Get window options before setting.
...
This closes #14677 , but I also am a little unsure if there are times
where this may not be correct. However, this just changes the behavior
that even if `was_set` was false, we still get for
`nvim_win_get_option`.
2021-06-29 08:42:07 -04:00
TJ DeVries
1d3ee1c441
fix(vim.opt): #14708 Now lets you put duplicate values in wildmode
2021-06-29 08:42:07 -04:00
TJ DeVries
43956dea55
lua: Add vim.opt and fix scopes of vim.o ( #13479 )
...
* lua: Add vim.opt
* fixup: cleaning
* fixup: comments
* ty clason
* fixup: comments
* this is the last commit. period.
2021-05-28 17:24:48 +02:00