Skip to content

Commit 5050266

Browse files
committed
break change: add prefix to options
1 parent 75e1150 commit 5050266

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ If you are using `lazy.nvim`, just add this to your configuration file:
2929
-- Here is default config, in general you no need to set these options
3030
init = function()
3131
-- if set this Non-negative value, zig-lamp will automatically install zls when open zig file.
32-
vim.g.zls_auto_install = nil
32+
vim.g.zig_lamp_zls_auto_install = nil
3333
-- if set this Non-negative value, zig-lamp will fallback system zls when not found downloaded zls.
34-
vim.g.fall_back_sys_zls = nil
34+
vim.g.zig_lamp_fall_back_sys_zls = nil
3535
-- this is setting for zls with lspconfig, the opts you need to see document of zls and lspconfig.
36-
vim.g.zls_lsp_opt = {}
36+
vim.g.zig_lamp_zls_lsp_opt = {}
3737
vim.g.zig_lamp_pkg_help_fg = "#CF5C00"
38-
vim.g.zig_fetch_timeout = 5000
38+
vim.g.zig_lamp_zig_fetch_timeout = 5000
3939
end,
4040
}
4141
```

ftplugin/zig.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ do
1111

1212
local is_there_zls = zls_path and zls_version
1313

14-
if (not is_there_zls) and not vim.g.fall_back_sys_zls then
15-
if vim.g.zls_auto_install then
14+
if (not is_there_zls) and not vim.g.zig_lamp_fall_back_sys_zls then
15+
if vim.g.zig_lamp_zls_auto_install then
1616
zls.zls_install({})
1717
return
1818
end

lua/zig-lamp/module/pkg.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ local function get_hash(_url)
3737
util.Error(string.format("failed fetch: %s, code is %d, signal is %d", _url, code, signal))
3838
end))
3939
util.Info("fetching: " .. _url)
40-
local _result, _ = _tmp:sync(vim.g.zig_fetch_timeout)
40+
local _result, _ = _tmp:sync(vim.g.zig_lamp_zig_fetch_timeout)
4141
if not _result then
4242
return nil
4343
end

lua/zig-lamp/module/zls.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ function M.setup_lspconfig(zls_version)
401401
local lspconfig = require("lspconfig")
402402

403403
-- support use user's config
404-
local lsp_opt = vim.g.zls_lsp_opt or {}
404+
local lsp_opt = vim.g.zig_lamp_zls_lsp_opt or {}
405405
lsp_opt.autostart = false
406406
lsp_opt.on_new_config = lsp_on_new_config
407407

0 commit comments

Comments
 (0)