aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
Commit message (Collapse)AuthorAge
...
| * | | | refactor(IWYU): move evalarg_T to eval_defs.h (#26716)zeertzjq2023-12-23
| | | | |
| * | | | refactor(options): generate BV_ and WV_ constants (#26705)zeertzjq2023-12-22
| | | | |
| * | | | refactor: run IWYU on entire repodundargoc2023-12-21
| | | | | | | | | | | | | | | | | | | | Reference: https://github.com/neovim/neovim/issues/6371.
| * | | | refactor(IWYU): move decor provider types to decoration_defs.h (#26692)zeertzjq2023-12-21
| | | | |
| * | | | refactor: eliminate cyclic includesdundargoc2023-12-20
| | | | |
| * | | | refactor: use `bool` to represent boolean valuesdundargoc2023-12-19
| | | | |
| * | | | docs: add style rule regarding initializationdundargoc2023-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | Specifically, specify that each initialization should be done on a separate line.
| * | | | refactor: split WIN_EXECUTE() into two functions (#26627)zeertzjq2023-12-18
| | | | |
| * | | | refactor: move non-symbols to defs.h headersdundargoc2023-12-17
| | | | |
| * | | | refactor(options): use hashy for finding options (#26573)Famiu Haque2023-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `findoption()` searches through the options[] table linearly for option names, even though hashy can be used to generate a compile-time hash table for it. Solution: Use hashy to generate a compile time hash table for finding options. This also allows handling option aliases, so we don't need separate options[] table entries for things like 'viminfo'.
| * | | | refactor(options): remove option type macrosFamiu Haque2023-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: We have `P_(BOOL|NUM|STRING)` macros to represent an option's type, which is redundant because `OptValType` can already do that. The current implementation of option type flags is also too limited to allow adding multitype options in the future. Solution: Remove `P_(BOOL|NUM|STRING)` and replace it with a new `type_flags` attribute in `vimoption_T`. Also do some groundwork for adding multitype options in the future. Side-effects: Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no longer gives an error.
| * | | | feat(eval): exists() function supports checking v:lua functions (#26485)Raphael2023-12-12
| | | | | | | | | | | | | | | | | | | | Problem: Vimscript function exists() can't check v:lua functions. Solution: Add support for v:lua functions to exists().
| * | | | refactor(options): convert `opt_idx` variables to `OptIndex`Famiu Haque2023-12-09
| | | | |
| * | | | refactor(options): reduce `findoption()` usageFamiu Haque2023-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Many places in the code use `findoption()` to access an option using its name, even if the option index is available. This is very slow because it requires looping through the options array over and over. Solution: Use option index instead of name wherever possible. Also introduce an `OptIndex` enum which contains the index for every option as enum constants, this eliminates the need to pass static option names as strings.
| * | | | refactor: format casting of negative number better (#26482)zeertzjq2023-12-09
| | | | |
| * | | | Merge pull request #26456 from gpanders/ignore-vim-runtimeGregory Anders2023-12-07
| |\ \ \ \ | | | | | | | | | | | | fix(terminal): ignore $VIM and $VIMRUNTIME in pty jobs
| | * | | | fix(terminal): ignore $VIM and $VIMRUNTIME in pty jobsGregory Anders2023-12-07
| | | | | |
| * | | | | refactor(options): split `get_option_value()` into smaller functionsFamiu Haque2023-12-07
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently, `get_option_value()` returns 3 separate things: The actual value of the option, whether the option is hidden, and the option flags. This makes the function difficult to refactor, modify or otherwise reason about. Solution: Split `get_option_value()` into 3 functions, each with a single purpose. This also affects `get_option_value_for()`.
| * | | | refactor: object_to_vim() cannot failJustin M. Keyes2023-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | Since the parent commit, object_to_vim() can't fail, so callers don't need to check its result.
| * | | | fix(terminal): never propagate $COLORTERM from outer env (#26440)zeertzjq2023-12-07
| | | | | | | | | | | | | | | | | | | | If $COLORTERM is "truecolor" but the user sets 'notermguicolors', propagating $COLORTERM to :terminal usually doesn't work well.
| * | | | fix(json): allow objects with empty keys #25564Emanuel2023-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Empty string is a valid JSON key, but json_decode() treats an object with empty key as ":help msgpack-special-dict". #20757 :echo json_decode('{"": "1"}') {'_TYPE': [], '_VAL': [['', '1']]} Note: vim returns `{'': '1'}`. Solution: Allow empty string as an object key. Note that we still (currently) disallow empty keys in object_to_vim() (since 7c01d5ff9286d262097484c680e3a4eab49e2911): https://github.com/neovim/neovim/blob/f64e4b43e1191ff30d902730f752875aa55682ce/src/nvim/api/private/converter.c#L333-L334 Fix #20757 Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * | | | vim-patch:8.1.1583: set_ref_in_list() only sets ref in items (#26418)zeertzjq2023-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Set_ref_in_list() only sets ref in items. Solution: Rename to set_ref_in_list_items() to avoid confusion. https://github.com/vim/vim/commit/7be3ab25891fec711d8a2d9d242711a9155852b6 Omit set_ref_in_list() and set_ref_in_dict(): only used in popup window, if_pyth and if_lua. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | | | refactor(IWYU): fix includes for highlight_group.h (#26340)zeertzjq2023-12-01
| | | | |
| * | | | refactor(IWYU): move typedefs out of globals.h (#26322)zeertzjq2023-11-30
| | | | |
| * | | | build: don't define FUNC_ATTR_* as empty in headers (#26317)zeertzjq2023-11-30
| | |_|/ | |/| | | | | | | | | | | | | | | | | | FUNC_ATTR_* should only be used in .c files with generated headers. Defining FUNC_ATTR_* as empty in headers causes misuses of them to be silently ignored. Instead don't define them by default, and only define them as empty after a .c file has included its generated header.
* | | | Merge remote-tracking branch 'upstream/master' into userreguserregJosh Rahm2023-11-29
|\| | |
| * | | refactor: fix headers with IWYUdundargoc2023-11-28
| | | |
| * | | refactor: move hashtab types to hashtab_defs.h (#26262)zeertzjq2023-11-28
| | | |
| * | | refactor: fix runtime_defs.h (#26259)zeertzjq2023-11-28
| | | |
| * | | refactor: rename types.h to types_defs.hdundargoc2023-11-27
| | | |
| * | | build(IWYU): fix includes for undo_defs.hdundargoc2023-11-27
| | | |
| * | | build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
| | | |
| * | | build: enable IWYU on macdundargoc2023-11-27
| | | |
| * | | build(IWYU): replace most private mappings with pragmas (#26247)zeertzjq2023-11-27
| | | |
| * | | refactor: remove vim.h from more headers (#26244)zeertzjq2023-11-27
| | | |
| * | | docs: small fixes (#26154)dundargoc2023-11-27
| | | |
| * | | refactor: move Arena and ArenaMem to memory_defs.h (#26240)zeertzjq2023-11-27
| | | |
| * | | build(IWYU): replace public-to-public mappings with pragmas (#26237)zeertzjq2023-11-27
| | | |
| * | | refactor: move garray_T to garray_defs.h (#26227)zeertzjq2023-11-26
| | | |
| * | | build: rework IWYU mapping filesdundargoc2023-11-25
| | | | | | | | | | | | | | | | | | | | Create mapping to most of the C spec and some POSIX specific functions. This is more robust than relying files shipped with IWYU.
| * | | vim-patch:8.2.4685: when a swap file is found for a popup there is no dialog ↵zeertzjq2023-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#26207) Problem: When a swap file is found for a popup there is no dialog and the buffer is loaded anyway. Solution: Silently load the buffer read-only. (closes vim/vim#10073) https://github.com/vim/vim/commit/188639d75c363dffaf813e8e2209f7350ad1e871 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | | refactor: remove __clang_analyzer__ macrodundargoc2023-11-21
| | | | | | | | | | | | | | | | | | | | It is less intrusive to silence the warning with a comment instead of a macro if needed.
| * | | build: adjust clang-tidy warning exclusion logicdundargoc2023-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable all clang-tidy warnings by default instead of disabling them. This ensures that we don't miss useful warnings on each clang-tidy version upgrade. A drawback of this is that it will force us to either fix or adjust the warnings as soon as possible.
| * | | refactor: enable formatting for ternariesdundargoc2023-11-20
| | | | | | | | | | | | | | | | | | | | | | | | This requires removing the "Inner expression should be aligned" rule from clint as it prevents essentially any formatting regarding ternary operators.
| * | | refactor: follow style guidedundargoc2023-11-19
| | | | | | | | | | | | | | | | | | | | - reduce variable scope - prefer initialization over declaration and assignment
| * | | Merge pull request #25724 from luukvbaal/signmergebfredl2023-11-18
| |\ \ \ | | | | | | | | | | refactor(sign): move legacy signs to extmarks
| | * | | refactor(sign): move legacy signs to extmarksLuuk van Baal2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The legacy signlist data structures and associated functions are redundant since the introduction of extmark signs. Solution: Store signs defined through the legacy commands in a hashmap, placed signs in the extmark tree. Replace signlist associated functions. Usage of the legacy sign commands should yield no change in behavior with the exception of: - "orphaned signs" are now always removed when the line it is placed on is deleted. This used to depend on the value of 'signcolumn'. - It is no longer possible to place multiple signs with the same identifier in a single group on multiple lines. This will now move the sign instead. Moreover, both signs placed through the legacy sign commands and through |nvim_buf_set_extmark()|: - Will show up in both |sign-place| and |nvim_buf_get_extmarks()|. - Are displayed by increasing sign identifier, left to right. Extmark signs used to be ordered decreasingly as opposed to legacy signs.
| * | | | refactor(grid): make screen rendering more multibyte than ever beforebfredl2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: buffer text with composing chars are converted from UTF-8 to an array of up to seven UTF-32 values and then converted back to UTF-8 strings. Solution: Convert buffer text directly to UTF-8 based schar_T values. The limit of the text size is now in schar_T bytes, which is currently 31+1 but easily could be raised as it no longer multiplies the size of the entire screen grid when not used, the full size is only required for temporary scratch buffers. Also does some general cleanup to win_line text handling, which was unnecessarily complicated due to multibyte rendering being an "opt-in" feature long ago. Nowadays, a char is just a char, regardless if it consists of one ASCII byte or multiple bytes.
| * | | | refactor: iwyu (#26062)zeertzjq2023-11-16
| | | | |
| * | | | refactor: move some functions to winfloat.c (#26020)Raphael2023-11-16
| |/ / /