aboutsummaryrefslogtreecommitdiff
path: root/lua/muwiki/external.lua
diff options
context:
space:
mode:
authormoxie <moxie@3kgcat.fi>2026-03-15 09:54:31 +0200
committermoxie <moxie@3kgcat.fi>2026-03-15 10:05:20 +0200
commitde2df63dcbe44f07dc994e29d7d400c49c811080 (patch)
tree10ae2c8eee90c661792e71aa5bd35cd26f5407d4 /lua/muwiki/external.lua
parent49c1e9d1fc3d6bf8748756a8543d8c1b7287940f (diff)
refactor: simplify codebase and fix FileType autocommands
Diffstat (limited to 'lua/muwiki/external.lua')
-rw-r--r--lua/muwiki/external.lua30
1 files changed, 0 insertions, 30 deletions
diff --git a/lua/muwiki/external.lua b/lua/muwiki/external.lua
deleted file mode 100644
index 9ea83b5..0000000
--- a/lua/muwiki/external.lua
+++ /dev/null
@@ -1,30 +0,0 @@
-local config = require('muwiki.config')
-local paths = require('muwiki.paths')
-
-local M = {}
-
-function M.open(url)
- if type(url) ~= 'string' then
- vim.notify('Invalid URL type', vim.log.levels.ERROR)
- return false
- end
-
- local valid, err = paths.validate_url_scheme(url)
- if not valid then
- vim.notify(err, vim.log.levels.ERROR)
- return false
- end
-
- vim.system({ 'xdg-open', url }, { detach = true })
- return true
-end
-
-function M.execute(handler, url)
- if type(handler.cmd) == 'function' then
- handler.cmd(url)
- else
- vim.system({ handler.cmd, url }, { detach = true })
- end
-end
-
-return M