mirror of
https://github.com/neovim/neovim.git
synced 2026-08-26 17:11:48 +00:00
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.
This commit is contained in:
@@ -27,6 +27,31 @@ local hashy = require'generators.hashy'
|
||||
|
||||
local hashpipe = io.open(funcsfname, 'wb')
|
||||
|
||||
hashpipe:write([[
|
||||
#include "nvim/arglist.h"
|
||||
#include "nvim/cmdexpand.h"
|
||||
#include "nvim/cmdhist.h"
|
||||
#include "nvim/digraph.h"
|
||||
#include "nvim/eval/funcs.h"
|
||||
#include "nvim/eval/typval.h"
|
||||
#include "nvim/eval/vars.h"
|
||||
#include "nvim/ex_docmd.h"
|
||||
#include "nvim/ex_getln.h"
|
||||
#include "nvim/fold.h"
|
||||
#include "nvim/getchar.h"
|
||||
#include "nvim/insexpand.h"
|
||||
#include "nvim/mapping.h"
|
||||
#include "nvim/match.h"
|
||||
#include "nvim/mbyte.h"
|
||||
#include "nvim/menu.h"
|
||||
#include "nvim/move.h"
|
||||
#include "nvim/quickfix.h"
|
||||
#include "nvim/search.h"
|
||||
#include "nvim/sign.h"
|
||||
#include "nvim/testing.h"
|
||||
|
||||
]])
|
||||
|
||||
local funcs = require('eval').funcs
|
||||
for _, func in pairs(funcs) do
|
||||
if func.float_func then
|
||||
|
||||
Reference in New Issue
Block a user