summaryrefslogtreecommitdiffstats
path: root/lua/core/misc.lua
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2025-05-31 03:32:58 -0400
committerSquibid <me@zacharyscheiman.com>2025-05-31 03:32:58 -0400
commite830931ff421e4380d5de8b1926842000ba9be34 (patch)
tree207584548026db649bc6ab21df3b41b71ebfd830 /lua/core/misc.lua
parentef678f31fdf24c0e6c4eca9a13ad9f63a53447b9 (diff)
downloadnvim-e830931ff421e4380d5de8b1926842000ba9be34.tar.gz
nvim-e830931ff421e4380d5de8b1926842000ba9be34.tar.bz2
nvim-e830931ff421e4380d5de8b1926842000ba9be34.zip
Diffstat (limited to 'lua/core/misc.lua')
-rw-r--r--lua/core/misc.lua35
1 files changed, 0 insertions, 35 deletions
diff --git a/lua/core/misc.lua b/lua/core/misc.lua
index fab3258..24378b4 100644
--- a/lua/core/misc.lua
+++ b/lua/core/misc.lua
@@ -3,18 +3,6 @@ local M = {}
--- vim.notify title
M.appid = "Nvim Config"
---- safe version of require
----@param fn string name of file to include
----@return any
-function M.include(fn)
- local ok, r = pcall(require, fn)
- if not ok then
- vim.notify("Could not find '"..fn.."': "..r, vim.log.levels.WARN, { title = M.appid })
- return ok
- end
- return r
-end
-
--- loop through files in directory
---@param path string absolute path of directory to be looped through
---@param body function function to use on every recursion of the loop
@@ -99,29 +87,6 @@ function M.highlight(group, opts, namespace)
end
end
---- copy highlight group
----@param hlgroup string highlight group to copy
----@param namespace? number highlight space
----@return table
-function M.cpyhl(hlgroup, namespace)
- namespace = namespace or 0
-
- local ok, hl = pcall(vim.api.nvim_get_hl, namespace, {
- name = hlgroup,
- create = false
- })
- if not ok then
- return {}
- end
-
- for _, key in pairs({ "foreground", "background", "special" }) do
- if hl[key] then
- hl[key] = string.format("#%06x", hl[key])
- end
- end
- return hl
-end
-
--- highlight something with some highlight group for a certain amount of time
--- example:
--- ```lua