update config
This commit is contained in:
parent
cd4d1d7523
commit
970de4a615
6 changed files with 220 additions and 189 deletions
|
|
@ -3,7 +3,7 @@ _: {
|
|||
enable = true;
|
||||
userEmail = "jonathan@donsz.nl";
|
||||
userName = "Jonathan Dönszelmann";
|
||||
signing.key = "~/.ssh/id_ed25519.pub";
|
||||
signing.key = "/home/jonathan/.ssh/id_ed25519.pub";
|
||||
signing.signByDefault = true;
|
||||
|
||||
delta.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,42 +1,42 @@
|
|||
{pkgs, inputs, ...}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font.name = "Jetbrains Mono";
|
||||
font.size = 13.0;
|
||||
font.package = pkgs.jetbrains-mono;
|
||||
{ pkgs, inputs, ... }: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font.name = "Jetbrains Mono";
|
||||
font.size = 13.0;
|
||||
font.package = pkgs.jetbrains-mono;
|
||||
|
||||
settings = {
|
||||
scrollback_lines = 20000;
|
||||
settings = {
|
||||
scrollback_lines = 20000;
|
||||
|
||||
repaint_delay = 10;
|
||||
input_delay = 3;
|
||||
repaint_delay = 10;
|
||||
input_delay = 3;
|
||||
|
||||
enable_audio_bell = false;
|
||||
update_check_interval = 0;
|
||||
enable_audio_bell = false;
|
||||
update_check_interval = 0;
|
||||
|
||||
initial_window_width = "95c";
|
||||
initial_window_height = "30c";
|
||||
remember_window_size = "no";
|
||||
initial_window_width = "95c";
|
||||
initial_window_height = "30c";
|
||||
remember_window_size = "no";
|
||||
|
||||
draw_minimal_borders = false;
|
||||
hide_window_decorations = true;
|
||||
draw_minimal_borders = false;
|
||||
hide_window_decorations = true;
|
||||
|
||||
shell = "${pkgs.tmux}/bin/tmux";
|
||||
clipboard_control = "write-clipboard write-primary read-clipboard read-primary";
|
||||
shell = "${pkgs.tmux}/bin/tmux";
|
||||
clipboard_control = "write-clipboard write-primary read-clipboard read-primary";
|
||||
|
||||
foreground = "#fcfcfc";
|
||||
background = "#232627";
|
||||
linux_display_server = "auto";
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
"ctrl+f" = "launch --location=hsplit --allow-remote-control kitty +kitten ${inputs.kitty-search}/search.py @active-kitty-window-id";
|
||||
"ctrl+alt+r" = "load_config_file";
|
||||
"ctrl+shift+r" = "no_op";
|
||||
"ctrl+EQUAL" = "change_font_size all +2.0";
|
||||
"ctrl+minus" = "change_font_size all -2.0";
|
||||
"ctrl+0" = "change_font_size all 0";
|
||||
"ctrl+/" = "send_text all \x1b[47;5u";
|
||||
};
|
||||
foreground = "#fcfcfc";
|
||||
background = "#232627";
|
||||
linux_display_server = "auto";
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
"ctrl+f" = "launch --location=hsplit --allow-remote-control kitty +kitten ${inputs.kitty-search}/search.py @active-kitty-window-id";
|
||||
"ctrl+alt+r" = "load_config_file";
|
||||
"ctrl+shift+r" = "no_op";
|
||||
"ctrl+EQUAL" = "change_font_size all +2.0";
|
||||
"ctrl+minus" = "change_font_size all -2.0";
|
||||
"ctrl+0" = "change_font_size all 0";
|
||||
"ctrl+/" = "send_text all \x1b[47;5u";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,11 +85,7 @@ local builtin = require('telescope.builtin')
|
|||
|
||||
-- comment
|
||||
vim.keymap.set("n", "<leader>c", ":lua require('Comment.api').toggle.linewise.current()<CR> j", { remap = true })
|
||||
vim.keymap.set("v", "<leader>c", ":lua require('Comment.api').toggle.linewise.current()<CR> j", { remap = true })
|
||||
|
||||
|
||||
vim.keymap.set("n", "<C-/>", ":lua require('Comment.api').toggle.linewise.current()<CR> j", { remap = true })
|
||||
vim.keymap.set("v", "<C-/>", ":lua require('Comment.api').toggle.linewise.current()<CR> j", { remap = true })
|
||||
vim.keymap.set("v", "<leader>c", ":lua require('Comment.api').toggle.blockwise.current()<CR> j", { remap = true })
|
||||
|
||||
-- indent and dedent using tab/shift-ta
|
||||
vim.keymap.set("n", "<tab>", ">>_")
|
||||
|
|
|
|||
|
|
@ -52,18 +52,21 @@ in
|
|||
key = "<leader>.";
|
||||
action = "<cmd>Lspsaga code_action<cr>";
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
|
||||
nixGrammars = true;
|
||||
ensureInstalled = "all";
|
||||
settings = {
|
||||
indent.enable = true;
|
||||
ensure_installed = "all";
|
||||
};
|
||||
};
|
||||
rainbow-delimiters.enable = true;
|
||||
surround.enable = true;
|
||||
vim-surround.enable = true;
|
||||
cmp-nvim-lsp.enable = true;
|
||||
lsp-format.enable = true;
|
||||
fugitive.enable = true;
|
||||
|
|
@ -88,10 +91,6 @@ in
|
|||
|
||||
settings = {
|
||||
sticky = true;
|
||||
opleader = {
|
||||
line = "gc";
|
||||
block = "gb";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -104,8 +103,8 @@ in
|
|||
mappings = {
|
||||
"<bs>" = "navigate_up";
|
||||
"." = "set_root";
|
||||
"f" = "fuzzy_finder";
|
||||
"/" = "filter_on_submit";
|
||||
"/" = "fuzzy_finder";
|
||||
"f" = "filter_on_submit";
|
||||
"h" = "show_help";
|
||||
};
|
||||
};
|
||||
|
|
@ -144,7 +143,7 @@ in
|
|||
text = "💡";
|
||||
};
|
||||
status_text = {
|
||||
enabled = true;
|
||||
enabled = false;
|
||||
text = "💡";
|
||||
};
|
||||
};
|
||||
|
|
@ -174,14 +173,14 @@ in
|
|||
enable = true;
|
||||
settings = {
|
||||
cmd = "${pkgs.typst}/bin/typst";
|
||||
conceal_math = true;
|
||||
auto_close_toc = true;
|
||||
conceal_math = 1;
|
||||
auto_close_toc = 1;
|
||||
};
|
||||
};
|
||||
|
||||
lualine = {
|
||||
enable = true;
|
||||
theme = "onedark";
|
||||
settings.options.theme = "onedark";
|
||||
};
|
||||
|
||||
rustaceanvim = {
|
||||
|
|
@ -193,7 +192,7 @@ in
|
|||
server = {
|
||||
standalone = false;
|
||||
cmd = [ "rustup" "run" "nightly" "rust-analyzer" ];
|
||||
settings = {
|
||||
default_settings = {
|
||||
rust-analyzer = {
|
||||
inlayHints = { lifetimeElisionHints = { enable = "always"; }; };
|
||||
check = { command = "clippy"; };
|
||||
|
|
@ -232,10 +231,11 @@ in
|
|||
};
|
||||
|
||||
rustc.source = "discover";
|
||||
};
|
||||
diagnostics = {
|
||||
enable = true;
|
||||
styleLints.enable = true;
|
||||
|
||||
options.diagnostics = {
|
||||
enable = true;
|
||||
styleLints.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -291,7 +291,7 @@ in
|
|||
|
||||
filetypes = [ "sh" "bash" ];
|
||||
};
|
||||
tsserver = {
|
||||
ts-ls = {
|
||||
enable = true;
|
||||
filetypes =
|
||||
[ "javascript" "javascriptreact" "typescript" "typescriptreact" ];
|
||||
|
|
@ -337,7 +337,7 @@ in
|
|||
};
|
||||
bufferline = {
|
||||
enable = true;
|
||||
diagnostics = "nvim_lsp";
|
||||
settings.options.diagnostics = "nvim_lsp";
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -353,6 +353,8 @@ in
|
|||
};
|
||||
};
|
||||
nix.enable = true;
|
||||
|
||||
web-devicons.enable = true;
|
||||
};
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
onedark-nvim
|
||||
|
|
@ -369,6 +371,7 @@ in
|
|||
vim-astro
|
||||
nvim-web-devicons
|
||||
vim-visual-multi
|
||||
vim-gh-line
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
|
|
|
|||
|
|
@ -1,98 +1,121 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
mouse = true;
|
||||
clock24 = true;
|
||||
programs.tmux =
|
||||
{
|
||||
enable = true;
|
||||
mouse = true;
|
||||
clock24 = true;
|
||||
|
||||
shortcut = "k";
|
||||
shortcut = "k";
|
||||
|
||||
extraConfig = ''
|
||||
# unbind every single normal keybinding
|
||||
unbind-key -a
|
||||
|
||||
set -g set-titles on
|
||||
set -s escape-time 0
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
plugin = tmuxPlugins.mkTmuxPlugin {
|
||||
pluginName = "suspend";
|
||||
version = "1a2f806";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "MunifTanjim";
|
||||
repo = "tmux-suspend";
|
||||
rev = "1a2f806666e0bfed37535372279fa00d27d50d14";
|
||||
sha256 = "0j7vjrwc7gniwkv1076q3wc8ccwj42zph5wdmsm9ibz6029wlmzv";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
set -g @suspend_key 'F11'
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = tmuxPlugins.mode-indicator;
|
||||
}
|
||||
];
|
||||
|
||||
set-option -g default-shell /bin/zsh
|
||||
extraConfig = ''
|
||||
# unbind every single normal keybinding
|
||||
unbind-key -a
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
set -g set-titles on
|
||||
set -s escape-time 0
|
||||
|
||||
# clipboard stuff
|
||||
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
|
||||
bind v copy-mode
|
||||
bind p paste-buffer -p
|
||||
set -s set-clipboard on
|
||||
set-option -g default-shell /bin/zsh
|
||||
|
||||
# get back normal terminal emulator bindings
|
||||
bind-key -n S-PPage copy-mode -u
|
||||
bind-key -T copy-mode -n S-NPage send-keys -X page-down
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# don't scroll to end when copying with mouse
|
||||
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe
|
||||
bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||
bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||
bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||
# clipboard stuff
|
||||
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
|
||||
bind v copy-mode
|
||||
bind p paste-buffer -p
|
||||
set -s set-clipboard on
|
||||
|
||||
# window control
|
||||
bind t new-window -c "#{pane_current_path}"
|
||||
bind-key Tab next-window
|
||||
bind-key BTab previous-window
|
||||
set -g automatic-rename-format "#{?#{==:#{pane_current_path},$HOME},~,#{b:pane_current_path}} (#{pane_current_command})"
|
||||
set -g renumber-windows on
|
||||
bind-key Q confirm-before -p "kill-window #W? (y/n)" kill-window
|
||||
bind A last-window
|
||||
# get back normal terminal emulator bindings
|
||||
bind-key -n S-PPage copy-mode -u
|
||||
bind-key -T copy-mode -n S-NPage send-keys -X page-down
|
||||
|
||||
bind-key 1 select-window -t :0
|
||||
bind-key 2 select-window -t :1
|
||||
bind-key 3 select-window -t :2
|
||||
bind-key 4 select-window -t :3
|
||||
bind-key 5 select-window -t :4
|
||||
bind-key 6 select-window -t :5
|
||||
bind-key 7 select-window -t :6
|
||||
bind-key 8 select-window -t :7
|
||||
bind-key 9 select-window -t :8
|
||||
bind-key 0 select-window -t :9
|
||||
# don't scroll to end when copying with mouse
|
||||
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe
|
||||
bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||
bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||
bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
|
||||
|
||||
# pane control
|
||||
bind h select-pane -L
|
||||
bind j select-pane -S
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
bind L split-window -h -c "#{pane_current_path}"
|
||||
bind J split-window -v -c "#{pane_current_path}"
|
||||
bind H split-window -h -b -c "#{pane_current_path}"
|
||||
bind K split-window -v -b -c "#{pane_current_path}"
|
||||
bind x swap-pane -D
|
||||
bind -r a select-pane -l
|
||||
bind-key q confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||
# window control
|
||||
bind t new-window -c "#{pane_current_path}"
|
||||
bind-key Tab next-window
|
||||
bind-key BTab previous-window
|
||||
set -g automatic-rename-format "#{?#{==:#{pane_current_path},$HOME},~,#{b:pane_current_path}} (#{pane_current_command})"
|
||||
set -g renumber-windows on
|
||||
bind-key Q confirm-before -p "kill-window #W? (y/n)" kill-window
|
||||
bind A last-window
|
||||
|
||||
bind-key o choose-tree -wZ
|
||||
bind-key O choose-tree -sZ
|
||||
bind-key 1 select-window -t :0
|
||||
bind-key 2 select-window -t :1
|
||||
bind-key 3 select-window -t :2
|
||||
bind-key 4 select-window -t :3
|
||||
bind-key 5 select-window -t :4
|
||||
bind-key 6 select-window -t :5
|
||||
bind-key 7 select-window -t :6
|
||||
bind-key 8 select-window -t :7
|
||||
bind-key 9 select-window -t :8
|
||||
bind-key 0 select-window -t :9
|
||||
|
||||
# get back command mode and some other basics...
|
||||
bind : command-prompt
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display "config reloaded"
|
||||
bind-key ? list-keys
|
||||
# pane control
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
bind L split-window -h -c "#{pane_current_path}"
|
||||
bind J split-window -v -c "#{pane_current_path}"
|
||||
bind H split-window -h -b -c "#{pane_current_path}"
|
||||
bind K split-window -v -b -c "#{pane_current_path}"
|
||||
bind x swap-pane -D
|
||||
bind -r a select-pane -l
|
||||
bind-key q confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||
|
||||
# Scroll oin man etc
|
||||
tmux_commands_with_legacy_scroll="nano less more man git"
|
||||
bind-key o choose-tree -wZ
|
||||
bind-key O choose-tree -sZ
|
||||
|
||||
bind-key -T root WheelUpPane \
|
||||
if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
|
||||
'send -Mt=' \
|
||||
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
||||
"send -t= Up" "copy-mode -et="'
|
||||
# get back command mode and some other basics...
|
||||
bind : command-prompt
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display "config reloaded"
|
||||
bind-key ? list-keys
|
||||
|
||||
bind-key -T root WheelDownPane \
|
||||
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
|
||||
'send -Mt=' \
|
||||
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
||||
"send -t= Down" "send -Mt="'
|
||||
# Scroll oin man etc
|
||||
tmux_commands_with_legacy_scroll="nano less more man git"
|
||||
|
||||
# bind -n DoubleClick1Pane run-shell "${pkgs.xdragon}/bin/dragon -x '#{pane_current_path}/#{mouse_word}'"
|
||||
'';
|
||||
};
|
||||
bind-key -T root WheelUpPane \
|
||||
if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
|
||||
'send -Mt=' \
|
||||
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
||||
"send -t= Up" "copy-mode -et="'
|
||||
|
||||
bind-key -T root WheelDownPane \
|
||||
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
|
||||
'send -Mt=' \
|
||||
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
||||
"send -t= Down" "send -Mt="'
|
||||
|
||||
# bind -n DoubleClick1Pane run-shell "${pkgs.xdragon}/bin/dragon -x '#{pane_current_path}/#{mouse_word}'"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue