feat(nvim): update color theme with semantic highlighting for go
This commit is contained in:
parent
03ba9586f6
commit
a8c1e82095
1 changed files with 23 additions and 2 deletions
|
@ -42,6 +42,10 @@
|
|||
|
||||
local table = require('table')
|
||||
|
||||
function clear_highlight(name)
|
||||
vim.api.nvim_set_hl(0, name, {})
|
||||
end
|
||||
|
||||
function highlight(opts)
|
||||
assert(opts.name, "The name of the group is missing")
|
||||
|
||||
|
@ -127,7 +131,7 @@ vim.cmd [[
|
|||
endif
|
||||
]]
|
||||
|
||||
vim.g.colors_name = "bsolarized2"
|
||||
--vim.g.colors_name = "bsolarized2"
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Builtin groups
|
||||
|
@ -339,6 +343,7 @@ highlight {name="Constant", fg=colors.cyan}
|
|||
|
||||
-- *Identifier any variable name
|
||||
-- Function function name (also: methods for classes)
|
||||
clear_highlight "Identifier"
|
||||
highlight {name="Identifier", fg=colors.blue}
|
||||
|
||||
-- *Statement any statement
|
||||
|
@ -361,7 +366,7 @@ highlight {name="PreProc", fg=colors.orange}
|
|||
-- StorageClass static, register, volatile, etc.
|
||||
-- Structure struct, union, enum, etc.
|
||||
-- Typedef A typedef
|
||||
highlight {name="Type", fg=colors.yellow}
|
||||
highlight {name="Type", fg=colors.yellow, attrs={attrs.bold}}
|
||||
|
||||
-- *Special any special symbol
|
||||
-- SpecialChar special character in a constant
|
||||
|
@ -385,6 +390,22 @@ highlight {name="Error", fg=colors.base03, bg=colors.red, attrs={attrs.bold}}
|
|||
highlight {name="Todo", fg=colors.magenta, bg=colors.none, attrs={attrs.bold}}
|
||||
|
||||
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Semantic tokens
|
||||
-- ----------------------------------------------------------------------
|
||||
|
||||
highlight {name = "@lsp.type.namespace", fg=colors.base0 }
|
||||
highlight {name = "@lsp.type.parameter", fg=colors.magenta }
|
||||
highlight {name = "@lsp.type.variable", fg=colors.blue, attrs={attrs.italic} }
|
||||
highlight {name = "@lsp.type.function", fg=colors.blue }
|
||||
highlight {name = "@lsp.type.method", link="Function" }
|
||||
|
||||
highlight {name = "@lsp.mod.readonly", fg=colors.orange}
|
||||
highlight {name = "@lsp.mod.definition", attrs={attrs.bold} }
|
||||
highlight {name = "@lsp.mod.deprecated", attrs={attrs.strike} }
|
||||
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- NvimTree syntax
|
||||
-- ----------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Reference in a new issue