added clang-format path
This commit is contained in:
1 parent
855e03ded2
commit
23e9401e86
2 files changed
+22
-2
No files matched your search
@@ -21,6 +21,8 @@ local utils = require("darcula.utils")
|
||||
|
||||
NV_DARCULA_AUTO_INSTALL_DEPS =
|
||||
utils.parse_env("NV_DARCULA_AUTO_INSTALL_DEPS", true)
|
||||
NV_DARCULA_CLANG_FORMAT_PATH =
|
||||
utils.parse_env("NV_DARCULA_CLANG_FORMAT_PATH", "clang-format")
|
||||
NV_DARCULA_COLOR_COLUMN = utils.parse_env("NV_DARCULA_COLOR_COLUMN", "80")
|
||||
NV_DARCULA_COLOR_SCHEME =
|
||||
utils.parse_env("NV_DARCULA_COLOR_SCHEME", "darcula_lush")
|
||||
|
||||
@@ -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