feat: Properly support nvim-0.7, and fix highlights

This commit is contained in:
hedy
2023-11-21 08:39:05 +08:00
parent b03c3a4e3d
commit 699bc85cc5
7 changed files with 174 additions and 106 deletions

View File

@@ -43,7 +43,7 @@ M.defaults = {
---@type boolean|string?
show_cursorline = true,
hide_cursor = false,
winhl = 'OutlineDetails:Comment,OutlineLineno:LineNr',
winhl = '',
jump_highlight_duration = 400,
center_on_jump = true,
},
@@ -55,7 +55,7 @@ M.defaults = {
min_height = 10,
border = 'single',
open_hover_on_preview = false,
winhl = '',
winhl = 'NormalFloat:',
winblend = 0,
},
symbol_folding = {
@@ -100,39 +100,39 @@ M.defaults = {
icon_source = nil,
icon_fetcher = nil,
icons = {
File = { icon = '󰈔', hl = '@text.uri' },
Module = { icon = '󰆧', hl = '@namespace' },
Namespace = { icon = '󰅪', hl = '@namespace' },
Package = { icon = '󰏗', hl = '@namespace' },
Class = { icon = '𝓒', hl = '@type' },
Method = { icon = 'ƒ', hl = '@method' },
Property = { icon = '', hl = '@method' },
Field = { icon = '󰆨', hl = '@field' },
Constructor = { icon = '', hl = '@constructor' },
Enum = { icon = '', hl = '@type' },
Interface = { icon = '󰜰', hl = '@type' },
Function = { icon = '', hl = '@function' },
Variable = { icon = '', hl = '@constant' },
Constant = { icon = '', hl = '@constant' },
String = { icon = '𝓐', hl = '@string' },
Number = { icon = '#', hl = '@number' },
Boolean = { icon = '', hl = '@boolean' },
Array = { icon = '󰅪', hl = '@constant' },
Object = { icon = '⦿', hl = '@type' },
Key = { icon = '🔐', hl = '@type' },
Null = { icon = 'NULL', hl = '@type' },
EnumMember = { icon = '', hl = '@field' },
Struct = { icon = '𝓢', hl = '@type' },
Event = { icon = '🗲', hl = '@type' },
Operator = { icon = '+', hl = '@operator' },
TypeParameter = { icon = '𝙏', hl = '@parameter' },
Component = { icon = '󰅴', hl = '@function' },
Fragment = { icon = '󰅴', hl = '@constant' },
File = { icon = '󰈔', hl = 'Identifier' },
Module = { icon = '󰆧', hl = 'Include' },
Namespace = { icon = '󰅪', hl = 'Include' },
Package = { icon = '󰏗', hl = 'Include' },
Class = { icon = '𝓒', hl = 'Type' },
Method = { icon = 'ƒ', hl = 'Function' },
Property = { icon = '', hl = 'Identifier' },
Field = { icon = '󰆨', hl = 'Identifier' },
Constructor = { icon = '', hl = 'Special' },
Enum = { icon = '', hl = 'Type' },
Interface = { icon = '󰜰', hl = 'Type' },
Function = { icon = '', hl = 'Function' },
Variable = { icon = '', hl = 'Constant' },
Constant = { icon = '', hl = 'Constant' },
String = { icon = '𝓐', hl = 'String' },
Number = { icon = '#', hl = 'Number' },
Boolean = { icon = '', hl = 'Boolean' },
Array = { icon = '󰅪', hl = 'Constant' },
Object = { icon = '⦿', hl = 'Type' },
Key = { icon = '🔐', hl = 'Type' },
Null = { icon = 'NULL', hl = 'Type' },
EnumMember = { icon = '', hl = 'Identifier' },
Struct = { icon = '𝓢', hl = 'Structure' },
Event = { icon = '🗲', hl = 'Type' },
Operator = { icon = '+', hl = 'Identifier' },
TypeParameter = { icon = '𝙏', hl = 'Identifier' },
Component = { icon = '󰅴', hl = 'Function' },
Fragment = { icon = '󰅴', hl = 'Constant' },
-- ccls
TypeAlias = { icon = '', hl = '@type' },
Parameter = { icon = '', hl = '@parameter' },
StaticMethod = { icon = '', hl = '@function' },
Macro = { icon = '', hl = '@macro' },
TypeAlias = { icon = '', hl = 'Type' },
Parameter = { icon = '', hl = 'Identifier' },
StaticMethod = { icon = '', hl = 'Function' },
Macro = { icon = '', hl = 'Function' },
},
},
}