X-Git-Url: https://gitweb.ps.run/flake_thinkpad/blobdiff_plain/7dba1e01896b0e3bb2c7470706a560beaa72f28e..6d5e77492bd3b0032686f2351498726da5d98cd8:/home.nix?ds=inline diff --git a/home.nix b/home.nix index 14dd4c3..fcf744d 100644 --- a/home.nix +++ b/home.nix @@ -73,7 +73,6 @@ in enable = true; mapExpression = { Caps_Lock = "Escape"; - Super_L = "Alt_L|F1"; }; }; @@ -208,7 +207,7 @@ in in lib.mkOptionDefault { # "${mod}+d" = "exec --no-startup-id krunner"; - "${mod}+Shift+p" = "exec --no-startup-id set-wallpaper"; + # "${mod}+Shift+p" = "exec --no-startup-id set-wallpaper"; "${mod}+Shift+Return" = "exec --no-startup-id ${pkgs.kitty}/bin/kitty -d $(${pkgs.xcwd}/bin/xcwd)"; "${mod}+BackSpace" = "kill"; "${mod}+Prior" = "workspace prev_on_output"; @@ -220,12 +219,14 @@ in "${mod}+Ctrl+Left" = "move workspace to output left"; "${mod}+Ctrl+Right" = "move workspace to output right"; "${mod}+y" = "exec --no-startup-id mirror-phone"; - "${mod}+n" = "exec ${pkgs.kitty}/bin/kitty ${pkgs.helix}/bin/hx -w ~/sync/txt ~/sync/txt"; + "${mod}+n" = "exec ${pkgs.kitty}/bin/kitty -d ~/sync/txt $EDITOR ."; "${mod}+m" = "exec --no-startup-id i3-msg $(${i3-max})"; "${mod}+Shift+m" = "exec --no-startup-id i3-msg $(${i3-move-max})"; + "${mod}+Shift+p" = "exec --no-startup-id ${pkgs.autorandr}/bin/autorandr --match-edid -c -f"; }; }; extraConfig = '' + exec ${pkgs.xfce.xfce4-panel}/bin/xfce4-panel for_window [window_role="pop-up"] floating enable for_window [window_role="task_dialog"] floating enable # for_window [workspace="0"] floating enable @@ -277,9 +278,11 @@ in snrs = "sudo nixos-rebuild switch --flake /etc/nixos#default"; snrt = "sudo nixos-rebuild test --flake /etc/nixos#default"; snrb = "sudo nixos-rebuild boot --flake /etc/nixos#default"; - senc = "sudo ${pkgs.helix}/bin/hx /etc/nixos/configuration.nix"; - senh = "sudo ${pkgs.helix}/bin/hx /etc/nixos/home.nix"; + senc = "sudo $EDITOR /etc/nixos/configuration.nix"; + senh = "sudo $EDITOR /etc/nixos/home.nix"; + senf = "sudo $EDITOR /etc/nixos/flake.nix"; flakerun = "nix run --override-input nixpkgs nixpkgs"; + n = "nvim"; }; }; @@ -356,14 +359,22 @@ in nvim-lspconfig blink-cmp telescope-nvim - trouble-nvim + undotree + which-key-nvim + guess-indent-nvim ]; extraConfig = '' set number set relativenumber set tabstop=4 set shiftwidth=4 + set expandtab set foldmethod=marker + set autoindent + set smartindent + filetype plugin indent on + set signcolumn=yes + colorscheme habamax nnoremap gj @@ -373,11 +384,62 @@ in inoremap gj inoremap gk tnoremap + map + nnoremap :noh + nnoremap u :UndotreeToggle :UndotreeFocus + nnoremap f :Telescope find_files + nnoremap b :Telescope buffers + nnoremap e :Telescope diagnostics + nnoremap g :Telescope live_grep + nnoremap s :Telescope lsp_document_symbols + nnoremap r :Telescope lsp_references + nnoremap :Telescope lsp_references + nnoremap d :Telescope lsp_definitions + noremap y "+y" + noremap p "+p" + + " augroup FormatAutogroup + " autocmd! + " autocmd BufWritePost * FormatWrite + " augroup END + + autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit' + \ | exe "normal! g`\"" + \ | endif ''; extraLuaConfig = '' require('lspconfig').zls.setup{} + require('lspconfig').clangd.setup{} + local util = require('formatter.util') require('formatter').setup { - + logging = true, + log_level = vim.log.levels.WARN, + filetype = { + c = { require("formatter.filetypes.c").clangformat }, + cpp = { require("formatter.filetypes.cpp").clangformat }, + zig = { require("formatter.filetypes.zig").zigfmt }, + } + } + require('blink.cmp').setup { + keymap = { + preset = 'none', + + [''] = { 'show', 'show_documentation', 'hide_documentation' }, + [''] = { 'hide', 'fallback' }, + [''] = { 'accept', 'fallback' }, + + [''] = { 'select_next', 'fallback_to_mappings' }, + [''] = { 'select_prev', 'fallback_to_mappings' }, + + [''] = { 'scroll_documentation_up', 'fallback' }, + [''] = { 'show_signature', 'hide_signature', 'fallback' }, + }, + completion = { + list = { selection = { preselect = false, } }, + }, } ''; }; @@ -683,6 +745,7 @@ in xarchiver tig lazygit gitui thunderbird + aerc libreoffice gimp guvcview