nvchad / ui Goto Github PK
View Code? Open in Web Editor NEWLightweight & high performance UI plugin for nvchad
License: GNU General Public License v3.0
Lightweight & high performance UI plugin for nvchad
License: GNU General Public License v3.0
It would be helpful if there was a way to only display modified buffers in Tabufline, like in vscode, because it's often hard to navigate when every opened buffer displays as a new tab.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
No Name
Expected behavior
only two intended file open
no No Name fuckery
Screenshots
Could this section be made optional, as it makes it impossible to use rcarriga/nvim-notify. When trying to implement it in NvChad, it has no effect, and keeps printing messages in console.
By removing this section of code, everything works.
Lines 29 to 39 in 63201c0
with this code there are these problems:
Is your feature request related to a problem? Please describe.
Not a problem, but it will be nice if after all buffer closed then open the dashboard instead new empty buffer :)
Additional context
I think it's a bit suboptimal if the alpha only appears for the first time when opening nvim.
Seems like TbufPick is flawed.
I've entered 'Enter Num 1'
It routes to Buffer 4
which does not exist:
My config if needed:
https://github.com/Fabian-programmer/nvim
I already have my own Neovim config, however I'd like to use this plugin in my configuration. The problem is, how could I do that? Attempting to use require('nvchad_ui').setup()
throws an error which I guess is related to the fact that I am not using NvChad.
Would love to see this feature similar to what bufferline.nvim offers. You can do BufferLineCloseLeft
& BufferLineCloseRight
to close buffers in either direction.
Hey all,
the tabufline plugins gets activated, when there is more than 1 buffer open.
It seems like that terminal buffers are not considered.
Steps to reproduce:
open nvim
:term
:term
:buffers
to check that there are several buffers available
for the sanity-check now open any file :e ~/.bashrc
and the buffer ui appears.
I tried to implement this for a PR in https://github.com/NvChad/ui/blob/main/lua/nvchad_ui/tabufline/init.lua, but it does not work:
M.tabuflineMoveForward = function()
local bufs = M.bufilter() or {}
for i, v in ipairs(bufs) do
if api.nvim_get_current_buf() == v then
local i2 = i == #bufs and 1 or i + 1
bufs[i] = bufs[i2]
bufs[i2] = v
break
end
end
end
M.tabuflineMoveBackward = function()
local bufs = M.bufilter() or {}
for i, v in ipairs(bufs) do
if api.nvim_get_current_buf() == v then
local i2 = i == #bufs or i - 1
bufs[i] = bufs[i2]
bufs[i2] = v
break
end
end
end
I thought the bufs
table represents the visible tabs. How could I make this work properly?
I tried to disable tabufline in NvChad config with
-- custom/chadrc.lua
local M = {}
M.plugins = {
override = {
["NvChad/ui"] = {
tabufline = {
enabled = false,
},
},
},
}
return M
Is there something missing in the init.lua file of tabufline?
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem was.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Screenshot
I want to not display suatusline in a certain type of window, how to set it up
Hey, so im getting a empty buffer when i boot up NvChad through the dashboard. This also happenes when i open a new tab. So opening a tab will create a new empty buffer. This is for v2.0 btw.. Here is a video from the first situation:
https://www.youtube.com/watch?v=l0m-OinYBnk
Describe the bug
Whenever the header text is set to include a few more lines than the default, the dashboard fails to appear on startup.
This is an issue with the v2 NvChad release and was not an issue with the Alpha dashboard (v1 release).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Dashboard should throw an error and maybe support extra lines of ASCII art.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
I overwrite the UI config like so:
local M = {}
M.override_options = {
statusline = {
separator_style = "arrow", -- default/round/block/arrow
},
tabufline = {
overriden_modules = {
buttons = function()
return ""
end
}
}
}
return M
I can verify my config loads, because it uses the arrow separator on the status line, but as soon as the tabufline would show, I get this:
^I...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lu...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:97>
E15: Invalid expression: v:lua.require('nvchad_ui').tabufline()
I'd like to hide the theme toggle icon and the red X in the top right corner.
Describe the bug
When I press Enter
in the middle of a word in the renamer, it duplicated the word instead of renaming it.
Desktop:
I would like to only see the tabs (with path/partial path/filename) instead of buffers, since I'm used to handling buffers with blindly or by using ":ls" and some key mappings.
Is something like this supported/possible?
Describe the bug
When load_on_startup = true
there are conflicts after performing PackerSync
also opening a file from the CLI with nvim
To Reproduce
Steps to reproduce the behavior:
["NvChad/ui"] = {
override_options = {
nvdash = {
load_on_startup = true
}
}
}
nvim +PackerSync
(this also happen when open nvim and perform : PackerSync
at any moment)nvim example.txt
(it does not matter if the file exists or not)PackerSync
the summary is not longer displayed but NvdashExpected behavior
Show PackerSync summary instead, and allow edit the file opened from the CLI
Desktop:
Describe the bug
NvDash has conflicts with some vim options enabled, like:
vim.opt.list
vim.opt.listchars
vim.opt.relativenumber
with this options enabled there is junk that should not be displayed for the dashboard
To Reproduce
Steps to reproduce the behavior:
vim.opt.list = true
vim.opt.listchars = { eol = "↲", tab = "» ", trail = "·", extends = "▸", nbsp = "." }
vim.opt.relativenumber = true
Expected behavior
The dashboard should be displayed completely clear, no matter if relative numbers or any other option like listchars are enabled
Desktop:
This part:
Lines 29 to 39 in 514958a
vim.notify
which has been already changed from the noice.nvim. I'd like to opt out of the modification of vim.notify
by NvChad.Putting vim.opt.laststatus = 2
to have window based status bars (instead of a global one) reveals an issue when navigating between the windows:
Both window status bars display the same file name / title.
I have tried to place the config in every place I could think of and still I am unable to disable the tab buffer line thingy.
-- custom/plugins.lua
-- this one _should_ work (i think)
{
"NvChad/ui"
opts = {
tabufline = {
enabled = false,
}
}
}
-- custom/plugins.lua
{
"NvChad/ui"
tbufline = {
enabled = false,
}
}
-- custom/chadrc.lua
M.ui = {
tabufline = {
enabled = false,
}
}
-- core/default_config.lua
M.ui = {
-- ...
tabufline = {
enabled = false
-- ...
},
-- ...
}
I notice that the option to disable tbufline was added in the main repo just yesterday, but this repo has not had a commit since 11 days ago. Is it just that the changes have not been merged?
Using a custom ascii header for nvdash (v2.0 branch) I can't get it to highlight everything evenly. Here are a couple examples:
My chadrc.lua:
---@type ChadrcConfig
local M = {}
-- neovim options
local opt = vim.opt
opt.cursorline = false
vim.cmd [[set nohidden]]
local highlights = require "custom.highlights"
M.ui = {
theme_toggle = { "catppuccin", "catppuccin_latte" },
theme = "catppuccin",
-- hl_override = highlights.override,
-- hl_add = highlights.add,
transparency = false,
statusline = {
theme = "vscode_colored"
},
cmp = {
style = "atom_colored",
},
nvdash = {
load_on_startup = true,
header = {
" ▄▄▄ ██▓ ██▓▓█████ ███▄ █ █████▒▒█████ ▒██ ██▒",
"▒████▄ ▓██▒ ▓██▒▓█ ▀ ██ ▀█ █ ▓██ ▒▒██▒ ██▒▒▒ █ █ ▒░",
"▒██ ▀█▄ ▒██░ ▒██▒▒███ ▓██ ▀█ ██▒▒████ ░▒██░ ██▒░░ █ ░",
"░██▄▄▄▄██ ▒██░ ░██░▒▓█ ▄ ▓██▒ ▐▌██▒░▓█▒ ░▒██ ██░ ░ █ █ ▒ " ,
" ▓█ ▓██▒░██████▒░██░░▒████▒▒██░ ▓██░░▒█░ ░ ████▓▒░▒██▒ ▒██▒",
" ▒▒ ▓▒█░░ ▒░▓ ░░▓ ░░ ▒░ ░░ ▒░ ▒ ▒ ▒ ░ ░ ▒░▒░▒░ ▒▒ ░ ░▓ ░",
" ▒ ▒▒ ░░ ░ ▒ ░ ▒ ░ ░ ░ ░░ ░░ ░ ▒░ ░ ░ ▒ ▒░ ░░ ░▒ ░",
" ░ ▒ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ",
" ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ",
},
buttons = {
{ " Find File", "Spc f f", "Telescope find_files" },
{ " Recent Files", "Spc f o", "Telescope oldfiles" },
{ " Find Word", "Spc f w", "Telescope live_grep" },
{ " Themes", "Spc t h", "Telescope themes" },
},
},
}
M.plugins = require "custom.plugins"
-- check core.mappings for table structure
M.mappings = require "custom.mappings"
return M
Describe the bug
Hi ! I'm somewhat of a new user of neovim. I wanted to try Nvchad. Everything went great for the install, but when I want to setup Nvdash, it doesn't work. Nothing appears, even after inputting the command Nvdash
.
Here's my chadrc.lua
:
-- Chadrc file
-- Custom NvChad configuration (main file)
local M = {}
-- UI Settings
M.ui = {
-- Theme
theme = "onedark",
-- Dashboard
nvdash = {
load_on_startup = true,
header = {
[[]],
[[ ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣭⣿⣶⣿⣦⣼⣆ ]],
[[ ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ]],
[[ ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷⠄⠄⠄⠄⠻⠿⢿⣿⣧⣄ ]],
[[ ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ]],
[[ ⢠⣿⣿⣿⠈ ⠡⠌⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ]],
[[ ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘⠄ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ]],
[[ ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ]],
[[ ⣠⣿⠿⠛⠄⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ]],
[[ ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇⠄⠛⠻⢷⣄ ]],
[[ ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ]],
[[ ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ]],
[[ ⢰⣶ ⣶ ⢶⣆⢀⣶⠂⣶⡶⠶⣦⡄⢰⣶⠶⢶⣦ ⣴⣶ ]],
[[ ⢸⣿⠶⠶⣿ ⠈⢻⣿⠁ ⣿⡇ ⢸⣿⢸⣿⢶⣾⠏ ⣸⣟⣹⣧ ]],
[[ ⠸⠿ ⠿ ⠸⠿ ⠿⠷⠶⠿⠃⠸⠿⠄⠙⠷⠤⠿⠉⠉⠿⠆ ]],
[[]],
},
buttons = {
{ " Find File", "Spc f f", "Telescope find_files" },
{ " Recent Files", "Spc f o", "Telescope oldfiles" },
{ " Find Word", "Spc f w", "Telescope live_grep" },
{ " Bookmarks", "Spc b m", "Telescope marks" },
{ " Themes", "Spc t h", "Telescope themes" },
{ " Mappings", "Spc c h", "NvCheatsheet" },
},
},
}
return M
To Reproduce
Steps to reproduce the behavior:
chadrc.lua
file to enable Nvdash on startup:Nvdash
Expected behavior
A dashboard with my custom header.
Desktop (please complete the following information):
vim --version
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az164-457
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/share/nvim"
Run :checkhealth for more info
command : :lua require('nvchad_ui/tabufline').closeAllBufs('');
E5108: Error executing lua ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:48: Vim(bdelete):E516: No buffers were deleted: confirm bd1 stack traceback: [C]: in function 'cmd' ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:48: in function 'close_buffer' ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:61: in function 'closeAllBufs' [string ":lua"]:1: in main chunk E5108: Error executing lua ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:48: Vim(bdelete):E516: No buffers were deleted: confirm bd1 stack traceback: [C]: in function 'cmd' ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:48: in function 'close_buffer' ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:61: in function 'closeAllBufs' [string ":lua"]:1: in main chunk E5108: Error executing lua ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:48: Vim(bdelete):E516: No buffers were deleted: confirm bd1 stack traceback: [C]: in function 'cmd' ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:48: in function 'close_buffer' ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:61: in function 'closeAllBufs' [string ":lua"]:1: in main chunk table: 0x7f99c7a4c810
If i open third tab, the first tab is hiding, and i can't reach it via . If i use gt to switch tab, i can reach it, but then other tabs are getting hiden.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem was.
Describe the solution you'd like
Like bufferline.nvim's BufferLineMoveNext & BufferLineMovePrev commands
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Screenshot
Maybe a screenshot of the feature
When I run nvim with Alpha dashboard active I'm getting this error:
E5108: Error executing lua ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:48: Vim(bdelete):E516: No buffers were deleted: confirm bd1 stack traceback: [C]: in function 'cmd' ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:48: in function 'close_buffer' ...site/pack/packer/opt/ui/lua/nvchad_ui/tabufline/init.lua:61: in function 'closeAllBufs' [string ":lua"]:1: in main chunk
To reproduce this:
nvim
I ran an update today then i got this
i removed ui folder from plugins intallation path then cloned this repo to replace it.
now every thing i alright
[ QUESTION ]
is it possible to modify status line icons without modifying the source.
would help finding particular keymaps, especially if i put #this
#and
#that
#the
#other
in my keymap descriptions
I'm rewritting part of the statusline
configuration and I would like to change the run
function. However, there are some modules that I would like to keep from the default configuration. So, copying everyting inside nvchad_ui.statusline.minimal
and then it can be changed. Still, there are too many things that I would have to clone internally.
It would be ideal that we could require('NvChad/ui')
and then use whatever dependencies that we need.
Is it doable?
The options for the plugin are different than the listed on the webpage.
statusline = {
theme = "default", -- default/vscode/vscode_colored/minimal
-- default/round/block/arrow separators work only for default statusline theme
-- round and block will work for minimal theme only
separator_style = "default",
overriden_modules = nil,
},
Describe the bug
After opening a files in split and then try to :TZFocus got this error:
Invalid expression: v:lua.require('nvchad_ui').tabufline()
To Reproduce
Steps to reproduce the behavior:
Does anyone else have this issue?
Describe the bug
Restoring a session appears to only be opening a single buffer containing the last-editet file. Closing this buffer reveals another buffer, closing this one revelas the previous one, and so on. This also happens with a fresh install / no custom config
To Reproduce
Steps to reproduce the behavior:
mksession ~/Session.vim
source ~/Session.vim
source ~/Session.vim
, same behaviourPackerCompile
Expected behavior
sourcing a session file opens all previous buffers next to each other in the bufferline
Desktop (please complete the following information):
Describe the bug
After upgrade plugins, tabufline or nvim-tree does not work properly. I have just updated all plugins by running :PackerUpdate
and new patches create bug about buffer. Specifically, nvim-tree take over the buffer 0, which is an unexpected behavior (see video). Both tabufline and nvim-tree has recent update so i suppose the problem is caused by one of them.
To Reproduce
Steps to reproduce the behavior:
nvim
:PackerUpdate
:PackerSync
Expected behavior
Nvim-tree buffer does not affected regular action (may be take buffer 0).
Screenshots
Desktop (please complete the following information):
Additional context
display = {
working_sym = "ﲊ",
error_sym = "✗ ",
done_sym = " ",
removed_sym = " ",
moved_sym = "",
}
local present, icons = pcall(require, "nvchad_ui.icons")
if present then
-- [ assign icons from ui ]
else
-- [ fallback icons ]
end
["NvChad/ui"] = {
override_options = {
icons = {
-- ...
},
},
}
E5108: Error executing lua: Vim:E15: Invalid expression: v:lua.require('nvchad_ui').statusline()
stack traceback:
[C]: in function 'input'
...ew/Cellar/neovim/0.8.2/share/nvim/runtime/lua/vim/ui.lua:91: in function 'input'
...t/nvim-tree.lua/lua/nvim-tree/actions/fs/rename-file.lua:74: in function 'handle_tree_actions'
...ker/opt/nvim-tree.lua/lua/nvim-tree/actions/dispatch.lua:123: in function 'dispatch'
.../packer/opt/nvim-tree.lua/lua/nvim-tree/actions/init.lua:273: in function <.../packer/opt/nvim-tree.lua/lua/nvim-tree/actions/init.lua:272>
1 select a file in nvimtree,then press 'r' to rename a file.
2 ctrl-f enter command-line mode.
3 press ctrl+shift+^ and then the error message came out.
4 modify the name after error occur. press enter to confirm the modify.
5 then tabufline disapear
Pulled and installed NvChad yesterday and the dashboard seems to not work. Whenever I nvim .
into a code base I just get a blank/empty screen instead of the dashboard with the header graphics.
Everything else still works, and I'm loving it. The blank screen on startup is a little disorienting tho. I checked Lazy on startup in a project and the UI package looks to be loaded - just no Dashboard.
Using NVIM v0.8.3 on WSL. Let me know what other info I can provide for debugging.
I believe I have dashboard enabled in .chadrc:
M.ui = {
...other config stuff...
nvdash = {
load_on_startup = true,
}
}
Hi,
I am getting an error message as the below. I am using v2.0 branch.
Error executing vim.schedule lua callback: ...ng/.local/share/nvim/lazy/ui/lua/nvchad_ui/signature.lua:1: attempt to index field 'lsp' (a nil value)
After remove local config = require("core.utils").load_config().ui.lsp.signature
everything works fine.
I take a quick look at NvChad v2.0 and the example config, but I can't find any member named lsp
in the ui config. Could you help take a look?
The automatic signature help is really nice, however, I am constantly reminded that there is no signature help when I type stuff like commas outside of function calls.
When using rcarriga/nvim-notify, this means there's a big green box every time I type a comma.
In my opinion, the message doesn't provide anything useful (I know there is no help when it doesn't show up).
I did some research on how to silence it:
In signature.lua, where the signature window is called, options to the nvim signature help provider are passed. Passing silent = true
disables the message.
vim.lsp.with(M.signature_window, {
border = "single",
focusable = false,
silent = true,
})
I am not familiar with the nvim option/plugin that highlights the current scope context. From the screenshot below, the div is highlighted since cursor is within the scope.
This presents an issue with Visual mode highlight since both colors are indistinguishable from each other. In the example screenshot below, the highlight supposedly starts in "class..." and ends in "... detai".
Howdy folks :)
First I would like to thank u guys for the amazing effort and even more amazing result, been using NvChad for the last couple of months and things are being relatively easily to setup and to get up and running.
I would like to ask how could I go about changing the status line to support transparency and how can I change from showing the current buffer file name to the file path?
PS: I've checked the docs and source code but I should've missed something.
Again, thx for the awesome work :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.