even more nvim config
This commit is contained in:
parent
3783ec19c6
commit
586f01ac58
3 changed files with 108 additions and 0 deletions
75
common/hm-modules/nvim/dashboard.lua
Normal file
75
common/hm-modules/nvim/dashboard.lua
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
local settings = {
|
||||||
|
-- every line should be same width without escaped \
|
||||||
|
header = {
|
||||||
|
type = "text",
|
||||||
|
oldfiles_directory = false,
|
||||||
|
align = "center",
|
||||||
|
fold_section = false,
|
||||||
|
title = "Header",
|
||||||
|
margin = 5,
|
||||||
|
content = {
|
||||||
|
" ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗",
|
||||||
|
" ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║",
|
||||||
|
" ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║",
|
||||||
|
" ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║",
|
||||||
|
" ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║",
|
||||||
|
" ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝",
|
||||||
|
},
|
||||||
|
highlight = "Statement",
|
||||||
|
default_color = "",
|
||||||
|
oldfiles_amount = 0,
|
||||||
|
},
|
||||||
|
-- name which will be displayed and command
|
||||||
|
body = {
|
||||||
|
type = "mapping",
|
||||||
|
oldfiles_directory = false,
|
||||||
|
align = "center",
|
||||||
|
fold_section = false,
|
||||||
|
title = "Basic Commands",
|
||||||
|
margin = 5,
|
||||||
|
content = {
|
||||||
|
{ " Find File", "Telescope find_files", "<leader>ff"},
|
||||||
|
{ " Find Word ", "Telescope live_grep", "<leader>fg"},
|
||||||
|
{ " Recent Files", "Telescope oldfiles", "<leader>fo"},
|
||||||
|
{ " File Browser", "Telescope file_browser", "<leader>fs"},
|
||||||
|
{ " New File", "lua require'startup'.new_file()", "<leader>nf"},
|
||||||
|
},
|
||||||
|
highlight = "String",
|
||||||
|
default_color = "",
|
||||||
|
oldfiles_amount = 0,
|
||||||
|
},
|
||||||
|
footer = {
|
||||||
|
type = "text",
|
||||||
|
oldfiles_directory = false,
|
||||||
|
align = "center",
|
||||||
|
fold_section = false,
|
||||||
|
title = "Footer",
|
||||||
|
margin = 5,
|
||||||
|
content = { "bottom text" },
|
||||||
|
highlight = "Number",
|
||||||
|
default_color = "",
|
||||||
|
oldfiles_amount = 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
options = {
|
||||||
|
mapping_keys = true,
|
||||||
|
cursor_column = 0.5,
|
||||||
|
empty_lines_between_mappings = true,
|
||||||
|
disable_statuslines = true,
|
||||||
|
paddings = { 1, 3, 3, 0 },
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
execute_command = "<CR>",
|
||||||
|
open_file = "o",
|
||||||
|
open_file_split = "<c-o>",
|
||||||
|
open_section = "<TAB>",
|
||||||
|
open_help = "?",
|
||||||
|
},
|
||||||
|
colors = {
|
||||||
|
background = "#1f2227",
|
||||||
|
folded_section = "#56b6c2",
|
||||||
|
},
|
||||||
|
parts = { "header", "body", "footer" },
|
||||||
|
}
|
||||||
|
return settings
|
||||||
|
|
|
@ -4,6 +4,9 @@ in with lib; {
|
||||||
options.programs.v.nvim = { enable = mkEnableOption "nvim"; };
|
options.programs.v.nvim = { enable = mkEnableOption "nvim"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [ fd ];
|
home.packages = with pkgs; [ fd ];
|
||||||
|
home.file.".config/nvim/lua/startup/themes/my_theme.lua" = {
|
||||||
|
source = ./dashboard.lua;
|
||||||
|
};
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.neovim-unwrapped;
|
package = pkgs.neovim-unwrapped;
|
||||||
|
@ -24,6 +27,11 @@ in with lib; {
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>ff";
|
key = "<leader>ff";
|
||||||
|
action = ":Telescope find_files<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>fs";
|
||||||
action = ":Telescope file_browser<CR>";
|
action = ":Telescope file_browser<CR>";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -42,6 +50,11 @@ in with lib; {
|
||||||
key = "<leader>fo";
|
key = "<leader>fo";
|
||||||
action = ":Telescope oldfiles<CR>";
|
action = ":Telescope oldfiles<CR>";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>fr";
|
||||||
|
action = ":Telescope frecency<CR>";
|
||||||
|
}
|
||||||
# Commenting
|
# Commenting
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
|
@ -128,6 +141,12 @@ in with lib; {
|
||||||
action =
|
action =
|
||||||
"function() require('neotest').run.run(vim.fn.expand('%')) end";
|
"function() require('neotest').run.run(vim.fn.expand('%')) end";
|
||||||
}
|
}
|
||||||
|
# LSP
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<M-CR>";
|
||||||
|
action = ":Lspsaga code_action<CR>";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
@ -147,6 +166,11 @@ in with lib; {
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
luasnip.enable = true;
|
luasnip.enable = true;
|
||||||
typst-vim.enable = true;
|
typst-vim.enable = true;
|
||||||
|
startup = {
|
||||||
|
enable = true;
|
||||||
|
theme = "my_theme";
|
||||||
|
};
|
||||||
|
none-ls.enable = false;
|
||||||
obsidian = {
|
obsidian = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -159,6 +183,10 @@ in with lib; {
|
||||||
name = "notes";
|
name = "notes";
|
||||||
path = "~/src/notes";
|
path = "~/src/notes";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "uni";
|
||||||
|
path = "~/cloud/Documents/CESE/notes";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
completion = {
|
completion = {
|
||||||
min_chars = 2;
|
min_chars = 2;
|
||||||
|
@ -267,6 +295,10 @@ in with lib; {
|
||||||
};
|
};
|
||||||
trouble.enable = true;
|
trouble.enable = true;
|
||||||
lspkind.enable = true;
|
lspkind.enable = true;
|
||||||
|
lspsaga = {
|
||||||
|
enable = true;
|
||||||
|
lightbulb.virtualText = false;
|
||||||
|
};
|
||||||
vimtex.enable = true;
|
vimtex.enable = true;
|
||||||
floaterm.enable = true;
|
floaterm.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -15,5 +15,6 @@
|
||||||
eduvpn-client
|
eduvpn-client
|
||||||
localsend
|
localsend
|
||||||
obsidian
|
obsidian
|
||||||
|
typst
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue