-
Notifications
You must be signed in to change notification settings - Fork 50
Home
You need:
- A compiler that supports C++20 (at least the parts that are used), I use Clang
- CMake (> 3.19)
- A generator, I use Ninja
Instructions:
Note: Use cmd
as the shell for these commands.
git clone https://github.com/rohit-px2/nvui.git --recurse-submodules
cd nvui
cmake -B build . -DCMAKE_TOOLCHAIN_FILE=.\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=(build type) -G (generator)
cmake --build build --target nvui --config (build type)
If you use MSVC / Visual Studio, by default the folder where the executable is built will be a subdirectory of the build directory.
This causes nvui to not be able to find the assets and the runtime vim file, since it expects the assets to be in "../assets" (where ../ is the parent directory of where the executable currently is) and the vim files to be in "../vim".
You need:
- Make
- A C++ compiler that supports C++20, I use clang-12
git clone https://github.com/rohit-px2/nvui.git --recurse-submodules
cd nvui
For the next part you have two options.
Install these packages from the system package manager (example using Ubuntu):
sudo apt-get install gperf autoconf build-essential libtool libgl1-mesa-dev libxi-dev libx11-dev libxext-dev libxkbcommon-x11-dev libglu1-mesa-dev libx11-xcb-dev '^libxcb.*-dev' libxrender-dev ninja-build curl zip unzip tar autopoint python
cmake -B build . -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build --target nvui --config Release
You need these packages:
- Boost
- fmt
- Qt5 (5.15.2)
- Catch2
- msgpack C++ libraries
cmake -B build . -DCMAKE_BUILD_TYPE=Release
cmake --build build --target nvui --config Release
You need:
- Homebrew
- A C++20 compiler
git clone https://github.com/rohit-px2/nvui.git --recurse-submodules
cd nvui
brew install fmt boost qt@5 msgpack-cxx catch2
export Qt5_DIR=/usr/local/Cellar/qt@5/5.15.2/lib/cmake/Qt5
(or wherever your Qt5 installation is)
cmake -B build . -DCMAKE_BUILD_TYPE=Release
cmake --build build --target nvui --config Release
nvui [--ext_multigrid[=[true | false]]] [--ext_popupmenu[=[true | false]]] [--ext_cmdline[=[true | false]]] [--ext_hlstate[=[true | false]]] [--nvim=/path/to/nvim] [--titlebar[=[true | false]] [-- [args_to_nvim...]]
--ext_multigrid
Enables the ext_multigrid
feature, allowing for grid movement and scrolling animations.
If specified with =false
, the feature is disabled.
Default: Disabled
--ext_popupmenu
Enables the ext_popupmenu
feature, using an external popup menu widget.
If specified with =false
, the feature is disabled.
Default: Disabled
--ext_cmdline
Enables the ext_cmdline
feature, which uses a custom command line widget.
If specified with =false
, the feature is disabled.
Default: Disabled
--ext_hlstate
Enables the ext_hlstate
feature, which gives more information about highlights to nvui
.
If specified with =false
, this feature is disabled.
Note: Enabling this feature has been known to cause crashes and has no effect on the application, so it should be kept disabled.
Default: Disabled
--nvim=/path/to/nvim
Specifies where the location of the nvim
executable is for nvui
to use.
If this flag is not set, or the file at the specified path is not executable,
nvui defaults to the nvim executable in your PATH, and will show an error message if it could not be found.
--titlebar
Enables the custom title bar.
For more information about the custom title bar and customization options, see :h nvui-titlebar
.
The custom title bar may have issues and is disabled by default.
-- [args_to_nvim...]
When you specify the --
flag, any arguments after this flag will be forwarded to Neovim.
nvui defines the variable g:nvui=1
so you can hide your configuration behind an existence check of this variable.
An example would be
" Other configuration
if exists('g:nvui')
" Configure nvui
NvuiCmdFontFamily Jetbrains Mono
NvuiCmdFontSize 25.0
NvuiScrollAnimationDuration 0.2
endif
Or in Lua:
if vim.g.nvui then
-- Configure through vim commands
vim.cmd [[NvuiCmdFontFamily Jetbrains Mono]]
end
nvui offers font fallback by setting multiple fonts.
For example,
set guifont=Consolas:h12,JetbrainsMono\ NF,Meiryo\ UI
will have this effect:
- Use "Consolas" as the primary font with point size 12,
- Look in "JetbrainsMono NF" if a symbol is not found in "Consolas",
- Look in "Meiryo UI" if a symbol is not found in "JetbrainsMono NF".
The font options are set by the first font i.e. to set the font size you would write
set guifont=First\ Font:h{size},Second\ Font,Third\ Font...
There can not be any spaces between the commas separating each font.