From 22e76b6b9ba3f1a68cf1954f7f82e5d3dc72e7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Doma=C5=84ski?= Date: Thu, 25 Jul 2024 20:09:29 +0200 Subject: [PATCH] bump; --- .config/aliasrc/programs | 6 ++--- .config/nvim/lazy-lock.json | 1 + .config/nvim/lua/config/autocmds.lua | 13 +++++++++ .config/nvim/lua/plugins/git.lua | 40 ++++++++++++++-------------- 4 files changed, 37 insertions(+), 23 deletions(-) diff --git a/.config/aliasrc/programs b/.config/aliasrc/programs index d317900..bc70762 100755 --- a/.config/aliasrc/programs +++ b/.config/aliasrc/programs @@ -11,9 +11,9 @@ alias e='exit' alias grep='grep --color=auto' # ls -if type exa &>/dev/null; then - alias ls='exa --icons -g' - lst() { exa --no-icons --sort=time | head --lines=1; } +if type eza &>/dev/null; then + alias ls='eza --icons -g' + lst() { eza --no-icons --sort=time | head --lines=1; } fi alias ll='ls -lh' diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 6752cbc..da2d821 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -7,6 +7,7 @@ "dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" }, "flutter-tools.nvim": { "branch": "main", "commit": "990a1349c29f7d474a0cd51355aba773ccc9deea" }, "gitsigns.nvim": { "branch": "main", "commit": "4a143f13e122ab91abdc88f89eefbe70a4858a56" }, + "hardtime.nvim": { "branch": "main", "commit": "9a4e24fb40482dc85a93bf6cf344a030b9bf9a39" }, "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, "lazy.nvim": { "branch": "main", "commit": "eb4957442e3182f051b0ae11da32e06d22c190e3" }, diff --git a/.config/nvim/lua/config/autocmds.lua b/.config/nvim/lua/config/autocmds.lua index 0aca2db..5192fec 100644 --- a/.config/nvim/lua/config/autocmds.lua +++ b/.config/nvim/lua/config/autocmds.lua @@ -1,2 +1,15 @@ vim.o.updatetime = 250 + vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] + +vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("lsp", { clear = true }), + callback = function(args) + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = args.buf, + callback = function() + vim.lsp.buf.format { async = false, id = args.data.client_id } + end, + }) + end +}) diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua index e44b43e..2e37f11 100644 --- a/.config/nvim/lua/plugins/git.lua +++ b/.config/nvim/lua/plugins/git.lua @@ -1,22 +1,22 @@ return { - { - "lewis6991/gitsigns.nvim", - event = { "BufReadPre", "BufNewFile" }, - opts = { - signs = { - add = { text = "▎" }, - change = { text = "▎" }, - delete = { text = "" }, - topdelete = { text = "" }, - changedelete = { text = "▎" }, - untracked = { text = "▎" }, - }, - on_attach = function(buffer) - local gs = package.loaded.gitsigns + { + "lewis6991/gitsigns.nvim", + event = { "BufReadPre", "BufNewFile" }, + opts = { + signs = { + add = { text = "▎" }, + change = { text = "▎" }, + delete = { text = "" }, + topdelete = { text = "" }, + changedelete = { text = "▎" }, + untracked = { text = "▎" }, + }, + on_attach = function(buffer) + local gs = package.loaded.gitsigns - local function map(mode, l, r, desc) - vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc }) - end + local function map(mode, l, r, desc) + vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc }) + end -- stylua: ignore start map("n", "]h", gs.next_hunk, "Next Hunk") @@ -31,7 +31,7 @@ return { map("n", "ghd", gs.diffthis, "Diff This") map("n", "ghD", function() gs.diffthis("~") end, "Diff This ~") map({ "o", "x" }, "ih", ":Gitsigns select_hunk", "GitSigns Select Hunk") - end, - }, - }, + end, + }, + }, }