X-Git-Url: https://gitweb.ps.run/flake_thinkpad/blobdiff_plain/6d5e77492bd3b0032686f2351498726da5d98cd8..7d4be89983f22a94e36bf18bb21453b36aeee3ae:/home.nix?ds=inline diff --git a/home.nix b/home.nix index fcf744d..e3394c6 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; @@ -386,17 +384,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 +409,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 +452,12 @@ in }, completion = { list = { selection = { preselect = false, } }, + documentation = { + auto_show = true, + -- treesitter_highlighting = false, + }, }, + signature = { enabled = true }, } ''; }; @@ -734,6 +752,7 @@ in clang-tools bear linuxPackages_latest.perf texliveFull + asciidoctor-with-extensions emscripten caddy python3 @@ -758,7 +777,7 @@ in wireshark nil bc - ffmpeg + ffmpeg-full sc-im visidata localsend vis @@ -806,9 +825,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'