neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 0d41c4dee126b6d93ee8ed82302af47df9a50576
parent 5f3018fa1a7a97d1f961f4c33e5ae418c19202ef
Author: kylo252 <59826753+kylo252@users.noreply.github.com>
Date:   Wed, 27 Apr 2022 06:38:12 +0200

refactor(build): remove unused includes #17078

Remove unused includes in src/nvim/buffer.c|h using the IWYU library.
Yet another step towards #6371 and #549
Diffstat:
M.clang-format | 13+++++++++++--
Msrc/nvim/autocmd.c | 4+++-
Msrc/nvim/buffer.c | 4----
Msrc/nvim/buffer.h | 3---
Msrc/nvim/buffer_defs.h | 2--
Msrc/nvim/buffer_updates.h | 4++--
Msrc/nvim/eval/funcs.c | 3+--
Msrc/nvim/if_cscope.c | 1+
Msrc/nvim/sign.c | 3++-
9 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/.clang-format b/.clang-format @@ -36,8 +36,16 @@ BraceWrapping: BeforeElse: false IndentBraces: false PointerAlignment: Right -SortIncludes: false +SortIncludes: true Cpp11BracedListStyle: false +IncludeCategories: + - Regex: '<[/[:alnum:].]+>' + Priority: 0 + - Regex: '^"(nvim|vim)/' + Priority: 1 + SortPriority: 1 + CaseSensitive: false +IndentPPDirectives: AfterHash SpaceBeforeParens: ControlStatementsExceptControlMacros ForEachMacros: - FOR_ALL_AUEVENTS @@ -54,4 +62,4 @@ ForEachMacros: - RBUFFER_EACH_REVERSE - RBUFFER_UNTIL_EMPTY - RBUFFER_UNTIL_FULL - - kl_iter + - kl_iter +\ No newline at end of file diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c @@ -4,7 +4,6 @@ // autocmd.c: Autocommand related functions #include <signal.h> -#include "lauxlib.h" #include "nvim/api/private/helpers.h" #include "nvim/ascii.h" #include "nvim/autocmd.h" @@ -27,6 +26,9 @@ #include "nvim/state.h" #include "nvim/ui_compositor.h" #include "nvim/vim.h" +#include "nvim/window.h" + +#include "lauxlib.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "auevents_name_map.generated.h" diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c @@ -25,7 +25,6 @@ #include <string.h> #include "nvim/api/private/helpers.h" -#include "nvim/api/vim.h" #include "nvim/ascii.h" #include "nvim/assert.h" #include "nvim/buffer.h" @@ -50,7 +49,6 @@ #include "nvim/garray.h" #include "nvim/getchar.h" #include "nvim/hashtab.h" -#include "nvim/highlight.h" #include "nvim/highlight_group.h" #include "nvim/indent.h" #include "nvim/indent_c.h" @@ -64,13 +62,11 @@ #include "nvim/os/input.h" #include "nvim/os/os.h" #include "nvim/os/time.h" -#include "nvim/os_unix.h" #include "nvim/path.h" #include "nvim/plines.h" #include "nvim/quickfix.h" #include "nvim/regexp.h" #include "nvim/screen.h" -#include "nvim/shada.h" #include "nvim/sign.h" #include "nvim/spell.h" #include "nvim/strings.h" diff --git a/src/nvim/buffer.h b/src/nvim/buffer.h @@ -2,14 +2,11 @@ #define NVIM_BUFFER_H #include "nvim/eval.h" -#include "nvim/ex_cmds_defs.h" // for exarg_T #include "nvim/func_attr.h" #include "nvim/macros.h" #include "nvim/memline.h" #include "nvim/pos.h" // for linenr_T #include "nvim/screen.h" // for StlClickRecord -#include "nvim/vim.h" -#include "nvim/window.h" // Values for buflist_getfile() enum getf_values { diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h @@ -102,8 +102,6 @@ typedef uint64_t disptick_T; // display tick type // for struct memline (it needs memfile_T) #include "nvim/memline_defs.h" -// for struct memfile, bhdr_T, blocknr_T... (it needs buf_T) -#include "nvim/memfile_defs.h" // for regprog_T. Needs win_T and buf_T. #include "nvim/regexp_defs.h" diff --git a/src/nvim/buffer_updates.h b/src/nvim/buffer_updates.h @@ -1,8 +1,8 @@ #ifndef NVIM_BUFFER_UPDATES_H #define NVIM_BUFFER_UPDATES_H -#include "nvim/buffer_defs.h" -#include "nvim/extmark.h" +#include "nvim/buffer_defs.h" // for buf_T +#include "nvim/extmark.h" // for bcount_t #ifdef INCLUDE_GENERATED_DECLARATIONS # include "buffer_updates.h.generated.h" diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c @@ -25,7 +25,6 @@ #include "nvim/eval/funcs.h" #include "nvim/eval/typval.h" #include "nvim/eval/userfunc.h" -#include "nvim/ex_cmds2.h" #include "nvim/ex_docmd.h" #include "nvim/ex_getln.h" #include "nvim/file_search.h" @@ -70,7 +69,7 @@ #include "nvim/undo.h" #include "nvim/version.h" #include "nvim/vim.h" - +#include "nvim/window.h" /// Describe data to return from find_some_match() typedef enum { diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c @@ -32,6 +32,7 @@ #include "nvim/quickfix.h" #include "nvim/strings.h" #include "nvim/tag.h" +#include "nvim/window.h" #if defined(UNIX) # include <sys/wait.h> #endif diff --git a/src/nvim/sign.c b/src/nvim/sign.c @@ -5,6 +5,7 @@ // sign.c: functions for managing with signs // +#include "nvim/sign.h" #include "nvim/ascii.h" #include "nvim/buffer.h" @@ -17,9 +18,9 @@ #include "nvim/move.h" #include "nvim/option.h" #include "nvim/screen.h" -#include "nvim/sign.h" #include "nvim/syntax.h" #include "nvim/vim.h" +#include "nvim/window.h" /// Struct to hold the sign properties. typedef struct sign sign_T;