X-Git-Url: https://gitweb.ps.run/flake_thinkpad/blobdiff_plain/6d5e77492bd3b0032686f2351498726da5d98cd8..68233ba77600f68edd09a6b0a08c4820231decd5:/home.nix diff --git a/home.nix b/home.nix index fcf744d..5260225 100644 --- a/home.nix +++ b/home.nix @@ -107,9 +107,7 @@ in bars = []; modifier = "Mod4"; terminal = "${pkgs.kitty}/bin/kitty"; - gaps = { - inner = 5; - }; + gaps = { inner = 0; outer = 0; }; keybindings = let mod = config.xsession.windowManager.i3.config.modifier; @@ -221,6 +219,7 @@ in "${mod}+y" = "exec --no-startup-id mirror-phone"; "${mod}+n" = "exec ${pkgs.kitty}/bin/kitty -d ~/sync/txt $EDITOR ."; "${mod}+m" = "exec --no-startup-id i3-msg $(${i3-max})"; + "${mod}+b" = "split toggle; layout tabbed"; "${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"; }; @@ -386,17 +385,21 @@ in tnoremap map nnoremap :noh + nnoremap gr :Telescope lsp_references + nnoremap gd :Telescope lsp_definitions 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" + nnoremap r :lua vim.lsp.buf.rename() + nnoremap n :bnext + nnoremap m :bprevious + noremap y "+y + noremap p "+p + noremap "+ + noremap "+ " augroup FormatAutogroup " autocmd! @@ -407,11 +410,22 @@ in \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit' \ | exe "normal! g`\"" \ | endif + + " Use persistent history. + if !isdirectory("/tmp/.vim-undo-dir") + call mkdir("/tmp/.vim-undo-dir", "", 0700) + endif + set undodir=/tmp/.vim-undo-dir + set undofile ''; extraLuaConfig = '' - require('lspconfig').zls.setup{} - require('lspconfig').clangd.setup{} + vim.lsp.enable('zls') + vim.lsp.enable('clangd') + vim.lsp.config('zuban', {}) + vim.lsp.enable('zuban') + require('guess-indent').setup {} local util = require('formatter.util') + local telescope = require('telescope') require('formatter').setup { logging = true, log_level = vim.log.levels.WARN, @@ -439,7 +453,12 @@ in }, completion = { list = { selection = { preselect = false, } }, + documentation = { + auto_show = true, + -- treesitter_highlighting = false, + }, }, + signature = { enabled = true }, } ''; }; @@ -734,6 +753,7 @@ in clang-tools bear linuxPackages_latest.perf texliveFull + asciidoctor-with-extensions emscripten caddy python3 @@ -758,7 +778,7 @@ in wireshark nil bc - ffmpeg + ffmpeg-full sc-im visidata localsend vis @@ -806,9 +826,8 @@ in (pkgs.writeShellScriptBin "fzfdir" '' find "$1" -name "$2" | ${pkgs.fzf}/bin/fzf --layout=reverse '') - (pkgs.writeShellScriptBin "md-app" '' - #popup bash -c 'file=$(fzfdir "md" "*.md") && run md $file' - firefox -p appmode --new-window localhost:8123/home/ps/sync/txt/hsrm + (pkgs.writeShellScriptBin "file-app" '' + app localhost:8123 '') (pkgs.writeShellScriptBin "run-popup" '' popup bash -c 'file=$(compgen -c | grep -v fzf | sort -u | fzf --layout=reverse --print-query | tail -n 1) && run $file'