summaryrefslogtreecommitdiff
path: root/lua/core/info.lua
diff options
context:
space:
mode:
authorLuc Sinet <[email protected]>2021-08-25 07:47:48 +0200
committerGitHub <[email protected]>2021-08-25 07:47:48 +0200
commit00b895d9e9577f084cf577a07f9d6d6e1f7a4cac (patch)
tree1139617d5b3acd56f221f24ce301f51535267bdc /lua/core/info.lua
parentf6c706ac0c346491cc79bdea46a52ee7a8694e0d (diff)
[Feature] Encapsulate config logic (#1338)
* Define core/builtins, streamline status_color interface * Encapsulate configuration in its own module * Add fallback to lv-config.lua * Rectify settings loading order to allow overriding vim options * Move default-config into config/ module * replace uv.fs_stat with utils.is_file
Diffstat (limited to 'lua/core/info.lua')
-rw-r--r--lua/core/info.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/core/info.lua b/lua/core/info.lua
index d9b348b5..67e45d1c 100644
--- a/lua/core/info.lua
+++ b/lua/core/info.lua
@@ -16,6 +16,7 @@ local function str_list(list)
end
local function get_formatter_suggestion_msg(ft)
+ local config = require "config"
local null_formatters = require "lsp.null-ls.formatters"
local supported_formatters = null_formatters.list_available(ft)
local section = {
@@ -27,7 +28,7 @@ local function get_formatter_suggestion_msg(ft)
if not vim.tbl_isempty(supported_formatters) then
vim.list_extend(section, {
"* Configured formatter needs to be installed and executable.",
- fmt("* Enable installed formatter(s) with following config in %s", USER_CONFIG_PATH),
+ fmt("* Enable installed formatter(s) with following config in %s", config.path),
"",
fmt(" lvim.lang.%s.formatters = { { exe = '%s' } }", ft, table.concat(supported_formatters, "│")),
})
@@ -37,6 +38,7 @@ local function get_formatter_suggestion_msg(ft)
end
local function get_linter_suggestion_msg(ft)
+ local config = require "config"
local null_linters = require "lsp.null-ls.linters"
local supported_linters = null_linters.list_available(ft)
local section = {
@@ -48,7 +50,7 @@ local function get_linter_suggestion_msg(ft)
if not vim.tbl_isempty(supported_linters) then
vim.list_extend(section, {
"* Configured linter needs to be installed and executable.",
- fmt("* Enable installed linter(s) with following config in %s", USER_CONFIG_PATH),
+ fmt("* Enable installed linter(s) with following config in %s", config.path),
"",
fmt(" lvim.lang.%s.linters = { { exe = '%s' } }", ft, table.concat(supported_linters, "│")),
})