summaryrefslogtreecommitdiffstatshomepage
path: root/src/nvim/viml/parser
AgeCommit message (Collapse)AuthorFiles
2026-01-17fix(api): parse_expression crash with unopened ] and nodeSean Dewar1
Problem: nvim_parse_expression null pointer dereference with unmatched ] followed by a node. Solution: if ast_stack was empty, set new_top_node_p to top of the stack after pushing the list literal node; similar to what's done for curlies. This bug was originally found by a Matrix user, but I couldn't remember how to trigger it... Ran into the other crash while finding a repro. :P
2026-01-17fix(api): parse_expression crash with ident and curlySean Dewar1
Problem: nvim_parse_expression null pointer dereference when parsing an identifier followed by { with "highlight" parameter set to false. Solution: only set opening_hl_idx if pstate->colors is not NULL. Not added to parser_tests.lua as that uses highlight = true.
2025-08-14refactor(build): remove INCLUDE_GENERATED_DECLARATIONS guardsbfredl4
These are not needed after #35129 but making uncrustify still play nice with them was a bit tricky. Unfortunately `uncrustify --update-config-with-doc` breaks strings with backslashes. This issue has been reported upstream, and in the meanwhile auto-update on every single run has been disabled.
2024-09-23refactor(api)!: rename Dictionary => DictJustin M. Keyes2
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.
2024-07-17fix: assert failure in VimL expression parserRustum Zia1
2024-07-13refactor(declarations): also generate prototypes for functions in headersbfredl1
Before this change, "static inline" functions in headers needed to have their function attributes specified in a completely different way. The prototype had to be duplicated, and REAL_FATTR_ had to be used instead of the public FUNC_ATTR_ names. TODO: need a check that a "header.h.inline.generated.h" file is not forgotten when the first "static inline" function with attributes is added to a header (they would just be silently missing).
2024-01-11refactor(IWYU): fix headersdundargoc5
Remove `export` pramgas from defs headers as it causes IWYU to believe that the definitions from the defs headers comes from main header, which is not what we really want.
2023-12-22refactor(options): generate BV_ and WV_ constants (#26705)zeertzjq1
2023-12-21refactor: run IWYU on entire repodundargoc1
Reference: https://github.com/neovim/neovim/issues/6371.
2023-11-30build: don't define FUNC_ATTR_* as empty in headers (#26317)zeertzjq2
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.
2023-11-29refactor: move some constants out of vim_defs.h (#26298)zeertzjq1
2023-11-28refactor: fix headers with IWYUdundargoc1
2023-11-27refactor: rename types.h to types_defs.hdundargoc2
2023-11-27build(IWYU): fix includes for func_attr.hdundargoc1
2023-11-20refactor: enable formatting for ternariesdundargoc1
This requires removing the "Inner expression should be aligned" rule from clint as it prevents essentially any formatting regarding ternary operators.
2023-11-12refactor: replace manual header guards with #pragma oncedundargoc2
It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard.
2023-11-12build: remove PVSdundargoc2
We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
2023-09-30build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq1
2023-06-22fix(messages): use "Vimscript" instead of "VimL" #24111Justin M. Keyes1
followup to #24109 fix #16150
2023-05-13docs: small fixesdundargoc1
Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: HiPhish <hiphish@posteo.de> Co-authored-by: Julio B <julio.bacel@gmail.com> Co-authored-by: T727 <74924917+T-727@users.noreply.github.com> Co-authored-by: camoz <camoz@users.noreply.github.com> Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
2023-05-13refactor: remove typval.h from most header files (#23601)zeertzjq1
Because typval_defs.h is enough for most of them.
2023-04-26refactor(clang-tidy): remove redundant castsdundargoc1
2023-03-05vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)zeertzjq1
Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes vim/vim#12103) https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-01-23refactor(PVS/V1048): remove redundant assignment (#21871)Lucas Merritt1
2023-01-18refactor: replace char_u with char 24 (#21823)dundargoc1
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
2022-12-21refactor: replace char_u with char 16 - remove STRNCMP (#21208)dundargoc1
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
2022-11-15build: allow IWYU to fix includes for all .c filesdundargoc4
Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
2022-11-07refactor: more clint (#20910)Lewis Russell1
2022-10-23docs: fix typos (#20724)dundargoc1
Co-authored-by: Marco Lehmann <m99@posteo.de>
2022-10-21refactor: fix uncrustify lint errorsdundargoc1
2022-10-21refactor(uncrustify): move macros definitions to enable formattingdundargoc1
Uncrustify struggles to format function-like macros which are defined in deeply nested areas of the code. Un-nesting them unblocks useful formatting rules from uncrustify.
2022-10-21refactor: clang-tidy fixes to silence clangd warning (#20683)dundargoc1
* refactor: readability-uppercase-literal-suffix * refactor: readability-named-parameter * refactor: bugprone-suspicious-string-compare * refactor: google-readability-casting * refactor: readability-redundant-control-flow * refactor: bugprone-too-small-loop-variable * refactor: readability-non-const-parameter * refactor: readability-avoid-const-params-in-decls * refactor: google-readability-todo * refactor: readability-inconsistent-declaration-parameter-name * refactor: bugprone-suspicious-missing-comma * refactor: remove noisy or slow warnings
2022-09-25refactor: move klib out of src/nvim/ #20341dundargoc2
It's confusing to mix vendored dependencies with neovim source code. A clean separation is simpler to keep track of and simpler to document.
2022-09-01refactor: replace char_u with charDundar Göc1
Work on https://github.com/neovim/neovim/issues/459
2022-08-30refactor: replace char_u with char 4 (#19987)dundargoc1
* refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
2022-08-12refactor: replace char_u with charDundar Goc1
Work on https://github.com/neovim/neovim/issues/459
2022-05-25refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc1
2022-05-20ci: lint with uncrustify #18563dundargoc1
This lint job will ensure that the C codebase is properly formatted at all times. This helps eliminate most of clint.py. To save CI time, it's faster to manually compile uncrustify and cache the binary instead of using homebrew (the apt-get package is too old).
2022-05-09refactor: replace char_u variables and functions with charDundar Goc1
Work on https://github.com/neovim/neovim/issues/459
2022-05-06build(clint): remove "function size is too large" warningDundar Goc1
This warning is essentially only triggered for ported vim functions. It's unlikely that we'll refactor vim functions solely based on their size since it'd mean we'd greatly deviate from vim, which is a high cost when it comes to importing the vim patches. Thus, this warning only serves as an annoyance and should be removed.
2022-05-03vim-patch:8.2.4858: K_SPECIAL may be escaped twicezeertzjq1
Problem: K_SPECIAL may be escaped twice. Solution: Avoid double escaping. (closes vim/vim#10340) https://github.com/vim/vim/commit/db08887f24d20be11d184ce321bc0890613e42bd
2022-04-29refactor(uncrustify): change rules to better align with the style guideDundar Goc1
Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
2022-04-29vim-patch:8.2.0867: using \{xxx} for encoding a modifier is not nicezeertzjq1
Problem: Using \{xxx} for encoding a modifier is not nice. Solution: Use \<*xxx> instead, since it's the same as \<xxx> but producing a different code. https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f Use this notation in langmap_spec.
2022-04-29vim-patch:8.2.0855: GUI tests fail because the test doesn't use a modifierzeertzjq1
Problem: GUI tests fail because the test doesn't use a modifier. Solution: Add "\{xxx}" to be able to encode a modifier. https://github.com/vim/vim/commit/ebe9d34aa07037cff2188a8dd424ee1f59cbb0bf Change macros to enums to use them in unit tests.
2022-04-29vim-patch:8.1.2145: cannot map <C-H> when modifyOtherKeys is enabledzeertzjq1
Problem: Cannot map <C-H> when modifyOtherKeys is enabled. Solution: Add the <C-H> mapping twice, both with modifier and as 0x08. Use only the first one when modifyOtherKeys has been detected. https://github.com/vim/vim/commit/459fd785e4a8d044147a3f83a5fca8748528aa84 Add REPTERM_NO_SPECIAL instead of REPTERM_SPECIAL because the meaning of "special" is different between Vim and Nvim. Omit seenModifyOtherKeys as Nvim supports attaching multiple UIs. Omit tests as they send terminal codes. Keep the behavior of API functions.
2022-04-24refactor: convert macros to all-caps (#17895)dundargoc1
Closes https://github.com/neovim/neovim/issues/6297
2022-03-13refactor: fix clint warnings (#17682)dundargoc1
2022-02-26fix(coverity/175977): big parameter passed by valueDundar Göc1
2022-01-04chore: fix typos (#16816)dundargoc2
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Sebastian Volland <seb@baunz.net> Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2021-11-23refactor: upgrade uncrustify config version to 0.74.0Dundar Göc1
Disable formatting for assert.h since there's a bug that results in a segmentation fault in uncrustify.