UI Configuration
Learn how to customize the user interface of NyxVim, including statusline, tabufline, and terminal
Overview
NyxVim’s UI plugin manages several key components of the user interface:
- Statusline
- Tabufline (bufferline + tablist)
- NvDash (Minimal dashboard)
- Term (terminal handling)
Customizing these components allows you to tailor NyxVim’s appearance to your preferences and workflow needs.
Tabufline and Statusline
Both the tabufline and statusline share a similar customization approach:
- The
order
is a list of module names from default modules plus your custom modules - Removing a word in the
order
will remove that module - Modules expect all their keys to be functions that return a string
- Statusline modules can also have strings
- To highlight a string in statusline/tabufline, wrap it with your highlight group or existing ones from the theme
Here’s an example configuration:
For more advanced customization, carefully review the default options in nvconfig.lua and check the source code of their module order tables in the ui repo.
Term (Terminal)
The term module provides functions for managing terminal windows. Here are the key options:
The pos
option is required, while others are optional. If optional options are not provided, they will be taken from the ui.term
table in your chadrc.
Terminal Window Functions
NyxVim provides several functions for working with terminal windows:
-
New Window
Create new terminal windows:
-
Toggleable Window
Create toggleable terminal windows:
-
Runner
Open a terminal and run a command, with the ability to re-run the command:
The cmd
option in the runner function can also be a Lua function, allowing for dynamic command generation based on the current file or other conditions.
Telescope Extensions
NyxVim’s UI plugin includes some useful Telescope extensions:
-
Theme Picker: Preview and apply themes from base46
- Command:
Telescope themes
- Command:
-
Hidden Term Picker: Unhide closed terminal windows
- Keymap:
<leader>pt
- Command:
Telescope terms
- Keymap:
Best Practices
- Consistency: Try to maintain a consistent style across your UI components
- Performance: Be mindful of performance when adding complex custom modules
- Readability: Use clear and descriptive names for custom modules
- Modularity: Break down complex UI elements into smaller, reusable modules
Troubleshooting
If you encounter issues with your UI configuration:
- Check for syntax errors in your configuration file
- Verify that all required plugins are installed and up to date
- Use
:checkhealth
to diagnose potential issues
Need Help?
If you’re having trouble with any NyxVim features or have questions:
- Check our FAQ section for common questions and answers.
- Join our Discord community to chat with other NyxVim users.
- Participate in GitHub Discussions to engage with the NyxVim community, share ideas, and get help.
- For bug reports or feature requests, open an issue on our GitHub repository.