A theme-driven, out-of-the-box modern configuration of neovim π
We developed a theme called HardHacker, which we thought was pretty and eye friendly, but we found that many neovim plugins have their own color scheme, so we made a neovim integration environment that matches the hardhacker theme.
- Session load and switch
- File explorer
- File find and search
- Float terminal
- LSP
- Pretty code highlighting, Colors highlighting
- Auto completion
- Languages
- Git integration
- Git diff view
- Pretty Tab line, Status line
- Markdown Preview via your browser
- Starting screen
- Quick resize the window
- Customization of frequently used shortcuts
- ...
The preview shows opening a project and then switching to another project. Here the project is loaded and switched via nvim's session. Thus, a project is a session.
When nvim is started in a directory, it is created as a session based on that directory, so we can always start nvim in the root directory of a project.
We can use the F6
shortcut (by default) to select and switch a project(session).
- Neovim 0.8+
- Not required, but recommended
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
git clone https://github.com/hardhackerlabs/oh-my-nvim.git ~/.config/nvim
Use command :LspInstall
to download and install a server, e.g. :LspInstall rust_analyzer
.
Use command :TSInstall
to download and install a parser, e.g. :TSInstall rust
.
~/.config/nvim/
βββ init.lua
βββ lazy-lock.json
βββ lua
βββ basic.lua
βββ custom.lua
βββ custom_keys.lua
βββ custom_opts.lua
βββ plugins
βΒ Β βββ my_plugins.lua
βΒ Β βββ ...
βββ settings.lua
-
~/.config/nvim/lua/plugins/my_plugins.lua
This file does not exist by default, you can create this file and configure the plugins you want.
-
~/.config/nvim/lua/custom.lua
This file does not exist by default, you can create this file, then place some custom configuration logic, the custom.lua module will be loaded last.
π View the default shortcut settings
You can edit the default settings of the shortcut keys in this configuration file (~/.config/nvim/lua/custom_keys.lua
).
If you want to add your own plugins, you can create a my_plugins.lua
file in the directory ~/.config/nvim/lua/plugins
. Setup the plugins in this file.
The plugin configuration in the my_plugins.lua
file refers to the following template (lazy.nvim syntax):
return {
-- Your Plugin1
{
'hardhacker/plugin1',
config = function() ... end
},
-- Your Plugin2
{'hardhacker/plugin2'},
}
- lazy.nvim (Plugin manager)
- hardhacker-theme
- nvim-notify
- nvim-web-devicons
- dashboard-nvim
- toggleterm.nvim
- gitsigns.nvim
- diffview.nvim
- lualine.nvim
- nvim-lspconfig
- nvim-cmp
- cmp-nvim-lsp
- cmp-buffer
- cmp-path
- cmp-cmdline
- lspkind.nvim
- nvim-treesitter
- bufferline.nvim
- telescope.nvim
- neo-tree.lua
- markdown-preview.nvim
- nvim-colorizer.lua
- smart-splits.nvim
- bufdelete
- aerial
- neovim-session-manager
- null-ls
- Neovide (Developed by rust)