|
1 | 1 | ---Run a test similar to :so $VIMRUNTIME/syntax/hitest.vim
|
2 | 2 | ---Display all icons and their group highlighted, followed by the concrete definition
|
3 | 3 |
|
4 |
| -local namespace_hi_test_id = vim.api.nvim_create_namespace("NvimWebDeviconsHiTest") |
| 4 | +local namespace_hi_test_id = vim.api.nvim_create_namespace "NvimWebDeviconsHiTest" |
5 | 5 |
|
6 | 6 | ---@class (exact) IconDisplay for :NvimTreeHiTest
|
7 | 7 | ---@field tag string filename, os or extension
|
@@ -47,8 +47,8 @@ function IconDisplay:render(bufnr, max_tag_len, max_group_len, l)
|
47 | 47 | local text = string.format(fmt, self.icon, self.tag, self.group, self.def)
|
48 | 48 |
|
49 | 49 | vim.api.nvim_buf_set_lines(bufnr, l, -1, true, { text })
|
50 |
| - if vim.fn.has("nvim-0.11") == 1 and vim.hl and vim.hl.range then |
51 |
| - vim.hl.range(bufnr, namespace_hi_test_id, self.group, { l, 0 }, { l, -1, }, {}) |
| 50 | + if vim.fn.has "nvim-0.11" == 1 and vim.hl and vim.hl.range then |
| 51 | + vim.hl.range(bufnr, namespace_hi_test_id, self.group, { l, 0 }, { l, -1 }, {}) |
52 | 52 | else
|
53 | 53 | vim.api.nvim_buf_add_highlight(bufnr, -1, self.group, l, 0, -1) ---@diagnostic disable-line: deprecated
|
54 | 54 | end
|
|
0 commit comments