From e3cf6d4c3ec10ba7ccfc3738467df1e451d8eebc Mon Sep 17 00:00:00 2001 From: Iron-E Date: Sun, 13 Jun 2021 12:48:07 -0400 Subject: [PATCH] perf(plugin): use lua for plugin initialization SEE #10 --- plugin/libmodal.lua | 20 ++++++++++++++++++++ plugin/libmodal.vim | 17 ----------------- 2 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 plugin/libmodal.lua delete mode 100644 plugin/libmodal.vim diff --git a/plugin/libmodal.lua b/plugin/libmodal.lua new file mode 100644 index 0000000..126c21e --- /dev/null +++ b/plugin/libmodal.lua @@ -0,0 +1,20 @@ +local exe = vim.api.nvim_command +local g = vim.g +local go = vim.go + +if g.loaded_libmodal then return end +g.loaded_libmodal = true + +if g.libmodalTimeouts == nil then + g.libmodalTimeouts = go.timeout +end + +--[[/* User Configuration */]] + +-- The default highlight groups (for colors) are specified below. +-- Change these default colors by defining or linking the corresponding highlight group. +exe +[[ + highlight default link LibmodalPrompt ModeMsg + highlight default link LibmodalStar StatusLine +]] diff --git a/plugin/libmodal.vim b/plugin/libmodal.vim deleted file mode 100644 index c770303..0000000 --- a/plugin/libmodal.vim +++ /dev/null @@ -1,17 +0,0 @@ -if exists('g:loaded_libmodal') - finish -endif -let g:loaded_libmodal = 1 - -if !exists('g:libmodalTimeouts') - let g:libmodalTimeouts = &timeout -endif - -" ************************************************************ -" * User Configuration -" ************************************************************ - -" The default highlight groups (for colors) are specified below. -" Change these default colors by defining or linking the corresponding highlight group. -highlight default link LibmodalPrompt ModeMsg -highlight default link LibmodalStar StatusLine