summaryrefslogtreecommitdiff
path: root/script/provider/name-style.lua
blob: f9c5c756d0493b7194b7cb63b1bcbce39ee3febf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local suc, codeFormat = pcall(require, 'code_format')
if not suc then
    return
end

local config = require 'config'


local m = {}

function m.nameStyleCheck(uri, text)
    return codeFormat.name_style_analysis(uri, text)
end

config.watch(function (uri, key, value)
    if key == "Lua.nameStyle.config" then
        codeFormat.update_name_style_config(value)
    end
end)

return m