Skip to content

Commit

Permalink
use unicode icons for AST
Browse files Browse the repository at this point in the history
  • Loading branch information
p00f committed Sep 23, 2022
1 parent d62ee65 commit f2ca89d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@ require("clangd_extensions").setup {
priority = 100,
},
ast = {
-- These are unicode, should be available in any font
role_icons = {
type = "🄣",
declaration = "🄓",
expression = "🄔",
statement = ";",
specifier = "🄢",
["template argument"] = "🆃",
},
kind_icons = {
Compound = "🄲",
Recovery = "🅁",
TranslationUnit = "🅄",
PackExpansion = "🄿",
TemplateTypeParm = "🅃",
TemplateTemplateParm = "🅃",
TemplateParamObject = "🅃",
},
--[[ These require codicons (https://github.com/microsoft/vscode-codicons)
role_icons = {
type = "",
declaration = "",
Expand All @@ -63,7 +82,7 @@ require("clangd_extensions").setup {
TemplateTypeParm = "",
TemplateTemplateParm = "",
TemplateParamObject = "",
},
}, ]]

highlights = {
detail = "Comment",
Expand Down
26 changes: 13 additions & 13 deletions lua/clangd_extensions/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ local defaults = {

ast = {
role_icons = {
type = "",
declaration = "",
expression = "",
specifier = "",
statement = "",
["template argument"] = "",
type = "🄣",
declaration = "🄓",
expression = "🄔",
statement = ";",
specifier = "🄢",
["template argument"] = "🆃",
},

kind_icons = {
Compound = "",
Recovery = "",
TranslationUnit = "",
PackExpansion = "",
TemplateTypeParm = "",
TemplateTemplateParm = "",
TemplateParamObject = "",
Compound = "🄲",
Recovery = "🅁",
TranslationUnit = "🅄",
PackExpansion = "🄿",
TemplateTypeParm = "🅃",
TemplateTemplateParm = "🅃",
TemplateParamObject = "🅃",
},

highlights = {
Expand Down

0 comments on commit f2ca89d

Please sign in to comment.