added clang-format path

This commit is contained in:
sgraves committed 2026-09-24 18:14:28 +00:00
1 parent 855e03ded2
commit 23e9401e86
2 files changed
+22 -2

No files matched your search

+2
View File
@@ -21,6 +21,8 @@ local utils = require("darcula.utils")
NV_DARCULA_AUTO_INSTALL_DEPS = NV_DARCULA_AUTO_INSTALL_DEPS =
utils.parse_env("NV_DARCULA_AUTO_INSTALL_DEPS", true) 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_COLUMN = utils.parse_env("NV_DARCULA_COLOR_COLUMN", "80")
NV_DARCULA_COLOR_SCHEME = NV_DARCULA_COLOR_SCHEME =
utils.parse_env("NV_DARCULA_COLOR_SCHEME", "darcula_lush") utils.parse_env("NV_DARCULA_COLOR_SCHEME", "darcula_lush")
+20 -2
View File
@@ -19,12 +19,30 @@
-- --
local formatter_util = require("formatter.util") 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 { require("formatter").setup {
logging = true, logging = true,
log_level = vim.log.levels.WARN, log_level = vim.log.levels.WARN,
filetype = { filetype = {
c = {require("formatter.filetypes.c").clangformat}, c = {
cpp = {require("formatter.filetypes.cpp").clangformat}, 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}, dart = {require("formatter.filetypes.dart").dartformat},
go = {require("formatter.filetypes.go").gofumpt}, go = {require("formatter.filetypes.go").gofumpt},
java = { java = {