-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
51 lines (42 loc) · 1.03 KB
/
Copy pathinit.lua
File metadata and controls
51 lines (42 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
-- vim thing
vim.o.mouse = ""
-- must load first
vim.loader.enable()
require("vim._core.ui2").enable()
require("startup")
-- your core
require("sys")
require("map")
require("plugin")
-- your local modules
require("module")
-- VimEnter Stuff
-- Load at last
require("server")
require("lazyc.mini.tabline_motion")
-- Lazy parsers
-- priority = last
require("treesitters.lazy")
-- lua/lazy/
require("lazyc.explore.oil")
require("lazyc.explore.fzf")
require("lazyc.mini.miniclues")
require("lazyc.mini.indent")
local state_file = vim.fn.stdpath('data') .. '/colorscheme_state'
local function pick_colorscheme(theme)
vim.cmd.colorscheme(theme)
local f = io.open(state_file, 'w')
if f then f:write(theme); f:close() end
end
vim.api.nvim_create_user_command('Pick', function(opts)
pick_colorscheme(opts.args)
end, { nargs = 1, complete = 'color' })
-- restore saved theme on startup
local f = io.open(state_file, 'r')
if f then
local theme = f:read('*l')
f:close()
if theme and theme ~= '' then
pcall(vim.cmd.colorscheme, theme)
end
end