mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 10:30:44 +02:00
Formated with alejandra
This commit is contained in:
+538
-533
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,19 @@
|
||||
{ config, pkgs, ... }: # ls replacement
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
# ls replacement
|
||||
# see ./zsh.nix for the alias (usefull to se default flags)
|
||||
|
||||
{
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
theme = { # from https://github.com/eza-community/eza-themes/blob/main/themes/gruvbox-dark.yml
|
||||
theme = {
|
||||
# from https://github.com/eza-community/eza-themes/blob/main/themes/gruvbox-dark.yml
|
||||
colourful = true;
|
||||
|
||||
filekinds= {
|
||||
|
||||
filekinds = {
|
||||
normal = {foreground = "#ebdbb2";};
|
||||
directory = {foreground = "#83a598";};
|
||||
symlink = {foreground = "#8ec07c";};
|
||||
@@ -16,98 +21,98 @@
|
||||
block_device = {foreground = "#fb4934";};
|
||||
char_device = {foreground = "#fb4934";};
|
||||
socket = {foreground = "#665c54";};
|
||||
special= {foreground= "#d3869b";};
|
||||
executable= {foreground= "#b8bb26";};
|
||||
mount_point= {foreground= "#fe8019";};
|
||||
special = {foreground = "#d3869b";};
|
||||
executable = {foreground = "#b8bb26";};
|
||||
mount_point = {foreground = "#fe8019";};
|
||||
};
|
||||
perms = {
|
||||
user_read= {foreground= "#ebdbb2";};
|
||||
user_write= {foreground= "#fabd2f";};
|
||||
user_execute_file= {foreground= "#b8bb26";};
|
||||
user_execute_other= {foreground= "#b8bb26";};
|
||||
group_read= {foreground= "#ebdbb2";};
|
||||
group_write= {foreground= "#fabd2f";};
|
||||
group_execute= {foreground= "#b8bb26";};
|
||||
other_read= {foreground= "#bdae93";};
|
||||
other_write= {foreground= "#fabd2f";};
|
||||
other_execute= {foreground= "#b8bb26";};
|
||||
special_user_file= {foreground= "#d3869b";};
|
||||
special_other= {foreground= "#928374";};
|
||||
attribute= {foreground= "#bdae93";};
|
||||
user_read = {foreground = "#ebdbb2";};
|
||||
user_write = {foreground = "#fabd2f";};
|
||||
user_execute_file = {foreground = "#b8bb26";};
|
||||
user_execute_other = {foreground = "#b8bb26";};
|
||||
group_read = {foreground = "#ebdbb2";};
|
||||
group_write = {foreground = "#fabd2f";};
|
||||
group_execute = {foreground = "#b8bb26";};
|
||||
other_read = {foreground = "#bdae93";};
|
||||
other_write = {foreground = "#fabd2f";};
|
||||
other_execute = {foreground = "#b8bb26";};
|
||||
special_user_file = {foreground = "#d3869b";};
|
||||
special_other = {foreground = "#928374";};
|
||||
attribute = {foreground = "#bdae93";};
|
||||
};
|
||||
size= {
|
||||
major= {foreground= "#bdae93";};
|
||||
minor= {foreground= "#8ec07c";};
|
||||
number_byte= {foreground= "#ebdbb2";};
|
||||
number_kilo= {foreground= "#ebdbb2";};
|
||||
number_mega= {foreground= "#83a598";};
|
||||
number_giga= {foreground= "#d3869b";};
|
||||
number_huge= {foreground= "#d3869b";};
|
||||
unit_byte= {foreground= "#bdae93";};
|
||||
unit_kilo= {foreground= "#83a598";};
|
||||
unit_mega= {foreground= "#d3869b";};
|
||||
unit_giga= {foreground= "#d3869b";};
|
||||
unit_huge= {foreground= "#fe8019";};
|
||||
size = {
|
||||
major = {foreground = "#bdae93";};
|
||||
minor = {foreground = "#8ec07c";};
|
||||
number_byte = {foreground = "#ebdbb2";};
|
||||
number_kilo = {foreground = "#ebdbb2";};
|
||||
number_mega = {foreground = "#83a598";};
|
||||
number_giga = {foreground = "#d3869b";};
|
||||
number_huge = {foreground = "#d3869b";};
|
||||
unit_byte = {foreground = "#bdae93";};
|
||||
unit_kilo = {foreground = "#83a598";};
|
||||
unit_mega = {foreground = "#d3869b";};
|
||||
unit_giga = {foreground = "#d3869b";};
|
||||
unit_huge = {foreground = "#fe8019";};
|
||||
};
|
||||
users= {
|
||||
user_you= {foreground= "#ebdbb2";};
|
||||
user_root= {foreground= "#fb4934";};
|
||||
user_other= {foreground= "#d3869b";};
|
||||
group_yours= {foreground= "#ebdbb2";};
|
||||
group_other= {foreground= "#928374";};
|
||||
group_root= {foreground= "#fb4934";};
|
||||
users = {
|
||||
user_you = {foreground = "#ebdbb2";};
|
||||
user_root = {foreground = "#fb4934";};
|
||||
user_other = {foreground = "#d3869b";};
|
||||
group_yours = {foreground = "#ebdbb2";};
|
||||
group_other = {foreground = "#928374";};
|
||||
group_root = {foreground = "#fb4934";};
|
||||
};
|
||||
links= {
|
||||
normal= {foreground= "#8ec07c";};
|
||||
multi_link_file= {foreground= "#fe8019";};
|
||||
links = {
|
||||
normal = {foreground = "#8ec07c";};
|
||||
multi_link_file = {foreground = "#fe8019";};
|
||||
};
|
||||
git= {
|
||||
new= {foreground= "#b8bb26";};
|
||||
modified= {foreground= "#fabd2f";};
|
||||
deleted= {foreground= "#fb4934";};
|
||||
renamed= {foreground= "#8ec07c";};
|
||||
typechange= {foreground= "#d3869b";};
|
||||
ignored= {foreground= "#928374";};
|
||||
conflicted= {foreground= "#cc241d";};
|
||||
git = {
|
||||
new = {foreground = "#b8bb26";};
|
||||
modified = {foreground = "#fabd2f";};
|
||||
deleted = {foreground = "#fb4934";};
|
||||
renamed = {foreground = "#8ec07c";};
|
||||
typechange = {foreground = "#d3869b";};
|
||||
ignored = {foreground = "#928374";};
|
||||
conflicted = {foreground = "#cc241d";};
|
||||
};
|
||||
git_repo= {
|
||||
branch_main= {foreground= "#ebdbb2";};
|
||||
branch_other= {foreground= "#d3869b";};
|
||||
git_clean= {foreground= "#b8bb26";};
|
||||
git_dirty= {foreground= "#fb4934";};
|
||||
git_repo = {
|
||||
branch_main = {foreground = "#ebdbb2";};
|
||||
branch_other = {foreground = "#d3869b";};
|
||||
git_clean = {foreground = "#b8bb26";};
|
||||
git_dirty = {foreground = "#fb4934";};
|
||||
};
|
||||
security_context= {
|
||||
colon= {foreground= "#928374";};
|
||||
user= {foreground= "#ebdbb2";};
|
||||
role= {foreground= "#d3869b";};
|
||||
typ= {foreground= "#665c54";};
|
||||
range= {foreground= "#d3869b";};
|
||||
security_context = {
|
||||
colon = {foreground = "#928374";};
|
||||
user = {foreground = "#ebdbb2";};
|
||||
role = {foreground = "#d3869b";};
|
||||
typ = {foreground = "#665c54";};
|
||||
range = {foreground = "#d3869b";};
|
||||
};
|
||||
file_type = {
|
||||
image = {foreground = "#fabd2f";};
|
||||
video = {foreground = "#fb4934";};
|
||||
music = {foreground = "#b8bb26";};
|
||||
lossless = {foreground = "#8ec07c";};
|
||||
crypto = {foreground = "#928374";};
|
||||
document = {foreground = "#ebdbb2";};
|
||||
compressed = {foreground = "#d3869b";};
|
||||
temp = {foreground = "#cc241d";};
|
||||
compiled = {foreground = "#83a598";};
|
||||
build = {foreground = "#928374";};
|
||||
source = {foreground = "#83a598";};
|
||||
punctuation = {foreground = "#928374";};
|
||||
date = {foreground = "#fabd2f";};
|
||||
inode = {foreground = "#bdae93";};
|
||||
blocks = {foreground = "#a89984";};
|
||||
header = {foreground = "#ebdbb2";};
|
||||
octal = {foreground = "#8ec07c";};
|
||||
flags = {foreground = "#d3869b";};
|
||||
|
||||
symlink_path = {foreground = "#8ec07c";};
|
||||
control_char = {foreground = "#83a598";};
|
||||
broken_symlink = {foreground = "#fb4934";};
|
||||
broken_path_overlay = {foreground = "#928374";};
|
||||
};
|
||||
file_type= {
|
||||
image= {foreground= "#fabd2f";};
|
||||
video= {foreground= "#fb4934";};
|
||||
music= {foreground= "#b8bb26";};
|
||||
lossless= {foreground= "#8ec07c";};
|
||||
crypto= {foreground= "#928374";};
|
||||
document= {foreground= "#ebdbb2";};
|
||||
compressed= {foreground= "#d3869b";};
|
||||
temp= {foreground= "#cc241d";};
|
||||
compiled= {foreground= "#83a598";};
|
||||
build= {foreground= "#928374";};
|
||||
source= {foreground= "#83a598";};
|
||||
punctuation= {foreground= "#928374";};
|
||||
date= {foreground= "#fabd2f";};
|
||||
inode= {foreground= "#bdae93";};
|
||||
blocks= {foreground= "#a89984";};
|
||||
header= {foreground= "#ebdbb2";};
|
||||
octal= {foreground= "#8ec07c";};
|
||||
flags= {foreground= "#d3869b";};
|
||||
|
||||
symlink_path= {foreground= "#8ec07c";};
|
||||
control_char= {foreground= "#83a598";};
|
||||
broken_symlink= {foreground= "#fb4934";};
|
||||
broken_path_overlay= {foreground= "#928374";};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -149,15 +149,17 @@ in {
|
||||
"Ctrl+Alt, 7, exec, caelestia shell gameMode toggle"
|
||||
# reloads the autostart programs # pos 3 1
|
||||
# we passed to caelestia-shell and stoped using that
|
||||
/*"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
|
||||
/*
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'"
|
||||
"Ctrl+$mod, 4, exec, kitty -e 'custom-launch'"
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
|
||||
#"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center
|
||||
"Ctrl+Alt, 1, exec, qs ipc call notifications toggle" */
|
||||
#"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center
|
||||
"Ctrl+Alt, 1, exec, qs ipc call notifications toggle"
|
||||
*/
|
||||
"Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar"
|
||||
"Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd"
|
||||
"Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd"
|
||||
"Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol
|
||||
"Ctrl+$mod, 5, exec, gnome-characters" # pos 2 2 special chars
|
||||
"Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 3 2 colorpicker
|
||||
@@ -220,7 +222,8 @@ in {
|
||||
#"custom-obsidianbackup" # backups the obsidian notes to kdrive and to a timed hidden dir (~/.Notes.backup/)
|
||||
#"QS-notifycache" # builds the cache that will be used for the notification history
|
||||
"sleep 2 & caelestia-shell" #works better if it sleeps a bit before
|
||||
/* We stopped using that ######################### maybe we should desactivate those scripts
|
||||
/*
|
||||
We stopped using that ######################### maybe we should desactivate those scripts
|
||||
# login autostart
|
||||
#######################
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
|
||||
@@ -229,7 +232,8 @@ in {
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
|
||||
######################
|
||||
######################*/
|
||||
######################
|
||||
*/
|
||||
];
|
||||
|
||||
# gestures (also keybindings)
|
||||
|
||||
@@ -10,62 +10,63 @@
|
||||
## new config (matches with caelestia
|
||||
## old condfig
|
||||
extraConfig = ''
|
||||
font_size 14
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
font_size 14
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
window_padding_width 25
|
||||
window_padding_width 25
|
||||
|
||||
# --- Core ---
|
||||
foreground #ece0d9
|
||||
background #18120e
|
||||
# --- Core ---
|
||||
foreground #ece0d9
|
||||
background #18120e
|
||||
|
||||
selection_foreground #18120e
|
||||
selection_background #ece0d9
|
||||
selection_foreground #18120e
|
||||
selection_background #ece0d9
|
||||
|
||||
cursor #ffb878
|
||||
cursor_text_color #18120e
|
||||
cursor #ffb878
|
||||
cursor_text_color #18120e
|
||||
|
||||
# --- Tabs ---
|
||||
active_tab_foreground #18120e
|
||||
active_tab_background #5c412a
|
||||
inactive_tab_foreground #d6c3b5
|
||||
inactive_tab_background #241e1a
|
||||
# --- Tabs ---
|
||||
active_tab_foreground #18120e
|
||||
active_tab_background #5c412a
|
||||
inactive_tab_foreground #d6c3b5
|
||||
inactive_tab_background #241e1a
|
||||
|
||||
# --- Black / Gray ---
|
||||
color0 #353433
|
||||
color8 #b29f91
|
||||
# --- Black / Gray ---
|
||||
color0 #353433
|
||||
color8 #b29f91
|
||||
|
||||
# --- Red ---
|
||||
color1 #e17300
|
||||
color9 #ff8a20
|
||||
# --- Red ---
|
||||
color1 #e17300
|
||||
color9 #ff8a20
|
||||
|
||||
# --- Green ---
|
||||
color2 #ffc071
|
||||
color10 #ffd6a8
|
||||
# --- Green ---
|
||||
color2 #ffc071
|
||||
color10 #ffd6a8
|
||||
|
||||
# --- Yellow ---
|
||||
color3 #ffe0c6
|
||||
color11 #fff2e8
|
||||
# --- Yellow ---
|
||||
color3 #ffe0c6
|
||||
color11 #fff2e8
|
||||
|
||||
# --- Blue ---
|
||||
color4 #b9ab66
|
||||
color12 #d7be91
|
||||
# --- Blue ---
|
||||
color4 #b9ab66
|
||||
color12 #d7be91
|
||||
|
||||
# --- Magenta ---
|
||||
color5 #ed9562
|
||||
color13 #fcad7e
|
||||
# --- Magenta ---
|
||||
color5 #ed9562
|
||||
color13 #fcad7e
|
||||
|
||||
# --- Cyan ---
|
||||
color6 #f4c16d
|
||||
color14 #ffd497
|
||||
# --- Cyan ---
|
||||
color6 #f4c16d
|
||||
color14 #ffd497
|
||||
|
||||
# --- White ---
|
||||
color7 #ebd4c1
|
||||
color15 #FFFFFF
|
||||
'';
|
||||
/*extraConfig = ''
|
||||
# --- White ---
|
||||
color7 #ebd4c1
|
||||
color15 #FFFFFF
|
||||
'';
|
||||
/*
|
||||
extraConfig = ''
|
||||
# font nerd-fonts._0xproto # this key dont work and causes errors
|
||||
font_size 14
|
||||
bold_font auto
|
||||
@@ -118,6 +119,7 @@ color15 #FFFFFF
|
||||
# white
|
||||
color7 #FFF0CC
|
||||
color15 #F0DBAA
|
||||
'';*/
|
||||
'';
|
||||
*/
|
||||
};
|
||||
}
|
||||
|
||||
+349
-350
@@ -4,12 +4,11 @@
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = false;
|
||||
viAlias = true;
|
||||
package = pkgs-unstable.neovim-unwrapped; # required for unwrapped version
|
||||
package = pkgs-unstable.neovim-unwrapped; # required for unwrapped version
|
||||
plugins = [
|
||||
pkgs-unstable.vimPlugins.vivify-vim
|
||||
pkgs-unstable.vimPlugins.vimtex
|
||||
@@ -70,369 +69,369 @@
|
||||
];
|
||||
extraLuaConfig = ''
|
||||
|
||||
local vim = vim
|
||||
local vim = vim
|
||||
|
||||
-- =========================
|
||||
-- LEADER & KEY DISABLE
|
||||
-- =========================
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.keymap.set({'n', 'v'}, '<Space>', '<Nop>', { desc = 'Leader key, disable default behavior' })
|
||||
vim.keymap.set('n', 'q', '<Nop>', { desc = 'Disable macro recording' })
|
||||
vim.keymap.set('n', 'gg', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gG', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g0', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g^', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g$', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gj', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gk', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g~', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gu', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gU', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g=', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gq', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g@', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g?', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gC', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gD', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gx', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gr', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g[', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g]', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g;', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g,', '<Nop>', { desc = 'Disable g motion' })
|
||||
-- =========================
|
||||
-- GENERAL OPTIONS
|
||||
-- =========================
|
||||
vim.g.have_nerd_font = true
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.number = true
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.showmode = false
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
end)
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.timeoutlen = 300
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.inccommand = 'split'
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
|
||||
-- =========================
|
||||
-- BASIC KEYMAPS
|
||||
-- =========================
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- Disable arrow keys in normal mode
|
||||
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Window navigation
|
||||
vim.keymap.set('n', '<C-Left>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
vim.keymap.set('n', '<C-Right>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-Down>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-Up>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- Cheatsheet
|
||||
vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>")
|
||||
require("cheatsheet").setup({
|
||||
bundled_cheatsheets = { enabled = { "default" } },
|
||||
bundled_plugin_cheatsheets = { disabled = { "gitsigns.nvim" } }
|
||||
})
|
||||
|
||||
-- Highlight yanked text
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight on yank',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function() vim.highlight.on_yank() end,
|
||||
})
|
||||
|
||||
-- ========================
|
||||
-- terminal
|
||||
-- =======================
|
||||
require("runner-nvim").setup({
|
||||
position = 'right', -- position of the terminal window when using the shell_handler
|
||||
-- can be: top, left, right, bottom
|
||||
-- will be overwritten when using the telescope mapping to open horizontally or vertically
|
||||
|
||||
width = 80, -- width of window when position is left or right
|
||||
height = 10, -- height of window when position is top or bottom
|
||||
|
||||
handlers = {
|
||||
lua = function(bufnr)
|
||||
vim.print('Running lua file in buffer ' .. bufnr)
|
||||
-- Run the file here
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader><leader>", function() require("runner-nvim").run() end)
|
||||
-- =========================
|
||||
-- SCROLLBAR
|
||||
-- =========================
|
||||
require("scrollbar").setup()
|
||||
|
||||
-- =========================
|
||||
-- UFO FOLDING
|
||||
-- =========================
|
||||
vim.o.foldcolumn = '1'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.keymap.set('n', '<leader>1', "<cmd>foldopen<CR>")
|
||||
vim.keymap.set('n', '<leader>2', "<cmd>foldclose<CR>")
|
||||
require('ufo').setup({
|
||||
provider_selector = function() return {'treesitter', 'indent'} end
|
||||
})
|
||||
|
||||
-- =========================
|
||||
-- treesitter
|
||||
-- ========================
|
||||
require('nvim-treesitter').setup({
|
||||
ensure_installed = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true },
|
||||
})
|
||||
-- =========================
|
||||
-- NVIM-TREE
|
||||
-- =========================
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
require("nvim-tree").setup({
|
||||
sort = { sorter = "case_sensitive" },
|
||||
view = { width = 30 },
|
||||
renderer = { group_empty = true },
|
||||
filters = { dotfiles = true },
|
||||
})
|
||||
|
||||
-- =========================
|
||||
-- CMP CONFIGURATION
|
||||
-- =========================
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end },
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'vsnip' } }, { { name = 'buffer' } }),
|
||||
})
|
||||
|
||||
cmp.setup.cmdline({ '/', '?' }, { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' } } })
|
||||
cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), matching = { disallow_symbol_nonprefix_matching = false } })
|
||||
|
||||
-- =========================
|
||||
-- LSP CONFIGURATION
|
||||
-- =========================
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
-- Diagnostics
|
||||
vim.keymap.set("n", "<leader>e1", function() vim.diagnostic.jump({ prev=true, count = 1 }) end, { desc = "Previous diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e2", function() vim.diagnostic.jump({ prev=false, count = 1 }) end, { desc = "Next diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e3", vim.diagnostic.open_float, { desc = "Show diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e4", vim.diagnostic.setloclist, { desc = "Diagnostic list" })
|
||||
|
||||
vim.diagnostic.config({
|
||||
update_in_insert = false, -- i don't get any new error when in insert
|
||||
})
|
||||
require("better-diagnostic-virtual-text").setup({
|
||||
ui = {
|
||||
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
|
||||
left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
|
||||
right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
|
||||
arrow = " ",
|
||||
up_arrow = " ",
|
||||
down_arrow = " ",
|
||||
above = false, -- the virtual text will be displayed above the line
|
||||
},
|
||||
priority = 2003, -- the priority of virtual text
|
||||
inline = false,
|
||||
|
||||
})
|
||||
-- =========================
|
||||
-- LEADER & KEY DISABLE
|
||||
-- =========================
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.keymap.set({'n', 'v'}, '<Space>', '<Nop>', { desc = 'Leader key, disable default behavior' })
|
||||
vim.keymap.set('n', 'q', '<Nop>', { desc = 'Disable macro recording' })
|
||||
vim.keymap.set('n', 'gg', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gG', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g0', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g^', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g$', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gj', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gk', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g~', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gu', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gU', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g=', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gq', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g@', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g?', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gC', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gD', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gx', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gr', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g[', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g]', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g;', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g,', '<Nop>', { desc = 'Disable g motion' })
|
||||
-- =========================
|
||||
-- GENERAL OPTIONS
|
||||
-- =========================
|
||||
vim.g.have_nerd_font = true
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.number = true
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.showmode = false
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
end)
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.timeoutlen = 300
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.inccommand = 'split'
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
|
||||
-- LSP functionality
|
||||
vim.keymap.set("n", "<leader>g1", vim.lsp.buf.hover, { desc = "Hover documentation" })
|
||||
vim.keymap.set("n", "<leader>g2", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
vim.keymap.set("n", "<leader>g3", vim.lsp.buf.declaration, { desc = "Go to declaration" })
|
||||
vim.keymap.set("n", "<leader>g4", vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||
vim.keymap.set("n", "<leader>g5", vim.lsp.buf.references, { desc = "Show references" })
|
||||
-- =========================
|
||||
-- BASIC KEYMAPS
|
||||
-- =========================
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- LSP server setup
|
||||
vim.lsp.config("lua_ls", { cmd = { "lua-language-server" }, filetypes = { "lua" }, root_dir = vim.fs.dirname, on_attach = on_attach })
|
||||
vim.lsp.config("clangd", {
|
||||
cmd = { "clangd" },
|
||||
filetypes = { "c","cpp","objc","objcpp" },
|
||||
on_attach = on_attach ,
|
||||
init_options = {
|
||||
clangdFileStatus = true,
|
||||
usePlaceholders = true,
|
||||
completeUnimported = true,
|
||||
semanticHighlighting = true}
|
||||
})
|
||||
vim.lsp.config("nixd", {
|
||||
cmd = { "nixd" },
|
||||
filetyypes = { "nix" },
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config("pylsp", {
|
||||
cmd = { "pylsp" },
|
||||
filetypes = { "python" },
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pylsp_mypy = { enabled = true },
|
||||
jedi_completion = { fuzzy = true }
|
||||
-- Disable arrow keys in normal mode
|
||||
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Window navigation
|
||||
vim.keymap.set('n', '<C-Left>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
vim.keymap.set('n', '<C-Right>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-Down>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-Up>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- Cheatsheet
|
||||
vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>")
|
||||
require("cheatsheet").setup({
|
||||
bundled_cheatsheets = { enabled = { "default" } },
|
||||
bundled_plugin_cheatsheets = { disabled = { "gitsigns.nvim" } }
|
||||
})
|
||||
|
||||
-- Highlight yanked text
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight on yank',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function() vim.highlight.on_yank() end,
|
||||
})
|
||||
|
||||
-- ========================
|
||||
-- terminal
|
||||
-- =======================
|
||||
require("runner-nvim").setup({
|
||||
position = 'right', -- position of the terminal window when using the shell_handler
|
||||
-- can be: top, left, right, bottom
|
||||
-- will be overwritten when using the telescope mapping to open horizontally or vertically
|
||||
|
||||
width = 80, -- width of window when position is left or right
|
||||
height = 10, -- height of window when position is top or bottom
|
||||
|
||||
handlers = {
|
||||
lua = function(bufnr)
|
||||
vim.print('Running lua file in buffer ' .. bufnr)
|
||||
-- Run the file here
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
vim.lsp.config("texlab", { cmd = { "texlab" }, filetypes = { "tex" }, on_attach = on_attach })
|
||||
})
|
||||
|
||||
vim.lsp.enable({ "lua_ls", "clangd", "pylsp", "texlab", "nixd"})
|
||||
-- =========================
|
||||
-- DASHBOARD
|
||||
-- =========================
|
||||
require('dashboard').setup {
|
||||
theme = 'hyper',
|
||||
config = {
|
||||
header = {
|
||||
" ... ... . ",
|
||||
" .=*8888n..\"%888: @88> ",
|
||||
" X ?8888f '8888 u. ... .. %8P .. . : ",
|
||||
" 88x. '8888X 8888> .u ...ue888b :~\"\"888h.:^\"888: . .888: x888 x888. ",
|
||||
"'8888k 8888X '\"*8h. ud8888. 888R Y888r 8X `8888X 8888> .@88u ~`8888~'888X`?888f` ",
|
||||
" \"8888 X888X .xH8 :888'8888. 888R I888> X888n. 8888X ?888> '\"888E` X888 888X '888> ",
|
||||
" `8\" X888!:888X d888 '88%\" 888R I888> '88888 8888X ?**h. 888E X888 888X '888> ",
|
||||
" =~` X888 X888X 8888.+\" 888R I888> `*88 8888~ x88x. 888E X888 888X '888> ",
|
||||
" :h. X8*` !888X 8888L u8888cJ888 ..<\" 88*` 88888X 888E X888 888X '888> ",
|
||||
" X888xX\" '8888..: '8888c. .+ \"*888*P\" ..XC. `*8888k 888& \"*88%\"\"*88\" '888!` ",
|
||||
":~`888f '*888*\" \"88888% 'Y\" :888888H. `%88> R888\" `~ \" `\"` ",
|
||||
" \"\" `\"` \"YP' < `\"888888: X\" \"\" ",
|
||||
" %888888x.-` ",
|
||||
" \"\"**\"\" ",
|
||||
"",
|
||||
""
|
||||
},
|
||||
shortcut = { { desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' } },
|
||||
packages = { enable = false },
|
||||
project = { enable = true, limit = 8, icon = ' New file', action = 'Telescope find_files cwd=' },
|
||||
mru = { limit = 10, icon = ' History' },
|
||||
footer = {},
|
||||
}
|
||||
}
|
||||
vim.keymap.set("n", "<leader><leader>", function() require("runner-nvim").run() end)
|
||||
-- =========================
|
||||
-- SCROLLBAR
|
||||
-- =========================
|
||||
require("scrollbar").setup()
|
||||
|
||||
-- jumps cursor when was last cursor last time
|
||||
require("nvim-lastplace").setup({
|
||||
-- Filetypes to ignore
|
||||
ignore_filetypes = {
|
||||
"gitcommit", "gitrebase", "svn", "hgcommit", "xxd", "COMMIT_EDITMSG"
|
||||
-- =========================
|
||||
-- UFO FOLDING
|
||||
-- =========================
|
||||
vim.o.foldcolumn = '1'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.keymap.set('n', '<leader>1', "<cmd>foldopen<CR>")
|
||||
vim.keymap.set('n', '<leader>2', "<cmd>foldclose<CR>")
|
||||
require('ufo').setup({
|
||||
provider_selector = function() return {'treesitter', 'indent'} end
|
||||
})
|
||||
|
||||
-- =========================
|
||||
-- treesitter
|
||||
-- ========================
|
||||
require('nvim-treesitter').setup({
|
||||
ensure_installed = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
|
||||
-- Buffer types to ignore
|
||||
ignore_buftypes = {
|
||||
"quickfix", "nofile", "help", "terminal"
|
||||
},
|
||||
|
||||
-- Center cursor after jumping
|
||||
center_on_jump = true,
|
||||
|
||||
-- Only jump if target line is not visible
|
||||
jump_only_if_not_visible = false,
|
||||
|
||||
-- Minimum lines required to enable jumping
|
||||
min_lines = 10,
|
||||
|
||||
-- Maximum line to jump to (0 = no limit)
|
||||
max_line = 0,
|
||||
|
||||
-- Open folds after jumping
|
||||
open_folds = true,
|
||||
|
||||
-- Enable debug messages
|
||||
debug = false,
|
||||
indent = { enable = true },
|
||||
})
|
||||
-- ======================
|
||||
-- gruvbox
|
||||
-- ======================
|
||||
-- =========================
|
||||
-- NVIM-TREE
|
||||
-- =========================
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
require("nvim-tree").setup({
|
||||
sort = { sorter = "case_sensitive" },
|
||||
view = { width = 30 },
|
||||
renderer = { group_empty = true },
|
||||
filters = { dotfiles = true },
|
||||
})
|
||||
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = false, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = false,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "hard", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = { -- for overrides see https://github.com/ellisonleao/gruvbox.nvim/blob/main/lua/gruvbox.lua
|
||||
dark0_hard = "#241F17"
|
||||
},
|
||||
overrides = {
|
||||
String = {fg = "#FFB878", italic = false},
|
||||
FoldColumn = {fg = faded_orange, bg = dark0_hard}
|
||||
},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
-- =========================
|
||||
-- CMP CONFIGURATION
|
||||
-- =========================
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end },
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'vsnip' } }, { { name = 'buffer' } }),
|
||||
})
|
||||
|
||||
cmp.setup.cmdline({ '/', '?' }, { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' } } })
|
||||
cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), matching = { disallow_symbol_nonprefix_matching = false } })
|
||||
|
||||
-- =========================
|
||||
-- LSP CONFIGURATION
|
||||
-- =========================
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
-- Diagnostics
|
||||
vim.keymap.set("n", "<leader>e1", function() vim.diagnostic.jump({ prev=true, count = 1 }) end, { desc = "Previous diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e2", function() vim.diagnostic.jump({ prev=false, count = 1 }) end, { desc = "Next diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e3", vim.diagnostic.open_float, { desc = "Show diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e4", vim.diagnostic.setloclist, { desc = "Diagnostic list" })
|
||||
|
||||
vim.diagnostic.config({
|
||||
update_in_insert = false, -- i don't get any new error when in insert
|
||||
})
|
||||
require("better-diagnostic-virtual-text").setup({
|
||||
ui = {
|
||||
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
|
||||
left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
|
||||
right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
|
||||
arrow = " ",
|
||||
up_arrow = " ",
|
||||
down_arrow = " ",
|
||||
above = false, -- the virtual text will be displayed above the line
|
||||
},
|
||||
priority = 2003, -- the priority of virtual text
|
||||
inline = false,
|
||||
|
||||
})
|
||||
|
||||
|
||||
-- LSP functionality
|
||||
vim.keymap.set("n", "<leader>g1", vim.lsp.buf.hover, { desc = "Hover documentation" })
|
||||
vim.keymap.set("n", "<leader>g2", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
vim.keymap.set("n", "<leader>g3", vim.lsp.buf.declaration, { desc = "Go to declaration" })
|
||||
vim.keymap.set("n", "<leader>g4", vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||
vim.keymap.set("n", "<leader>g5", vim.lsp.buf.references, { desc = "Show references" })
|
||||
|
||||
-- LSP server setup
|
||||
vim.lsp.config("lua_ls", { cmd = { "lua-language-server" }, filetypes = { "lua" }, root_dir = vim.fs.dirname, on_attach = on_attach })
|
||||
vim.lsp.config("clangd", {
|
||||
cmd = { "clangd" },
|
||||
filetypes = { "c","cpp","objc","objcpp" },
|
||||
on_attach = on_attach ,
|
||||
init_options = {
|
||||
clangdFileStatus = true,
|
||||
usePlaceholders = true,
|
||||
completeUnimported = true,
|
||||
semanticHighlighting = true}
|
||||
})
|
||||
vim.lsp.config("nixd", {
|
||||
cmd = { "nixd" },
|
||||
filetyypes = { "nix" },
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config("pylsp", {
|
||||
cmd = { "pylsp" },
|
||||
filetypes = { "python" },
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pylsp_mypy = { enabled = true },
|
||||
jedi_completion = { fuzzy = true }
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
vim.opt.termguicolors = false
|
||||
vim.o.background = "dark"
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
-- =========================
|
||||
-- LUALINE
|
||||
-- =========================
|
||||
require('lualine').setup { options = { theme = "gruvbox_dark" } }
|
||||
vim.lsp.config("texlab", { cmd = { "texlab" }, filetypes = { "tex" }, on_attach = on_attach })
|
||||
|
||||
vim.lsp.enable({ "lua_ls", "clangd", "pylsp", "texlab", "nixd"})
|
||||
-- =========================
|
||||
-- DASHBOARD
|
||||
-- =========================
|
||||
require('dashboard').setup {
|
||||
theme = 'hyper',
|
||||
config = {
|
||||
header = {
|
||||
" ... ... . ",
|
||||
" .=*8888n..\"%888: @88> ",
|
||||
" X ?8888f '8888 u. ... .. %8P .. . : ",
|
||||
" 88x. '8888X 8888> .u ...ue888b :~\"\"888h.:^\"888: . .888: x888 x888. ",
|
||||
"'8888k 8888X '\"*8h. ud8888. 888R Y888r 8X `8888X 8888> .@88u ~`8888~'888X`?888f` ",
|
||||
" \"8888 X888X .xH8 :888'8888. 888R I888> X888n. 8888X ?888> '\"888E` X888 888X '888> ",
|
||||
" `8\" X888!:888X d888 '88%\" 888R I888> '88888 8888X ?**h. 888E X888 888X '888> ",
|
||||
" =~` X888 X888X 8888.+\" 888R I888> `*88 8888~ x88x. 888E X888 888X '888> ",
|
||||
" :h. X8*` !888X 8888L u8888cJ888 ..<\" 88*` 88888X 888E X888 888X '888> ",
|
||||
" X888xX\" '8888..: '8888c. .+ \"*888*P\" ..XC. `*8888k 888& \"*88%\"\"*88\" '888!` ",
|
||||
":~`888f '*888*\" \"88888% 'Y\" :888888H. `%88> R888\" `~ \" `\"` ",
|
||||
" \"\" `\"` \"YP' < `\"888888: X\" \"\" ",
|
||||
" %888888x.-` ",
|
||||
" \"\"**\"\" ",
|
||||
"",
|
||||
""
|
||||
},
|
||||
shortcut = { { desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' } },
|
||||
packages = { enable = false },
|
||||
project = { enable = true, limit = 8, icon = ' New file', action = 'Telescope find_files cwd=' },
|
||||
mru = { limit = 10, icon = ' History' },
|
||||
footer = {},
|
||||
}
|
||||
}
|
||||
|
||||
-- jumps cursor when was last cursor last time
|
||||
require("nvim-lastplace").setup({
|
||||
-- Filetypes to ignore
|
||||
ignore_filetypes = {
|
||||
"gitcommit", "gitrebase", "svn", "hgcommit", "xxd", "COMMIT_EDITMSG"
|
||||
},
|
||||
|
||||
-- Buffer types to ignore
|
||||
ignore_buftypes = {
|
||||
"quickfix", "nofile", "help", "terminal"
|
||||
},
|
||||
|
||||
-- Center cursor after jumping
|
||||
center_on_jump = true,
|
||||
|
||||
-- Only jump if target line is not visible
|
||||
jump_only_if_not_visible = false,
|
||||
|
||||
-- Minimum lines required to enable jumping
|
||||
min_lines = 10,
|
||||
|
||||
-- Maximum line to jump to (0 = no limit)
|
||||
max_line = 0,
|
||||
|
||||
-- Open folds after jumping
|
||||
open_folds = true,
|
||||
|
||||
-- Enable debug messages
|
||||
debug = false,
|
||||
})
|
||||
-- ======================
|
||||
-- gruvbox
|
||||
-- ======================
|
||||
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = false, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = false,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "hard", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = { -- for overrides see https://github.com/ellisonleao/gruvbox.nvim/blob/main/lua/gruvbox.lua
|
||||
dark0_hard = "#241F17"
|
||||
},
|
||||
overrides = {
|
||||
String = {fg = "#FFB878", italic = false},
|
||||
FoldColumn = {fg = faded_orange, bg = dark0_hard}
|
||||
},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
||||
vim.opt.termguicolors = false
|
||||
vim.o.background = "dark"
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
-- =========================
|
||||
-- LUALINE
|
||||
-- =========================
|
||||
require('lualine').setup { options = { theme = "gruvbox_dark" } }
|
||||
|
||||
|
||||
--==================0
|
||||
-- Some utils
|
||||
--==================
|
||||
vim.keymap.set('n', '<leader>r1', '<cmd>Fugit2<CR>', { desc = 'Open git helper' })
|
||||
--==================0
|
||||
-- Some utils
|
||||
--==================
|
||||
vim.keymap.set('n', '<leader>r1', '<cmd>Fugit2<CR>', { desc = 'Open git helper' })
|
||||
|
||||
-- =========================
|
||||
-- telescope
|
||||
-- =======================
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>f1', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>f2', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>f3', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>f4', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
-- =========================
|
||||
-- telescope
|
||||
-- =======================
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>f1', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>f2', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>f3', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>f4', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
|
||||
-- Disable relative numbers even if plugins override
|
||||
vim.api.nvim_create_autocmd("VimEnter", { callback = function() vim.opt.colorcolumn = ""; vim.opt.relativenumber = false end })
|
||||
-- Disable relative numbers even if plugins override
|
||||
vim.api.nvim_create_autocmd("VimEnter", { callback = function() vim.opt.colorcolumn = ""; vim.opt.relativenumber = false end })
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.obsidian = {
|
||||
enable = true;
|
||||
|
||||
vaults = {
|
||||
miscellanious = { enable = true; target = "/Documents/Notes/miscellanious"; };
|
||||
work = { enable = true; target = "/Documents/Notes/work"; };
|
||||
miscellanious = {
|
||||
enable = true;
|
||||
target = "/Documents/Notes/miscellanious";
|
||||
};
|
||||
work = {
|
||||
enable = true;
|
||||
target = "/Documents/Notes/work";
|
||||
};
|
||||
};
|
||||
|
||||
defaultSettings = {
|
||||
@@ -14,8 +22,8 @@
|
||||
|
||||
extraFiles = {
|
||||
".obsidian/themes/gruvbox/manifest.json" = ../../other/obsidian-theme/manifest.json;
|
||||
".obsidian/themes/gruvbox/obsidian.css" = ../../other/obsidian-theme/obsidian.css;
|
||||
".obsidian/themes/gruvbox/theme.css" = ../../other/obsidian-theme/theme.css;
|
||||
".obsidian/themes/gruvbox/obsidian.css" = ../../other/obsidian-theme/obsidian.css;
|
||||
".obsidian/themes/gruvbox/theme.css" = ../../other/obsidian-theme/theme.css;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
# pulled from https://codeberg.org/zacoons/rivendell-hyprdots
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
qt.enable =true;
|
||||
qt.enable = true;
|
||||
programs.quickshell = {
|
||||
systemd.enable = true;
|
||||
enable = true;
|
||||
};
|
||||
home.file.".config/quickshell" = {
|
||||
source = ../../other/quickshell;
|
||||
recursive = true;
|
||||
};
|
||||
home.file.".config/quickshell" = {
|
||||
source = ../../other/quickshell;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user