|
| 1 | +local api = vim.api |
1 | 2 | local colors = require 'lib/config'.colors
|
2 | 3 |
|
3 |
| -local cmd = vim.api.nvim_command |
| 4 | +local M = {} |
4 | 5 |
|
5 | 6 | local HIGHLIGHTS = {
|
6 |
| - Symlink = { gui = 'bold', fg = colors.cyan }, |
7 |
| - FolderName = { gui = 'bold', fg = colors.blue }, |
8 |
| - FolderIcon = { fg = '#90a4ae' }, |
9 |
| - |
10 |
| - ExecFile = { gui = 'bold', fg = colors.green }, |
11 |
| - SpecialFile = { gui = 'bold,underline', fg = colors.yellow }, |
12 |
| - ImageFile = { gui = 'bold', fg = colors.purple }, |
13 |
| - MarkdownFile = { fg = colors.purple }, |
14 |
| - LicenseIcon = { fg = colors.yellow }, |
15 |
| - YamlIcon = { fg = colors.yellow }, |
16 |
| - TomlIcon = { fg = colors.yellow }, |
17 |
| - GitignoreIcon = { fg = colors.yellow }, |
18 |
| - JsonIcon = { fg = colors.yellow }, |
19 |
| - |
20 |
| - LuaIcon = { fg = '#42a5f5' }, |
21 |
| - PythonIcon = { fg = colors.green }, |
22 |
| - ShellIcon = { fg = colors.green }, |
23 |
| - JavascriptIcon = { fg = colors.yellow }, |
24 |
| - CIcon = { fg = colors.blue }, |
25 |
| - ReactIcon = { fg = colors.cyan }, |
26 |
| - HtmlIcon = { fg = colors.orange }, |
27 |
| - RustIcon = { fg = colors.orange }, |
28 |
| - VimIcon = { fg = colors.green }, |
29 |
| - TypescriptIcon = { fg = colors.blue }, |
30 |
| - |
31 |
| - GitDirty = { fg = colors.dark_red }, |
32 |
| - GitStaged = { fg = colors.green }, |
33 |
| - GitMerge = { fg = colors.orange }, |
34 |
| - GitRenamed = { fg = colors.purple }, |
35 |
| - GitNew = { fg = colors.yellow } |
| 7 | + Symlink = { gui = 'bold', fg = colors.cyan }, |
| 8 | + FolderName = { gui = 'bold', fg = colors.blue }, |
| 9 | + FolderIcon = { fg = '#90a4ae' }, |
| 10 | + |
| 11 | + ExecFile = { gui = 'bold', fg = colors.green }, |
| 12 | + SpecialFile = { gui = 'bold,underline', fg = colors.yellow }, |
| 13 | + ImageFile = { gui = 'bold', fg = colors.purple }, |
| 14 | + MarkdownFile = { fg = colors.purple }, |
| 15 | + LicenseIcon = { fg = colors.yellow }, |
| 16 | + YamlIcon = { fg = colors.yellow }, |
| 17 | + TomlIcon = { fg = colors.yellow }, |
| 18 | + GitignoreIcon = { fg = colors.yellow }, |
| 19 | + JsonIcon = { fg = colors.yellow }, |
| 20 | + |
| 21 | + LuaIcon = { fg = '#42a5f5' }, |
| 22 | + PythonIcon = { fg = colors.green }, |
| 23 | + ShellIcon = { fg = colors.green }, |
| 24 | + JavascriptIcon = { fg = colors.yellow }, |
| 25 | + CIcon = { fg = colors.blue }, |
| 26 | + ReactIcon = { fg = colors.cyan }, |
| 27 | + HtmlIcon = { fg = colors.orange }, |
| 28 | + RustIcon = { fg = colors.orange }, |
| 29 | + VimIcon = { fg = colors.green }, |
| 30 | + TypescriptIcon = { fg = colors.blue }, |
| 31 | + |
| 32 | + GitDirty = { fg = colors.dark_red }, |
| 33 | + GitStaged = { fg = colors.green }, |
| 34 | + GitMerge = { fg = colors.orange }, |
| 35 | + GitRenamed = { fg = colors.purple }, |
| 36 | + GitNew = { fg = colors.yellow } |
36 | 37 | }
|
37 | 38 |
|
38 | 39 | local LINKS = {
|
39 |
| - Normal = 'Normal', |
40 |
| - EndOfBuffer = 'EndOfBuffer', |
41 |
| - CursorLine = 'CursorLine', |
42 |
| - VertSplit = 'VertSplit', |
43 |
| - CursorColumn = 'CursorColumn' |
| 40 | + Normal = 'Normal', |
| 41 | + EndOfBuffer = 'EndOfBuffer', |
| 42 | + CursorLine = 'CursorLine', |
| 43 | + VertSplit = 'VertSplit', |
| 44 | + CursorColumn = 'CursorColumn' |
44 | 45 | }
|
45 | 46 |
|
46 |
| -local function init_colors() |
47 |
| - for k, d in pairs(HIGHLIGHTS) do |
48 |
| - local gui = d.gui or 'NONE' |
49 |
| - vim.api.nvim_command('hi def LuaTree'..k..' gui='..gui..' guifg='..d.fg) |
50 |
| - end |
| 47 | +function M.init_colors() |
| 48 | + for k, d in pairs(HIGHLIGHTS) do |
| 49 | + local gui = d.gui or 'NONE' |
| 50 | + api.nvim_command('hi def LuaTree'..k..' gui='..gui..' guifg='..d.fg) |
| 51 | + end |
51 | 52 |
|
52 |
| - for k, d in pairs(LINKS) do |
53 |
| - vim.api.nvim_command('hi def link LuaTree'..k..' '..d) |
54 |
| - end |
| 53 | + for k, d in pairs(LINKS) do |
| 54 | + api.nvim_command('hi def link LuaTree'..k..' '..d) |
| 55 | + end |
55 | 56 | end
|
56 | 57 |
|
57 |
| -return { |
58 |
| - init_colors = init_colors |
59 |
| -} |
| 58 | +return M |
0 commit comments