Commit Graph

10 Commits

Author SHA1 Message Date
dundargoc
4d757bbfbb refactor: combine regexp files
regext_bt.c and regexp_nfa.c are inlined into regexp.c instead of
included as a header. This makes developer tools like clang-tidy and
clangd be able to understand the code better.
2023-11-05 11:48:42 +01:00
zeertzjq
09a17f91d0
refactor: move cmdline completion types to cmdexpand_defs.h (#25465) 2023-10-02 10:45:33 +08:00
zeertzjq
cf8b2c0e74
build(iwyu): add a few more _defs.h mappings (#25435) 2023-09-30 12:05:28 +08:00
bfredl
e2fdd53d8c refactor(map): avoid duplicated khash_t types for values
This reduces the total number of khash_t instantiations from 22 to 8.

Make the khash internal functions take the size of values as a runtime
parameter. This is abstracted with typesafe Map containers which
are still specialized for both key, value type.

Introduce `Set(key)` type for when there is no value.

Refactor shada.c to use Map/Set instead of khash directly.
This requires `map_ref` operation to be more flexible.
Return pointers to both key and value, plus an indicator for new_item.
As a bonus, `map_key` is now redundant.

Instead of Map(cstr_t, FileMarks), use a pointer map as the FileMarks struct is
humongous.

Make `event_strings` actually work like an intern pool instead of wtf it
was doing before.
2023-05-17 12:26:21 +02:00
Lewis Russell
7bf1a917b7
vim-patch:8.1.2094: the fileio.c file is too big
Problem:    The fileio.c file is too big.
Solution:   Move buf_write() to bufwrite.c. (Yegappan Lakshmanan,
            closes vim/vim#4990)

c079f0fed1

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-04-19 13:15:29 +01:00
dundargoc
3269902a13
refactor: fix IWYU mapping file and use IWYU (#21802)
Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
2023-01-15 14:16:33 +01:00
Lewis Russell
5841a97500
feat!: remove hardcopy
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2023-01-03 10:07:43 +00:00
Justin M. Keyes
a283a99165
refactor: eliminate os_unix.c #21621 2023-01-02 14:56:17 -08:00
zeertzjq
0b79137c59
vim-patch:8.1.2001: some source files are too big (#21231)
Problem:    Some source files are too big.
Solution:   Move buffer and window related functions to evalbuffer.c and
            evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898)

261f346f81
2022-11-29 16:47:29 +08:00
dundargoc
66360675cf build: allow IWYU to fix includes for all .c files
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-15 10:30:03 +01:00