add: config global variable

This commit is contained in:
asep.komarudin 2024-05-21 14:20:50 +07:00
parent 77436b89c4
commit a7726a6b33
30 changed files with 703 additions and 857 deletions

View file

@ -1,13 +1,12 @@
local run = 0
local data_exists, frmt = pcall(require, "core.config")
if not data_exists then
run = 1
end
if frmt.format_on_save == 1 then
local frmt = vim.g.pcode_format_on_save
if frmt == 1 then
run = 1
else
run = 0
end
local buf_clients = vim.lsp.buf_get_clients()
local buf_clients = vim.lsp.get_clients()
if next(buf_clients) == nil then
run = 0
end