-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statusline isn't working as expected #134
Comments
You should be able to debug this by strategically inserting some local fg = pinnacle.extract_fg(status_highlight)
local bg = pinnacle.extract_bg("StatusLine")
print(vim.inspect(fg))
print(vim.inspect(bg))
vim.cmd("highlight User4 " .. pinnacle.highlight({ bg = bg, fg = fg })) If, say, I'm using base16-vim, and I find that all the highlight groups have defined values. In your local set-up, something else must be happening; fixing it might mean doing something to the colorscheme, or to your
I'm not using either of those, so I don't have any specific advice to offer about them. |
After a little digging, I found the issue. For some reason, when using the I'm going to keep this issue open since I'm currently working on getting the statusbar to work with gps and to get TreeSitter working along with the focus/blur method. Once I've completed these tasks, I'll post my results here and close the issue, just in case anyone else wants the same. |
Alrighty. I just completed the gps part of the statusbar. Here's how the statusbar looks like. Here's the code (I put this right after: .. "%*" -- Reset highlight group.
.. "%3*" -- Switch to User3 highlight group (bold).
.. "%= %<%{%v:lua.require'nvim-navic'.get_location()%} %=" -- Navic in Center.
.. "%*" -- Reset highlight group. Of course, to get this working, you need to have nvim-navic installed and configured. I'll try and get the TreeSitter + focus/blur done today and close this issue as soon as possible. |
Finally. I figured out the final issue. I disable TreeSitter and IndentLine by adding the following autocmds: autocmd("BufEnter", "*", "TSBufEnable highlight")
autocmd("BufEnter", "*", "IndentBlanklineToggle")
autocmd("BufLeave", "*", "TSBufDisable highlight")
autocmd("BufLeave", "*", "IndentBlanklineDisable") This does bring about the following issues. When opening something like a float, it disables highlighters and indentation, but after leaving, it doesn't bring them back. @wincent How would you create an autocmd that only triggers when leaving a buffer, and then re-entering another buffer? |
Unfortunately, autocmds are notoriously fiddly, especially once you have multiple plug-in installed, firing autocmds, listening to autocmds, suppressing autocmds (eg. with |
Closing some old stale issues. |
Expected Behavior
I'm expecting the statusline to look like your statusline.
Actual Behavior
The statusline looks similiar to yours, but it doesn't have any coloring and when I modify the file, I get the following error:
Steps to Reproduce the Problem
Here's the content of
statusline.lua
:Here's the content of
augroup.lua
:I then call these files in my
init.lua
like so:Question
I'm currently using TreeSitter and when I try to implement the blur/focus methods you use, I can't get TreeSitter disabled for the inactive buffers. How would you deal with this?
Also, how would I add the gps to the statusline right after the file type next to the filename?
Specifications
The text was updated successfully, but these errors were encountered: