fix: ui: Follow links while setting up SymbolsOutlineConnector
we link to comment but dont follow links which makes it wonky with themes. Also make the highlight customizable.
This commit is contained in:
11
README.md
11
README.md
@@ -115,8 +115,9 @@ vim.g.symbols_outline = {
|
|||||||
| ? | Show help message |
|
| ? | Show help message |
|
||||||
|
|
||||||
### Highlights
|
### Highlights
|
||||||
| Highlight | Purpose |
|
| Highlight | Purpose |
|
||||||
| ------------- | ------------------------------------------------------- |
|
| ----------------------- | -------------------------------------- |
|
||||||
| FocusedSymbol | Highlight of the focused symbol |
|
| FocusedSymbol | Highlight of the focused symbol |
|
||||||
| Pmenu | Highlight of the preview popup windows |
|
| Pmenu | Highlight of the preview popup windows |
|
||||||
| Comment | Highlight of the table connectors and info virtual text |
|
| SymbolsOutlineConnector | Highlight of the table connectors |
|
||||||
|
| Comment | Highlight of the info virtual text |
|
||||||
|
|||||||
@@ -218,8 +218,8 @@ symbol_blacklist
|
|||||||
================================================================================
|
================================================================================
|
||||||
5. COMMANDS *symbols-outline-commands*
|
5. COMMANDS *symbols-outline-commands*
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
| -------------------- | ---------------------- |
|
| ---------------------- | ---------------------- |
|
||||||
| `:SymbolsOutline` | Toggle symbols outline |
|
| `:SymbolsOutline` | Toggle symbols outline |
|
||||||
| `:SymbolsOutlineOpen` | Open symbols outline |
|
| `:SymbolsOutlineOpen` | Open symbols outline |
|
||||||
| `:SymbolsOutlineClose` | Close symbols outline |
|
| `:SymbolsOutlineClose` | Close symbols outline |
|
||||||
@@ -241,11 +241,12 @@ symbol_blacklist
|
|||||||
================================================================================
|
================================================================================
|
||||||
7. HIGHLIGHTS *symbols-outline-highlights*
|
7. HIGHLIGHTS *symbols-outline-highlights*
|
||||||
|
|
||||||
| Highlight | Purpose |
|
| Highlight | Purpose |
|
||||||
| ------------- | ------------------------------------------------------- |
|
| ----------------------- | ------------------------------------------------------- |
|
||||||
| FocusedSymbol | Highlight of the focused symbol |
|
| FocusedSymbol | Highlight of the focused symbol |
|
||||||
| Pmenu | Highlight of the preview popup windows |
|
| Pmenu | Highlight of the preview popup windows |
|
||||||
| Comment | Highlight of the table connectors and info virtual text |
|
| SymbolsOutlineConnector | Highlight of the table connectors |
|
||||||
|
| Comment | Highlight of the table connectors and info virtual text |
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
vim:tw=79:ts=8:ft=help:norl
|
vim:tw=79:ts=8:ft=help:norl
|
||||||
|
|||||||
@@ -37,14 +37,15 @@ function M.setup_highlights()
|
|||||||
-- notably making them italic, which messes up the outline connector. Fix
|
-- notably making them italic, which messes up the outline connector. Fix
|
||||||
-- this by copying the foreground color from the comment hl into a new
|
-- this by copying the foreground color from the comment hl into a new
|
||||||
-- highlight.
|
-- highlight.
|
||||||
local comment_fg_gui = vim.fn.synIDattr(vim.fn.hlID('Comment'), 'fg',
|
local comment_fg_gui = vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID('Comment')), 'fg', 'gui')
|
||||||
'gui')
|
local comment_fg_cterm = vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID('Comment')), 'fg',
|
||||||
local comment_fg_cterm = vim.fn.synIDattr(vim.fn.hlID('Comment'), 'fg',
|
|
||||||
'cterm')
|
'cterm')
|
||||||
|
print(comment_fg_gui)
|
||||||
|
|
||||||
|
if vim.fn.hlexists('SymbolsOutlineConnector') == 0 then
|
||||||
vim.cmd(string.format('hi SymbolsOutlineConnector ctermfg=%s guifg=%s',
|
vim.cmd(string.format('hi SymbolsOutlineConnector ctermfg=%s guifg=%s',
|
||||||
comment_fg_cterm, comment_fg_gui))
|
comment_fg_cterm, comment_fg_gui))
|
||||||
|
end
|
||||||
|
|
||||||
local symbols = config.options.symbols
|
local symbols = config.options.symbols
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user