feat: add toggleterm, markdown preview keymaps, lualine switch filename and navic (#23)
- Configured toggleterm plugin - Added keymap for markdown preview - Changed lualine so Navic is better readable by switching filename and type with Navic.
This commit is contained in:
parent
864f443364
commit
0331a50aa8
8 changed files with 105 additions and 16 deletions
BIN
.docs/images/neovim.png
Normal file
BIN
.docs/images/neovim.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 781 KiB |
53
README.md
53
README.md
|
|
@ -2,29 +2,63 @@
|
|||
|
||||
This repository contains my personal configuration NixVim, a Neovim configuration managed with Nix.
|
||||
|
||||
## General Configuration
|
||||

|
||||
|
||||
## How to use
|
||||
|
||||
You can use this flake as an input:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
nixvim.url = "github:dc-tec/nixvim"
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
You can then install the package either normally or through home-manager.
|
||||
|
||||
#### Normal:
|
||||
|
||||
```nix
|
||||
environment.systemPackages = [
|
||||
inputs.nixvim.packages.x86_64-linux.default
|
||||
];
|
||||
```
|
||||
|
||||
#### Home-Manager
|
||||
|
||||
```nix
|
||||
home-manager.users.<user>.home.packages = [
|
||||
inputs.nixvim.packages.x86_64-linux.default
|
||||
];
|
||||
```
|
||||
|
||||
## Plugins
|
||||
|
||||
### General Configuration
|
||||
|
||||
- `settings.nix`: Contains general settings for Neovim.
|
||||
- `keymaps.nix`: Defines key mappings.
|
||||
- `auto_cmds.nix`: Sets up automatic commands.
|
||||
- `file_types.nix`: Configures file type specific settings.
|
||||
|
||||
## Themes
|
||||
### Themes
|
||||
|
||||
- `default.nix`: Sets the default theme.
|
||||
|
||||
## Completion
|
||||
### Completion
|
||||
|
||||
- `cmp.nix`: Configures the cmp completion framework.
|
||||
- `cmp-copilot.nix`: Adds GitHub Copilot support to cmp.
|
||||
- `lspkind.nix`: Adds icons to lsp completion items.
|
||||
- `autopairs.nix`: Adds the autopairs plugin.
|
||||
|
||||
## Snippets
|
||||
### Snippets
|
||||
|
||||
- `luasnip.nix`: Configures the LuaSnip snippet engine.
|
||||
|
||||
## Editor Plugins and Configurations
|
||||
### Editor Plugins and Configurations
|
||||
|
||||
- `neo-tree.nix`: Configures the NeoTree file explorer.
|
||||
- `treesitter.nix`: Configures the TreeSitter syntax highlighter.
|
||||
|
|
@ -35,24 +69,24 @@ This repository contains my personal configuration NixVim, a Neovim configuratio
|
|||
- `copilot-chat.nix`: Configures the Copilot Chat plugin for interacting with GitHub Copilot.
|
||||
- `navic.nix`: Configures the Navic plugin, shows the current code context.
|
||||
|
||||
## UI Plugins
|
||||
### UI Plugins
|
||||
|
||||
- `bufferline.nix`: Configures the Bufferline plugin for enhanced buffer/tab display.
|
||||
- `lualine.nix`: Configures the Lualine status line plugin.
|
||||
- `startup.nix`: Configures the startup screen.
|
||||
|
||||
## LSP
|
||||
### LSP
|
||||
|
||||
- `lsp.nix`: Configures the Neovim LSP client.
|
||||
- `conform.nix`: Configures the Conform plugin for automatic code formatting.
|
||||
- `fidget.nix`: Configures the Fidget plugin for displaying LSP diagnostics in the status line.
|
||||
|
||||
## Git
|
||||
### Git
|
||||
|
||||
- `lazygit.nix`: Configures the LazyGit plugin for Git integration.
|
||||
- `gitsigns.nix`: Configures the GitSigns plugin for displaying Git diff information.
|
||||
|
||||
## Utils
|
||||
### Utils
|
||||
|
||||
- `telescope.nix`: Configures the Telescope plugin for fuzzy finding and picking.
|
||||
- `whichkey.nix`: Configures the WhichKey plugin for displaying key mappings.
|
||||
|
|
@ -60,6 +94,7 @@ This repository contains my personal configuration NixVim, a Neovim configuratio
|
|||
- `mini.nix`: Configures the Mini plugin.
|
||||
- `obsidian.nix`: Confiugres the Obsidian plugin, for note-taking purposes.
|
||||
- `markdown-preview.nix`: Configures the Markdown Preview plugin.
|
||||
- `toggleterm.nix`: Configures Terminal plugin.
|
||||
|
||||
Please refer to the individual `.nix` files for more detailed configuration information.
|
||||
|
||||
|
|
|
|||
|
|
@ -49,5 +49,6 @@ _: {
|
|||
./plugins/utils/mini.nix
|
||||
./plugins/utils/markdown-preview.nix
|
||||
./plugins/utils/obsidian.nix
|
||||
./plugins/utils/toggleterm.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
_: {
|
||||
plugins.navic = {
|
||||
enable = true;
|
||||
separator = " ";
|
||||
separator = " ";
|
||||
highlight = true;
|
||||
depthLimit = 5;
|
||||
lsp = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
_: {
|
||||
plugins.luasnip = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
settings = {
|
||||
enable_autosnippets = true;
|
||||
store_selection_keys = "<Tab>";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -46,6 +46,11 @@ _: {
|
|||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "navic";
|
||||
}
|
||||
];
|
||||
lualine_x = [
|
||||
{
|
||||
name = "filetype";
|
||||
extraConfig = {
|
||||
|
|
@ -63,11 +68,6 @@ _: {
|
|||
path = 1;
|
||||
};
|
||||
}
|
||||
];
|
||||
lualine_x = [
|
||||
{
|
||||
name = "navic";
|
||||
}
|
||||
{
|
||||
name.__raw = ''
|
||||
function()
|
||||
|
|
|
|||
|
|
@ -15,4 +15,15 @@ _: {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>mp";
|
||||
action = "<cmd>MarkdownPreview<cr>";
|
||||
options = {
|
||||
desc = "Toggle Markdown Preview";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
42
config/plugins/utils/toggleterm.nix
Normal file
42
config/plugins/utils/toggleterm.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
_: {
|
||||
plugins.toggleterm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
size = 20;
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>t";
|
||||
action = "<cmd>ToggleTerm<cr>";
|
||||
options = {
|
||||
desc = "Toggle Terminal Window";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tv";
|
||||
action = "<cmd>ToggleTerm direction=vertical<cr>";
|
||||
options = {
|
||||
desc = "Toggle Vertical Terminal Window";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>th";
|
||||
action = "<cmd>ToggleTerm direction=horizontal<cr>";
|
||||
options = {
|
||||
desc = "Toggle Horizontal Terminal Window";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tf";
|
||||
action = "<cmd>ToggleTerm direction=float<cr>";
|
||||
options = {
|
||||
desc = "Toggle Floating Terminal Window";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue