added clang-format path
This commit is contained in:
1 parent
855e03ded2
commit
23e9401e86
2 files changed
+22
-2
No files matched your search
@@ -19,12 +19,30 @@
|
||||
--
|
||||
local formatter_util = require("formatter.util")
|
||||
|
||||
local with_exe = function(base_config_fn, exe)
|
||||
return function()
|
||||
local config = base_config_fn()
|
||||
config.exe = exe
|
||||
return config
|
||||
end
|
||||
end
|
||||
|
||||
require("formatter").setup {
|
||||
logging = true,
|
||||
log_level = vim.log.levels.WARN,
|
||||
filetype = {
|
||||
c = {require("formatter.filetypes.c").clangformat},
|
||||
cpp = {require("formatter.filetypes.cpp").clangformat},
|
||||
c = {
|
||||
with_exe(
|
||||
require("formatter.filetypes.c").clangformat,
|
||||
NV_DARCULA_CLANG_FORMAT_PATH
|
||||
)
|
||||
},
|
||||
cpp = {
|
||||
with_exe(
|
||||
require("formatter.filetypes.cpp").clangformat,
|
||||
NV_DARCULA_CLANG_FORMAT_PATH
|
||||
)
|
||||
},
|
||||
dart = {require("formatter.filetypes.dart").dartformat},
|
||||
go = {require("formatter.filetypes.go").gofumpt},
|
||||
java = {
|
||||
|
||||
Reference in new issue
Block a user