From 4260b23f59752ca9e88161f649285da3cce82982 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:24:36 +0100 Subject: style(lua): apply stylua formatting --- dot_config/nvim/lua/plugins/git.lua | 12 +---- dot_config/nvim/lua/plugins/init.lua | 28 +++++++++-- dot_config/nvim/lua/plugins/lsp.lua | 21 ++------- dot_config/nvim/lua/plugins/treesitter.lua | 74 ++++++++++++++++++++++++++---- 4 files changed, 96 insertions(+), 39 deletions(-) (limited to 'dot_config/nvim/lua/plugins') diff --git a/dot_config/nvim/lua/plugins/git.lua b/dot_config/nvim/lua/plugins/git.lua index b052c33..8f4e571 100644 --- a/dot_config/nvim/lua/plugins/git.lua +++ b/dot_config/nvim/lua/plugins/git.lua @@ -101,17 +101,9 @@ require("gitsigns").setup({ nmap("hC", function() gs.change_base("~") end, "git [C]hange base to HEAD") - nmap( - "tgd", - gs.preview_hunk_inline, - "[T]oggle [G]it show [D]eleted" - ) + nmap("tgd", gs.preview_hunk_inline, "[T]oggle [G]it show [D]eleted") nmap("tgw", gs.toggle_word_diff, "[T]oggle [G]it [W]ord diff") - nmap( - "tgl", - gs.toggle_linehl, - "[T]oggle [G]it [L]ine highlighting" - ) + nmap("tgl", gs.toggle_linehl, "[T]oggle [G]it [L]ine highlighting") -- Text object map( { "o", "x" }, diff --git a/dot_config/nvim/lua/plugins/init.lua b/dot_config/nvim/lua/plugins/init.lua index b106b6e..24eb70d 100644 --- a/dot_config/nvim/lua/plugins/init.lua +++ b/dot_config/nvim/lua/plugins/init.lua @@ -1,9 +1,29 @@ -- Seamless navigation between neovim splits and zellij panes require("smart-splits").setup({}) -vim.keymap.set("n", "", require("smart-splits").move_cursor_left, { desc = "Move to left split/pane" }) -vim.keymap.set("n", "", require("smart-splits").move_cursor_down, { desc = "Move to below split/pane" }) -vim.keymap.set("n", "", require("smart-splits").move_cursor_up, { desc = "Move to above split/pane" }) -vim.keymap.set("n", "", require("smart-splits").move_cursor_right, { desc = "Move to right split/pane" }) +vim.keymap.set( + "n", + "", + require("smart-splits").move_cursor_left, + { desc = "Move to left split/pane" } +) +vim.keymap.set( + "n", + "", + require("smart-splits").move_cursor_down, + { desc = "Move to below split/pane" } +) +vim.keymap.set( + "n", + "", + require("smart-splits").move_cursor_up, + { desc = "Move to above split/pane" } +) +vim.keymap.set( + "n", + "", + require("smart-splits").move_cursor_right, + { desc = "Move to right split/pane" } +) require("which-key").setup({ spec = { diff --git a/dot_config/nvim/lua/plugins/lsp.lua b/dot_config/nvim/lua/plugins/lsp.lua index ddd5bea..e9b7e84 100644 --- a/dot_config/nvim/lua/plugins/lsp.lua +++ b/dot_config/nvim/lua/plugins/lsp.lua @@ -120,16 +120,8 @@ vim.api.nvim_create_autocmd("LspAttach", { nmap("ci", fzf.lsp_incoming_calls, "[C]ode [I]ncoming calls") nmap("co", fzf.lsp_outgoing_calls, "[C]ode [O]utgoing calls") nmap("gO", fzf.lsp_document_symbols, "d[O]ocument symbols") - nmap( - "ws", - fzf.lsp_live_workspace_symbols, - "[W]orkspace [S]ymbols" - ) - nmap( - "wd", - fzf.diagnostics_workspace, - "[W]orkspace [D]iagnostics" - ) + nmap("ws", fzf.lsp_live_workspace_symbols, "[W]orkspace [S]ymbols") + nmap("wd", fzf.diagnostics_workspace, "[W]orkspace [D]iagnostics") local client = vim.lsp.get_client_by_id(event.data.client_id) if @@ -154,10 +146,7 @@ vim.api.nvim_create_autocmd("LspAttach", { }) vim.api.nvim_create_autocmd("LspDetach", { - group = vim.api.nvim_create_augroup( - "lsp-detach", - { clear = true } - ), + group = vim.api.nvim_create_augroup("lsp-detach", { clear = true }), callback = function(event2) vim.lsp.buf.clear_references() vim.api.nvim_clear_autocmds({ @@ -186,9 +175,7 @@ vim.api.nvim_create_autocmd("LspAttach", { ) then nmap("th", function() - vim.lsp.inlay_hint.enable( - not vim.lsp.inlay_hint.is_enabled(event.buf) - ) + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled(event.buf)) end, "[T]oggle Inlay [H]ints") end end, diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua index a4a488c..69902c6 100644 --- a/dot_config/nvim/lua/plugins/treesitter.lua +++ b/dot_config/nvim/lua/plugins/treesitter.lua @@ -1,13 +1,71 @@ require("treewalker").setup({}) -vim.keymap.set({ "n", "v" }, "", "Treewalker Up", { silent = true, desc = "Moves up to the previous neighbor node" }) -vim.keymap.set({ "n", "v" }, "", "Treewalker Down", { silent = true, desc = "Moves up to the next neighbor node" }) -vim.keymap.set({ "n", "v" }, "", "Treewalker Left", { silent = true, desc = "Moves to the first ancestor node that's on a different line from the current node" }) -vim.keymap.set({ "n", "v" }, "", "Treewalker Right", { silent = true, desc = "Moves to the next node down that's indented further than the current node" }) -vim.keymap.set("n", "", "Treewalker SwapUp", { silent = true, desc = "Swaps the highest node on the line upwards in the document" }) -vim.keymap.set("n", "", "Treewalker SwapDown", { silent = true, desc = "Swaps the biggest node on the line downward in the document" }) -vim.keymap.set("n", "", "Treewalker SwapLeft", { silent = true, desc = "Swap the node under the cursor with its previous neighbor" }) -vim.keymap.set("n", "", "Treewalker SwapRight", { silent = true, desc = "Swap the node under the cursor with its next neighbor" }) +vim.keymap.set( + { "n", "v" }, + "", + "Treewalker Up", + { silent = true, desc = "Moves up to the previous neighbor node" } +) +vim.keymap.set( + { "n", "v" }, + "", + "Treewalker Down", + { silent = true, desc = "Moves up to the next neighbor node" } +) +vim.keymap.set( + { "n", "v" }, + "", + "Treewalker Left", + { + silent = true, + desc = "Moves to the first ancestor node that's on a different line from the current node", + } +) +vim.keymap.set( + { "n", "v" }, + "", + "Treewalker Right", + { + silent = true, + desc = "Moves to the next node down that's indented further than the current node", + } +) +vim.keymap.set( + "n", + "", + "Treewalker SwapUp", + { + silent = true, + desc = "Swaps the highest node on the line upwards in the document", + } +) +vim.keymap.set( + "n", + "", + "Treewalker SwapDown", + { + silent = true, + desc = "Swaps the biggest node on the line downward in the document", + } +) +vim.keymap.set( + "n", + "", + "Treewalker SwapLeft", + { + silent = true, + desc = "Swap the node under the cursor with its previous neighbor", + } +) +vim.keymap.set( + "n", + "", + "Treewalker SwapRight", + { + silent = true, + desc = "Swap the node under the cursor with its next neighbor", + } +) require("nvim-treesitter").install({ "awk", -- cgit v1.2.3-70-g09d2