From 107f74a0094d7b2e2d477b5a94882abe5479e0d9 Mon Sep 17 00:00:00 2001 From: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Date: Tue, 11 Jun 2024 00:30:58 +0800 Subject: [PATCH] chore: cleanup Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- .luarc.json | 17 +++++------------ lua/modules/plugins/lang.lua | 2 +- lua/modules/plugins/tool.lua | 2 +- lua/modules/utils/init.lua | 2 +- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.luarc.json b/.luarc.json index b5cf41c5..f5ff9258 100644 --- a/.luarc.json +++ b/.luarc.json @@ -1,23 +1,16 @@ { "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema-zh-tw.json", - "diagnostics": { - "globals": [ - "vim" - ], - "disable": [ - "different-requires" - ] - }, "runtime": { "version": "LuaJIT" }, + "diagnostics": { + "globals": ["vim"], + "disable": ["different-requires", "undefined-field"] + }, "workspace": { "maxPreload": 100000, "preloadFileSize": 10000, - "ignoreDir": [ - ".vscode", - ".git" - ], + "ignoreDir": [".vscode", ".git"], "library": [ "/usr/local/opt/neovim/share/nvim/runtime/lua", "/usr/local/opt/neovim/share/nvim/runtime/plugin" diff --git a/lua/modules/plugins/lang.lua b/lua/modules/plugins/lang.lua index fcaee03f..54f83899 100644 --- a/lua/modules/plugins/lang.lua +++ b/lua/modules/plugins/lang.lua @@ -46,8 +46,8 @@ lang["chrisbra/csv.vim"] = { ft = "csv", } lang["gauteh/vim-cppman"] = { - lazy = true, enabled = false, + lazy = true, ft = { "c", "cpp" }, keys = "K", -- only activate this plugin when we're searching for documentation. } diff --git a/lua/modules/plugins/tool.lua b/lua/modules/plugins/tool.lua index 114f60a0..550bf373 100644 --- a/lua/modules/plugins/tool.lua +++ b/lua/modules/plugins/tool.lua @@ -93,8 +93,8 @@ tool["nvim-telescope/telescope.nvim"] = { cmd = "Telescope", config = require("tool.telescope"), dependencies = { - { "nvim-tree/nvim-web-devicons" }, { "nvim-lua/plenary.nvim" }, + { "nvim-tree/nvim-web-devicons" }, { "jvgrootveld/telescope-zoxide" }, { "nvim-telescope/telescope-frecency.nvim" }, { "nvim-telescope/telescope-file-browser.nvim" }, diff --git a/lua/modules/utils/init.lua b/lua/modules/utils/init.lua index 6ad64448..481a7fe6 100644 --- a/lua/modules/utils/init.lua +++ b/lua/modules/utils/init.lua @@ -121,7 +121,6 @@ end ---@param background string @The background color to blend with ---@param alpha number|string @Number between 0 and 1 for blending amount. function M.blend(foreground, background, alpha) - ---@diagnostic disable-next-line: cast-local-type alpha = type(alpha) == "string" and (tonumber(alpha, 16) / 0xff) or alpha local bg = hex_to_rgb(background) local fg = hex_to_rgb(foreground) @@ -167,6 +166,7 @@ function M.extend_hl(name, def) local current_def = vim.api.nvim_get_hl(0, { name = name, link = false }) local combined_def = vim.tbl_deep_extend("force", current_def, def) + ---@diagnostic disable-next-line: param-type-mismatch vim.api.nvim_set_hl(0, name, combined_def) end