style(setup): apply stylua formatting
This commit is contained in:
parent
5b56ff7980
commit
0b52d9639c
1 changed files with 2 additions and 6 deletions
|
|
@ -10,17 +10,13 @@ local state = require('cp.state')
|
||||||
|
|
||||||
local function apply_template(bufnr, lang_id, platform)
|
local function apply_template(bufnr, lang_id, platform)
|
||||||
local config = config_module.get_config()
|
local config = config_module.get_config()
|
||||||
local eff = config.runtime.effective[platform]
|
local eff = config.runtime.effective[platform] and config.runtime.effective[platform][lang_id]
|
||||||
and config.runtime.effective[platform][lang_id]
|
|
||||||
if not eff or not eff.template then
|
if not eff or not eff.template then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local path = vim.fn.expand(eff.template)
|
local path = vim.fn.expand(eff.template)
|
||||||
if vim.fn.filereadable(path) ~= 1 then
|
if vim.fn.filereadable(path) ~= 1 then
|
||||||
logger.log(
|
logger.log(('[cp.nvim] template not readable: %s'):format(path), vim.log.levels.WARN)
|
||||||
('[cp.nvim] template not readable: %s'):format(path),
|
|
||||||
vim.log.levels.WARN
|
|
||||||
)
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local lines = vim.fn.readfile(path)
|
local lines = vim.fn.readfile(path)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue